/*Color Variables*/
:root {
    --dark-blue: #2a4a7f;
    --baby-blue-ice: #96b7f4;
    --baby-blue-ice-2: #9ABAF3;
    --baby-blue-ice-3: #9EBDF2;
    --baby-blue-ice-4: #A8C3F0;
    --powder-blue: #B1C9EE;
    --powder-blue-2: #B9CFED;
    --pale-sky: #B9CFED;
    --pale-sky-2: #c8d9e9;
    --pale-sky-3: #cfdee7;
    --alice-blue: #d3e1e9;

}

/*Keyframes*/
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.2) translateX(500px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateX(0);
    }
}

@keyframes wobble {

    0%,
    100% {
        transform: rotate(0deg);
    }

    25% {
        transform: rotate(-5deg);
    }

    75% {
        transform: rotate(5deg);
    }
}

@media print {
    body * {
        visibility: hidden;
    }

    #certificate-inner,
    #certificate-inner * {
        visibility: visible;
    }

    #certificate-inner {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }
}

/*Main CSS*/
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: linear-gradient(180deg, var(--baby-blue-ice), var(--alice-blue));
    min-height: 100vh;
    font-family: sans-serif;
    color: var(--dark-blue);
}

/*Intro CSS*/
#intro-overlay {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

#intro-text {
    font-size: 8rem;
    text-align: center;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

/*Button CSS*/
#menu-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    padding-top: 30rem;
}

#menu-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

#menu-center h1 {
    font-size: 6rem;
}

#menu-options {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.menu-btn {
    background-color: var(--baby-blue-ice);
    color: var(--dark-blue);
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 25px;
    font-size: 1.2rem;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s;
}

.menu-btn:hover {
    background-color: var(--dark-blue);
    color: var(--alice-blue);
}

/*Game CSS*/
#top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background-color: var(--dark-blue);
    color: white;
    font-size: 1.2rem;
}

#game-container {
    display: grid;
    grid-template-columns: 160px 2fr 160px;
    gap: 1rem;
    padding: 1rem;
    height: calc(100vh - 130px);
}

/*Left Panel*/
#left-panel {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    align-items: center;
    padding-top: 1rem;
    justify-content: center;
}

/*Right Panel*/
#right-panel {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    align-items: center;
    padding-top: 1rem;
    justify-content: center;
}

#book {
    display: flex;
    width: 100px;
    height: 140px;
    cursor: pointer;
    filter: drop-shadow(3px 3px 6px rgba(0, 0, 0, 0.3));
    transition: transform 0.2s;
}

#book:hover {
    transform: scale(1.05);
}

#book-spine {
    width: 20px;
    height: 100%;
    background-color: #8B5E3C;
    border-radius: 3px 0 0 3px;
}

#book-cover {
    flex: 1;
    background-color: #f0c040;
    border-radius: 0 5px 5px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    font-size: 0.9rem;
    color: #8B5E3C;
    text-align: center;
    padding: 0.5rem;
}

#profile-btn,
#toolkit-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 150px;
    padding: 0.9rem 1rem;
    border: none;
    border-radius: 20px;
    background-color: var(--dark-blue);
    color: var(--powder-blue);
    font-size: 1.1rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

#profile-btn:hover,
#toolkit-btn:hover {
    background-color: var(--dark-blue);
    color: white;
}

/*Profile Modal*/
#profile-modal,
#toolkit-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

#profile-card {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    width: 400px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
}

#profile-card button {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--dark-blue);
}

#profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: var(--baby-blue-ice)
}

#profile-username {
    font-size: 1.3rem;
}

#profile-handle {
    color: gray;
    font-size: 0.9rem;
}

#profile-bio {
    text-align: center;
    font-size: 0.95rem;
}

#profile-stats {
    display: flex;
    gap: 1.5rem;
    font-size: 0.9rem;
}


/*Post Panel*/
#post-panel {
    display: flex;
    justify-content: center;
    align-items: center;
}

#post-card {
    background: white;
    border-radius: 15px;
    padding: 3rem;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    font-size: 1.2rem;
}

#post-header {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

#author-name {
    font-weight: bold;
    font-size: 1.1rem;
}

#author-handle {
    color: gray;
    font-size: 0.9rem;
}

#post-text {
    font-size: 1.2rem;
    line-height: 1.8;
}

/*Toolkit Modal*/
#toolkit-card {
    background: #FDF6E3;
    border-radius: 20px;
    padding: 2rem;
    width: 700px;
    max-height: 80vh;
    position: relative;
    display: flex;
    flex-direction: row;
    gap: 0;
    overflow: hidden;
}

#toolkit-card>button {
    width: fit-content;
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #8B5E3C;

}

#toolkit-terms {
    width: 220px;
    overflow-y: auto;
    border-right: 2px solid #d4a843;
    padding-right: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toolkit-term {
    background-color: #F5E6C0;
    border-radius: 8px;
    padding: 0.6rem 1rem;
    cursor: pointer;
    transition: background-color 0.2s;
    color: #8B5E3C;
}

.toolkit-term:hover {
    background-color: #8B5E3C;
    color: #F0C040;
}

.toolkit-term strong {
    display: block;
    font-size: 0.95rem;
}

.toolkit-term p {
    display: none;
}

#toolkit-definition {
    flex: 1;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#def-title {
    font-size: 1.4rem;
    color: #8B5E3C;
    border-bottom: 2px solid #D4A843;
    padding-bottom: 0.5rem;
}

#def-text {
    font-size: 1rem;
    line-height: 1.6;
    color: #5a3e28;
}

/*Toast*/
#toast {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.8rem 2rem;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: bold;
    opacity: 0;
    transition: opacity 0.4s;
    z-index: 200;
    pointer-events: none;
}

#toast.show {
    opacity: 1;
}

#toast.correct {
    background-color: #4caf50;
    color: white;
}

#toast.wrong {
    background-color: #e05555;
    color: white;
}

#toast.streak {
    background-color: #e07b20;
    color: white;
}

/*Answer Bar*/
#answer-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    padding: 1.5rem;
    background-color: var(--dark-blue);
}

#btn-not-propaganda,
#btn-propaganda {
    padding: 1.2rem 3rem;
    border: none;
    border-radius: 25px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

#btn-not-propaganda {
    background-color: var(--baby-blue-ice);
    color: var(--dark-blue);
}

#btn-propaganda {
    background-color: #e05555;
    color: white;
}

#btn-not-propaganda:hover {
    background-color: white;
}

#btn-propaganda:hover {
    background-color: #c03030;
}

/*Animation*/
.slide-in {
    animation: slideIn 0.4s ease-out;
}

#toolkit-card {
    transform-origin: right center;
}

#book.wobble {
    animation: wobble 0.5s ease-in-out infinite;
}

/*Win Page*/
#confetti-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

#win-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    gap: 1.5rem;
    z-index: 1;
    position: relative;
    text-align: center;
}

#win-screen h1 {
    font-size: 4rem;
    color: var(--dark-blue);
}

#name-input-section {
    display: flex;
    gap: 1rem;
    align-items: center;
}

#player-name {
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    border: 2px solid var(--dark-blue);
    font-size: 1rem;
    outline: none;
    width: 300px;
}

#name-input-section button {
    padding: 0.8rem 2rem;
    border-radius: 25px;
    border: none;
    background-color: var(--dark-blue);
    color: white;
    font-size: 1rem;
    cursor: pointer;
}

/*Certificate*/
#certificate {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    gap: 1.5rem;
    position: relative;
    z-index: 1;
}

#certificate-inner {
    background: white;
    border: 8px double var(--dark-blue);
    border-radius: 20px;
    padding: 3rem 4rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    max-width: 650px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

#certificate-inner h1 {
    font-size: 2.5rem;
    color: var(--dark-blue);
}

#certificate-inner h2 {
    font-size: 1.8rem;
    color: var(--dark-blue);
    border-bottom: 2px solid var(--dark-blue);
    padding-bottom: 0.5rem;
}

#certificate-inner h3 {
    font-size: 1.3rem;
    color: var(--dark-blue);
}

#cert-footer {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: gray;
    border-top: 1px solid var(--powder-blue);
    padding-top: 0.8rem;
}

#cert-buttons {
    display: flex;
    gap: 1rem;
}

#cert-buttons button {
    padding: 0.8rem 2rem;
    border-radius: 25px;
    border: none;
    font-size: 1rem;
    cursor: pointer;
}

#cert-buttons button:first-child {
    background-color: var(--dark-blue);
    color: white;
}

#cert-buttons button:last-child {
    background-color: var(--baby-blue-ice);
    color: var(--dark-blue);
}

/*How to play*/
#how-to-play-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

#how-to-play-card {
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#how-to-play-card button {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--dark-blue);
}

#how-to-play-card h2 {
    font-size: 1.8rem;
    color: var(--dark-blue);
    text-align: center;
}

#how-to-play-card ol {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    padding-left: 1.5rem;
}

#how-to-play-card li {
    font-size: 1rem;
    line-height: 1.5;
    color: var(--dark-blue);
}