/* 📚 Topic-Content.css - Individual Topic Pages Styling */

/* Content Container */
.topic-content-wrapper {
    max-width: 900px;
    margin: 0 auto;
    padding: 120px 30px 60px;
}

/* Topic Header */
.topic-header {
    text-align: center;
    margin-bottom: 60px;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.topic-title {
    font-family: var(--font-heading);
    font-size: 2.8rem;
    margin-bottom: 15px;
    background: linear-gradient(135deg, var(--text-primary), var(--accent-color));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.topic-intro {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.7;
}

/* Breadcrumb Navigation */
.breadcrumb {
    display: flex;
    gap: 10px;
    align-items: center;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.breadcrumb a {
    color: var(--accent-color);
    text-decoration: none;
    transition: opacity 0.2s;
}

.breadcrumb a:hover {
    opacity: 0.7;
}

.breadcrumb-separator {
    opacity: 0.4;
}

/* Section Box - Learning Content */
.section-box {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.4), rgba(30, 41, 59, 0.2));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-left: 4px solid var(--accent-color);
    border-radius: 16px;
    padding: 30px;
    margin: 30px 0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.section-box:hover {
    transform: translateX(4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.section-box h2 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    color: var(--text-primary);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-box h3 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    color: var(--text-primary);
    margin: 25px 0 15px;
}

.section-box p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 15px;
}

.section-box ul,
.section-box ol {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-left: 25px;
    margin-bottom: 15px;
}

.section-box li {
    margin-bottom: 10px;
}

/* Example Box */
.example-box {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.05));
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    position: relative;
    overflow: hidden;
}

.example-box::before {
    content: '💡';
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 1.5rem;
    opacity: 0.3;
}

.example-box h3 {
    font-size: 1.1rem;
    color: var(--accent-color);
    margin-bottom: 15px;
    font-weight: 600;
}

.example-box p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 12px;
}

.example-box code,
.example-box .math-expression {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    background: rgba(0, 0, 0, 0.3);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.95em;
    color: #a5b4fc;
}

/* Practice Questions Section */
.practice-section {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(16, 185, 129, 0.02));
    border: 2px dashed rgba(16, 185, 129, 0.3);
    border-radius: 20px;
    padding: 35px;
    margin: 40px 0;
}

.practice-section h3 {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    color: #10b981;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.question-grid {
    display: grid;
    gap: 15px;
}

.question-item {
    background: rgba(30, 41, 59, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    gap: 15px;
}

.question-item:hover {
    background: rgba(30, 41, 59, 0.6);
    border-color: rgba(16, 185, 129, 0.3);
    transform: translateX(5px);
}

.question-number {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #10b981, #059669);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
    font-size: 0.9rem;
}

.question-text {
    color: var(--text-secondary);
    line-height: 1.6;
    flex: 1;
}

/* Challenge Questions Section */
.challenge-section {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(239, 68, 68, 0.05));
    border: 2px dashed rgba(245, 158, 11, 0.4);
    border-radius: 20px;
    padding: 35px;
    margin: 40px 0;
    position: relative;
}

.challenge-section::before {
    content: '🔥';
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 3rem;
    opacity: 0.15;
}

.challenge-section h3 {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    color: #f59e0b;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.challenge-section .question-item {
    border-color: rgba(245, 158, 11, 0.2);
}

.challenge-section .question-item:hover {
    border-color: rgba(245, 158, 11, 0.4);
    background: rgba(245, 158, 11, 0.05);
}

.challenge-section .question-number {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

/* Navigation Between Topics */
.topic-navigation {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-button {
    flex: 1;
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 20px 25px;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-button:hover {
    background: rgba(30, 41, 59, 0.8);
    border-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.nav-button-prev {
    justify-content: flex-start;
}

.nav-button-next {
    justify-content: flex-end;
}

.nav-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-title {
    font-size: 1.1rem;
    color: var(--text-primary);
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
    .topic-content-wrapper {
        padding: 100px 20px 40px;
    }

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

    .topic-intro {
        font-size: 1rem;
    }

    .section-box {
        padding: 20px;
    }

    .practice-section,
    .challenge-section {
        padding: 25px;
    }

    .topic-navigation {
        flex-direction: column;
    }

    .question-item {
        flex-direction: column;
        gap: 12px;
    }
}

/* Smooth Scroll Animations */
.animate-on-scroll {
    opacity: 1;
    /* Ensure content is always visible */
}

/* ========================= */
/* LEVEL 2: CYAN/BLUE THEME  */
/* ========================= */

body.level-2 .section-box {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.1), rgba(14, 165, 233, 0.05));
    border-left-color: #06b6d4;
}

body.level-2 .section-box:hover {
    box-shadow: 0 8px 32px rgba(6, 182, 212, 0.2);
}

body.level-2 .example-box {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.12), rgba(14, 165, 233, 0.06));
    border-color: rgba(56, 189, 248, 0.3);
}

body.level-2 .topic-title {
    background: linear-gradient(135deg, #38bdf8, #06b6d4, #0284c7);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

body.level-2 .practice-section {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.1), rgba(6, 182, 212, 0.02));
    border-color: rgba(6, 182, 212, 0.4);
}

body.level-2 .practice-section h3 {
    color: #06b6d4;
}

body.level-2 .question-number {
    background: linear-gradient(135deg, #06b6d4, #0284c7);
}

body.level-2 .question-item:hover {
    border-color: rgba(6, 182, 212, 0.4);
    box-shadow: 0 4px 16px rgba(6, 182, 212, 0.15);
}

body.level-2 .challenge-section {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.1), rgba(219, 39, 119, 0.05));
    border-color: rgba(236, 72, 153, 0.4);
}

body.level-2 .challenge-section h3 {
    color: #ec4899;
}

body.level-2 .challenge-section .question-number {
    background: linear-gradient(135deg, #ec4899, #db2777);
}

/* Enhanced Hover Effects for Level 2 */
body.level-2 .section-box:hover {
    transform: translateX(6px) scale(1.01);
}

body.level-2 .question-item {
    position: relative;
    overflow: hidden;
}

body.level-2 .question-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(6, 182, 212, 0.1), transparent);
    transition: left 0.5s ease;
}

body.level-2 .question-item:hover::before {
    left: 100%;
}

/* Pulse Animation for Level 2 */
@keyframes pulse-cyan {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(6, 182, 212, 0.4);
    }

    50% {
        box-shadow: 0 0 0 10px rgba(6, 182, 212, 0);
    }
}

body.level-2 .practice-section h3,
body.level-2 .challenge-section h3 {
    animation: pulse-cyan 3s infinite;
}

/* ========================= */
/* LEVEL 3: PURPLE/VIOLET THEME */
/* ========================= */

body.level-3 .section-box {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(167, 139, 250, 0.05));
    border-left-color: #8b5cf6;
}

body.level-3 .section-box:hover {
    box-shadow: 0 8px 32px rgba(139, 92, 246, 0.2);
}

body.level-3 .example-box {
    background: linear-gradient(135deg, rgba(167, 139, 250, 0.12), rgba(139, 92, 246, 0.06));
    border-color: rgba(167, 139, 250, 0.3);
}

body.level-3 .topic-title {
    background: linear-gradient(135deg, #a78bfa, #8b5cf6, #7c3aed);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

body.level-3 .practice-section {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(139, 92, 246, 0.02));
    border-color: rgba(139, 92, 246, 0.4);
}

body.level-3 .practice-section h3 {
    color: #8b5cf6;
}

body.level-3 .question-number {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

body.level-3 .question-item:hover {
    border-color: rgba(139, 92, 246, 0.4);
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.15);
}

body.level-3 .challenge-section {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.1), rgba(219, 39, 119, 0.05));
    border-color: rgba(236, 72, 153, 0.4);
}

body.level-3 .challenge-section h3 {
    color: #ec4899;
}

body.level-3 .challenge-section .question-number {
    background: linear-gradient(135deg, #ec4899, #db2777);
}

/* Enhanced Hover Effects for Level 3 */
body.level-3 .section-box:hover {
    transform: translateX(6px) scale(1.01);
}

body.level-3 .question-item {
    position: relative;
    overflow: hidden;
}

body.level-3 .question-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.1), transparent);
    transition: left 0.5s ease;
}

body.level-3 .question-item:hover::before {
    left: 100%;
}

/* Pulse Animation for Level 3 */
@keyframes pulse-purple {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.4);
    }

    50% {
        box-shadow: 0 0 0 10px rgba(139, 92, 246, 0);
    }
}

body.level-3 .practice-section h3,
body.level-3 .challenge-section h3 {
    animation: pulse-purple 3s infinite;
}

/* Additional Box Styles for Level 3 */
body.level-3 .definition-box {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(139, 92, 246, 0.05));
    border-left: 4px solid #d946ef;
    border-radius: 12px;
    padding: 20px;
    margin: 25px 0;
}

body.level-3 .theorem-box {
    background: linear-gradient(135deg, rgba(167, 139, 250, 0.2), rgba(139, 92, 246, 0.1));
    border-left: 4px solid #8b5cf6;
    border-radius: 12px;
    padding: 25px;
    margin: 30px 0;
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.15);
}

body.level-3 .note-box {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(245, 158, 11, 0.05));
    border-left: 4px solid #f59e0b;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
}

body.level-3 .definition-box h3,
body.level-3 .theorem-box h3,
body.level-3 .note-box h3 {
    color: var(--text-primary);
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.2rem;
    font-family: var(--font-heading);
}

body.level-3 .definition-box p,
body.level-3 .theorem-box p,
body.level-3 .note-box p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 10px;
}

body.level-3 .definition-box ul,
body.level-3 .theorem-box ul,
body.level-3 .note-box ul {
    color: var(--text-secondary);
    margin-left: 20px;
}