/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%);
    color: #e0e6ed;
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Animated background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(120, 219, 255, 0.1) 0%, transparent 50%);
    animation: backgroundShift 20s ease-in-out infinite alternate;
    z-index: -1;
}

@keyframes backgroundShift {
    0% { transform: translateX(0) translateY(0); }
    100% { transform: translateX(-10px) translateY(-10px); }
}

/* Container */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 40px;
    padding: 40px 0;
}

.game-title {
    font-family: 'Orbitron', monospace;
    font-size: 4rem;
    font-weight: 900;
    background: linear-gradient(45deg, #00d4ff, #ff00d4, #00ff88);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease-in-out infinite alternate;
    text-shadow: 0 0 30px rgba(0, 212, 255, 0.5);
    margin-bottom: 10px;
    letter-spacing: 0.1em;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    100% { background-position: 100% 50%; }
}

.game-subtitle {
    font-family: 'Orbitron', monospace;
    font-size: 1.2rem;
    color: #a0a6b0;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    opacity: 0.8;
}

/* Game area */
.game-area {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 40px;
    margin-bottom: 30px;
    backdrop-filter: blur(10px);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.game-area::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Chapter display */
#chapter-display {
    margin-bottom: 40px;
}

#chapter-title {
    font-family: 'Orbitron', monospace;
    font-size: 1.8rem;
    color: #00d4ff;
    margin-bottom: 20px;
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
    border-bottom: 2px solid rgba(0, 212, 255, 0.3);
    padding-bottom: 10px;
}

#chapter-text {
    font-size: 1.1rem;
    line-height: 1.9;
    margin-bottom: 30px;
    color: #d0d6e0;
    white-space: pre-line;
    word-wrap: break-word;
}

#chapter-text br {
    display: block;
    margin: 0.8em 0;
    content: "";
}

#chapter-text strong {
    color: #ff00d4;
    text-shadow: 0 0 5px rgba(255, 0, 212, 0.3);
    font-weight: 700;
}

#chapter-text em {
    color: #00ff88;
    font-style: italic;
}

/* Choices area */
#choices-area {
    margin-top: 30px;
}

#choice-prompt {
    font-family: 'Orbitron', monospace;
    font-size: 1.3rem;
    color: #00ff88;
    margin-bottom: 20px;
    text-align: center;
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
}

#choice-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.choice-btn {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.1), rgba(255, 0, 212, 0.1));
    border: 2px solid rgba(0, 212, 255, 0.3);
    color: #e0e6ed;
    padding: 15px 25px;
    border-radius: 10px;
    font-size: 1rem;
    font-family: 'Roboto', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    text-align: left;
}

.choice-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.choice-btn:hover {
    border-color: #00d4ff;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.2), rgba(255, 0, 212, 0.2));
    box-shadow: 
        0 10px 20px rgba(0, 212, 255, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.choice-btn:hover::before {
    left: 100%;
}

.choice-btn:active {
    transform: translateY(0);
    box-shadow: 
        0 5px 10px rgba(0, 212, 255, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Game over section */
#game-over {
    text-align: center;
    padding: 40px;
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.1), rgba(0, 212, 255, 0.1));
    border: 2px solid rgba(0, 255, 136, 0.3);
    border-radius: 15px;
    margin-top: 30px;
}

#game-over h2 {
    font-family: 'Orbitron', monospace;
    color: #00ff88;
    margin-bottom: 20px;
    text-shadow: 0 0 15px rgba(0, 255, 136, 0.5);
}

#restart-btn {
    background: linear-gradient(135deg, #00ff88, #00d4ff);
    border: none;
    color: #000;
    padding: 15px 30px;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

#restart-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(0, 255, 136, 0.4);
}

/* Footer */
footer {
    text-align: center;
    padding: 30px 0;
    color: #7a7a8a;
    font-size: 0.9rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

footer p {
    margin-bottom: 5px;
}

/* Utility classes */
.hidden {
    display: none;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .game-title {
        font-size: 2.5rem;
    }
    
    .game-area {
        padding: 25px;
    }
    
    #chapter-title {
        font-size: 1.4rem;
    }
    
    #chapter-text {
        font-size: 1rem;
    }
    
    .choice-btn {
        padding: 12px 20px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .game-title {
        font-size: 2rem;
    }
    
    .game-subtitle {
        font-size: 1rem;
    }
    
    .game-area {
        padding: 20px;
    }
    
    #chapter-title {
        font-size: 1.2rem;
    }
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #00d4ff, #ff00d4);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #00ff88, #00d4ff);
}

