:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --success-color: #10b981;
    --error-color: #ef4444;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-color: #1e293b;
    --text-light: #64748b;
    --border-radius: 8px;
    --box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --border-color: #e2e8f0;
    --option-bg: #f8fafc;
    --option-hover-bg: #f1f5f9;
}

@import url('https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@300;400;500;700&display=swap');

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

body {
    font-family: 'Roboto Mono', monospace, system-ui, -apple-system, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    padding: 15px;
    background-attachment: fixed;
    position: relative;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}


.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 15px;
    width: 100%;
    box-sizing: border-box;
}

header {
    text-align: center;
    margin-bottom: 40px;
}

h1 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 2.5rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
    display: inline-block;
}

h1::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), transparent);
    border-radius: 2px;
}

.subtitle {
    color: var(--text-light);
    font-size: 1.1rem;
}

.screen {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--box-shadow);
    margin-bottom: 30px;
    transition: var(--transition);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.screen::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), transparent);
}

.hidden {
    display: none !important;
}

/* Progress Bar - Cyber Style */
.progress-container {
    width: 100%;
    background: rgba(0, 255, 157, 0.1);
    border-radius: 10px;
    margin-bottom: 30px;
    position: relative;
    height: 6px;
    overflow: hidden;
}

#progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary-color), #00cc7d);
    border-radius: 10px;
    transition: width 0.5s cubic-bezier(0.645, 0.045, 0.355, 1);
    position: relative;
    overflow: hidden;
}

#progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.4), 
        transparent);
    animation: progressGlow 2s infinite;
}

@keyframes progressGlow {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-container {
    width: 100%;
    background-color: #f0f0f0;
    border-radius: 20px;
    margin-bottom: 30px;
    position: relative;
    height: 10px;
    overflow: hidden;
}

#progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary-color), #6a8eff);
    border-radius: 20px;
    transition: width 0.3s ease;
}

#progress-text {
    position: absolute;
    top: 15px;
    right: 0;
    font-size: 0.9rem;
    color: var(--text-light);
}

/* Question Styles */
#question {
    font-size: 1.4rem;
    margin-bottom: 25px;
    font-weight: 500;
    color: var(--text-color);
}

.options-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

.option-btn {
    background: var(--option-bg);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 15px 20px;
    font-size: 1rem;
    cursor: pointer;
    text-align: left;
    transition: var(--transition);
    color: var(--text-color);
    position: relative;
    overflow: hidden;
    font-family: 'Roboto Mono', monospace, system-ui, -apple-system, sans-serif;
}

.option-btn::before {
    content: '>';
    margin-right: 10px;
    color: var(--primary-color);
    opacity: 0;
    transition: var(--transition);
    display: inline-block;
    transform: translateX(-10px);
}

.option-btn:hover {
    background: var(--option-hover-bg);
    transform: translateX(5px);
    border-color: var(--primary-color);
}

.option-btn:hover::before {
    opacity: 1;
    transform: translateX(0);
}

.option-btn.correct {
    background-color: #e8f5e9;
    border-color: var(--success-color);
    color: var(--success-color);
}

.option-btn.incorrect {
    background-color: #ffebee;
    border-color: var(--error-color);
    color: var(--error-color);
}

.option-btn:disabled {
    cursor: not-allowed;
    opacity: 0.8;
}

/* Navigation Buttons */
.navigation {
    display: flex;
    justify-content: flex-end;
}

.btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn:hover:not(:disabled) {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

/* Result Screen */
.result-container {
    text-align: center;
    padding: 30px 20px;
}

.score-container {
    margin: 30px 0;
    position: relative;
    display: inline-block;
}

.score-circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), #00cc7d);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: #0a192f;
    font-size: 2.5rem;
    font-weight: 700;
    box-shadow: 0 0 25px rgba(0, 255, 157, 0.3);
    animation: pulse 2s infinite;
    position: relative;
    border: 3px solid rgba(0, 255, 157, 0.5);
}

.score-circle::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
    animation: borderPulse 3s infinite;
    pointer-events: none;
}

@keyframes borderPulse {
    0% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.05); opacity: 1; }
    100% { transform: scale(1); opacity: 0.5; }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

#score-text {
    font-size: 1.5rem;
    margin-bottom: 20px;
    font-weight: 500;
}

#feedback {
    background: #f8f9ff;
    padding: 20px;
    border-radius: var(--border-radius);
    margin: 30px 0;
    text-align: left;
    border-left: 4px solid var(--primary-color);
}

/* Responsive Design */
/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
        max-width: 100%;
    }
    
    h1 {
        font-size: 1.8rem;
        margin-top: 15px;
    }
    
    .subtitle {
        font-size: 1rem;
        margin-bottom: 20px;
    }
    
    .screen {
        padding: 20px 15px;
        margin: 10px 0;
        border-radius: 8px;
    }
    
    #question {
        font-size: 1.2rem;
        line-height: 1.4;
        margin-bottom: 20px;
    }
    
    .options-container {
        gap: 10px;
    }
    
    .option-btn {
        padding: 12px 15px;
        font-size: 0.95rem;
    }
    
    .score-circle {
        width: 120px;
        height: 120px;
        font-size: 2rem;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 0.95rem;
        width: 100%;
        margin-top: 10px;
    }
    
    .theme-toggle {
        width: 44px;
        height: 44px;
        top: 15px;
        right: 15px;
    }
    
    .theme-icon {
        font-size: 1.2rem;
    }
    
    /* Adjust progress bar for mobile */
    .progress-container {
        height: 8px;
        margin-bottom: 20px;
    }
    
    /* Make sure content doesn't get hidden behind fixed elements */
    body {
        padding-bottom: 20px;
    }
    
    /* Improve spacing for result screen */
    .result-container {
        padding: 15px;
    }
    
    /* Adjust feedback section */
    #feedback {
        padding: 15px;
        margin: 15px 0;
    }
    
    /* Make sure text is readable on small screens */
    p, li {
        line-height: 1.5;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.screen {
    animation: fadeIn 0.5s ease-out;
}

.option-btn {
    position: relative;
    overflow: hidden;
}

.option-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%);
    transform-origin: 50% 50%;
}

.option-btn:focus:not(:active)::after {
    animation: ripple 1s ease-out;
}

@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 1;
    }
    100% {
        transform: scale(200, 200);
        opacity: 0;
    }
}
