/* ==========================================================================
   Stressless Language Lab - Unified Styles
   Brand Palette:
   - Primary Sage: #7faf7b
   - Accent Warm: #e8a96a
   - Dark Slate: #2a2520
   - Soft Cream: #fdfaf4
   - Card Border: #edf5ec
   - Secondary Slate: #7a736a
   ========================================================================== */

:root {
    --lab-primary: #7faf7b;
    --lab-primary-dark: #63935f;
    --lab-accent: #e8a96a;
    --lab-accent-hover: #d59654;
    --lab-dark: #2a2520;
    --lab-muted: #7a736a;
    --lab-bg-light: #fdfaf4;
    --lab-card-bg: #ffffff;
    --lab-border: #e6eee5;
    --lab-radius: 16px;
    --lab-radius-sm: 8px;
    --lab-shadow: 0 10px 25px rgba(42, 37, 32, 0.05);
}

/* --------------------------------------------------------------------------
   1. MY LAB DASHBOARD
   -------------------------------------------------------------------------- */

.stressless-my-lab-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--lab-dark);
}

.my-lab-hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #ffffff 0%, #edf5ec 100%);
    padding: 36px 40px;
    border-radius: var(--lab-radius);
    border: 1px solid var(--lab-border);
    box-shadow: var(--lab-shadow);
    margin-bottom: 30px;
}

.my-lab-badge {
    display: inline-block;
    background: rgba(127, 175, 123, 0.15);
    color: var(--lab-primary-dark);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 10px;
}

.my-lab-greeting {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 32px;
    font-weight: 700;
    color: var(--lab-dark);
    margin: 0 0 10px 0;
}

.my-lab-subgreeting {
    font-size: 16px;
    color: var(--lab-muted);
    margin: 0;
    max-width: 600px;
    line-height: 1.5;
}

.my-lab-hero-avatar img {
    border-radius: 50%;
    border: 4px solid #ffffff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

/* Action Grid (Continue Learning & Next Class) */
.my-lab-action-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 24px;
    margin-bottom: 40px;
}

@media (max-width: 768px) {
    .my-lab-hero {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    .my-lab-action-grid {
        grid-template-columns: 1fr;
    }
}

.my-lab-card {
    background: var(--lab-card-bg);
    border-radius: var(--lab-radius);
    border: 1px solid var(--lab-border);
    box-shadow: var(--lab-shadow);
    padding: 28px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card-header-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    color: var(--lab-primary-dark);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 16px;
}

.card-header-tag.tag-live {
    color: #b82105;
}

.card-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 6px 0;
    color: var(--lab-dark);
}

.card-subtitle {
    font-size: 15px;
    color: var(--lab-muted);
    margin: 0 0 20px 0;
}

.progress-bar-wrap {
    background: #edf5ec;
    border-radius: 10px;
    height: 10px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-bar-fill {
    background: linear-gradient(90deg, var(--lab-primary), var(--lab-accent));
    height: 100%;
    border-radius: 10px;
    transition: width 0.5s ease;
}

.progress-label {
    font-size: 13px;
    color: var(--lab-muted);
    font-weight: 600;
    margin-bottom: 20px;
}

.live-datetime {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    margin-bottom: 12px;
    color: var(--lab-dark);
}

.live-cycle-steps {
    margin-bottom: 20px;
}

.cycle-step-link {
    font-size: 14px;
    color: var(--lab-primary-dark);
    text-decoration: none;
    font-weight: 600;
}
.cycle-step-link:hover {
    text-decoration: underline;
}

/* Buttons */
.btn-lab-primary, .btn-lab-zoom, .btn-next-station, .btn-check-answers, .btn-jump-cafe, .btn-open-story {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--lab-primary);
    color: #ffffff !important;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    padding: 12px 24px;
    border-radius: var(--lab-radius-sm);
    border: none;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

.btn-lab-primary:hover, .btn-next-station:hover, .btn-check-answers:hover, .btn-jump-cafe:hover, .btn-open-story:hover {
    background: var(--lab-accent);
}

.btn-lab-zoom {
    background: #2D8CFF;
    gap: 8px;
}
.btn-lab-zoom:hover {
    background: #1765c7;
}

.btn-prev-station {
    background: transparent;
    border: 1.5px solid #d3d1c7;
    color: var(--lab-dark);
    font-weight: 600;
    padding: 12px 20px;
    border-radius: var(--lab-radius-sm);
    cursor: pointer;
}

.btn-back-mylab {
    background: var(--lab-accent);
    color: #ffffff !important;
    font-weight: 600;
    padding: 12px 24px;
    border-radius: var(--lab-radius-sm);
    text-decoration: none;
}

/* Sections */
.my-lab-section {
    margin-bottom: 40px;
}

.section-heading h2 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 24px;
    margin: 0 0 6px 0;
    color: var(--lab-dark);
}

.section-sub {
    font-size: 14px;
    color: var(--lab-muted);
    display: block;
    margin-bottom: 20px;
}

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

.new-item-card {
    background: var(--lab-card-bg);
    border-radius: var(--lab-radius);
    border: 1px solid var(--lab-border);
    padding: 24px;
    box-shadow: var(--lab-shadow);
}

.item-tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 4px;
    margin-bottom: 12px;
}
.tag-story { background: #edf5ec; color: var(--lab-primary-dark); }
.tag-listening { background: #fef5ea; color: #d59654; }
.tag-discussion { background: #f0f4f8; color: #1159af; }

.new-item-card h4 {
    font-size: 17px;
    margin: 0 0 6px 0;
    color: var(--lab-dark);
}

.new-item-card p {
    font-size: 14px;
    color: var(--lab-muted);
    margin: 0 0 16px 0;
}

.item-link {
    font-size: 14px;
    font-weight: 600;
    color: var(--lab-primary-dark);
    text-decoration: none;
}
.item-link:hover { text-decoration: underline; }

/* Explore Hub Grid */
.explore-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
}

.explore-card {
    background: var(--lab-card-bg);
    border-radius: var(--lab-radius);
    border: 1px solid var(--lab-border);
    box-shadow: var(--lab-shadow);
    padding: 24px;
    display: flex;
    align-items: flex-start;
    gap: 18px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s, border-color 0.2s;
}

.explore-card:hover {
    transform: translateY(-3px);
    border-color: var(--lab-primary);
}

.explore-icon {
    font-size: 32px;
    background: #edf5ec;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    flex-shrink: 0;
}

.explore-info h3 {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 6px 0;
    color: var(--lab-dark);
}

.explore-info p {
    font-size: 14px;
    color: var(--lab-muted);
    margin: 0;
    line-height: 1.4;
}

/* --------------------------------------------------------------------------
   2. CI STORY UNIT & STEPPER (WATCH -> LISTEN -> READ...)
   -------------------------------------------------------------------------- */

.stressless-ci-unit-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 30px 20px;
    font-family: 'DM Sans', sans-serif;
}

.ci-station-stepper {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 12px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--lab-border);
}

.ci-step-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #ffffff;
    border: 1.5px solid #edf5ec;
    border-radius: 30px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    color: var(--lab-muted);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

.ci-step-btn .step-num {
    background: #edf5ec;
    color: var(--lab-dark);
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 11px;
}

.ci-step-btn.active {
    background: var(--lab-primary);
    border-color: var(--lab-primary);
    color: #ffffff;
}

.ci-step-btn.active .step-num {
    background: #ffffff;
    color: var(--lab-primary-dark);
}

.ci-station-content-box {
    background: var(--lab-card-bg);
    border: 1px solid var(--lab-border);
    border-radius: var(--lab-radius);
    box-shadow: var(--lab-shadow);
    padding: 36px;
}

.ci-station-pane {
    display: none;
}
.ci-station-pane.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

.pane-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: 26px;
    margin: 0 0 6px 0;
}
.pane-header p {
    color: var(--lab-muted);
    margin: 0 0 24px 0;
    font-size: 15px;
}

.station-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #edf5ec;
}

/* Embedded Glossed Reading */
.ci-reading-card {
    font-size: 19px;
    line-height: 1.8;
    background: #fdfaf4;
    padding: 30px;
    border-radius: var(--lab-radius-sm);
    border: 1px solid #e6eee5;
}

.ci-gloss {
    border-bottom: 2px dotted var(--lab-primary);
    cursor: pointer;
    position: relative;
    color: #13612e;
    font-weight: 500;
}
.ci-gloss:hover::after {
    content: attr(data-trans);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--lab-dark);
    color: #ffffff;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 13px;
    white-space: nowrap;
    z-index: 100;
}

/* Audio Player */
.ci-audio-player-card {
    text-align: center;
    background: #edf5ec;
    padding: 30px;
    border-radius: var(--lab-radius-sm);
}
.audio-illustration { font-size: 48px; margin-bottom: 10px; }
.audio-controls-row {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 15px;
}
.speed-toggle {
    background: #ffffff;
    border: 1px solid #d3d1c7;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}
.speed-toggle.active {
    background: var(--lab-primary);
    color: #ffffff;
    border-color: var(--lab-primary);
}

/* Comprehension Check */
.quiz-question {
    background: #fdfaf4;
    border: 1px solid #e6eee5;
    padding: 20px;
    border-radius: var(--lab-radius-sm);
    margin-bottom: 15px;
}
.quiz-option {
    display: block;
    margin: 8px 0;
    cursor: pointer;
    font-size: 16px;
}
.quiz-feedback {
    margin-top: 8px;
    font-weight: 600;
    font-size: 14px;
}

/* --------------------------------------------------------------------------
   3. STORY LIBRARY (NETFLIX GRID)
   -------------------------------------------------------------------------- */

.stressless-story-library-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
    font-family: 'DM Sans', sans-serif;
}

.library-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: 30px;
    margin: 0 0 6px 0;
}
.library-header p {
    color: var(--lab-muted);
    margin-bottom: 24px;
}

.library-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    background: #edf5ec;
    padding: 16px 20px;
    border-radius: var(--lab-radius-sm);
    margin-bottom: 30px;
    align-items: center;
}

.filter-group label {
    font-size: 13px;
    font-weight: 700;
    margin-right: 6px;
    color: var(--lab-dark);
}

.filter-group select {
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid #d3d1c7;
    background: #ffffff;
    font-size: 14px;
}

.btn-clear-filters {
    font-size: 13px;
    color: #b82105;
    text-decoration: none;
    font-weight: 600;
}

.story-grid-netflix {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
}

.story-card {
    background: #ffffff;
    border-radius: var(--lab-radius);
    border: 1px solid var(--lab-border);
    box-shadow: var(--lab-shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s, box-shadow 0.2s;
}

.story-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 30px rgba(42, 37, 32, 0.1);
}

.story-card-thumb {
    position: relative;
    height: 160px;
    background: #2a2520;
    display: flex;
    align-items: center;
    justify-content: center;
}

.story-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.story-placeholder-thumb {
    font-size: 42px;
}

.badge-level {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: rgba(0, 0, 0, 0.7);
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
}

.story-card-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
    justify-content: space-between;
}

.story-type-tag {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--lab-accent-hover);
    margin-bottom: 6px;
}

.story-card-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 8px 0;
    color: var(--lab-dark);
}

.story-card-excerpt {
    font-size: 14px;
    color: var(--lab-muted);
    margin: 0 0 16px 0;
    line-height: 1.4;
}
