/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

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

.nav-logo h2 {
    color: #2563eb;
    font-weight: 700;
    font-size: 1.5rem;
}

.nav-logo i {
    color: #f59e0b;
    margin-right: 8px;
}

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

.nav-menu a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-menu a:hover {
    color: #2563eb;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: #2563eb;
    transition: width 0.3s ease;
}

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

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: #333;
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.highlight {
    background: linear-gradient(45deg, #f59e0b, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: #f59e0b;
    color: white;
}

.btn-primary:hover {
    background: #d97706;
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background: white;
    color: #333;
}

/* Floating Elements */
.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.floating-elements {
    position: relative;
    width: 300px;
    height: 300px;
}

.element {
    position: absolute;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    animation: float 6s ease-in-out infinite;
}

.element.physics {
    background: linear-gradient(45deg, #3b82f6, #1d4ed8);
    top: 0;
    right: 0;
    animation-delay: 0s;
}

.element.chemistry {
    background: linear-gradient(45deg, #10b981, #059669);
    bottom: 0;
    left: 0;
    animation-delay: 2s;
}

.element.mathematics {
    background: linear-gradient(45deg, #f59e0b, #d97706);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

/* Quote Section */
.quote-section {
    padding: 80px 0;
    background: #f8fafc;
    position: relative;
}

.quote-container {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    position: relative;
}

.quote-icon {
    font-size: 3rem;
    color: #2563eb;
    margin-bottom: 2rem;
    opacity: 0.3;
}

.quote-text {
    font-size: 1.5rem;
    font-style: italic;
    color: #1f2937;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.quote-author {
    font-size: 1.1rem;
    color: #6b7280;
    font-weight: 600;
}

.quote-refresh {
    position: absolute;
    top: 0;
    right: 0;
    background: #2563eb;
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quote-refresh:hover {
    background: #1d4ed8;
    transform: rotate(180deg);
}

/* Subjects Section */
.subjects-section {
    padding: 80px 0;
    background: white;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 3rem;
}

.subjects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.subject-card {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid #e5e7eb;
}

.subject-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.card-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    color: white;
}

.physics-card .card-icon {
    background: linear-gradient(45deg, #3b82f6, #1d4ed8);
}

.chemistry-card .card-icon {
    background: linear-gradient(45deg, #10b981, #059669);
}

.mathematics-card .card-icon {
    background: linear-gradient(45deg, #f59e0b, #d97706);
}

.subject-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #1f2937;
}

.subject-card p {
    color: #6b7280;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.card-stats {
    display: flex;
    justify-content: space-around;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 10px;
}

.card-stats span {
    font-size: 0.9rem;
    color: #6b7280;
}

.card-stats i {
    margin-right: 5px;
    color: #2563eb;
}

.card-btn {
    background: linear-gradient(45deg, #2563eb, #1d4ed8);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.card-btn:hover {
    background: linear-gradient(45deg, #1d4ed8, #1e40af);
    transform: translateY(-2px);
}

/* Success Section */
.success-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #1f2937 0%, #374151 100%);
    color: white;
}

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

.stat-item {
    text-align: center;
    padding: 2rem;
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: #f59e0b;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1.1rem;
    color: #d1d5db;
}

/* Footer */
.footer {
    background: #111827;
    color: white;
    padding: 50px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
    color: #f59e0b;
}

.footer-section p,
.footer-section a {
    color: #d1d5db;
    text-decoration: none;
    line-height: 1.8;
}

.footer-section a:hover {
    color: white;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #374151;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: #f59e0b;
    transform: translateY(-2px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #374151;
    color: #9ca3af;
}

.footer-bottom a {
    color: #f59e0b;
    text-decoration: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .floating-elements {
        width: 200px;
        height: 200px;
    }
    
    .element {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .quote-text {
        font-size: 1.2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
    }
    
    .subjects-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease forwards;
}

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

/* Smooth scrolling for webkit browsers */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #2563eb;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #1d4ed8;
}


        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        
        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            line-height: 1.6;
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        
        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            line-height: 1.6;
            color: #333;
            background-color: #f5f5f5;
        }
        
        .container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 20px;
        }
        
        /* Breadcrumb Styles */
        .breadcrumb-container {
            background: white;
            padding: 15px 20px;
            border-radius: 10px;
            margin-bottom: 20px;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        }
        
        .breadcrumb {
            display: flex;
            align-items: center;
            flex-wrap: wrap;
            gap: 10px;
            font-size: 0.95em;
            color: #666;
        }
        
        .breadcrumb a {
            color: #667eea;
            text-decoration: none;
            transition: all 0.3s ease;
            font-weight: 500;
        }
        
        .breadcrumb a:hover {
            color: #764ba2;
            text-decoration: underline;
        }
        
        .breadcrumb-separator {
            color: #999;
            margin: 0 5px;
        }
        
        .breadcrumb-current {
            color: #2c3e50;
            font-weight: 600;
        }
        
        /* Header Styles */
        .topic-header {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            padding: 40px 20px;
            border-radius: 10px;
            margin-bottom: 30px;
            box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        }
        
        .topic-header h1 {
            font-size: 2.5em;
            margin-bottom: 10px;
        }
        
        .topic-meta {
            /* Force five items on the same row */
            display: grid;
            grid-template-columns: repeat(5, 1fr);
            gap: 12px;
            margin-top: 20px;
            font-size: 0.95em;
            align-items: stretch;
        }
        
        .meta-item {
            background: rgba(255,255,255,0.2);
            padding: 8px 12px;
            border-radius: 20px;
            /* Allow text to wrap within each badge while staying on one row */
            white-space: normal;
            word-break: break-word;
            overflow-wrap: anywhere;
            /* Distribute available width across items and allow shrinking */
            flex: 1 1 0;
            min-width: 0;
        }
        
        .meta-item strong {
            margin-right: 5px;
        }
        
        .meta-item a {
            color: white;
            text-decoration: none;
            border-bottom: 1px dotted rgba(255,255,255,0.5);
            transition: all 0.3s ease;
            /* Allow wrapping within the anchor text */
            white-space: normal;
            word-break: break-word;
            overflow-wrap: anywhere;
        }
        
        .meta-item a:hover {
            border-bottom: 1px solid white;
            opacity: 0.9;
        }
        
        /* Progress Bar */
        .progress-section {
            background: white;
            padding: 20px;
            border-radius: 10px;
            margin-bottom: 30px;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        }
        
        .progress-bar {
            width: 100%;
            height: 30px;
            background: #e0e0e0;
            border-radius: 15px;
            overflow: hidden;
            position: relative;
        }
        
        .progress-fill {
            height: 100%;
            background: linear-gradient(90deg, #4CAF50, #8BC34A);
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-weight: bold;
            transition: width 0.3s ease;
        }
        
        /* Content Sections */
        .content-section {
            background: white;
            padding: 30px;
            border-radius: 10px;
            margin-bottom: 30px;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        }
        
        .section-title {
            font-size: 1.8em;
            color: #667eea;
            margin-bottom: 20px;
            padding-bottom: 10px;
            border-bottom: 3px solid #667eea;
        }
        
        .section-icon {
            margin-right: 10px;
        }
        
        /* Explanation Cards */
        .explanation-card {
            background: #f9f9f9;
            padding: 20px;
            border-radius: 8px;
            margin-bottom: 20px;
            border-left: 4px solid #667eea;
        }
        
        .explanation-card h3 {
            color: #667eea;
            margin-bottom: 10px;
            display: flex;
            align-items: center;
            gap: 10px;
        }
        
        .source-badge {
            display: inline-block;
            background: #667eea;
            color: white;
            padding: 4px 12px;
            border-radius: 12px;
            font-size: 0.8em;
            font-weight: bold;
        }
        
        .explanation-content {
            white-space: pre-wrap;
            line-height: 1.8;
        }
        
        /* Numerical Cards */
        .numerical-card {
            background: #fff;
            border: 1px solid #ddd;
            border-radius: 8px;
            padding: 20px;
            margin-bottom: 20px;
            transition: box-shadow 0.3s ease;
        }
        
        .numerical-card:hover {
            box-shadow: 0 4px 8px rgba(0,0,0,0.1);
        }
        
        .numerical-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 15px;
        }
        
        .numerical-number {
            background: #667eea;
            color: white;
            padding: 5px 15px;
            border-radius: 20px;
            font-weight: bold;
        }
        
        .difficulty-badge {
            padding: 5px 12px;
            border-radius: 12px;
            font-size: 0.85em;
            font-weight: bold;
        }
        
        .difficulty-easy {
            background: #4CAF50;
            color: white;
        }
        
        .difficulty-medium {
            background: #FF9800;
            color: white;
        }
        
        .difficulty-hard {
            background: #f44336;
            color: white;
        }
        
        .question-text {
            font-size: 1.1em;
            font-weight: 500;
            margin-bottom: 15px;
            color: #2c3e50;
        }
        
        .solution-steps {
            background: #f0f4f8;
            padding: 15px;
            border-radius: 6px;
            white-space: pre-wrap;
            line-height: 1.8;
            margin: 15px 0;
        }
        
        .final-answer {
            background: #e8f5e9;
            padding: 15px;
            border-radius: 6px;
            border-left: 4px solid #4CAF50;
            margin-top: 15px;
        }
        
        .final-answer strong {
            color: #2e7d32;
        }
        
        /* Video Cards */
        .video-card {
            background: white;
            border-radius: 8px;
            overflow: hidden;
            margin-bottom: 25px;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        }
        
        .video-embed {
            position: relative;
            padding-bottom: 56.25%; /* 16:9 aspect ratio */
            height: 0;
            overflow: hidden;
        }
        
        .video-embed iframe {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            border: none;
        }
        
        .video-info {
            padding: 15px;
        }
        
        .video-title {
            font-size: 1.2em;
            font-weight: 600;
            margin-bottom: 8px;
            color: #2c3e50;
        }
        
        .video-meta {
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-wrap: wrap;
            gap: 10px;
            font-size: 0.9em;
            color: #666;
        }
        
        .rating {
            color: #FFB300;
        }
        
        /* Image Gallery */
        .image-gallery {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
            gap: 20px;
        }
        
        .image-card {
            background: white;
            border-radius: 8px;
            overflow: hidden;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
            transition: transform 0.3s ease;
            cursor: pointer;
        }
        
        .image-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 6px 12px rgba(0,0,0,0.15);
        }
        
        .image-card img {
            width: 100%;
            height: 280px;
            object-fit: contain;
            background: #f9f9f9;
            padding: 10px;
        }
        
        .image-info {
            padding: 15px;
        }
        
        .image-title {
            font-weight: 600;
            margin-bottom: 5px;
            color: #2c3e50;
        }
        
        .image-type-badge {
            display: inline-block;
            background: #764ba2;
            color: white;
            padding: 3px 10px;
            border-radius: 10px;
            font-size: 0.8em;
            margin-bottom: 8px;
        }
        
        .primary-badge {
            background: #4CAF50;
            color: white;
            padding: 3px 10px;
            border-radius: 10px;
            font-size: 0.75em;
            margin-left: 5px;
        }
        
        /* Lightbox Modal */
        .lightbox-modal {
            display: none;
            position: fixed;
            z-index: 9999;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.95);
            overflow: auto;
            animation: fadeIn 0.3s ease;
        }
        
        .lightbox-modal.active {
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 20px;
        }
        
        .lightbox-content {
            position: relative;
            max-width: 95%;
            max-height: 95vh;
            margin: auto;
            background: white;
            border-radius: 10px;
            overflow: hidden;
            animation: zoomIn 0.3s ease;
        }
        
        @keyframes zoomIn {
            from {
                transform: scale(0.7);
                opacity: 0;
            }
            to {
                transform: scale(1);
                opacity: 1;
            }
        }
        
        .lightbox-image {
            width: 100%;
            height: auto;
            max-height: 80vh;
            object-fit: contain;
            display: block;
            background: #f9f9f9;
        }
        
        .lightbox-caption {
            padding: 20px;
            background: white;
            color: #333;
            text-align: center;
        }
        
        .lightbox-title {
            font-size: 1.3em;
            font-weight: 600;
            margin-bottom: 10px;
            color: #667eea;
        }
        
        .lightbox-description {
            font-size: 1em;
            color: #666;
            line-height: 1.6;
        }
        
        .lightbox-close {
            position: absolute;
            top: 15px;
            right: 25px;
            color: white;
            font-size: 40px;
            font-weight: bold;
            cursor: pointer;
            z-index: 10000;
            background: rgba(0, 0, 0, 0.5);
            width: 50px;
            height: 50px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.3s ease;
        }
        
        .lightbox-close:hover,
        .lightbox-close:focus {
            background: rgba(102, 126, 234, 0.9);
            transform: rotate(90deg);
        }
        
        .zoom-hint {
            position: absolute;
            bottom: 20px;
            left: 50%;
            transform: translateX(-50%);
            background: rgba(0, 0, 0, 0.7);
            color: white;
            padding: 8px 15px;
            border-radius: 20px;
            font-size: 0.9em;
            pointer-events: none;
            opacity: 0;
            transition: opacity 0.3s ease;
        }
        
        .image-card:hover .zoom-hint {
            opacity: 1;
        }
        
        /* Formula Cards */
        .formula-card {
            background: #f9f9f9;
            border: 1px solid #e0e0e0;
            border-radius: 8px;
            padding: 20px;
            margin-bottom: 20px;
        }
        
        .formula-name {
            font-size: 1.2em;
            font-weight: 600;
            color: #667eea;
            margin-bottom: 15px;
        }
        
        .formula-display {
            background: white;
            padding: 20px;
            border-radius: 6px;
            text-align: center;
            font-size: 1.3em;
            margin: 15px 0;
            border: 1px solid #ddd;
        }
        
        .formula-description {
            color: #555;
            margin: 10px 0;
            line-height: 1.6;
        }
        
        .formula-variables {
            background: #fff3cd;
            padding: 12px;
            border-radius: 6px;
            border-left: 4px solid #ffc107;
            margin-top: 10px;
            font-size: 0.9em;
        }
        
        /* Reference Cards */
        .reference-card {
            background: white;
            border: 1px solid #e0e0e0;
            border-radius: 8px;
            padding: 20px;
            margin-bottom: 15px;
        }
        
        .reference-type {
            display: inline-block;
            background: #667eea;
            color: white;
            padding: 4px 12px;
            border-radius: 12px;
            font-size: 0.8em;
            font-weight: bold;
            margin-bottom: 10px;
        }
        
        .reference-title {
            font-size: 1.1em;
            font-weight: 600;
            margin-bottom: 8px;
            color: #2c3e50;
        }
        
        .reference-author {
            color: #666;
            font-style: italic;
            margin-bottom: 8px;
        }
        
        .reference-link {
            color: #667eea;
            text-decoration: none;
            word-break: break-all;
        }
        
        .reference-link:hover {
            text-decoration: underline;
        }
        
        /* Tabs */
        .main-tabs {
            /* Arrange buttons in exactly 5 columns on a single line; additional buttons wrap to next line */
            display: grid;
            grid-template-columns: repeat(5, minmax(0, 1fr));
            gap: 10px;
            margin-bottom: 30px;
            background: #f5f5f5;
            padding: 15px;
            border-radius: 10px;
        }
        
        .main-tab-button {
            padding: 12px 16px;
            background: white;
            border: 2px solid #e0e0e0;
            border-radius: 8px;
            cursor: pointer;
            font-size: 1em;
            font-weight: 500;
            transition: all 0.3s ease;
            color: #333;
            /* Allow button text to wrap within the fixed column */
            white-space: normal;
            word-break: break-word;
            overflow-wrap: anywhere;
            text-align: center;
            /* Ensure buttons stretch to fill their grid cell */
            height: 100%;
            align-self: stretch;
            justify-self: stretch;
        }
        
        .main-tab-button:hover {
            background: #f0f0f0;
            border-color: #667eea;
            transform: translateY(-2px);
            box-shadow: 0 4px 8px rgba(0,0,0,0.1);
        }
        
        .main-tab-button.active {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            border-color: #667eea;
            box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
        }
        
        .main-tab-content {
            display: none;
            animation: fadeIn 0.3s ease-in;
        }
        
        .main-tab-content.active {
            display: block;
        }
        
        @keyframes fadeIn {
            from {
                opacity: 0;
                transform: translateY(10px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }
        
        .tabs {
            display: flex;
            gap: 10px;
            margin-bottom: 20px;
            flex-wrap: wrap;
        }
        
        .tab-button {
            padding: 10px 20px;
            background: #f0f0f0;
            border: none;
            border-radius: 6px;
            cursor: pointer;
            font-size: 1em;
            transition: all 0.3s ease;
        }
        
        .tab-button:hover {
            background: #e0e0e0;
        }
        
        .tab-button.active {
            background: #667eea;
            color: white;
        }
        
        .tab-content {
            display: none;
        }
        
        .tab-content.active {
            display: block;
        }
        
        /* Mistake Card Styles */
        .mistake-card {
            background: white;
            border-radius: 10px;
            padding: 25px;
            margin-bottom: 20px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
            border-left: 5px solid #e53e3e;
        }
        
        .mistake-header {
            display: flex;
            gap: 10px;
            margin-bottom: 15px;
            flex-wrap: wrap;
        }
        
        .severity-badge {
            display: inline-block;
            padding: 5px 12px;
            border-radius: 15px;
            font-size: 0.85em;
            font-weight: bold;
            text-transform: uppercase;
        }
        
        .severity-critical {
            background: #fed7d7;
            color: #9b2c2c;
        }
        
        .severity-important {
            background: #feebc8;
            color: #c05621;
        }
        
        .severity-minor {
            background: #c6f6d5;
            color: #22543d;
        }
        
        .mistake-category {
            display: inline-block;
            padding: 5px 12px;
            background: #e2e8f0;
            border-radius: 15px;
            font-size: 0.85em;
            color: #2d3748;
        }
        
        .mistake-title {
            font-size: 1.4em;
            color: #2d3748;
            margin-bottom: 15px;
        }
        
        .mistake-description {
            background: #fff5f5;
            padding: 15px;
            border-radius: 8px;
            margin-bottom: 15px;
            line-height: 1.6;
        }
        
        .mistake-section {
            margin: 15px 0;
        }
        
        .mistake-section-title {
            font-size: 1.1em;
            font-weight: bold;
            color: #2d3748;
            margin-bottom: 10px;
        }
        
        .mistake-section-content {
            background: #f7fafc;
            padding: 15px;
            border-radius: 8px;
            border-left: 4px solid #cbd5e0;
            line-height: 1.6;
        }
        
        .mistake-examples {
            margin: 15px 0;
        }
        
        .example-wrong {
            background: #fff5f5;
            padding: 15px;
            border-radius: 8px;
            margin-bottom: 10px;
            border-left: 4px solid #e53e3e;
        }
        
        .example-correct {
            background: #f0fff4;
            padding: 15px;
            border-radius: 8px;
            border-left: 4px solid #38a169;
        }
        
        /* AI Explanation Styles */
        .ai-explanation-container {
            background: white;
            border-radius: 10px;
            padding: 30px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        }
        
        .ai-section {
            background: #f7fafc;
            border-radius: 10px;
            padding: 20px;
            margin-bottom: 20px;
            border-left: 4px solid #667eea;
        }
        
        .ai-section-title {
            font-size: 1.3em;
            color: #2d3748;
            margin-bottom: 15px;
            display: flex;
            align-items: center;
            gap: 10px;
        }
        
        .ai-section-content {
            line-height: 1.8;
            color: #4a5568;
        }
        
        .ai-section-content p {
            margin-bottom: 12px;
        }
        
        .ai-section-content ul, 
        .ai-section-content ol {
            margin-left: 20px;
            margin-bottom: 12px;
        }
        
        .ai-section-content li {
            margin-bottom: 8px;
        }
        
        .ai-metadata {
            background: linear-gradient(135deg, #667eea15 0%, #764ba215 100%);
            border-radius: 10px;
            padding: 20px;
            margin-top: 30px;
        }
        
        .metadata-row {
            display: flex;
            gap: 15px;
            flex-wrap: wrap;
            margin-bottom: 15px;
        }
        
        .metadata-badge {
            display: inline-block;
            padding: 8px 15px;
            background: white;
            border-radius: 20px;
            font-size: 0.9em;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        }
        
        .metadata-badge.review-ai_generated {
            border-left: 4px solid #4299e1;
        }
        
        .metadata-badge.review-reviewed {
            border-left: 4px solid #48bb78;
        }
        
        .metadata-badge.review-verified {
            border-left: 4px solid #38a169;
            background: #f0fff4;
        }
        
        .metadata-badge.review-needs_update {
            border-left: 4px solid #ed8936;
        }
        
        .reviewer-notes {
            background: white;
            padding: 12px 15px;
            border-radius: 8px;
            font-size: 0.9em;
            color: #4a5568;
        }
        
        /* AI Sub-tabs Styles */
        .ai-sub-tabs {
            display: grid;
            grid-template-columns: repeat(5, minmax(0, 1fr));
            gap: 8px;
            margin-bottom: 25px;
            background: #f7fafc;
            padding: 12px;
            border-radius: 8px;
            border: 1px solid #e2e8f0;
        }
        
        .ai-tab-button {
            padding: 10px 12px;
            background: white;
            border: 2px solid #e2e8f0;
            border-radius: 6px;
            cursor: pointer;
            font-size: 0.9em;
            font-weight: 500;
            transition: all 0.3s ease;
            color: #4a5568;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            white-space: normal;
            word-break: break-word;
            overflow-wrap: anywhere;
            text-align: center;
            height: 100%;
            min-height: 45px;
        }
        
        .ai-tab-icon {
            font-size: 1.1em;
            flex-shrink: 0;
        }
        
        .ai-tab-label {
            line-height: 1.2;
        }
        
        .ai-tab-button:hover {
            background: #edf2f7;
            border-color: #667eea;
            transform: translateY(-1px);
            box-shadow: 0 2px 6px rgba(0,0,0,0.08);
        }
        
        .ai-tab-button.active {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            border-color: #667eea;
            box-shadow: 0 3px 10px rgba(102, 126, 234, 0.3);
        }
        
        .ai-tab-button.active .ai-tab-icon {
            filter: brightness(1.2);
        }
        
        .ai-tab-content {
            display: none;
            animation: fadeInUp 0.4s ease-in;
        }
        
        .ai-tab-content.active {
            display: block;
        }
        
        @keyframes fadeInUp {
            from {
                opacity: 0;
                transform: translateY(15px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }
        
        /* Responsive */
        @media (max-width: 768px) {
            .breadcrumb {
                font-size: 0.85em;
            }
            
            .breadcrumb-container {
                margin-bottom: 15px;
            }
            
            .topic-header h1 {
                font-size: 1.8em;
            }
            
            .topic-meta {
                flex-direction: column;
                gap: 10px;
            }
            
            .image-gallery {
                grid-template-columns: 1fr;
            }
            
            .numerical-header {
                flex-direction: column;
                align-items: flex-start;
                gap: 10px;
            }
            
            .main-tabs {
                /* Keep five columns even on small screens; allow text to wrap inside buttons */
                display: grid;
                grid-template-columns: repeat(5, minmax(0, 1fr));
                gap: 10px;
                overflow-x: visible;
                white-space: normal;
                padding-bottom: 10px;
            }
            
            .mistake-header {
                flex-direction: column;
            }
            
            .metadata-row {
                flex-direction: column;
            }
            
            .ai-explanation-container {
                padding: 20px;
            }
            
            .ai-sub-tabs {
                grid-template-columns: repeat(3, minmax(0, 1fr));
                gap: 6px;
                padding: 10px;
            }
            
            .ai-tab-button {
                font-size: 0.85em;
                padding: 8px 6px;
                min-height: 40px;
            }
            
            .ai-tab-icon {
                font-size: 1em;
            }
        }
        
        /* Print styles */
        @media print {
            .video-embed {
                display: none;
            }
            
            .content-section {
                page-break-inside: avoid;
            }
        }
