@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700;900&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: #000000;
    color: #e0e6ff;
    min-height: 100vh;
    padding: 90px 20px 20px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle 3000px at 50% 50%, rgba(59, 130, 246, 0.2) 0%, transparent 60%);
    background-size: 200% 200%;
    pointer-events: none;
    z-index: -1;
    animation: blueGlow 12s ease-in-out infinite;
}

@keyframes blueGlow {
    0% {
        background-position: 0% 0%;
    }
    50% {
        background-position: 100% 100%;
    }
    100% {
        background-position: 0% 0%;
    }
}

.main-container {
    width: 100%;
    max-width: 1200px;
    position: relative;
    z-index: 1;
}

.header {
    text-align: center;
    margin-bottom: 50px;
    animation: fadeInDown 0.6s ease;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.header h1 {
    font-size: 3.5em;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #60a5fa, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 10px rgba(96, 165, 250, 0.3);
}

.header p {
    font-size: 1.3em;
    color: #b0b0b0;
    margin-bottom: 5px;
}

.header .subtitle {
    font-size: 1em;
    color: #cbd5e1;
    margin-top: 10px;
}

.topics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.topic-card {
    background: rgba(30, 30, 60, 0.3);
    border: 2px solid rgba(96, 165, 250, 0.3);
    border-radius: 15px;
    padding: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    animation: fadeInUp 0.6s ease;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(96, 165, 250, 0.1);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.topic-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #60a5fa, #a78bfa, #60a5fa);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.topic-card:hover::before {
    opacity: 1;
}

.topic-card:hover {
    transform: translateY(-10px);
    border-color: rgba(167, 139, 250, 0.6);
    box-shadow: 0 15px 40px rgba(96, 165, 250, 0.2), 0 0 30px rgba(167, 139, 250, 0.2);
    background: rgba(50, 50, 100, 0.4);
}

.topic-number {
    font-size: 3em;
    font-weight: bold;
    color: #60a5fa;
    margin-bottom: 10px;
}

.topic-title {
    font-size: 1.5em;
    font-weight: 600;
    color: #f0f4ff;
    margin-bottom: 12px;
}

.topic-description {
    font-size: 1em;
    color: #cbd5e1;
    margin-bottom: 20px;
    flex-grow: 1;
}

.question-count {
    font-size: 0.9em;
    color: #b0b0b0;
    margin-bottom: 15px;
    padding: 8px 12px;
    background: rgba(96, 165, 250, 0.1);
    border-radius: 6px;
    border-left: 3px solid #60a5fa;
}

.start-button {
    padding: 12px 24px;
    background: linear-gradient(135deg, #3b82f6 0%, #7c3aed 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: block;
    text-align: center;
    box-shadow: 0 5px 15px rgba(59, 130, 246, 0.4);
    align-self: flex-start;
}

.start-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.6);
}

.start-button:active {
    transform: translateY(0);
}

.footer {
    text-align: center;
    color: #64748b;
    font-size: 0.9em;
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid rgba(96, 165, 250, 0.2);
}

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 50px;
}

.stat-box {
    background: rgba(30, 30, 60, 0.3);
    border: 1px solid rgba(96, 165, 250, 0.3);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    backdrop-filter: blur(10px);
    animation: fadeInUp 0.6s ease;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.stat-number {
    font-size: 2.5em;
    font-weight: bold;
    color: #60a5fa;
    margin-bottom: 5px;
}

.stat-label {
    color: #cbd5e1;
    font-size: 0.9em;
}

@media (max-width: 768px) {
    .header h1 {
        font-size: 2.5em;
    }

    .header p {
        font-size: 1.1em;
    }

    .topics-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .topic-number {
        font-size: 2em;
    }

    .topic-title {
        font-size: 1.3em;
    }
}

/* Navigation Bar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: rgba(30, 30, 60, 0.2);
    border-bottom: 1px solid rgba(96, 165, 250, 0.3);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 20px;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.hamburger {
    background: rgba(30, 30, 60, 0.3);
    border: 1px solid rgba(96, 165, 250, 0.3);
    border-radius: 8px;
    width: 50px;
    height: 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    padding: 0;
}

.hamburger:hover {
    border-color: rgba(96, 165, 250, 0.6);
    background: rgba(50, 50, 100, 0.4);
}

.hamburger span {
    width: 24px;
    height: 2px;
    background: #60a5fa;
    border-radius: 2px;
    transition: all 0.3s ease;
    display: block;
}

/* Sidebar */
.sidebar {
    position: fixed;
    right: -550px;
    top: 0;
    height: 100vh;
    width: 550px;
    background: rgba(30, 30, 60, 0.3);
    border-left: 2px solid rgba(96, 165, 250, 0.3);
    backdrop-filter: blur(10px);
    transition: right 0.3s ease;
    z-index: 1001;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
    padding: 20px;
}

.sidebar.active {
    right: 0;
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    color: #60a5fa;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    color: #a78bfa;
    transform: rotate(90deg);
}

.sidebar-content {
    padding-top: 60px;
    color: #cbd5e1;
    font-size: 1.1em;
    text-align: center;
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0);
    transition: background 0.3s ease;
    z-index: 998;
    pointer-events: none;
}

.sidebar-overlay.active {
    background: rgba(0, 0, 0, 0.4);
    pointer-events: auto;
}

/* Mobile Responsive */
@media (max-width: 900px) {
    .sidebar {
        width: 100%;
        right: -100%;
    }
}

/* Quiz Page Styles */
.quiz-container {
    max-width: 1200px;
    margin: 0 auto;
    background: rgba(30, 30, 60, 0.2);
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(96, 165, 250, 0.1);
    border: 2px solid rgba(96, 165, 250, 0.3);
    overflow: hidden;
    backdrop-filter: blur(10px);
    animation: fadeInUp 0.6s ease;
}

.quiz-header {
    background: linear-gradient(135deg, #1e1e45 0%, #2a2a5f 100%);
    padding: 40px 30px;
    text-align: center;
    border-bottom: 2px solid rgba(96, 165, 250, 0.3);
}

.quiz-header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #60a5fa, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 10px rgba(96, 165, 250, 0.3);
}

.quiz-header p {
    font-size: 1.1em;
    color: #cbd5e1;
}

.quiz-back-button {
    display: inline-block;
    margin-bottom: 20px;
    padding: 10px 20px;
    background: rgba(96, 165, 250, 0.1);
    border: 2px solid #60a5fa;
    border-radius: 8px;
    color: #60a5fa;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.quiz-back-button:hover {
    background: rgba(96, 165, 250, 0.2);
    border-color: #a78bfa;
    color: #a78bfa;
    transform: translateX(-5px);
}

.quiz-content {
    padding: 40px;
}

.quiz-section-title {
    font-size: 1.6em;
    color: #60a5fa;
    margin: 35px 0 25px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(96, 165, 250, 0.3);
}

.quiz-section-title:first-of-type {
    margin-top: 0;
}

.quiz-question-container {
    margin-bottom: 35px;
    padding: 20px;
    background: rgba(30, 30, 60, 0.3);
    border-radius: 10px;
    border-left: 4px solid #60a5fa;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.quiz-question-container:hover {
    background: rgba(30, 30, 60, 0.5);
    border-left-color: #a78bfa;
    box-shadow: 0 5px 20px rgba(96, 165, 250, 0.1);
}

.quiz-question-number {
    color: #60a5fa;
    font-weight: 600;
    font-size: 0.95em;
    margin-bottom: 8px;
}

.quiz-question-text {
    font-size: 1.1em;
    margin-bottom: 18px;
    font-weight: 500;
    color: #f0f4ff;
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.quiz-option {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    background: rgba(96, 165, 250, 0.05);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid rgba(96, 165, 250, 0.2);
}

.quiz-option:hover {
    background: rgba(96, 165, 250, 0.1);
    border-color: rgba(96, 165, 250, 0.4);
    transform: translateX(5px);
}

.quiz-option input[type="radio"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #60a5fa;
    margin-right: 15px;
    flex-shrink: 0;
}

.quiz-option label {
    cursor: pointer;
    flex: 1;
    font-size: 1em;
    user-select: none;
    color: #cbd5e1;
}

.quiz-option span {
    cursor: pointer;
    flex: 1;
    font-size: 1em;
    user-select: none;
    color: #cbd5e1;
}

.quiz-option input[type="radio"]:checked + label {
    color: #60a5fa;
    font-weight: 600;
}

.quiz-option input[type="radio"]:checked + span {
    color: #60a5fa;
    font-weight: 600;
}

.quiz-button-container {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 40px;
    flex-wrap: wrap;
}

.quiz-button {
    padding: 14px 35px;
    font-size: 1.05em;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.quiz-btn-submit {
    background: linear-gradient(135deg, #3b82f6 0%, #7c3aed 100%);
    color: white;
    box-shadow: 0 5px 15px rgba(59, 130, 246, 0.4);
}

.quiz-btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.6);
}

.quiz-btn-submit:active {
    transform: translateY(0);
}

.quiz-btn-reset {
    background: rgba(96, 165, 250, 0.1);
    color: #60a5fa;
    border: 2px solid #60a5fa;
}

.quiz-btn-reset:hover {
    background: rgba(96, 165, 250, 0.2);
    border-color: #a78bfa;
    color: #a78bfa;
}

.quiz-btn-toggle-answers {
    background: rgba(167, 139, 250, 0.1);
    color: #a78bfa;
    border: 2px solid #a78bfa;
}

.quiz-btn-toggle-answers:hover {
    background: rgba(167, 139, 250, 0.2);
    border-color: #60a5fa;
    color: #60a5fa;
}

.quiz-results {
    display: none;
    background: rgba(96, 165, 250, 0.1);
    border: 2px solid rgba(96, 165, 250, 0.4);
    border-radius: 10px;
    padding: 30px;
    margin: 30px 0;
    text-align: center;
    backdrop-filter: blur(10px);
}

.quiz-results.show {
    display: block;
    animation: quizSlideIn 0.5s ease;
}

@keyframes quizSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.quiz-score-display {
    font-size: 3em;
    color: #60a5fa;
    font-weight: bold;
    margin: 15px 0;
}

.quiz-score-text {
    font-size: 1.3em;
    color: #a78bfa;
}

.quiz-answer-key {
    display: none;
    background: rgba(96, 165, 250, 0.05);
    border: 1px solid rgba(96, 165, 250, 0.3);
    border-radius: 10px;
    padding: 25px;
    margin-top: 30px;
    backdrop-filter: blur(10px);
}

.quiz-answer-key.show {
    display: block;
}

.quiz-answer-key h3 {
    color: #60a5fa;
    margin-bottom: 20px;
    font-size: 1.3em;
}

.quiz-answer-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.quiz-answer-item {
    background: rgba(30, 30, 60, 0.3);
    padding: 12px 15px;
    border-radius: 6px;
    border-left: 3px solid #60a5fa;
    backdrop-filter: blur(5px);
}

.quiz-answer-item-text {
    font-size: 0.95em;
    color: #cbd5e1;
}

.quiz-answer-item-number {
    color: #60a5fa;
    font-weight: 600;
}

.quiz-answer-item-answer {
    color: #a78bfa;
    font-weight: bold;
    font-size: 1.1em;
}

.quiz-footer {
    background: rgba(0, 0, 0, 0.2);
    padding: 20px;
    text-align: center;
    color: #9ca3af;
    font-size: 0.9em;
    border-top: 1px solid rgba(96, 165, 250, 0.2);
}

.quiz-loading {
    text-align: center;
    padding: 40px;
    color: #60a5fa;
    font-size: 1.2em;
}

.quiz-error {
    text-align: center;
    padding: 40px;
    color: #ff6b6b;
    font-size: 1.2em;
    background: rgba(255, 107, 107, 0.1);
    border-radius: 10px;
    margin: 20px;
    border: 2px solid rgba(255, 107, 107, 0.3);
}

@media (max-width: 768px) {
    .quiz-header h1 {
        font-size: 1.8em;
    }

    .quiz-content {
        padding: 20px;
    }

    .quiz-button-container {
        flex-direction: column;
    }

    .quiz-button {
        width: 100%;
    }

    .quiz-score-display {
        font-size: 2.5em;
    }
}
