/* ========================================
   Programming Logic Learning - Main Styles
   ======================================== */

/* Hero Sections */
.programming-logic-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 140px 0 80px; /* Top padding accounts for fixed header */
    position: relative;
    overflow: hidden;
    min-height: 600px;
    display: flex;
    align-items: center;
}

/* Responsive adjustments for hero section */
@media (max-width: 1200px) {
    .programming-logic-hero {
        padding: 120px 0 60px;
        min-height: 500px;
    }
}

@media (max-width: 768px) {
    .programming-logic-hero {
        padding: 100px 0 50px;
        min-height: 450px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .programming-logic-hero {
        padding: 80px 0 40px;
        min-height: 400px;
    }
}

.programming-logic-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><text x="10" y="50" font-family="monospace" font-size="14" fill="rgba(255,255,255,0.1)">&lt;/&gt;</text></svg>') repeat;
    opacity: 0.1;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
}

.hero-badge i {
    font-size: 1.2rem;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.2;
}

/* Responsive hero title */
@media (max-width: 1200px) {
    .hero-title {
        font-size: 3rem;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
        margin-bottom: 15px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
        margin-bottom: 12px;
        line-height: 1.3;
    }
}

.hero-subtitle {
    font-size: 1.2rem;
    opacity: 0.95;
    margin-bottom: 30px;
    line-height: 1.6;
}

.hero-stats {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
    justify-content: center;
}

/* Responsive hero stats */
@media (max-width: 768px) {
    .hero-stats {
        gap: 20px;
        margin-bottom: 25px;
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .hero-stats {
        gap: 15px;
        margin-bottom: 20px;
        justify-content: space-around;
    }

    .hero-stats .stat-number {
        font-size: 1.5rem;
    }

    .hero-stats .stat-label {
        font-size: 0.8rem;
    }
}

.hero-stats .stat-item {
    text-align: center;
}

.hero-stats .stat-number {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
}

.hero-stats .stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-top: 5px;
}

.hero-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.btn-hero-primary {
    background: white;
    color: #667eea;
    padding: 14px 30px;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-hero-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    color: #667eea;
}

.btn-hero-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 14px 30px;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-hero-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    color: white;
}

.btn-hero-success {
    background: #10b981;
    color: white;
    padding: 14px 30px;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
    border: none;
}

.btn-hero-success:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
    color: white;
}

.completion-badge {
    background: rgba(16, 185, 129, 0.2);
    color: white;
    padding: 14px 30px;
    border-radius: 50px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(16, 185, 129, 0.3);
}

/* Notification Toast Animations */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Completion Modal */
.completion-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.completion-modal-overlay.show {
    opacity: 1;
}

.completion-modal {
    background: white;
    border-radius: 20px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
    position: relative;
}

.completion-modal-overlay.show .completion-modal {
    transform: scale(1);
}

.completion-header {
    text-align: center;
    padding: 40px 30px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 20px 20px 0 0;
}

.completion-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    animation: bounce 1s ease infinite;
}

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

.completion-header h2 {
    font-size: 2rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.completion-header p {
    margin: 0;
    opacity: 0.9;
    font-size: 1.1rem;
}

.completion-body {
    padding: 30px;
}

.completion-body h4 {
    margin-bottom: 20px;
    color: #333;
    font-weight: 600;
}

.completion-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.completion-btn {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.completion-btn i {
    font-size: 30px;
    flex-shrink: 0;
}

.completion-btn div {
    text-align: left;
}

.completion-btn strong {
    display: block;
    font-size: 1rem;
    margin-bottom: 3px;
}

.completion-btn small {
    display: block;
    opacity: 0.8;
    font-size: 0.85rem;
}

.completion-btn.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.completion-btn.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
    color: white;
}

.completion-btn.btn-info {
    background: #17a2b8;
    color: white;
}

.completion-btn.btn-info:hover {
    background: #138496;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(23, 162, 184, 0.3);
    color: white;
}

.completion-btn.btn-secondary {
    background: #6c757d;
    color: white;
}

.completion-btn.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(108, 117, 125, 0.3);
    color: white;
}

.completion-btn.btn-outline {
    background: white;
    border-color: #ddd;
    color: #333;
}

.completion-btn.btn-outline:hover {
    border-color: #667eea;
    color: #667eea;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.1);
}

.completion-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.completion-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

@media (max-width: 768px) {
    .completion-actions {
        grid-template-columns: 1fr;
    }

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

.hero-illustration {
    position: relative;
}

.code-window {
    background: #1e1e1e;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.window-header {
    background: #2d2d2d;
    padding: 12px 15px;
    display: flex;
    gap: 8px;
}

.window-header .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.window-header .dot.red {
    background: #ff5f56;
}

.window-header .dot.yellow {
    background: #ffbd2e;
}

.window-header .dot.green {
    background: #27c93f;
}

.window-body {
    padding: 20px;
}

.window-body pre {
    margin: 0;
    color: #d4d4d4;
    font-family: 'Fira Code', 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
}

.window-body code {
    color: #d4d4d4;
}

.floating-badge {
    position: absolute;
    background: white;
    color: #667eea;
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    animation: float 3s ease-in-out infinite;
}

.floating-badge.badge-1 {
    top: 20px;
    right: -20px;
    animation-delay: 0s;
}

.floating-badge.badge-2 {
    bottom: 30px;
    left: -30px;
    animation-delay: 1s;
}

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

/* Responsive Hero */
@media (max-width: 991px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-illustration {
        margin-top: 40px;
    }

    .floating-badge.badge-1 {
        right: 10px;
    }

    .floating-badge.badge-2 {
        left: 10px;
    }
}

@media (max-width: 767px) {
    .programming-logic-hero {
        padding: 120px 0 60px;
        min-height: auto;
    }

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

    .hero-stats {
        gap: 20px;
    }

    .hero-stats .stat-number {
        font-size: 1.5rem;
    }

    .hero-actions {
        flex-direction: column;
    }

    .btn-hero-primary,
    .btn-hero-secondary {
        width: 100%;
        justify-content: center;
    }
}

/* Module Hero */
.module-hero {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 60px 0;
}

/* Module hero responsive adjustments */
@media (max-width: 768px) {
    .module-hero {
        padding: 40px 0;
        text-align: center;
    }

    .module-hero .container {
        padding: 0 20px;
    }
}

@media (max-width: 480px) {
    .module-hero {
        padding: 30px 0;
    }

    .module-hero .container {
        padding: 0 15px;
    }
}

.module-hero .breadcrumb {
    background: rgba(255, 255, 255, 0.1);
    padding: 10px 20px;
    border-radius: 8px;
}

/* Responsive breadcrumb in module hero */
@media (max-width: 768px) {
    .module-hero .breadcrumb {
        padding: 8px 15px;
        font-size: 0.9rem;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .module-hero .breadcrumb {
        padding: 6px 12px;
        font-size: 0.85rem;
    }
}

.module-hero .breadcrumb-item a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
}

.module-hero .breadcrumb-item.active {
    color: white;
}

.module-icon-large {
    font-size: 3.5rem;
    margin-bottom: 15px;
    opacity: 0.9;
}

.module-meta-info {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 20px;
}

/* Module meta info responsive */
@media (max-width: 768px) {
    .module-meta-info {
        justify-content: center;
        gap: 12px;
        margin-top: 15px;
    }
}

@media (max-width: 480px) {
    .module-meta-info {
        gap: 10px;
        margin-top: 12px;
        flex-direction: column;
        align-items: center;
    }

    .module-meta-info .difficulty-badge,
    .module-meta-info .duration-badge,
    .module-meta-info .topics-badge {
        font-size: 0.85rem;
        padding: 5px 10px;
    }
}

/* Progress Summary Card */
.progress-summary-card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 50px;
}

.progress-stats .stat-item {
    text-align: center;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: #667eea;
    display: block;
}

.stat-label {
    color: #6c757d;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Category Header Styles */
.category-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 30px;
    border-radius: 16px;
    color: white;
    display: flex;
    align-items: center;
    gap: 25px;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.2);
}

.category-icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    flex-shrink: 0;
}

.category-info {
    flex: 1;
}

.category-info h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: white;
}

.category-info p {
    margin-bottom: 15px;
    opacity: 0.9;
    font-size: 1.1rem;
}

.category-progress {
    max-width: 500px;
}

.category-progress .progress {
    background: rgba(255, 255, 255, 0.2);
}

.category-progress .progress-bar {
    background: white !important;
}

.category-progress small {
    color: rgba(255, 255, 255, 0.9);
}

/* Module Cards */
.module-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.module-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.module-header {
    padding: 25px 25px 15px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.module-icon {
    font-size: 2.5rem;
    color: #667eea;
}

.module-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.module-body {
    padding: 0 25px 20px;
    flex: 1;
}

.module-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: #2d3748;
}

.module-description {
    color: #718096;
    margin-bottom: 20px;
    line-height: 1.6;
}

.module-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.module-stats .stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #4a5568;
    font-size: 0.9rem;
}

.module-stats .stat-item i {
    color: #667eea;
}

.progress-bar-wrapper {
    margin-top: 15px;
}

.progress {
    height: 8px;
    background: #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar {
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transition: width 0.6s ease;
}

.module-footer {
    padding: 20px 25px;
    border-top: 1px solid #e2e8f0;
}

.btn-module-primary {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-module-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
    color: white;
}

/* Difficulty Badges */
.difficulty-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.difficulty-beginner {
    background: #d4edda;
    color: #155724;
}

.difficulty-intermediate {
    background: #fff3cd;
    color: #856404;
}

.difficulty-advanced {
    background: #f8d7da;
    color: #721c24;
}

.difficulty-easy {
    background: #d4edda;
    color: #155724;
}

.difficulty-medium {
    background: #fff3cd;
    color: #856404;
}

.difficulty-hard {
    background: #f8d7da;
    color: #721c24;
}

.duration-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    background: #e2e8f0;
    color: #4a5568;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.topics-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    background: #e2e8f0;
    color: #4a5568;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Topic Cards */
.topic-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    display: flex;
    gap: 20px;
    align-items: flex-start;
    transition: box-shadow 0.3s ease;
}

.topic-card:hover {
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.12);
}

.topic-number {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
}

.topic-number i {
    font-size: 1.5rem;
}

.topic-content {
    flex: 1;
}

.topic-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
    gap: 15px;
}

.topic-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2d3748;
    margin: 0;
}

.topic-description {
    color: #718096;
    margin-bottom: 15px;
    line-height: 1.5;
}

.topic-features {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
}

.feature-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    background: #f7fafc;
    color: #4a5568;
    border-radius: 15px;
    font-size: 0.85rem;
}

.feature-badge i {
    color: #667eea;
}

.topic-prerequisites {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px;
    background: #fff3cd;
    border-left: 3px solid #ffc107;
    border-radius: 4px;
    font-size: 0.9rem;
    color: #856404;
    margin-top: 15px;
}

.topic-progress-info {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.status-badge {
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 500;
}

.status-not_started {
    background: #e2e8f0;
    color: #4a5568;
}

.status-in_progress {
    background: #bee3f8;
    color: #2c5282;
}

.status-completed {
    background: #c6f6d5;
    color: #22543d;
}

.time-spent {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #718096;
    font-size: 0.85rem;
}

.topic-action {
    flex-shrink: 0;
}

/* Topic Page */
.topic-page {
    padding: 40px 0;
}

.topic-content-card {
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
}

.topic-content-body {
    line-height: 1.8;
    color: #2d3748;
    font-size: 1.05rem;
}

.topic-content-body p {
    margin-bottom: 15px;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.topic-content-body h2 {
    font-size: 1.75rem;
    margin-top: 30px;
    margin-bottom: 15px;
    color: #1a202c;
}

.topic-content-body h3 {
    font-size: 1.5rem;
    margin-top: 25px;
    margin-bottom: 12px;
    color: #2d3748;
}

.topic-content-body ul,
.topic-content-body ol {
    margin-bottom: 20px;
    padding-left: 30px;
}

.topic-content-body li {
    margin-bottom: 8px;
}

.topic-content-body code {
    background: #2d3748;
    color: #68d391;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.topic-content-body pre {
    background: #2d3748;
    color: #e2e8f0;
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 20px 0;
    white-space: pre;
    font-family: 'Courier New', monospace;
    line-height: 1.6;
}

.topic-content-body pre code {
    background: transparent;
    color: inherit;
    padding: 0;
    border-radius: 0;
}

/* TinyMCE Code Samples - HIGHEST PRIORITY */
.topic-content-body pre[class*="language-"],
.topic-content-body pre.language-markup,
.topic-content-body pre.language-javascript,
.topic-content-body pre.language-css,
.topic-content-body pre.language-php,
.topic-content-body pre.language-python,
.topic-content-body pre.language-java,
.topic-content-body pre.language-c,
.topic-content-body pre.language-cpp,
.topic-content-body pre.language-csharp,
.topic-content-body pre.language-sql,
.topic-content-body pre.language-json,
.topic-content-body pre.language-bash {
    background: #282c34 !important;
    border-radius: 8px !important;
    padding: 1.5rem !important;
    overflow-x: auto !important;
    margin: 1.5rem 0 !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    white-space: pre !important;
    font-family: 'Courier New', Courier, monospace !important;
    font-size: 14px !important;
    line-height: 1.8 !important;
    display: block !important;
}

.topic-content-body pre[class*="language-"] code,
.topic-content-body pre code {
    color: #abb2bf !important;
    font-family: 'Courier New', Courier, monospace !important;
    font-size: 14px !important;
    line-height: 1.8 !important;
    white-space: pre !important;
    display: block !important;
    background: transparent !important;
    padding: 0 !important;
    border: none !important;
}

/* Fallback for all pre tags */
.topic-content-body pre {
    white-space: pre !important;
    font-family: 'Courier New', Courier, monospace !important;
    background: #282c34 !important;
    color: #abb2bf !important;
    padding: 1.5rem !important;
    border-radius: 8px !important;
    overflow-x: auto !important;
    margin: 1.5rem 0 !important;
    display: block !important;
}

/* Video Wrapper */
.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    border-radius: 8px;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Code Examples */
.code-examples-section {
    margin-top: 40px;
}

.section-title {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 25px;
    color: #1a202c;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title i {
    color: #667eea;
}

.code-example-card {
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.example-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.example-header h4 {
    margin: 0;
    font-size: 1.125rem;
    color: #2d3748;
}

.language-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    background: white;
    border: 1px solid #cbd5e0;
    border-radius: 15px;
    font-size: 0.85rem;
    color: #4a5568;
    font-weight: 500;
}

.example-explanation {
    color: #4a5568;
    margin-bottom: 15px;
}

.code-block-wrapper {
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 12px;
}

.code-block-header {
    background: #2d3748;
    color: white;
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.code-language {
    font-size: 0.85rem;
    font-weight: 500;
}

.copy-code-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.2s ease;
}

.copy-code-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.code-block-wrapper pre {
    margin: 0;
    padding: 20px;
    background: #1a202c;
    overflow-x: auto;
}

.code-block-wrapper code {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #e2e8f0;
}

.complexity-info {
    display: flex;
    gap: 15px;
}

.complexity-badge {
    padding: 8px 15px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.9rem;
    color: #4a5568;
}

.complexity-badge strong {
    color: #2d3748;
}

/* Practice Problems */
.problems-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.problem-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.problem-card:hover {
    border-color: #667eea;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.15);
}

.problem-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.problem-header h4 {
    margin: 0;
    font-size: 1.125rem;
    color: #2d3748;
    flex: 1;
}

.problem-description {
    color: #718096;
    margin-bottom: 15px;
    line-height: 1.5;
}

.problem-stats {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 0.85rem;
    color: #718096;
}

.problem-stats .stat-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Sidebar */
.topic-sidebar {
    position: sticky;
    top: 120px;
    max-height: calc(100vh - 140px);
    overflow-y: auto;
    padding-bottom: 20px;
}

.sidebar-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    margin-bottom: 20px;
}

.sidebar-card h4 {
    font-size: 1.125rem;
    margin-bottom: 15px;
    color: #2d3748;
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-selector {
    width: 100%;
    padding: 10px;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    font-size: 0.95rem;
}

.topics-navigation {
    max-height: 400px;
    overflow-y: auto;
}

.topic-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    margin-bottom: 8px;
    background: #f7fafc;
    border-radius: 6px;
    text-decoration: none;
    color: #4a5568;
    transition: background 0.2s ease;
}

.topic-nav-item:hover {
    background: #edf2f7;
}

.topic-nav-item.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.topic-nav-item.completed {
    border-left: 3px solid #10b981;
}

.topic-nav-item.completed:not(.active) {
    background: #f0fdf4;
}

.topic-nav-item.completed .topic-nav-number {
    background: transparent;
}

.topic-nav-number {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    flex-shrink: 0;
}

.topic-nav-item.active .topic-nav-number {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.topic-nav-title {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.topic-nav-title span {
    font-weight: 500;
}

.topic-nav-title small {
    font-size: 0.8rem;
    opacity: 0.8;
}

/* Problem Page */
.problem-page {
    min-height: calc(100vh - 80px);
}

.problem-panel,
.editor-panel {
    height: calc(100vh - 140px);
    overflow-y: auto;
}

.problem-panel {
    background: white;
    border-right: 1px solid #e2e8f0;
    padding: 20px;
}

.problem-title {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: #1a202c;
}

.problem-meta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.stat-badge {
    padding: 5px 12px;
    background: #f7fafc;
    border-radius: 15px;
    font-size: 0.85rem;
    color: #4a5568;
}

.problem-tabs .nav-tabs {
    border-bottom: 2px solid #e2e8f0;
}

.problem-tabs .nav-link {
    color: #718096;
    border: none;
    padding: 12px 20px;
    font-weight: 500;
}

.problem-tabs .nav-link.active {
    color: #667eea;
    border-bottom: 2px solid #667eea;
}

.problem-description {
    padding: 20px 0;
    line-height: 1.8;
}

.problem-description h3 {
    font-size: 1.25rem;
    margin-top: 25px;
    margin-bottom: 12px;
}

.problem-description h4 {
    font-size: 1.125rem;
    margin-top: 20px;
    margin-bottom: 10px;
    color: #2d3748;
}

.constraints-box,
.example-box pre {
    background: #f7fafc;
    padding: 15px;
    border-radius: 6px;
    border-left: 3px solid #667eea;
    white-space: pre-wrap;
    font-family: monospace;
}

.example-box {
    background: #f7fafc;
    border-radius: 8px;
    padding: 20px;
    margin: 15px 0;
}

.example-item {
    margin-bottom: 15px;
}

.example-item:last-child {
    margin-bottom: 0;
}

.example-item strong {
    display: block;
    margin-bottom: 8px;
    color: #2d3748;
}

.example-item pre {
    background: white;
    padding: 12px;
    border-radius: 4px;
    margin: 0;
}

/* Submissions */
.submissions-list {
    padding: 20px 0;
}

.submission-item {
    background: #f7fafc;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    border-left: 3px solid #cbd5e0;
}

.submission-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.submission-status {
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

.status-passed {
    color: #38a169;
    border-left-color: #38a169;
}

.submission-item.status-passed {
    border-left-color: #38a169;
}

.status-failed {
    color: #e53e3e;
}

.submission-details {
    display: flex;
    gap: 20px;
    font-size: 0.9rem;
    color: #718096;
}

.submission-error {
    margin-top: 10px;
    padding: 10px;
    background: #fff5f5;
    border-radius: 4px;
    color: #c53030;
}

/* Hints */
.hint-item {
    margin-bottom: 15px;
}

.hint-toggle {
    width: 100%;
    padding: 12px 15px;
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: background 0.2s ease;
    font-weight: 500;
    color: #2d3748;
}

.hint-toggle:hover {
    background: #edf2f7;
}

.hint-content {
    padding: 15px;
    background: #fffaf0;
    border: 1px solid #fbd38d;
    border-top: none;
    border-radius: 0 0 6px 6px;
    margin-top: -6px;
}

.toggle-icon {
    transition: transform 0.3s ease;
}

/* Editor Panel */
.editor-panel {
    background: #1a202c;
    padding: 0;
}

.editor-header {
    background: #2d3748;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #4a5568;
}

.language-selector {
    max-width: 200px;
    background: #1a202c;
    color: white;
    border: 1px solid #4a5568;
}

.editor-actions {
    display: flex;
    gap: 10px;
}

.code-editor-wrapper {
    height: calc(60vh - 100px);
}

.code-editor {
    width: 100%;
    height: 100%;
    padding: 20px;
    background: #1a202c;
    color: #e2e8f0;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    border: none;
    resize: none;
    outline: none;
}

.CodeMirror {
    height: 100%;
    font-size: 14px;
}

.output-panel {
    background: white;
    border-top: 1px solid #e2e8f0;
    height: calc(40vh - 40px);
    display: flex;
    flex-direction: column;
}

.output-header {
    padding: 12px 20px;
    background: #f7fafc;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.output-header h5 {
    margin: 0;
    font-size: 1rem;
    color: #2d3748;
}

.output-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.output-text,
.error-text {
    background: #f7fafc;
    padding: 15px;
    border-radius: 6px;
    white-space: pre-wrap;
    font-family: monospace;
    font-size: 0.9rem;
}

.error-text {
    background: #fff5f5;
    color: #c53030;
}

/* Progress Dashboard */
.progress-dashboard {
    padding: 50px 0;
}

.page-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 10px;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    gap: 15px;
    transition: transform 0.2s ease;
}

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

.stat-icon {
    font-size: 2.5rem;
}

.stat-info h3 {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
    color: #2d3748;
}

.stat-info p {
    margin: 0;
    color: #718096;
    font-size: 0.9rem;
}

/* Module Progress Cards */
.module-progress-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.module-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.module-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.module-icon-small {
    font-size: 2rem;
    color: #667eea;
}

.module-meta-small {
    display: flex;
    gap: 10px;
    margin-top: 5px;
}

.progress-percentage {
    font-weight: 600;
    color: #4a5568;
}

.topics-breakdown {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e2e8f0;
}

.breakdown-stat {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #4a5568;
}

.breakdown-stat i {
    font-size: 1.25rem;
}

/* Activity Timeline */
.activity-timeline {
    max-width: 800px;
}

.activity-item {
    display: flex;
    gap: 20px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.activity-icon {
    flex-shrink: 0;
    font-size: 1.5rem;
}

.activity-content h5 {
    font-size: 1.125rem;
    margin-bottom: 5px;
    color: #2d3748;
}

.activity-content p {
    margin-bottom: 5px;
    color: #718096;
}

/* Stats Cards */
.stats-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    height: 100%;
}

.stats-card h4 {
    font-size: 1.25rem;
    margin-bottom: 20px;
    color: #2d3748;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
}

.stat-item-detailed {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 0.85rem;
    color: #718096;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #2d3748;
}

/* Language Stats */
.language-stat-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.language-name {
    flex-shrink: 0;
    width: 100px;
    font-weight: 500;
    color: #2d3748;
}

.language-bar {
    flex: 1;
    height: 24px;
    background: #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
}

.language-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transition: width 0.6s ease;
}

.language-count {
    flex-shrink: 0;
    font-weight: 600;
    color: #4a5568;
}

/* Benefit Cards */
.benefit-card {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s ease;
}

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

.benefit-icon {
    font-size: 3rem;
    color: #667eea;
    margin-bottom: 15px;
}

.benefit-card h4 {
    font-size: 1.25rem;
    margin-bottom: 10px;
    color: #2d3748;
}

.benefit-card p {
    color: #718096;
    margin: 0;
}

/* Progress Circle */
.progress-circle-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.circular-progress {
    position: relative;
}

.progress-ring-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.2);
    stroke-width: 8;
}

.progress-ring-fill {
    fill: none;
    stroke: white;
    stroke-width: 8;
    stroke-linecap: round;
    transform: rotate(-90deg);
    transform-origin: 50% 50%;
    transition: stroke-dashoffset 0.5s ease;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.progress-text .percentage {
    display: block;
    font-size: 1.75rem;
    font-weight: 700;
    color: white;
}

.progress-text .label {
    display: block;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.9);
}

/* Empty State */
.empty-state {
    padding: 60px 20px;
}

.empty-state h3 {
    color: #4a5568;
    margin-bottom: 10px;
}

/* Responsive */
@media (max-width: 991px) {
    .topic-sidebar {
        position: static !important;
        margin-top: 30px;
    }

    .problem-panel,
    .editor-panel {
        height: auto;
        min-height: 500px;
    }
}

@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2rem;
    }

    .module-header {
        flex-direction: column;
        gap: 15px;
    }

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

    .topic-number {
        align-self: flex-start;
    }

    .problem-header {
        flex-direction: column;
        gap: 10px;
    }

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

    .hero-actions {
        flex-direction: column;
    }
}

/* ========================================
   Topic Page Hero Section
   ======================================== */

.topic-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 140px 0 100px;
    position: relative;
    overflow: hidden;
    min-height: 450px;
}

.topic-hero .hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="2" fill="rgba(255,255,255,0.1)"/></svg>') repeat;
    opacity: 0.3;
}

.topic-hero .container {
    position: relative;
    z-index: 2;
}

.topic-hero .hero-breadcrumb .breadcrumb {
    background: rgba(255, 255, 255, 0.1);
    padding: 10px 20px;
    border-radius: 50px;
    backdrop-filter: blur(10px);
    display: inline-flex;
}

.topic-hero .hero-breadcrumb .breadcrumb-item {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
}

.topic-hero .hero-breadcrumb .breadcrumb-item a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.topic-hero .hero-breadcrumb .breadcrumb-item a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.topic-hero .hero-breadcrumb .breadcrumb-item.active {
    color: rgba(255, 255, 255, 0.7);
}

.topic-hero .hero-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255, 255, 255, 0.6);
    content: "›";
    padding: 0 8px;
}

.topic-hero .hero-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 25px;
    line-height: 1.2;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
}

.topic-hero .hero-meta {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.topic-hero .hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.2);
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.topic-hero .hero-badge i {
    font-size: 1.1rem;
}

.topic-hero .hero-badge.difficulty-beginner {
    background: rgba(72, 187, 120, 0.3);
    border-color: rgba(72, 187, 120, 0.5);
}

.topic-hero .hero-badge.difficulty-intermediate {
    background: rgba(237, 137, 54, 0.3);
    border-color: rgba(237, 137, 54, 0.5);
}

.topic-hero .hero-badge.difficulty-advanced {
    background: rgba(245, 101, 101, 0.3);
    border-color: rgba(245, 101, 101, 0.5);
}

.topic-hero .hero-badge.progress-badge {
    background: rgba(66, 153, 225, 0.3);
    border-color: rgba(66, 153, 225, 0.5);
}

.topic-hero .hero-description {
    font-size: 1.15rem;
    opacity: 0.95;
    max-width: 700px;
    margin: 0 auto 30px;
    line-height: 1.7;
}

.topic-hero .hero-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    align-items: center;
}

.topic-hero .btn-hero-primary {
    background: white;
    color: #667eea;
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.05rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.topic-hero .btn-hero-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    background: #f7fafc;
}

.topic-hero .btn-hero-primary i {
    font-size: 1.2rem;
}

.topic-hero .completion-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(72, 187, 120, 0.3);
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 600;
    border: 2px solid rgba(72, 187, 120, 0.5);
    backdrop-filter: blur(10px);
}

.topic-hero .completion-badge i {
    font-size: 1.3rem;
    color: #48bb78;
}

.topic-hero .hero-wave {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
}

.topic-hero .hero-wave svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 80px;
}

/* Topic Page Adjustments */
.topic-page {
    padding-top: 50px;
    padding-bottom: 60px;
    background: #f7fafc;
    min-height: 600px;
}

/* ========================================
   Practice Problem Hero Section
   ======================================== */

.practice-hero {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 140px 0 100px;
    position: relative;
    overflow: hidden;
    min-height: 400px;
}

.practice-hero .hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="60" height="60" xmlns="http://www.w3.org/2000/svg"><text x="10" y="30" font-family="monospace" font-size="24" fill="rgba(255,255,255,0.1)">{ }</text></svg>') repeat;
    opacity: 0.3;
}

.practice-hero .container {
    position: relative;
    z-index: 2;
}

.practice-hero .hero-breadcrumb .breadcrumb {
    background: rgba(255, 255, 255, 0.1);
    padding: 10px 20px;
    border-radius: 50px;
    backdrop-filter: blur(10px);
    display: inline-flex;
}

.practice-hero .hero-breadcrumb .breadcrumb-item {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
}

.practice-hero .hero-breadcrumb .breadcrumb-item a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.practice-hero .hero-breadcrumb .breadcrumb-item a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.practice-hero .hero-breadcrumb .breadcrumb-item.active {
    color: rgba(255, 255, 255, 0.7);
}

.practice-hero .hero-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255, 255, 255, 0.6);
    content: "›";
    padding: 0 8px;
}

.practice-hero .hero-title {
    font-size: 2.75rem;
    font-weight: 800;
    margin-bottom: 25px;
    line-height: 1.2;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
}

.practice-hero .hero-meta {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.practice-hero .hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.2);
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.practice-hero .hero-badge i {
    font-size: 1.1rem;
}

.practice-hero .hero-badge.difficulty-beginner {
    background: rgba(72, 187, 120, 0.3);
    border-color: rgba(72, 187, 120, 0.5);
}

.practice-hero .hero-badge.difficulty-intermediate {
    background: rgba(237, 137, 54, 0.3);
    border-color: rgba(237, 137, 54, 0.5);
}

.practice-hero .hero-badge.difficulty-advanced {
    background: rgba(245, 101, 101, 0.3);
    border-color: rgba(245, 101, 101, 0.5);
}

.practice-hero .hero-badge.success-badge {
    background: rgba(66, 153, 225, 0.3);
    border-color: rgba(66, 153, 225, 0.5);
}

.practice-hero .hero-badge.points-badge {
    background: rgba(251, 191, 36, 0.3);
    border-color: rgba(251, 191, 36, 0.5);
}

.practice-hero .hero-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    align-items: center;
}

.practice-hero .btn-hero-primary {
    background: white;
    color: #f5576c;
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.05rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.practice-hero .btn-hero-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    background: #f7fafc;
}

.practice-hero .btn-hero-primary i {
    font-size: 1.2rem;
}

.practice-hero .completion-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(72, 187, 120, 0.3);
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 600;
    border: 2px solid rgba(72, 187, 120, 0.5);
    backdrop-filter: blur(10px);
}

.practice-hero .completion-badge i {
    font-size: 1.3rem;
    color: #48bb78;
}

.practice-hero .hero-wave {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
}

.practice-hero .hero-wave svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 80px;
}

/* Problem Page Adjustments */
.problem-page {
    padding-top: 0;
}
/* Enhanced Code Formatting for Highlighted Class */
.highlighted pre {
    background: #1a202c !important;
    border-radius: 8px;
    padding: 20px !important;
    overflow-x: auto;
    margin: 20px 0;
    border: 1px solid #2d3748;
}

.highlighted pre code {
    background: transparent !important;
    color: #e2e8f0 !important;
    font-family: 'Courier New', Consolas, Monaco, monospace !important;
    font-size: 0.9rem;
    line-height: 1.6;
    white-space: pre;
    display: block;
}

.highlighted code {
    background: #2d3748;
    color: #68d391;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', Consolas, Monaco, monospace;
    font-size: 0.9em;
}

.highlighted p code,
.highlighted li code {
    background: #2d3748;
    color: #68d391;
    padding: 3px 8px;
    border-radius: 4px;
    font-family: 'Courier New', Consolas, Monaco, monospace;
    font-size: 0.88em;
    font-weight: 600;
    white-space: nowrap;
}

/* Prism.js Line Numbers Support */
.highlighted pre.line-numbers {
    position: relative;
    padding-left: 3.8em;
    counter-reset: linenumber;
}

.highlighted pre.line-numbers > code {
    position: relative;
    white-space: pre;
}

.highlighted .line-numbers .line-numbers-rows {
    position: absolute;
    pointer-events: none;
    top: 0;
    font-size: 100%;
    left: -3.8em;
    width: 3em;
    letter-spacing: -1px;
    border-right: 1px solid #4a5568;
    user-select: none;
}

.highlighted .line-numbers-rows > span {
    display: block;
    counter-increment: linenumber;
}

.highlighted .line-numbers-rows > span:before {
    content: counter(linenumber);
    color: #718096;
    display: block;
    padding-right: 0.8em;
    text-align: right;
}

/* ============================================
   Quiz Section Styles
============================================ */
.quiz-section {
    margin-top: 60px;
}

.quiz-card {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 20px;
    padding: 40px;
    display: flex;
    align-items: center;
    gap: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.quiz-card.quiz-unlocked {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.quiz-card.quiz-locked {
    background: linear-gradient(135deg, #cbd5e0 0%, #a0aec0 100%);
    color: #4a5568;
}

.quiz-icon {
    font-size: 80px;
    flex-shrink: 0;
}

.quiz-unlocked .quiz-icon {
    color: #ffd700;
    animation: trophy-bounce 2s infinite;
}

.quiz-locked .quiz-icon {
    color: #718096;
}

.quiz-content {
    flex-grow: 1;
}

.quiz-content h3 {
    font-size: 28px;
    margin-bottom: 15px;
    font-weight: 700;
}

.quiz-content p {
    font-size: 16px;
    opacity: 0.9;
}

.quiz-details {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.quiz-card .btn-hero-success {
    font-size: 18px;
    padding: 12px 35px;
}

@keyframes trophy-bounce {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-10px) rotate(-5deg);
    }
    75% {
        transform: translateY(-5px) rotate(5deg);
    }
}

/* Mobile responsive */
@media (max-width: 768px) {
    .quiz-card {
        flex-direction: column;
        text-align: center;
        padding: 30px 20px;
    }

    .quiz-icon {
        font-size: 60px;
    }

    .quiz-content h3 {
        font-size: 24px;
    }
}

/* ========================================
   Filter Styles
   ======================================== */
.module-filters {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.module-filters .form-control,
.module-filters .form-select {
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    padding: 10px 15px;
    font-size: 0.95rem;
}

.module-filters .form-control:focus,
.module-filters .form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.15);
}

.module-filters .input-group-text {
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-right: none;
    color: #718096;
}

/* ========================================
   Category Stats Badges
   ======================================== */
.category-stats-badges {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.category-stats-badges .badge {
    padding: 8px 15px;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.category-stats-badges .badge i {
    font-size: 1rem;
}

/* Module Item States */
.module-item {
    transition: all 0.3s ease;
}

.module-item[style*="display: none"] {
    opacity: 0;
    transform: scale(0.95);
}

/* No Results Message */
#no-results {
    animation: fadeIn 0.3s ease;
}

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

/* Responsive Filters */
@media (max-width: 768px) {
    .module-filters {
        padding: 15px;
    }

    .category-stats-badges {
        justify-content: center;
        margin-top: 10px;
    }

    .category-header {
        text-align: center;
    }
}
