:root {
    --primary-color: #6c5ce7;
    --primary-dark: #5649c0;
    --secondary-color: #00cec9;
    --dark-color: #1e2029;
    --darker-color: #16181f;
    --light-color: #f5f6fa;
    --lighter-color: #ffffff;
    --success-color: #00b894;
    --error-color: #d63031;
    --warning-color: #fdcb6e;
    --border-radius: 12px;
    --box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--dark-color);
    color: var(--light-color);
    line-height: 1.6;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(108, 92, 231, 0.1) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(0, 206, 201, 0.1) 0%, transparent 20%);
}

.app-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 15px 0;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
    box-shadow: var(--box-shadow);
}

h1 {
    font-family: 'Space Mono', monospace;
    font-size: 1.8rem;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: 700;
}

.user-stats {
    display: flex;
    gap: 15px;
}

.stat-box {
    background-color: var(--darker-color);
    padding: 10px 15px;
    border-radius: var(--border-radius);
    min-width: 80px;
    text-align: center;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.stat-box:hover {
    transform: translateY(-3px);
}

.stat-box.streak {
    position: relative;
    overflow: hidden;
}

.stat-box.streak::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(to right, var(--warning-color), var(--error-color));
}

.stat-value {
    font-size: 1.3rem;
    font-weight: 700;
    display: block;
    margin-bottom: 2px;
}

.stat-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.7;
}

.cooldown-message {
    color: var(--secondary-color);
    font-size: 0.9rem;
    margin: 10px 0;
}

.cooldown-timer {
    background-color: rgba(0, 0, 0, 0.3);
    padding: 10px;
    border-radius: var(--border-radius);
    margin-top: 15px;
    text-align: center;
}

.cooldown-timer span {
    font-weight: bold;
    color: var(--warning-color);
}


.section-nav {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    overflow-x: auto;
    padding-bottom: 10px;
}

.section-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 30px;
    width: 100%;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
}

.section-select-btn {
    width: 100%;
    text-align: center;
}

.difficulty-badge {
    background-color: var(--darker-color);
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 1px solid;
}

.difficulty-badge[data-difficulty="easy"] {
    border-color: var(--success-color);
    color: var(--success-color);
}

.difficulty-badge[data-difficulty="medium"] {
    border-color: var(--warning-color);
    color: var(--warning-color);
}

.difficulty-badge[data-difficulty="hard"] {
    border-color: var(--error-color);
    color: var(--error-color);
}

.section-btn {
    background-color: var(--darker-color);
    border: none;
    padding: 12px 20px;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-family: 'Space Mono', monospace;
    font-size: 0.9rem;
    color: var(--light-color);
    transition: var(--transition);
    white-space: nowrap;
    box-shadow: var(--box-shadow);
}

.section-btn:hover {
    background-color: rgba(108, 92, 231, 0.2);
}

.section-btn.active {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
}

.quiz-container {
    background-color: var(--darker-color);
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--box-shadow);
    flex-grow: 1;
    display: flex;
}

.start-screen {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    width: 100%;
}

.start-content {
    max-width: 500px;
}

.start-screen h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    font-family: 'Space Mono', monospace;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.start-screen p {
    font-size: 1.1rem;
    margin-bottom: 30px;
    opacity: 0.8;
    line-height: 1.8;
}

.mine-button {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(108, 92, 231, 0.3);
    position: relative;
    overflow: hidden;
}

.mine-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(108, 92, 231, 0.4);
}

.mine-button:active {
    transform: translateY(1px);
}

.mine-button.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(108, 92, 231, 0.7);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(108, 92, 231, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(108, 92, 231, 0);
    }
}

.question-container {
    width: 100%;
}

.question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.question-progress {
    font-size: 0.9rem;
    opacity: 0.7;
}

.question-text {
    font-size: 1.4rem;
    margin-bottom: 30px;
    line-height: 1.5;
    font-weight: 500;
}

.options-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

.option-btn {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--light-color);
    padding: 18px 25px;
    border-radius: var(--border-radius);
    cursor: pointer;
    text-align: left;
    transition: var(--transition);
    font-size: 1rem;
    position: relative;
    overflow: hidden;
}

.option-btn:hover {
    background-color: rgba(108, 92, 231, 0.1);
    border-color: var(--primary-color);
}

.option-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: var(--transition);
}

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

.option-btn.correct {
    background-color: rgba(0, 184, 148, 0.2);
    border-color: var(--success-color);
    color: var(--success-color);
}

.option-btn.incorrect {
    background-color: rgba(214, 48, 49, 0.2);
    border-color: var(--error-color);
    color: var(--error-color);
}

.feedback-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: var(--darker-color);
    padding: 40px;
    border-radius: var(--border-radius);
    max-width: 500px;
    width: 90%;
    border: 1px solid rgba(108, 92, 231, 0.3);
    text-align: center;
    box-shadow: var(--box-shadow);
    position: relative;
    overflow: hidden;
}

.modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
}

.modal-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

#feedbackTitle {
    font-size: 1.8rem;
    margin-bottom: 15px;
    font-family: 'Space Mono', monospace;
}

#feedbackText {
    margin-bottom: 25px;
    line-height: 1.7;
    font-size: 1.1rem;
}

.modal-stats {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

.stat-change {
    background-color: rgba(0, 0, 0, 0.3);
    padding: 15px 20px;
    border-radius: var(--border-radius);
    min-width: 100px;
}

.stat-change span {
    font-size: 1.3rem;
    font-weight: 700;
    display: block;
    margin-bottom: 5px;
}

.stat-change small {
    font-size: 0.8rem;
    opacity: 0.7;
    text-transform: uppercase;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .app-header {
        flex-direction: column;
        gap: 20px;
    }
    
    .user-stats {
        width: 100%;
        justify-content: space-between;
    }
    
    .question-text {
        font-size: 1.2rem;
    }
    
    .modal-content {
        padding: 30px 20px;
    }
}