/* ===== Global Styles ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Georgia', serif;
    min-height: 100vh;
    background: linear-gradient(180deg, #0a1628 0%, #1a3a5c 50%, #2d5a7b 100%);
    color: #e8f4fc;
    overflow-x: hidden;
}

/* ===== Snowfall Animation ===== */
.snowflakes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
    overflow: hidden;
}

.snowflake {
    position: absolute;
    top: -20px;
    color: #fff;
    font-size: 1.5rem;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
    animation: fall linear infinite;
    opacity: 0.8;
}

.snowflake:nth-child(1) { left: 5%; animation-duration: 10s; animation-delay: 0s; font-size: 1.2rem; }
.snowflake:nth-child(2) { left: 15%; animation-duration: 12s; animation-delay: 1s; font-size: 1.8rem; }
.snowflake:nth-child(3) { left: 25%; animation-duration: 8s; animation-delay: 2s; font-size: 1rem; }
.snowflake:nth-child(4) { left: 35%; animation-duration: 14s; animation-delay: 0.5s; font-size: 1.5rem; }
.snowflake:nth-child(5) { left: 50%; animation-duration: 11s; animation-delay: 3s; font-size: 2rem; }
.snowflake:nth-child(6) { left: 60%; animation-duration: 9s; animation-delay: 1.5s; font-size: 1.3rem; }
.snowflake:nth-child(7) { left: 70%; animation-duration: 13s; animation-delay: 2.5s; font-size: 1.7rem; }
.snowflake:nth-child(8) { left: 80%; animation-duration: 10s; animation-delay: 0.8s; font-size: 1.1rem; }
.snowflake:nth-child(9) { left: 88%; animation-duration: 15s; animation-delay: 4s; font-size: 1.9rem; }
.snowflake:nth-child(10) { left: 95%; animation-duration: 7s; animation-delay: 2s; font-size: 1.4rem; }

@keyframes fall {
    0% {
        transform: translateY(-20px) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.8;
    }
    90% {
        opacity: 0.8;
    }
    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

/* ===== Game Container ===== */
.game-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ===== Header ===== */
header {
    text-align: center;
    padding: 30px 0;
}

h1 {
    font-size: 2.8rem;
    color: #a8d8ea;
    text-shadow: 0 0 20px rgba(168, 216, 234, 0.5), 0 4px 8px rgba(0, 0, 0, 0.3);
    letter-spacing: 3px;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.2rem;
    color: #7bb8d1;
    font-style: italic;
    letter-spacing: 2px;
}

/* ===== Story Panel ===== */
.story-panel {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    border-radius: 20px;
    padding: 30px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

/* ===== Story Image ===== */
.story-image {
    font-size: 4rem;
    text-align: center;
    margin-bottom: 20px;
    padding: 20px;
    animation: fadeIn 0.5s ease-in;
}

/* ===== Story Text ===== */
.story-text {
    font-size: 1.2rem;
    line-height: 1.8;
    text-align: center;
    padding: 20px;
    color: #e8f4fc;
    animation: fadeIn 0.8s ease-in;
    flex-grow: 1;
    width: 70%;
    margin: 0 auto;
}

.story-text p {
    margin-bottom: 15px;
    text-wrap: pretty;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== Choices ===== */
.choices {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.choice-btn {
    background: linear-gradient(135deg, #4a90a4 0%, #2d5a7b 100%);
    border: 2px solid rgba(168, 216, 234, 0.4);
    border-radius: 12px;
    padding: 18px 25px;
    color: #e8f4fc;
    font-size: 1.1rem;
    font-family: 'Georgia', serif;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.choice-btn:hover {
    background: linear-gradient(135deg, #5aa0b4 0%, #3d6a8b 100%);
    border-color: rgba(168, 216, 234, 0.8);
    transform: translateX(10px);
    box-shadow: 0 6px 20px rgba(168, 216, 234, 0.3);
}

.choice-btn:active {
    transform: translateX(5px);
}

/* ===== Restart Button ===== */
footer {
    text-align: center;
    padding: 20px;
}

.restart-btn {
    background: transparent;
    border: 2px solid rgba(168, 216, 234, 0.4);
    border-radius: 25px;
    padding: 12px 30px;
    color: #7bb8d1;
    font-size: 1rem;
    font-family: 'Georgia', serif;
    cursor: pointer;
    transition: all 0.3s ease;
}

.restart-btn:hover {
    background: rgba(168, 216, 234, 0.1);
    border-color: rgba(168, 216, 234, 0.8);
    color: #a8d8ea;
}

/* ===== Ending Styles ===== */
.ending {
    text-align: center;
    padding: 30px;
}

.ending-title {
    font-size: 1.8rem;
    color: #a8d8ea;
    margin-bottom: 20px;
    text-shadow: 0 0 15px rgba(168, 216, 234, 0.5);
}

.ending-good .ending-title {
    color: #90EE90;
}

.ending-bad .ending-title {
    color: #ff6b6b;
}

.ending-neutral .ending-title {
    color: #ffd700;
}

/* ===== Responsive Design ===== */
@media (max-width: 600px) {
    h1 {
        font-size: 2rem;
    }
    
    .story-panel {
        padding: 20px;
    }
    
    .story-text {
        font-size: 1.1rem;
    }
    
    .choice-btn {
        padding: 15px 20px;
        font-size: 1rem;
    }
    
    .story-image {
        font-size: 3rem;
    }
}
