@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Rajdhani:wght@300;400;600;700&display=swap');

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

body {
    font-family: 'Rajdhani', 'Arial', sans-serif;
    background: 
        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.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(120, 219, 255, 0.2) 0%, transparent 50%),
        linear-gradient(135deg, #0a0a0a 0%, #1a0a2e 25%, #16213e 50%, #0f3460 75%, #0a1a2a 100%);
    color: #e0e0e0;
    min-height: 100vh;
    line-height: 1.6;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 2px,
            rgba(0, 255, 255, 0.03) 2px,
            rgba(0, 255, 255, 0.03) 4px
        ),
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(255, 0, 255, 0.03) 2px,
            rgba(255, 0, 255, 0.03) 4px
        );
    pointer-events: none;
    z-index: 1;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, transparent 1px, rgba(0, 255, 255, 0.05) 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: 1;
    animation: grid-move 20s linear infinite;
}

@keyframes grid-move {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    position: relative;
    z-index: 2;
}

.game-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 40px 0;
    border-bottom: 2px solid transparent;
    background: linear-gradient(90deg, transparent, #00ffff, transparent);
    background-size: 100% 2px;
    background-repeat: no-repeat;
    background-position: bottom;
    position: relative;
}

.game-header::before {
    content: '◆ ◇ ◆';
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    color: #00ffff;
    font-size: 1.5em;
    text-shadow: 0 0 10px #00ffff;
    animation: pulse-glow 2s ease-in-out infinite alternate;
}

.game-header::after {
    content: '▲ ▼ ▲';
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    color: #ff00ff;
    font-size: 1.2em;
    text-shadow: 0 0 10px #ff00ff;
    animation: pulse-glow 2s ease-in-out infinite alternate-reverse;
}

.game-header h1 {
    font-family: 'Orbitron', monospace;
    font-size: 4em;
    font-weight: 900;
    background: linear-gradient(45deg, #00ffff, #ff00ff, #ffff00, #00ffff);
    background-size: 400% 400%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(0, 255, 255, 0.5);
    margin-bottom: 15px;
    animation: gradient-shift 3s ease infinite, text-glow 2s ease-in-out infinite alternate;
    position: relative;
}

.game-header h1::before {
    content: '⟨ ';
    color: #00ffff;
    -webkit-text-fill-color: #00ffff;
    text-shadow: 0 0 15px #00ffff;
}

.game-header h1::after {
    content: ' ⟩';
    color: #ff00ff;
    -webkit-text-fill-color: #ff00ff;
    text-shadow: 0 0 15px #ff00ff;
}

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

@keyframes text-glow {
    0% { text-shadow: 0 0 30px rgba(0, 255, 255, 0.5); }
    100% { text-shadow: 0 0 50px rgba(255, 0, 255, 0.8), 0 0 70px rgba(0, 255, 255, 0.3); }
}

@keyframes pulse-glow {
    0% { opacity: 0.6; transform: translateX(-50%) scale(1); }
    100% { opacity: 1; transform: translateX(-50%) scale(1.1); }
}

.subtitle {
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.4em;
    font-weight: 300;
    color: #888;
    font-style: italic;
    text-transform: uppercase;
    letter-spacing: 3px;
    position: relative;
}

.subtitle::before {
    content: '━━━ ';
    color: #00ffff;
}

.subtitle::after {
    content: ' ━━━';
    color: #ff00ff;
}

.game-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.story-section {
    background: 
        linear-gradient(135deg, rgba(0, 255, 255, 0.05) 0%, rgba(255, 0, 255, 0.05) 100%),
        rgba(0, 0, 0, 0.8);
    border: 1px solid transparent;
    background-clip: padding-box;
    border-radius: 15px;
    padding: 35px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 0 0 1px rgba(0, 255, 255, 0.2);
    backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
}

.story-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        linear-gradient(45deg, transparent 30%, rgba(0, 255, 255, 0.03) 50%, transparent 70%),
        linear-gradient(-45deg, transparent 30%, rgba(255, 0, 255, 0.03) 50%, transparent 70%);
    pointer-events: none;
    animation: shimmer 4s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { opacity: 0; }
    50% { opacity: 1; }
}

.chapter-title {
    font-family: 'Orbitron', monospace;
    font-size: 2.5em;
    font-weight: 700;
    background: linear-gradient(45deg, #00ffff, #ff00ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 25px;
    text-align: center;
    text-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
    position: relative;
    z-index: 1;
}

.chapter-title::before {
    content: '⟦ ';
    color: #00ffff;
    -webkit-text-fill-color: #00ffff;
    text-shadow: 0 0 15px #00ffff;
}

.chapter-title::after {
    content: ' ⟧';
    color: #ff00ff;
    -webkit-text-fill-color: #ff00ff;
    text-shadow: 0 0 15px #ff00ff;
}

.story-text {
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.2em;
    font-weight: 400;
    line-height: 1.9;
    margin-bottom: 20px;
    text-align: justify;
    position: relative;
    z-index: 1;
}

.story-text p {
    margin-bottom: 18px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.story-text strong {
    color: #ff6b6b;
    font-weight: 700;
    text-shadow: 0 0 8px rgba(255, 107, 107, 0.4);
    position: relative;
}

.story-text strong::before {
    content: '◈ ';
    color: #00ffff;
    font-size: 0.8em;
    text-shadow: 0 0 5px #00ffff;
}

.story-text em {
    color: #ffd93d;
    font-style: italic;
    text-shadow: 0 0 8px rgba(255, 217, 61, 0.4);
    position: relative;
}

.story-text em::before {
    content: '◊ ';
    color: #ff00ff;
    font-size: 0.8em;
    text-shadow: 0 0 5px #ff00ff;
}

.story-text blockquote {
    border-left: 4px solid #00ffff;
    border-image: linear-gradient(to bottom, #00ffff, #ff00ff) 1;
    padding-left: 25px;
    margin: 25px 0;
    font-style: italic;
    color: #b0b0b0;
    background: rgba(0, 255, 255, 0.05);
    padding: 20px 25px;
    border-radius: 0 10px 10px 0;
    position: relative;
}

.story-text blockquote::before {
    content: '❝';
    position: absolute;
    top: -10px;
    left: 10px;
    font-size: 3em;
    color: #00ffff;
    text-shadow: 0 0 10px #00ffff;
}

.story-text blockquote::after {
    content: '❞';
    position: absolute;
    bottom: -20px;
    right: 10px;
    font-size: 3em;
    color: #ff00ff;
    text-shadow: 0 0 10px #ff00ff;
}

.choices-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: relative;
}

.choices-section::before {
    content: '⟨ CHOOSE YOUR PATH ⟩';
    display: block;
    text-align: center;
    font-family: 'Orbitron', monospace;
    font-size: 1.1em;
    font-weight: 700;
    color: #00ffff;
    text-shadow: 0 0 10px #00ffff;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.choice-btn {
    background: 
        linear-gradient(135deg, rgba(0, 255, 255, 0.1) 0%, rgba(255, 0, 255, 0.1) 100%),
        linear-gradient(45deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: #ffffff;
    border: 2px solid transparent;
    background-clip: padding-box;
    padding: 18px 30px;
    border-radius: 12px;
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.2em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s ease;
    box-shadow: 
        0 6px 20px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    text-align: left;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.choice-btn::before {
    content: '▶ ';
    color: #00ffff;
    text-shadow: 0 0 8px #00ffff;
    margin-right: 10px;
    transition: all 0.3s ease;
}

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

.choice-btn:hover {
    background: 
        linear-gradient(135deg, rgba(0, 255, 255, 0.2) 0%, rgba(255, 0, 255, 0.2) 100%),
        linear-gradient(45deg, #2a2a4e 0%, #26335e 50%, #1f4480 100%);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 
        0 10px 30px rgba(0, 255, 255, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border-color: rgba(0, 255, 255, 0.5);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

.choice-btn:hover::before {
    color: #ff00ff;
    text-shadow: 0 0 12px #ff00ff;
    transform: translateX(5px);
}

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

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

.game-controls {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-top: 40px;
    position: relative;
}

.game-controls::before {
    content: '◆ ◇ ◆';
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    color: #00ffff;
    font-size: 1.2em;
    text-shadow: 0 0 8px #00ffff;
}

.control-btn {
    background: rgba(0, 0, 0, 0.6);
    color: #e0e0e0;
    border: 2px solid rgba(0, 255, 255, 0.3);
    padding: 12px 24px;
    border-radius: 8px;
    font-family: 'Rajdhani', sans-serif;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

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

.control-btn:hover {
    background: rgba(0, 255, 255, 0.1);
    border-color: rgba(0, 255, 255, 0.6);
    color: #ffffff;
    text-shadow: 0 0 8px rgba(0, 255, 255, 0.8);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 255, 255, 0.2);
}

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

.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at center, rgba(0, 255, 255, 0.1) 0%, transparent 70%),
        rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
}

.modal.show {
    display: block;
    animation: modal-appear 0.3s ease-out;
}

@keyframes modal-appear {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.modal-content {
    background: 
        linear-gradient(135deg, rgba(0, 255, 255, 0.05) 0%, rgba(255, 0, 255, 0.05) 100%),
        rgba(0, 0, 0, 0.9);
    margin: 8% auto;
    padding: 35px;
    border: 2px solid rgba(0, 255, 255, 0.3);
    border-radius: 15px;
    width: 85%;
    max-width: 700px;
    color: #e0e0e0;
    font-family: 'Rajdhani', sans-serif;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.8),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        linear-gradient(45deg, transparent 30%, rgba(0, 255, 255, 0.02) 50%, transparent 70%);
    pointer-events: none;
    animation: shimmer 3s ease-in-out infinite;
}

.modal-content h2 {
    font-family: 'Orbitron', monospace;
    color: #00ffff;
    text-shadow: 0 0 15px #00ffff;
    margin-bottom: 20px;
    text-align: center;
}

.close {
    color: #ff00ff;
    float: right;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    text-shadow: 0 0 10px #ff00ff;
    transition: all 0.3s ease;
    line-height: 1;
}

.close:hover {
    color: #00ffff;
    text-shadow: 0 0 15px #00ffff;
    transform: scale(1.2);
}

.hidden {
    display: none;
}

.ending-text {
    color: #ff6b6b;
    font-family: 'Orbitron', monospace;
    font-weight: 700;
    text-align: center;
    font-size: 1.5em;
    margin: 30px 0;
    text-shadow: 0 0 20px rgba(255, 107, 107, 0.6);
    text-transform: uppercase;
    letter-spacing: 3px;
    position: relative;
}

.ending-text::before {
    content: '◆ ◇ ◆';
    display: block;
    color: #00ffff;
    font-size: 0.6em;
    margin-bottom: 10px;
    text-shadow: 0 0 10px #00ffff;
}

.ending-text::after {
    content: '◇ ◆ ◇';
    display: block;
    color: #ff00ff;
    font-size: 0.6em;
    margin-top: 10px;
    text-shadow: 0 0 10px #ff00ff;
}

.glitch-text {
    color: #ff0080;
    text-shadow: 
        2px 0 #00ff00, 
        -2px 0 #0080ff,
        0 0 10px #ff0080;
    animation: glitch 0.8s infinite;
    position: relative;
    display: inline-block;
}

.glitch-text::before {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    color: #00ff00;
    z-index: -1;
    animation: glitch-1 0.8s infinite;
}

.glitch-text::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    color: #0080ff;
    z-index: -2;
    animation: glitch-2 0.8s infinite;
}

@keyframes glitch {
    0%, 100% { transform: translate(0); }
    10% { transform: translate(-2px, 2px); }
    20% { transform: translate(-2px, -2px); }
    30% { transform: translate(2px, 2px); }
    40% { transform: translate(2px, -2px); }
    50% { transform: translate(-1px, 1px); }
    60% { transform: translate(-1px, -1px); }
    70% { transform: translate(1px, 1px); }
    80% { transform: translate(1px, -1px); }
    90% { transform: translate(-1px, 0); }
}

@keyframes glitch-1 {
    0%, 100% { transform: translate(0); }
    10% { transform: translate(2px, -2px); }
    20% { transform: translate(-2px, 2px); }
    30% { transform: translate(-2px, -2px); }
    40% { transform: translate(2px, 2px); }
    50% { transform: translate(1px, -1px); }
    60% { transform: translate(-1px, 1px); }
    70% { transform: translate(-1px, -1px); }
    80% { transform: translate(1px, 1px); }
    90% { transform: translate(1px, 0); }
}

@keyframes glitch-2 {
    0%, 100% { transform: translate(0); }
    10% { transform: translate(-1px, 1px); }
    20% { transform: translate(1px, -1px); }
    30% { transform: translate(1px, 1px); }
    40% { transform: translate(-1px, -1px); }
    50% { transform: translate(-2px, 2px); }
    60% { transform: translate(2px, -2px); }
    70% { transform: translate(2px, 2px); }
    80% { transform: translate(-2px, -2px); }
    90% { transform: translate(0, -1px); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .game-header h1 {
        font-size: 2.8em;
    }
    
    .game-header::before,
    .game-header::after {
        font-size: 1em;
    }
    
    .subtitle {
        font-size: 1.1em;
        letter-spacing: 2px;
    }
    
    .story-section {
        padding: 25px;
    }
    
    .chapter-title {
        font-size: 2em;
    }
    
    .story-text {
        font-size: 1.1em;
    }
    
    .choice-btn {
        padding: 15px 25px;
        font-size: 1.1em;
        text-transform: none;
    }
    
    .game-controls {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    .modal-content {
        width: 95%;
        margin: 5% auto;
        padding: 25px;
    }
    
    .ending-text {
        font-size: 1.2em;
        letter-spacing: 2px;
    }
}

@media (max-width: 480px) {
    .game-header h1 {
        font-size: 2.2em;
    }
    
    .chapter-title {
        font-size: 1.6em;
    }
    
    .story-text {
        font-size: 1em;
        line-height: 1.7;
    }
    
    .choice-btn {
        padding: 12px 20px;
        font-size: 1em;
    }
    
    .story-section {
        padding: 20px;
    }
}
