/* ============================================
   SANTANATOR GAME STYLES
   Christmas-themed Akinator clone - FULLSCREEN
   ============================================ */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body.page-santanator {
    background: url("assets/santanator/background.png") center center;
    background-size: cover;
    background-attachment: fixed;
    color: #1e3b00;
    font-family:
        "Comic Sans MS", "Comic Sans", "Trebuchet MS", Arial, sans-serif;
    margin: 0;
    padding: 0;
    overflow: hidden;
    min-height: 100vh;
    cursor:
        url("assets/tree.ani"),
        url("assets/tree.cur"),
        url("assets/tree.png") 16 16,
        auto;
}

/* Back to Site Button */
#back-to-site {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 10000;
    background: rgba(219, 4, 4, 0.9);
    border: 3px solid #8b0000;
    color: #ffffff;
    padding: 10px 18px;
    font-size: 20px;
    font-family:
        "Comic Sans MS", "Comic Sans", "Trebuchet MS", Arial, sans-serif;
    font-weight: bold;
    text-decoration: none;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
}

#back-to-site:hover {
    background: #ff0000;
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.4);
}

#back-to-site:active {
    transform: translateY(0);
}

/* Game Container */
#santanator-game {
    height: 100vh;
    width: 100vw;
    padding: 5px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    overflow: hidden;
    box-sizing: border-box;
    position: relative;
}

/* Logo */
.santanator-logo {
    text-align: center;
    margin: 5px 0 5px 0;
    flex-shrink: 0;
}

.santanator-logo img {
    max-width: 400px;
    max-height: 60px;
    width: auto;
    height: auto;
    filter: drop-shadow(3px 3px 8px rgba(0, 0, 0, 0.4));
}

/* Main Game Layout - Santa and Bubble stay in place */
.game-layout {
    display: grid;
    grid-template-columns: 1fr 420px;
    grid-template-rows: auto auto auto;
    gap: 20px;
    align-items: start;
    justify-content: center;
    padding: 0 20px;
    width: 100%;
    max-width: 1200px;
    margin: -10px auto 0;
    flex-shrink: 0;
}

/* Santa Character */
.santa-character {
    text-align: center;
    margin: 0 auto;
    flex-shrink: 0;
}

.santa-character img {
    max-width: 630px;
    max-height: 570px;
    width: auto;
    height: auto;
    filter: drop-shadow(4px 4px 8px rgba(0, 0, 0, 0.5));
    transition: transform 0.3s ease;
}

.santa-character img:hover {
    transform: scale(1.05);
}

/* Speech Bubble */
.speech-bubble {
    position: relative;
    max-width: 550px;
    width: 100%;
    margin: 0 auto;
    text-align: center;
    flex-shrink: 0;
}

.bubble-bg {
    width: 100%;
    height: auto;
    display: block;
}

.bubble-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 75%;
    padding: 3px;
    color: #1e3b00;
}

.bubble-text h2 {
    margin: 0 0 6px 0;
    font-size: 20px;
    color: #005412;
    text-shadow: 2px 2px 3px rgba(255, 255, 255, 0.6);
}

.bubble-text p {
    margin: 4px 0;
    font-size: 16px;
    line-height: 1.3;
    font-weight: bold;
}

/* Question Counter */
.question-counter {
    text-align: left;
    font-size: 18px;
    color: #db0404;
    font-weight: bold;
    margin: 0 0 -5px 0;
    text-shadow: 2px 2px 3px rgba(255, 255, 255, 0.8);
    flex-shrink: 0;
    grid-column: 1;
    grid-row: 1;
}

/* Answer Buttons */
.answer-buttons {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-width: 550px;
    margin: -35px auto 0;
    width: 100%;
    align-items: stretch;
    flex-shrink: 0;
    grid-column: 1;
    grid-row: 3;
}

.answer-btn {
    background: linear-gradient(180deg, #ffd700 0%, #ffb800 100%);
    border: 3px solid #8b4513;
    color: #3b2200;
    padding: 10px 18px;
    font-size: 18px;
    font-family:
        "Comic Sans MS", "Comic Sans", "Trebuchet MS", Arial, sans-serif;
    font-weight: bold;
    cursor: pointer;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.4);
    transition: all 0.2s ease;
    position: relative;
}

.answer-btn:hover {
    background: linear-gradient(180deg, #ffe44d 0%, #ffc400 100%);
    transform: translateY(-3px);
    box-shadow: 0 7px 10px rgba(0, 0, 0, 0.5);
}

.answer-btn:active {
    transform: translateY(0);
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.4);
}

/* Game Buttons */
.game-button {
    background: #db0404;
    border: 3px solid #8b0000;
    color: #ffffff;
    padding: 10px 20px;
    font-size: 17px;
    font-family:
        "Comic Sans MS", "Comic Sans", "Trebuchet MS", Arial, sans-serif;
    font-weight: bold;
    cursor: pointer;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.4);
    transition: all 0.2s ease;
    margin: 4px 6px;
}

.game-button:hover {
    background: #ff0000;
    transform: translateY(-3px);
    box-shadow: 0 7px 10px rgba(0, 0, 0, 0.5);
}

.game-button:active {
    transform: translateY(0);
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.4);
}

.game-button.primary {
    background: #db0404;
    border-color: #8b0000;
}

.game-button.secondary {
    background: #169f48;
    border-color: #005412;
}

.game-button.secondary:hover {
    background: #1fc05a;
}

/* Guess Buttons */
.guess-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin: 0 auto;
    width: 100%;
    max-width: 550px;
    grid-column: 1;
    grid-row: 3;
}

/* Play Again Buttons */
.play-again-buttons {
    display: flex;
    justify-content: center;
    margin: 0 auto;
    width: 100%;
    grid-column: 1;
    grid-row: 3;
}

/* Game Controls */
.game-controls {
    display: none !important;
}

/* Speech bubble positioning */
.game-layout .speech-bubble {
    max-width: 550px;
    flex-shrink: 0;
    grid-column: 1;
    grid-row: 2;
}

/* Santa positioning */
.game-layout .santa-character {
    flex-shrink: 0;
    grid-column: 2;
    grid-row: 2;
    align-self: center;
    margin-top: 40px;
}

.game-layout .santa-character img {
    max-width: 630px;
    max-height: 570px;
}

/* Snow Effect - Period (.) Snowflakes */
#snow {
    pointer-events: none;
    position: fixed;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    z-index: 9999;
}

.snowflake {
    position: absolute;
    top: -4vh;
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    will-change: transform, opacity;
    user-select: none;
    transform: translateX(0) rotate(0deg);
    font-weight: bold;
}

@keyframes fall {
    0% {
        transform: translateY(-8vh) translateX(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(110vh) translateX(var(--drift, 0px))
            rotate(var(--spin, 0deg));
        opacity: 0.6;
    }
}

/* Animation for Santa expression changes */
@keyframes santaBounce {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-15px);
    }
}

.santa-character img.animate {
    animation: santaBounce 0.6s ease;
}

/* Responsive Design */
@media screen and (max-width: 1024px) {
    .game-layout {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .game-layout .santa-character {
        grid-column: 1;
        grid-row: auto;
    }

    .game-layout .santa-character img {
        max-width: 500px;
        max-height: 500px;
    }

    .santa-character img {
        max-width: 450px;
        max-height: 450px;
    }

    .santanator-logo img {
        max-width: 350px;
        max-height: 70px;
    }

    .speech-bubble {
        max-width: 450px;
    }

    .question-bubble .bubble-text p {
        font-size: 18px;
    }

    .answer-btn {
        font-size: 18px;
        padding: 10px 16px;
    }
}

@media screen and (max-width: 768px) {
    #back-to-site {
        top: 8px;
        left: 8px;
        padding: 8px 12px;
        font-size: 14px;
    }

    #santanator-game {
        padding: 2px;
    }

    .santanator-logo {
        margin-bottom: 1px;
    }

    .santanator-logo img {
        max-width: 280px;
        max-height: 55px;
    }

    .game-layout {
        flex-direction: column;
        gap: 8px;
        padding: 0 10px;
    }

    .game-layout .santa-character img {
        max-width: 400px;
        max-height: 400px;
    }

    .santa-character img {
        max-width: 280px;
        max-height: 280px;
    }

    .speech-bubble {
        margin: 0 auto;
        max-width: 380px;
    }

    .bubble-text h2 {
        font-size: 18px;
        margin-bottom: 4px;
    }

    .bubble-text p {
        font-size: 14px;
        margin: 3px 0;
    }

    .question-bubble .bubble-text p {
        font-size: 16px;
    }

    .answer-btn {
        font-size: 16px;
        padding: 9px 12px;
    }

    .answer-buttons {
        gap: 4px;
    }

    .game-button {
        font-size: 16px;
        padding: 10px 18px;
        margin: 5px 4px;
    }

    .question-counter {
        font-size: 22px;
        margin-bottom: 1px;
    }

    .game-controls {
        margin-top: 1px;
    }

    .guess-character h3 {
        font-size: 18px;
    }

    .guess-character p {
        font-size: 14px;
    }
}

@media screen and (max-width: 480px) {
    #back-to-site {
        padding: 6px 10px;
        font-size: 12px;
        top: 5px;
        left: 5px;
    }

    #santanator-game {
        padding: 1px;
    }

    .santanator-logo {
        margin-bottom: 1px;
    }

    .santanator-logo img {
        max-width: 220px;
        max-height: 45px;
    }

    .game-layout {
        flex-direction: column;
        gap: 5px;
        padding: 0 5px;
    }

    .game-layout .santa-character img {
        max-width: 320px;
        max-height: 320px;
    }

    .santa-character img {
        max-width: 200px;
        max-height: 200px;
    }

    .speech-bubble {
        margin: 0 auto;
        max-width: 90%;
    }

    .bubble-text {
        width: 75%;
        padding: 3px;
    }

    .bubble-text h2 {
        font-size: 15px;
        margin-bottom: 3px;
    }

    .bubble-text p {
        font-size: 12px;
        margin: 2px 0;
        line-height: 1.2;
    }

    .question-bubble .bubble-text {
        padding: 8px 12px;
    }

    .question-bubble .bubble-text p {
        font-size: 14px;
    }

    .answer-buttons {
        gap: 3px;
    }

    .answer-btn {
        font-size: 14px;
        padding: 7px 10px;
    }

    .game-button {
        font-size: 14px;
        padding: 8px 14px;
        margin: 4px 3px;
    }

    .question-counter {
        font-size: 18px;
        margin-bottom: 1px;
    }

    .guess-character {
        margin: 6px 0;
        padding: 8px;
    }

    .guess-character h3 {
        font-size: 16px;
        margin: 4px 0;
    }

    .guess-character p {
        font-size: 12px;
    }

    #win-screen .bubble-text h2,
    #lose-screen .bubble-text h2 {
        font-size: 18px;
    }

    #win-screen .bubble-text p,
    #lose-screen .bubble-text p {
        font-size: 13px;
        margin: 4px 0;
    }

    #win-character-name {
        font-size: 15px;
    }

    .control-btn {
        padding: 8px 16px;
        font-size: 14px;
    }

    .game-controls {
        margin-top: 1px;
    }
}

@media screen and (max-height: 800px) {
    .santanator-logo img {
        max-height: 65px;
        max-width: 350px;
    }

    .santa-character img {
        max-width: 350px;
        max-height: 350px;
    }

    #start-screen .santa-character img {
        max-width: 400px;
        max-height: 400px;
    }

    .speech-bubble {
        max-width: 450px;
    }

    .bubble-text h2 {
        font-size: 20px;
    }

    .bubble-text p {
        font-size: 15px;
    }

    .question-bubble .bubble-text p {
        font-size: 18px;
    }

    .answer-btn {
        padding: 9px 16px;
        font-size: 18px;
    }

    .answer-buttons {
        gap: 5px;
    }

    .game-button {
        padding: 10px 22px;
        font-size: 18px;
    }

    .question-counter {
        font-size: 24px;
    }
}

@media screen and (max-height: 650px) {
    .santanator-logo img {
        max-height: 50px;
        max-width: 280px;
    }

    .santa-character img {
        max-width: 250px;
        max-height: 250px;
    }

    #start-screen .santa-character img {
        max-width: 300px;
        max-height: 300px;
    }

    .speech-bubble {
        max-width: 380px;
    }

    .bubble-text h2 {
        font-size: 18px;
    }

    .bubble-text p {
        font-size: 13px;
    }

    .question-bubble .bubble-text p {
        font-size: 16px;
    }

    .answer-btn {
        padding: 7px 12px;
        font-size: 16px;
    }

    .answer-buttons {
        gap: 4px;
    }

    .game-button {
        padding: 8px 18px;
        font-size: 16px;
    }

    .question-counter {
        font-size: 20px;
    }

    .guess-character {
        padding: 8px;
        margin: 5px 0;
    }

    .guess-character h3 {
        font-size: 18px;
    }
}

/* Height-based responsive adjustments */
@media screen and (max-height: 900px) {
    .santanator-logo img {
        max-height: 50px;
        max-width: 350px;
    }

    .game-layout {
        margin: -5px auto 0;
        gap: 15px;
    }

    .game-layout .santa-character {
        margin-top: 30px;
    }

    .answer-buttons {
        margin: -25px auto 0;
    }

    .santa-character img {
        max-width: 525px;
        max-height: 525px;
    }

    .game-layout .santa-character img {
        max-width: 525px;
        max-height: 525px;
    }

    .speech-bubble {
        max-width: 480px;
    }

    .answer-btn {
        padding: 8px 16px;
        font-size: 16px;
    }

    .answer-buttons {
        gap: 3px;
        margin: 5px auto 0;
    }
}

@media screen and (max-height: 800px) {
    .santanator-logo img {
        max-height: 45px;
        max-width: 320px;
    }

    .game-layout {
        margin: -5px auto 0;
        gap: 12px;
    }

    .game-layout .santa-character {
        margin-top: 25px;
    }

    .santa-character img {
        max-width: 480px;
        max-height: 480px;
    }

    .game-layout .santa-character img {
        max-width: 480px;
        max-height: 480px;
    }

    .speech-bubble {
        max-width: 450px;
    }

    .bubble-text h2 {
        font-size: 18px;
        margin: 0 0 4px 0;
    }

    .bubble-text p {
        font-size: 14px;
        margin: 3px 0;
    }

    .answer-btn {
        padding: 7px 14px;
        font-size: 15px;
    }

    .answer-buttons {
        gap: 3px;
        margin: -20px auto 0;
        max-width: 450px;
    }

    .question-counter {
        font-size: 16px;
        margin: 0 0 -3px 0;
    }

    .game-button {
        padding: 8px 16px;
        font-size: 15px;
    }
}

@media screen and (max-height: 700px) {
    #santanator-game {
        padding: 2px 0;
    }

    .santanator-logo {
        margin: 2px 0;
    }

    .santanator-logo img {
        max-height: 35px;
        max-width: 280px;
    }

    .game-layout {
        margin: -5px auto 0;
        gap: 10px;
    }

    .game-layout .santa-character {
        margin-top: 20px;
    }

    .santa-character img {
        max-width: 420px;
        max-height: 420px;
    }

    .game-layout .santa-character img {
        max-width: 420px;
        max-height: 420px;
    }

    .speech-bubble {
        max-width: 400px;
    }

    .bubble-text h2 {
        font-size: 16px;
        margin: 0 0 3px 0;
    }

    .bubble-text p {
        font-size: 13px;
        margin: 2px 0;
        line-height: 1.2;
    }

    .answer-btn {
        padding: 6px 12px;
        font-size: 14px;
    }

    .answer-buttons {
        gap: 2px;
        margin: -15px auto 0;
        max-width: 400px;
    }

    .question-counter {
        font-size: 14px;
        margin: 0 0 -2px 0;
    }

    .game-button {
        padding: 6px 12px;
        font-size: 14px;
        margin: 3px 4px;
    }
}
