@import url('https://fonts.googleapis.com/css2?family=Creepster&family=Nosifer&family=Special+Elite&display=swap');

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

body {
    font-family: 'Special Elite', 'Courier New', monospace;
    background: #0a0a0a;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(139, 0, 0, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(139, 0, 0, 0.1) 0%, transparent 50%),
        repeating-linear-gradient(0deg, rgba(0,0,0,0.4) 0px, transparent 2px, transparent 4px, rgba(0,0,0,0.4) 4px);
    background-size: 100% 100%, 100% 100%, 100% 2px;
    min-height: 100vh;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    position: relative;
    animation: bodyFlicker 10s infinite alternate;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at center, transparent 0%, rgba(0,0,0,0.8) 100%);
    pointer-events: none;
    z-index: 1;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.15),
        rgba(0, 0, 0, 0.15) 1px,
        transparent 1px,
        transparent 2px
    );
    pointer-events: none;
    animation: scanlines 8s linear infinite;
    z-index: 999;
}

@keyframes bodyFlicker {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(0.9); }
}

@keyframes scanlines {
    0% { transform: translateY(0); }
    100% { transform: translateY(10px); }
}

/* Barcha sahifalar uchun umumiy */
.page {
    display: none;
    min-height: 100vh;
    padding: 20px;
    position: relative;
    z-index: 2;
}

.page.active {
    display: flex;
    flex-direction: column;
    animation: pageGlitch 0.3s ease-out;
}

@keyframes pageGlitch {
    0%, 100% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(-2px, -2px); }
    60% { transform: translate(2px, 2px); }
    80% { transform: translate(2px, -2px); }
}

.container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.card {
    background: linear-gradient(145deg, #1a0000 0%, #0d0d0d 100%);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 
        0 0 30px rgba(139, 0, 0, 0.5),
        0 0 60px rgba(139, 0, 0, 0.3),
        inset 0 0 20px rgba(0, 0, 0, 0.8);
    max-width: 600px;
    width: 100%;
    animation: slideIn 0.8s ease-out, cardPulse 3s infinite alternate;
    border: 2px solid rgba(139, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, 
        transparent 40%, 
        rgba(139, 0, 0, 0.3) 50%, 
        transparent 60%);
    animation: borderGlow 3s linear infinite;
    z-index: -1;
    border-radius: 20px;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
        filter: blur(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

@keyframes cardPulse {
    0% { box-shadow: 0 0 30px rgba(139, 0, 0, 0.5), 0 0 60px rgba(139, 0, 0, 0.3), inset 0 0 20px rgba(0, 0, 0, 0.8); }
    100% { box-shadow: 0 0 40px rgba(139, 0, 0, 0.7), 0 0 80px rgba(139, 0, 0, 0.4), inset 0 0 25px rgba(0, 0, 0, 0.9); }
}

@keyframes borderGlow {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

h1 {
    font-family: 'Creepster', cursive;
    color: #8b0000;
    margin-bottom: 20px;
    text-align: center;
    font-size: 2.5em;
    text-shadow: 
        0 0 10px rgba(139, 0, 0, 0.8),
        0 0 20px rgba(139, 0, 0, 0.6),
        0 0 30px rgba(139, 0, 0, 0.4),
        2px 2px 5px rgba(0, 0, 0, 0.9);
    animation: titleGlitch 4s infinite, textFlicker 2s infinite alternate;
    letter-spacing: 3px;
}

@keyframes titleGlitch {
    0%, 90%, 100% { transform: skew(0deg); filter: brightness(1); }
    91% { transform: skew(2deg); filter: brightness(1.2); }
    92% { transform: skew(-2deg); filter: brightness(0.8); }
    93% { transform: skew(1deg); filter: brightness(1.1); }
}

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

h2 {
    color: #c41e3a;
    margin-bottom: 20px;
    font-size: 1.5em;
    text-shadow: 
        0 0 10px rgba(196, 30, 58, 0.6),
        2px 2px 4px rgba(0, 0, 0, 0.8);
    font-family: 'Special Elite', monospace;
}

.warning {
    background: linear-gradient(135deg, #2d0000 0%, #1a0000 100%);
    border: 2px solid #8b0000;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
    color: #ff4444;
    font-weight: bold;
    text-align: center;
    animation: warningPulse 2s infinite, warningShake 0.5s infinite;
    box-shadow: 
        0 0 20px rgba(139, 0, 0, 0.4),
        inset 0 0 10px rgba(0, 0, 0, 0.5);
    text-shadow: 0 0 5px rgba(255, 68, 68, 0.5);
}

@keyframes warningPulse {
    0%, 100% { border-color: #8b0000; }
    50% { border-color: #ff0000; }
}

@keyframes warningShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-1px); }
    75% { transform: translateX(1px); }
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    color: #c41e3a;
    font-weight: 600;
    text-shadow: 0 0 5px rgba(196, 30, 58, 0.5);
    letter-spacing: 1px;
}

input[type="text"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #3d0000;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s;
    background: rgba(0, 0, 0, 0.6);
    color: #ff4444;
    font-family: 'Special Elite', monospace;
    box-shadow: 
        inset 0 0 10px rgba(0, 0, 0, 0.8),
        0 0 5px rgba(139, 0, 0, 0.3);
}

input[type="text"]:focus {
    outline: none;
    border-color: #8b0000;
    box-shadow: 
        inset 0 0 10px rgba(0, 0, 0, 0.8),
        0 0 15px rgba(139, 0, 0, 0.6),
        0 0 25px rgba(139, 0, 0, 0.4);
    animation: inputGlow 1s infinite alternate;
}

input[type="text"]::placeholder {
    color: #663333;
    opacity: 0.7;
}

@keyframes inputGlow {
    0% { box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.8), 0 0 15px rgba(139, 0, 0, 0.6), 0 0 25px rgba(139, 0, 0, 0.4); }
    100% { box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.8), 0 0 20px rgba(139, 0, 0, 0.8), 0 0 35px rgba(139, 0, 0, 0.6); }
}

.checkbox-group {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    padding: 10px;
    background: rgba(139, 0, 0, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(139, 0, 0, 0.3);
}

input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    cursor: pointer;
    accent-color: #8b0000;
    filter: drop-shadow(0 0 5px rgba(139, 0, 0, 0.5));
}

.checkbox-group label {
    margin: 0;
    cursor: pointer;
    color: #ff6666;
}

/* Tugmalar */
.btn-primary, .btn-secondary, .btn-submit {
    padding: 12px 30px;
    border: 2px solid #8b0000;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
    font-family: 'Special Elite', monospace;
    position: relative;
    overflow: hidden;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.8);
    letter-spacing: 1px;
}

.btn-primary {
    background: linear-gradient(135deg, #3d0000 0%, #1a0000 100%);
    color: #ff4444;
    box-shadow: 
        0 0 20px rgba(139, 0, 0, 0.4),
        inset 0 0 10px rgba(0, 0, 0, 0.5);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(139, 0, 0, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.5s, height 0.5s;
}

.btn-primary:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 
        0 0 30px rgba(139, 0, 0, 0.8),
        0 10px 30px rgba(139, 0, 0, 0.6),
        inset 0 0 15px rgba(0, 0, 0, 0.7);
    border-color: #ff0000;
    animation: buttonPulse 0.5s infinite;
    color: #ff6666;
}

@keyframes buttonPulse {
    0%, 100% { box-shadow: 0 0 30px rgba(139, 0, 0, 0.8), 0 10px 30px rgba(139, 0, 0, 0.6), inset 0 0 15px rgba(0, 0, 0, 0.7); }
    50% { box-shadow: 0 0 40px rgba(139, 0, 0, 1), 0 10px 40px rgba(139, 0, 0, 0.8), inset 0 0 20px rgba(0, 0, 0, 0.9); }
}

.btn-primary:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: none;
    animation: none;
}

.btn-secondary {
    background: linear-gradient(135deg, #1a1a1a 0%, #0d0d0d 100%);
    color: #999;
    border-color: #333;
    box-shadow: 
        0 0 10px rgba(0, 0, 0, 0.6),
        inset 0 0 10px rgba(0, 0, 0, 0.5);
}

.btn-secondary:hover:not(:disabled) {
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    color: #ccc;
    border-color: #555;
    transform: translateY(-2px);
    box-shadow: 
        0 0 20px rgba(50, 50, 50, 0.8),
        0 10px 20px rgba(0, 0, 0, 0.7);
}

.btn-submit {
    background: linear-gradient(135deg, #003d00 0%, #001a00 100%);
    color: #44ff44;
    border-color: #008b00;
    box-shadow: 
        0 0 20px rgba(0, 139, 0, 0.4),
        inset 0 0 10px rgba(0, 0, 0, 0.5);
}

.btn-submit:hover {
    background: linear-gradient(135deg, #005500 0%, #002d00 100%);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 
        0 0 30px rgba(0, 139, 0, 0.8),
        0 10px 30px rgba(0, 139, 0, 0.6);
    border-color: #00ff00;
    color: #66ff66;
    animation: submitPulse 0.5s infinite;
}

@keyframes submitPulse {
    0%, 100% { box-shadow: 0 0 30px rgba(0, 139, 0, 0.8), 0 10px 30px rgba(0, 139, 0, 0.6); }
    50% { box-shadow: 0 0 40px rgba(0, 255, 0, 1), 0 10px 40px rgba(0, 139, 0, 0.8); }
}

/* Test sahifasi */
.test-header {
    background: linear-gradient(135deg, #0d0d0d 0%, #1a0000 100%);
    padding: 20px;
    box-shadow: 
        0 4px 20px rgba(139, 0, 0, 0.6),
        0 8px 40px rgba(0, 0, 0, 0.8);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 2px solid #8b0000;
    animation: headerFlicker 5s infinite;
}

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

.header-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-weight: 600;
    color: #ff4444;
    text-shadow: 0 0 5px rgba(255, 68, 68, 0.6);
}

#timer {
    color: #ff0000;
    font-size: 1.2em;
    animation: timerPulse 1s infinite;
    text-shadow: 
        0 0 10px rgba(255, 0, 0, 0.8),
        0 0 20px rgba(255, 0, 0, 0.5);
    font-family: 'Special Elite', monospace;
}

@keyframes timerPulse {
    0%, 100% { 
        transform: scale(1); 
        color: #ff0000; 
    }
    50% { 
        transform: scale(1.05); 
        color: #ff3333;
    }
}

.progress-bar {
    width: 100%;
    height: 15px;
    background: #0a0a0a;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #3d0000;
    box-shadow: 
        inset 0 0 10px rgba(0, 0, 0, 0.8),
        0 0 10px rgba(139, 0, 0, 0.3);
}

#progressFill {
    height: 100%;
    background: linear-gradient(90deg, #8b0000 0%, #ff0000 50%, #8b0000 100%);
    background-size: 200% 100%;
    width: 0%;
    transition: width 0.5s ease;
    animation: progressShine 2s linear infinite;
    box-shadow: 0 0 15px rgba(139, 0, 0, 0.8);
}

@keyframes progressShine {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.test-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    position: relative;
}

.test-container::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 30% 40%, rgba(139, 0, 0, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 70% 70%, rgba(139, 0, 0, 0.05) 0%, transparent 40%);
    animation: bloodPulse 4s infinite alternate;
    pointer-events: none;
}

@keyframes bloodPulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

.question-card {
    background: linear-gradient(145deg, #1a0000 0%, #0d0d0d 100%);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 
        0 0 40px rgba(139, 0, 0, 0.6),
        0 10px 60px rgba(0, 0, 0, 0.8),
        inset 0 0 30px rgba(0, 0, 0, 0.7);
    max-width: 800px;
    width: 100%;
    border: 2px solid rgba(139, 0, 0, 0.4);
    animation: cardBreath 3s infinite alternate;
    position: relative;
    overflow: hidden;
}

.question-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(139, 0, 0, 0.1) 0%, transparent 70%);
    animation: cardRotate 10s linear infinite;
    pointer-events: none;
}

@keyframes cardBreath {
    0% { box-shadow: 0 0 40px rgba(139, 0, 0, 0.6), 0 10px 60px rgba(0, 0, 0, 0.8), inset 0 0 30px rgba(0, 0, 0, 0.7); }
    100% { box-shadow: 0 0 50px rgba(139, 0, 0, 0.8), 0 10px 70px rgba(0, 0, 0, 0.9), inset 0 0 40px rgba(0, 0, 0, 0.8); }
}

@keyframes cardRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.question-number {
    color: #c41e3a;
    font-weight: 600;
    margin-bottom: 20px;
    font-size: 1.1em;
    text-shadow: 0 0 10px rgba(196, 30, 58, 0.6);
    position: relative;
    z-index: 1;
}

.answers-container {
    margin: 30px 0;
    position: relative;
    z-index: 1;
}

.answer-option {
    background: linear-gradient(135deg, rgba(20, 0, 0, 0.8) 0%, rgba(10, 0, 0, 0.8) 100%);
    padding: 15px 20px;
    margin-bottom: 15px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.4s ease;
    border: 2px solid rgba(139, 0, 0, 0.3);
    display: flex;
    align-items: center;
    color: #cc6666;
    box-shadow: 
        0 0 10px rgba(0, 0, 0, 0.8),
        inset 0 0 10px rgba(0, 0, 0, 0.6);
    position: relative;
    overflow: hidden;
}

.answer-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(139, 0, 0, 0.3), transparent);
    transition: left 0.5s;
}

.answer-option:hover::before {
    left: 100%;
}

.answer-option:hover {
    background: linear-gradient(135deg, rgba(40, 0, 0, 0.9) 0%, rgba(20, 0, 0, 0.9) 100%);
    transform: translateX(8px) scale(1.02);
    border-color: #8b0000;
    box-shadow: 
        0 0 20px rgba(139, 0, 0, 0.8),
        0 5px 20px rgba(139, 0, 0, 0.6),
        inset 0 0 15px rgba(0, 0, 0, 0.7);
    color: #ff8888;
}

.answer-option.selected {
    background: linear-gradient(135deg, #3d0000 0%, #1a0000 100%);
    color: #ff4444;
    border-color: #ff0000;
    box-shadow: 
        0 0 30px rgba(255, 0, 0, 0.8),
        0 5px 30px rgba(139, 0, 0, 0.8),
        inset 0 0 20px rgba(139, 0, 0, 0.3);
    animation: selectedPulse 1.5s infinite;
}

@keyframes selectedPulse {
    0%, 100% { 
        box-shadow: 0 0 30px rgba(255, 0, 0, 0.8), 0 5px 30px rgba(139, 0, 0, 0.8), inset 0 0 20px rgba(139, 0, 0, 0.3);
        border-color: #ff0000;
    }
    50% { 
        box-shadow: 0 0 40px rgba(255, 0, 0, 1), 0 5px 40px rgba(139, 0, 0, 1), inset 0 0 25px rgba(139, 0, 0, 0.5);
        border-color: #ff3333;
    }
}

.answer-option input[type="radio"] {
    margin-right: 15px;
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #8b0000;
    filter: drop-shadow(0 0 5px rgba(139, 0, 0, 0.8));
}

.navigation-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 30px;
    position: relative;
    z-index: 1;
}

.navigation-buttons .btn-submit {
    grid-column: 1 / -1;
}

/* Natija sahifasi */
.result-card {
    text-align: center;
    animation: resultGlow 2s infinite alternate;
}

@keyframes resultGlow {
    0% { box-shadow: 0 0 30px rgba(139, 0, 0, 0.5), 0 0 60px rgba(139, 0, 0, 0.3), inset 0 0 20px rgba(0, 0, 0, 0.8); }
    100% { box-shadow: 0 0 50px rgba(139, 0, 0, 0.8), 0 0 80px rgba(139, 0, 0, 0.5), inset 0 0 30px rgba(0, 0, 0, 0.9); }
}

.result-info {
    margin: 30px 0;
}

.result-info p {
    margin: 10px 0;
    font-size: 1.1em;
    color: #ff6666;
    text-shadow: 0 0 5px rgba(255, 102, 102, 0.5);
}

.result-info strong {
    color: #ff4444;
    text-shadow: 0 0 8px rgba(255, 68, 68, 0.6);
}

hr {
    margin: 20px 0;
    border: none;
    border-top: 2px solid #3d0000;
    box-shadow: 0 0 10px rgba(139, 0, 0, 0.5);
}

.score {
    margin: 30px 0;
}

.score h2 {
    animation: scoreFlicker 2s infinite;
}

@keyframes scoreFlicker {
    0%, 100% { opacity: 1; text-shadow: 0 0 10px rgba(196, 30, 58, 0.6), 2px 2px 4px rgba(0, 0, 0, 0.8); }
    50% { opacity: 0.9; text-shadow: 0 0 15px rgba(196, 30, 58, 0.8), 2px 2px 6px rgba(0, 0, 0, 0.9); }
}

.score-display {
    font-size: 3em;
    font-weight: bold;
    color: #8b0000;
    margin: 20px 0;
    text-shadow: 
        0 0 20px rgba(139, 0, 0, 0.8),
        0 0 40px rgba(139, 0, 0, 0.6),
        0 0 60px rgba(139, 0, 0, 0.4);
    animation: scoreBreath 2s infinite alternate;
    font-family: 'Creepster', cursive;
}

@keyframes scoreBreath {
    0% { 
        transform: scale(1);
        text-shadow: 0 0 20px rgba(139, 0, 0, 0.8), 0 0 40px rgba(139, 0, 0, 0.6), 0 0 60px rgba(139, 0, 0, 0.4);
    }
    100% { 
        transform: scale(1.05);
        text-shadow: 0 0 30px rgba(139, 0, 0, 1), 0 0 50px rgba(139, 0, 0, 0.8), 0 0 70px rgba(139, 0, 0, 0.6);
    }
}

.percentage {
    font-size: 2em;
    color: #00ff00;
    font-weight: bold;
    text-shadow: 
        0 0 15px rgba(0, 255, 0, 0.8),
        0 0 30px rgba(0, 255, 0, 0.5);
    animation: percentGlow 1.5s infinite alternate;
    font-family: 'Creepster', cursive;
}

@keyframes percentGlow {
    0% { 
        text-shadow: 0 0 15px rgba(0, 255, 0, 0.8), 0 0 30px rgba(0, 255, 0, 0.5);
        filter: brightness(1);
    }
    100% { 
        text-shadow: 0 0 25px rgba(0, 255, 0, 1), 0 0 45px rgba(0, 255, 0, 0.7);
        filter: brightness(1.2);
    }
}

.grade {
    margin: 20px 0;
    padding: 20px;
    background: linear-gradient(135deg, #3d0000 0%, #1a0000 100%);
    border-radius: 15px;
    color: #ff4444;
    border: 2px solid #8b0000;
    box-shadow: 
        0 0 30px rgba(139, 0, 0, 0.6),
        inset 0 0 20px rgba(0, 0, 0, 0.7);
    animation: gradePulse 2s infinite;
}

@keyframes gradePulse {
    0%, 100% { 
        box-shadow: 0 0 30px rgba(139, 0, 0, 0.6), inset 0 0 20px rgba(0, 0, 0, 0.7);
        border-color: #8b0000;
    }
    50% { 
        box-shadow: 0 0 45px rgba(139, 0, 0, 0.9), inset 0 0 30px rgba(0, 0, 0, 0.9);
        border-color: #ff0000;
    }
}

.grade h3 {
    font-size: 2em;
    color: #ff6666;
    text-shadow: 
        0 0 15px rgba(255, 102, 102, 0.8),
        0 0 30px rgba(255, 102, 102, 0.5);
    font-family: 'Creepster', cursive;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(10px);
}

.modal.show {
    display: flex;
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: linear-gradient(145deg, #1a0000 0%, #0d0d0d 100%);
    padding: 40px;
    border-radius: 20px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    animation: shake 0.5s, modalGlitch 0.3s;
    border: 3px solid #8b0000;
    box-shadow: 
        0 0 50px rgba(255, 0, 0, 0.8),
        0 0 100px rgba(139, 0, 0, 0.6),
        inset 0 0 30px rgba(0, 0, 0, 0.8);
    position: relative;
    overflow: hidden;
}

.modal-content::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: repeating-conic-gradient(
        from 0deg,
        transparent 0deg 10deg,
        rgba(139, 0, 0, 0.1) 10deg 20deg
    );
    animation: modalRotate 10s linear infinite;
    pointer-events: none;
}

@keyframes modalRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0) rotate(0deg); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-10px) rotate(-2deg); }
    20%, 40%, 60%, 80% { transform: translateX(10px) rotate(2deg); }
}

@keyframes modalGlitch {
    0%, 100% { transform: translate(0); }
    25% { transform: translate(-5px, 5px); }
    50% { transform: translate(5px, -5px); }
    75% { transform: translate(-5px, -5px); }
}

.modal-content h2 {
    color: #ff0000;
    margin-bottom: 20px;
    font-family: 'Nosifer', cursive;
    text-shadow: 
        0 0 20px rgba(255, 0, 0, 1),
        0 0 40px rgba(255, 0, 0, 0.8),
        0 0 60px rgba(255, 0, 0, 0.6);
    animation: warningPulseText 1s infinite;
    font-size: 2.5em;
    position: relative;
    z-index: 1;
}

@keyframes warningPulseText {
    0%, 100% { 
        transform: scale(1);
        text-shadow: 0 0 20px rgba(255, 0, 0, 1), 0 0 40px rgba(255, 0, 0, 0.8), 0 0 60px rgba(255, 0, 0, 0.6);
    }
    50% { 
        transform: scale(1.05);
        text-shadow: 0 0 30px rgba(255, 0, 0, 1), 0 0 50px rgba(255, 0, 0, 1), 0 0 70px rgba(255, 0, 0, 0.8);
    }
}

.modal-content p {
    margin: 15px 0;
    font-size: 1.1em;
    color: #ff6666;
    text-shadow: 0 0 10px rgba(255, 102, 102, 0.6);
    position: relative;
    z-index: 1;
}

#warningCount {
    color: #ff0000;
    font-weight: bold;
    font-size: 1.3em;
    text-shadow: 
        0 0 15px rgba(255, 0, 0, 0.9),
        0 0 30px rgba(255, 0, 0, 0.6);
    animation: countFlicker 0.5s infinite;
    display: inline-block;
    position: relative;
    z-index: 1;
}

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

/* Responsive */
@media (max-width: 768px) {
    .card, .question-card {
        padding: 20px;
    }
    
    h1 {
        font-size: 1.8em;
    }
    
    .navigation-buttons {
        grid-template-columns: 1fr;
    }
    
    .score-display {
        font-size: 2em;
    }

    .modal-content h2 {
        font-size: 1.8em;
    }
}

/* Chop etishni bloklash */
@media print {
    body {
        display: none;
    }
}

/* Qo'shimcha horror effektlar */
@keyframes bloodDrip {
    0% { 
        transform: translateY(-100%);
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% { 
        transform: translateY(100vh);
        opacity: 0;
    }
}

/* Cursor effecti */
body {
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewport="0 0 24 24"><circle cx="12" cy="12" r="10" fill="%23ff0000" opacity="0.5"/><circle cx="12" cy="12" r="5" fill="%238b0000"/></svg>'), auto;
}

a, button, input, .answer-option {
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewport="0 0 24 24"><circle cx="12" cy="12" r="10" fill="%23ff0000" opacity="0.7"/><circle cx="12" cy="12" r="5" fill="%238b0000"/></svg>'), pointer;
}

/* Scroll bar styling */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: #0a0a0a;
    border-left: 1px solid #3d0000;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #8b0000 0%, #3d0000 100%);
    border-radius: 6px;
    box-shadow: 0 0 10px rgba(139, 0, 0, 0.8);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #ff0000 0%, #8b0000 100%);
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.9);
}

/* Selection styling */
::selection {
    background: rgba(139, 0, 0, 0.8);
    color: #ff4444;
    text-shadow: 0 0 10px rgba(255, 68, 68, 0.8);
}

/* Floating ghost effect */
@keyframes ghostFloat {
    0%, 100% { 
        transform: translate(0, 0) rotate(0deg);
        opacity: 0.1;
    }
    25% { 
        transform: translate(10vw, -5vh) rotate(5deg);
        opacity: 0.2;
    }
    50% { 
        transform: translate(-5vw, -10vh) rotate(-5deg);
        opacity: 0.15;
    }
    75% { 
        transform: translate(5vw, -15vh) rotate(3deg);
        opacity: 0.1;
    }
}

/* Pulsing shadow effect */
@keyframes shadowPulse {
    0%, 100% { 
        filter: drop-shadow(0 0 20px rgba(139, 0, 0, 0.5));
    }
    50% { 
        filter: drop-shadow(0 0 40px rgba(139, 0, 0, 0.8));
    }
}

/* Blood text effect */
.blood-text {
    color: #8b0000;
    text-shadow: 
        0 1px 0 #7a0000,
        0 2px 0 #6a0000,
        0 3px 0 #5a0000,
        0 4px 0 #4a0000,
        0 5px 0 #3a0000,
        0 6px 1px rgba(0, 0, 0, 0.1),
        0 0 5px rgba(139, 0, 0, 0.5),
        0 1px 3px rgba(0, 0, 0, 0.3),
        0 3px 5px rgba(0, 0, 0, 0.2),
        0 5px 10px rgba(0, 0, 0, 0.25),
        0 10px 10px rgba(0, 0, 0, 0.2),
        0 20px 20px rgba(0, 0, 0, 0.15);
}

/* Creepy glow effect */
@keyframes creepyGlow {
    0%, 100% {
        box-shadow: 
            0 0 5px rgba(139, 0, 0, 0.5),
            0 0 10px rgba(139, 0, 0, 0.4),
            0 0 15px rgba(139, 0, 0, 0.3),
            0 0 20px rgba(139, 0, 0, 0.2);
    }
    50% {
        box-shadow: 
            0 0 10px rgba(139, 0, 0, 0.8),
            0 0 20px rgba(139, 0, 0, 0.6),
            0 0 30px rgba(139, 0, 0, 0.4),
            0 0 40px rgba(139, 0, 0, 0.3);
    }
}

/* Distorted text effect */
@keyframes textDistort {
    0%, 100% {
        text-shadow: 
            0 0 10px rgba(139, 0, 0, 0.8),
            2px 2px 5px rgba(0, 0, 0, 0.9);
        transform: skew(0deg);
    }
    25% {
        text-shadow: 
            -2px 0 10px rgba(139, 0, 0, 0.8),
            2px 2px 5px rgba(0, 0, 0, 0.9);
        transform: skew(-1deg);
    }
    75% {
        text-shadow: 
            2px 0 10px rgba(139, 0, 0, 0.8),
            2px 2px 5px rgba(0, 0, 0, 0.9);
        transform: skew(1deg);
    }
}

/* Eerie mist effect */
@keyframes mistFloat {
    0% {
        transform: translateX(-100%) translateY(0);
        opacity: 0;
    }
    50% {
        opacity: 0.3;
    }
    100% {
        transform: translateX(100%) translateY(-20px);
        opacity: 0;
    }
}

/* Haunted screen effect */
@keyframes hauntedScreen {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.98; }
}

/* Blood drip from top */
@keyframes bloodDripTop {
    0% {
        height: 0;
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    100% {
        height: 100px;
        opacity: 0.8;
    }
}

/* Jittery movement */
@keyframes jitter {
    0%, 100% { transform: translate(0, 0); }
    10% { transform: translate(-1px, -1px); }
    20% { transform: translate(1px, 1px); }
    30% { transform: translate(-1px, 1px); }
    40% { transform: translate(1px, -1px); }
    50% { transform: translate(-1px, -1px); }
    60% { transform: translate(1px, 1px); }
    70% { transform: translate(-1px, 1px); }
    80% { transform: translate(1px, -1px); }
    90% { transform: translate(-1px, -1px); }
}

/* Breathing effect for cards */
@keyframes breathe {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.005);
    }
}

/* Static noise overlay */
@keyframes staticNoise {
    0%, 100% { opacity: 0.03; }
    50% { opacity: 0.06; }
}

/* Sinister fade in */
@keyframes sinisterFadeIn {
    0% {
        opacity: 0;
        transform: scale(0.9);
        filter: blur(5px);
    }
    100% {
        opacity: 1;
        transform: scale(1);
        filter: blur(0);
    }
}

