/* ── JS Page Specific Styles ──── */

/* Progress bar */
.js-progress-wrap {
    background: var(--bg-header);
    padding: 10px 24px;
    border-bottom: 1px solid var(--border-modal);
}

.js-progress-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.js-progress-track {
    height: 6px;
    background: var(--border-modal);
    border-radius: 20px;
    overflow: hidden;
}

#js-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #f59e0b, #10b981);
    border-radius: 20px;
    width: 0%;
    transition: width 0.5s ease;
}

#js-reset-btn {
    background: none;
    border: 1px solid var(--border-modal);
    color: var(--text-secondary);
    border-radius: 20px;
    padding: 2px 10px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
}

#js-reset-btn:hover {
    color: #ef4444;
    border-color: #ef4444;
}

/* Category filter bar */
#category-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 16px 0 8px;
    justify-content: center;
}



/* Category section header */
.js-category-section .group-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.js-category-section .group-title h2 {
    margin: 0;
    text-align: left;
    font-size: 1.3rem;
}

/* JS Topic card enhancements */
.js-topic-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
}

.js-topic-card:hover {
    transform: translateY(-3px) scale(1.02);
}

.js-topic-card.active-card {
    border-color: #f59e0b;
    box-shadow: 0 0 14px rgba(245, 158, 11, 0.45);
}

.js-card-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.js-card-desc {
    font-size: 0.78rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.js-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 4px;
}

.js-difficulty-badge {
    font-size: 0.68rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.badge-beginner {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.badge-intermediate {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.js-learn-btn {
    font-size: 0.75rem;
    background: var(--btn-run-bg);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 4px 10px;
    cursor: pointer;
    transition: background 0.2s;
}

.js-learn-btn:hover {
    background: var(--btn-run-hover);
}

/* Modal difficulty badge */
.modal-difficulty-badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 8px;
}

/* Modal navigation */



/* JS hero banner */
.js-hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #0f172a 100%);
    border: 1px solid #312e81;
    border-radius: 16px;
    padding: 32px 24px;
    text-align: center;
    margin: 0 auto 24px;
    max-width: 1100px;
    box-shadow: 0 0 40px rgba(99, 102, 241, 0.2);
}

html[data-theme="light"] .js-hero {
    background: linear-gradient(135deg, #eff6ff 0%, #f0f4ff 100%);
    border-color: #c7d2fe;
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.1);
}

.js-hero-emoji {
    font-size: 3rem;
    margin-bottom: 8px;
}

.js-hero h1 {
    font-size: 2rem;
    color: #f59e0b;
    text-shadow: 0 0 20px rgba(245, 158, 11, 0.4);
    margin: 0 0 8px;
}

.js-hero p {
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    font-size: 0.95rem;
}

.js-search-wrap {
    margin-top: 16px;
}

#jsSearchBar {
    width: 60%;
    max-width: 420px;
    padding: 10px 16px;
    border: 2px solid var(--search-border);
    border-radius: 25px;
    font-size: 15px;
    outline: none;
    background: var(--search-bg);
    color: var(--search-text);
    transition: border-color 0.3s, box-shadow 0.3s;
}

#jsSearchBar:focus {
    border-color: #f59e0b;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.3);
}

#jsSearchBar::placeholder {
    color: var(--text-secondary);
}

@media (max-width: 600px) {
    #jsSearchBar {
        width: 90%;
    }

    .js-hero h1 {
        font-size: 1.4rem;
    }

    #category-filter-bar {
        gap: 6px;
    }
}