/* Root Variables */
:root {
    --primary-bg: #0a0e27;
    --secondary-bg: #1a1f3a;
    --tertiary-bg: #2d2e4d;
    --accent-gold: #d4af37;
    --accent-purple: #9d4edd;
    --accent-blue: #3c5aa6;
    --text-light: #e0e0ff;
    --text-dim: #a0a0c0;
    --success: #7cb342;
    --warning: #ff9800;
    --error: #f44336;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--primary-bg);
    color: var(--text-light);
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Background Stars */
.stars-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    pointer-events: none;
    z-index: 0;
}

.stars {
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(1px 1px at 20px 30px, #eee, #0a0e27),
        radial-gradient(1px 1px at 60px 70px, #fff, #0a0e27),
        radial-gradient(1px 1px at 50px 50px, #ddd, #0a0e27),
        radial-gradient(1px 1px at 130px 80px, #fff, #0a0e27),
        radial-gradient(1px 1px at 90px 10px, #eee, #0a0e27),
        radial-gradient(2px 2px at 20px 80px, #fff, #0a0e27),
        radial-gradient(1px 1px at 200px 200px, #ddd, #0a0e27);
    background-repeat: repeat;
    background-size: 200px 200px;
    animation: twinkle 3s ease-in-out infinite;
}

.twinkling {
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.05);
    animation: shimmer 8s ease-in-out infinite;
}

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

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

/* Navigation Bar */
.navbar {
    position: sticky;
    top: 0;
    background: rgba(10, 14, 39, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid var(--accent-gold);
    z-index: 100;
    padding: 1rem 0;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.2);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--accent-gold);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    letter-spacing: 1px;
}

.logo-star {
    font-size: 1.8rem;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: var(--text-light);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.nav-link:hover {
    color: var(--accent-gold);
    background: rgba(212, 175, 55, 0.1);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-gold);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Main Content */
.main-content {
    flex: 1;
    position: relative;
    z-index: 1;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 2rem;
}

/* Sections */
.section {
    display: none;
    animation: fadeIn 0.5s ease;
}

.section.active {
    display: block;
}

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

/* Hero Section */
.hero {
    text-align: center;
    margin: 3rem 0;
    padding: 3rem;
    background: linear-gradient(135deg, rgba(61, 90, 166, 0.2), rgba(157, 78, 221, 0.2));
    border: 2px solid rgba(212, 175, 55, 0.3);
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.hero-title {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 0 0 20px rgba(212, 175, 55, 0.5);
}

.gradient-text {
    background: linear-gradient(135deg, var(--accent-gold), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-dim);
    margin-bottom: 2rem;
}

.hero-decorations {
    font-size: 2.5rem;
    margin: 2rem 0;
    letter-spacing: 1rem;
    animation: pulse 2s ease-in-out infinite;
}

.planet {
    display: inline-block;
    transition: transform 0.3s ease;
}

.planet:hover {
    transform: scale(1.3) rotate(10deg);
}

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

.cta-button {
    background: linear-gradient(135deg, var(--accent-gold), var(--accent-purple));
    color: var(--primary-bg);
    border: none;
    padding: 1rem 2.5rem;
    font-size: 1rem;
    border-radius: 50px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.6);
}

.cta-button:active {
    transform: translateY(0);
}

/* Features Section */
.features-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature-card {
    padding: 2rem;
    background: rgba(45, 46, 77, 0.6);
    border: 2px solid rgba(212, 175, 55, 0.2);
    border-radius: 10px;
    text-align: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.feature-card:hover {
    background: rgba(45, 46, 77, 0.9);
    border-color: var(--accent-gold);
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(212, 175, 55, 0.2);
}

.feature-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 1rem;
}

.feature-card h3 {
    color: var(--accent-gold);
    margin-bottom: 0.5rem;
}

.feature-card p {
    color: var(--text-dim);
    font-size: 0.9rem;
}

/* Section Header */
.section-header {
    text-align: center;
    margin: 2rem 0;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: var(--accent-gold);
}

.section-header p {
    color: var(--text-dim);
    font-size: 1.1rem;
}

/* Concepts Grid */
.concepts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.concept-card {
    padding: 2rem;
    background: linear-gradient(135deg, rgba(61, 90, 166, 0.15), rgba(157, 78, 221, 0.15));
    border: 2px solid rgba(212, 175, 55, 0.3);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    display: flex;
    flex-direction: column;
}

.concept-card:hover {
    background: linear-gradient(135deg, rgba(61, 90, 166, 0.3), rgba(157, 78, 221, 0.3));
    border-color: var(--accent-gold);
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.25);
}

.concept-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.concept-card h3 {
    color: var(--accent-gold);
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.concept-card p {
    color: var(--text-dim);
    font-size: 0.9rem;
    line-height: 1.5;
    flex: 1;
}

.concept-read-more {
    margin-top: 1rem;
    color: var(--accent-purple);
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 200;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: linear-gradient(135deg, rgba(26, 31, 58, 0.98), rgba(45, 46, 77, 0.98));
    padding: 3rem;
    border-radius: 15px;
    border: 2px solid var(--accent-gold);
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 10px 40px rgba(212, 175, 55, 0.3);
}

.close {
    position: absolute;
    right: 2rem;
    top: 2rem;
    font-size: 2rem;
    cursor: pointer;
    color: var(--accent-gold);
    transition: transform 0.3s ease;
}

.close:hover {
    transform: rotate(90deg);
}

#conceptDetail h2 {
    color: var(--accent-gold);
    margin-bottom: 1rem;
    font-size: 2rem;
}

#conceptDetail .detail-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

#conceptDetail p {
    margin-bottom: 1rem;
    line-height: 1.8;
    color: var(--text-light);
}

#conceptDetail strong {
    color: var(--accent-purple);
}

/* Quiz Styles */
.quiz-container {
    max-width: 700px;
    margin: 0 auto;
    padding: 2rem;
}

.quiz-intro {
    text-align: center;
    padding: 3rem 2rem;
    background: linear-gradient(135deg, rgba(61, 90, 166, 0.2), rgba(157, 78, 221, 0.2));
    border: 2px solid rgba(212, 175, 55, 0.3);
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.quiz-intro.active {
    display: flex;
}

.quiz-intro h2 {
    color: var(--accent-gold);
    font-size: 2rem;
}

.quiz-info {
    color: var(--text-dim);
    font-size: 0.95rem;
}

.quiz-content {
    display: none;
}

.quiz-content.active {
    display: block;
}

.quiz-progress {
    width: 100%;
    height: 8px;
    background: rgba(212, 175, 55, 0.1);
    border-radius: 10px;
    margin-bottom: 2rem;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-gold), var(--accent-purple));
    width: 0%;
    transition: width 0.3s ease;
}

.question-counter {
    text-align: right;
    color: var(--text-dim);
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

#questionContainer {
    background: rgba(45, 46, 77, 0.6);
    padding: 2rem;
    border: 2px solid rgba(212, 175, 55, 0.3);
    border-radius: 10px;
    backdrop-filter: blur(5px);
}

.question-text {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: var(--text-light);
}

.options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.option {
    padding: 1rem;
    background: rgba(61, 90, 166, 0.1);
    border: 2px solid rgba(212, 175, 55, 0.2);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-light);
    text-align: left;
}

.option:hover {
    background: rgba(212, 175, 55, 0.15);
    border-color: var(--accent-gold);
}

.option.selected {
    background: rgba(212, 175, 55, 0.3);
    border-color: var(--accent-gold);
}

.option.correct {
    background: rgba(124, 179, 66, 0.3);
    border-color: var(--success);
}

.option.incorrect {
    background: rgba(244, 67, 54, 0.2);
    border-color: var(--error);
}

.quiz-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    justify-content: center;
}

.quiz-actions button {
    flex: 1;
    padding: 0.8rem 1.5rem;
    background: rgba(212, 175, 55, 0.2);
    border: 2px solid var(--accent-gold);
    color: var(--accent-gold);
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.quiz-actions button:hover {
    background: rgba(212, 175, 55, 0.4);
}

.quiz-actions button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.quiz-results {
    display: none;
    text-align: center;
}

.quiz-results.active {
    display: block;
}

.quiz-results h2 {
    color: var(--accent-gold);
    font-size: 2rem;
    margin-bottom: 2rem;
}

.result-card {
    background: linear-gradient(135deg, rgba(61, 90, 166, 0.2), rgba(157, 78, 221, 0.2));
    padding: 2rem;
    border: 2px solid rgba(212, 175, 55, 0.3);
    border-radius: 15px;
    margin-bottom: 2rem;
    backdrop-filter: blur(5px);
}

.score-display {
    font-size: 3.5rem;
    font-weight: bold;
    background: linear-gradient(135deg, var(--accent-gold), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 1rem 0;
}

.result-card p {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

#resultDetails {
    margin-top: 1.5rem;
    text-align: left;
}

.result-item {
    padding: 1rem;
    background: rgba(45, 46, 77, 0.5);
    border-left: 4px solid var(--accent-gold);
    margin-bottom: 0.5rem;
    border-radius: 5px;
}

.result-item strong {
    color: var(--accent-gold);
}

/* Footer */
.footer {
    background: rgba(10, 14, 39, 0.95);
    border-top: 2px solid var(--accent-gold);
    padding: 2rem;
    text-align: center;
    color: var(--text-dim);
    position: relative;
    z-index: 1;
    margin-top: auto;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-container {
        padding: 0 1rem;
    }

    .nav-menu {
        gap: 1rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .main-content {
        padding: 1rem;
    }

    .concepts-grid {
        grid-template-columns: 1fr;
    }

    .modal-content {
        padding: 2rem;
    }

    .quiz-container {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .nav-logo {
        font-size: 1rem;
    }

    .nav-menu {
        gap: 0.5rem;
    }

    .nav-link {
        padding: 0.3rem 0.5rem;
    }

    .hero-title {
        font-size: 1.5rem;
    }

    .hero-decorations {
        font-size: 2rem;
        letter-spacing: 0.5rem;
    }

    .section-header h2 {
        font-size: 1.5rem;
    }

    .cta-button {
        padding: 0.8rem 2rem;
        font-size: 0.9rem;
    }
}
