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

:root {
    --bg-dark: #0a0e1a;
    --bg-light: #f5f7fe;
    --text-dark: #1a1a2e;
    --text-light: #f0f0f0;
    --card-dark: #1e2436;
    --card-light: #ffffff;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    transition: all 0.3s ease;
    background: var(--bg-light);
    color: var(--text-dark);
}

body.dark {
    background: var(--bg-dark);
    color: var(--text-light);
}

/* Rainbow/VIBGYOR Effects */
.rainbow-text {
    background: linear-gradient(90deg, #FF0000, #FF7F00, #FFFF00, #00FF00, #0000FF, #4B0082, #9400D3);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: rainbow 3s ease infinite;
}

@keyframes rainbow {

    0%,
    100% {
        filter: hue-rotate(0deg);
    }

    50% {
        filter: hue-rotate(30deg);
    }
}

.vibgyor-bg {
    background: linear-gradient(135deg, #FF000020, #FF7F0020, #FFFF0020, #00FF0020, #0000FF20, #4B008220, #9400D320);
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    background: var(--card-dark);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

body.dark .navbar {
    background: #0f1422;
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: bold;
    background: linear-gradient(135deg, #FF0000, #FF7F00, #FFFF00);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.nav-links a {
    color: inherit;
    text-decoration: none;
    margin: 0 1rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
    background: linear-gradient(135deg, #FF0000, #FF7F00, #FFFF00);
    color: white;
}

.theme-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    background: #FF7F00;
    color: white;
    font-weight: bold;
    transition: transform 0.2s;
}

.theme-btn:hover {
    transform: scale(1.05);
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, #FF000010, #FF7F0010, #FFFF0010, #00FF0010);
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.9;
}

.hero-buttons {
    margin-top: 2rem;
}

.btn {
    display: inline-block;
    padding: 1rem 2rem;
    margin: 0 0.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    transition: transform 0.3s;
}

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

.btn-primary {
    background: linear-gradient(135deg, #FF0000, #FF7F00);
    color: white;
}

.btn-secondary {
    background: linear-gradient(135deg, #0000FF, #9400D3);
    color: white;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.section-title {
    font-size: 2rem;
    margin: 2rem 0 1rem 0;
    text-align: center;
}

.page-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 0.5rem;
}

.subtitle {
    text-align: center;
    opacity: 0.8;
    margin-bottom: 2rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.stat-card {
    text-align: center;
    padding: 2rem;
    background: var(--card-light);
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

body.dark .stat-card {
    background: var(--card-dark);
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-number {
    font-size: 3rem;
    font-weight: bold;
    background: linear-gradient(135deg, #FF0000, #FF7F00, #FFFF00);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Topics Tags */
.topics-preview {
    text-align: center;
    margin: 2rem 0;
}

.topic-tag {
    display: inline-block;
    padding: 0.5rem 1rem;
    margin: 0.5rem;
    border-radius: 20px;
    font-weight: 500;
    transition: all 0.3s;
}

.topic-tag:hover {
    transform: scale(1.05);
}

/* Drive Card */
.drive-card {
    background: linear-gradient(135deg, #667eea20, #764ba220);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    margin: 3rem 0;
}

.btn-drive {
    display: inline-block;
    padding: 1rem 2rem;
    margin-top: 1rem;
    background: linear-gradient(135deg, #00FF00, #0000FF);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: bold;
    transition: transform 0.3s;
}

.btn-drive:hover {
    transform: scale(1.05);
}

/* Notes Grid */
.notes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.note-card {
    background: var(--card-light);
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
    border-left: 5px solid;
}

body.dark .note-card {
    background: var(--card-dark);
}

.note-card:hover {
    transform: translateX(5px);
}

.note-title {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: #FF7F00;
    font-weight: bold;
}

.note-content {
    margin: 1rem 0;
    line-height: 1.6;
}

.code-block {
    background: #1e1e1e;
    color: #d4d4d4;
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    margin: 1rem 0;
}

.code-block pre {
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Challenge Container */
.challenge-stats {
    display: flex;
    justify-content: space-between;
    margin: 2rem 0;
    padding: 1rem;
    background: var(--card-light);
    border-radius: 15px;
}

body.dark .challenge-stats {
    background: var(--card-dark);
}

.stat-badge {
    font-size: 1.1rem;
    font-weight: bold;
}

.challenge-container {
    background: linear-gradient(135deg, #FF000010, #FF7F0010, #FFFF0010);
    border-radius: 20px;
    padding: 2rem;
    margin: 2rem 0;
}

.challenge-question {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--card-light);
    border-radius: 10px;
}

body.dark .challenge-question {
    background: var(--card-dark);
}

.challenge-editor {
    width: 100%;
    min-height: 150px;
    font-family: 'Courier New', monospace;
    padding: 1rem;
    border-radius: 10px;
    border: 2px solid #FF7F00;
    background: #1e1e1e;
    color: #d4d4d4;
    font-size: 0.9rem;
}

.challenge-buttons {
    margin-top: 1rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-challenge {
    padding: 0.7rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: transform 0.2s;
}

.btn-challenge:hover {
    transform: scale(1.05);
}

.btn-submit {
    background: linear-gradient(135deg, #00FF00, #0000FF);
    color: white;
}

.btn-next {
    background: linear-gradient(135deg, #FF0000, #FF7F00);
    color: white;
}

.feedback {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 10px;
    animation: slideIn 0.3s ease;
    font-weight: 500;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Search Bar */
.search-bar {
    margin: 2rem 0;
}

.search-bar input {
    width: 100%;
    padding: 1rem;
    border-radius: 50px;
    border: 2px solid #FF7F00;
    font-size: 1rem;
    background: var(--card-light);
    color: inherit;
}

.search-bar input:focus {
    outline: none;
    border-color: #FF0000;
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 10px;
    background: #ddd;
    border-radius: 5px;
    overflow: hidden;
    margin: 2rem 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #FF0000, #FF7F00, #FFFF00, #00FF00);
    width: 0%;
    transition: width 0.3s;
}

/* Tip Box */
.tip-box {
    background: #FF7F0020;
    border-left: 4px solid #FF7F00;
    padding: 1rem;
    border-radius: 10px;
    margin: 2rem 0;
}

/* Footer */
.footer {
    text-align: center;
    padding: 2rem;
    background: var(--card-dark);
    margin-top: 3rem;
}

body.dark .footer {
    background: #0f1422;
}

/* Responsive */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 1rem;
    }

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

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

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

    .container {
        padding: 1rem;
    }

    .btn {
        padding: 0.7rem 1.5rem;
        margin: 0.5rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}