/* ==========================================================
   TheForgeJA — Trading Academy Stylesheet
   Dark-first design with gold/green accents
   ========================================================== */

/* ---------- CSS Custom Properties ---------- */
:root, :root[data-theme="dark"] {
    --t-bg: #020617;
    --t-bg-secondary: #0F172A;
    --t-bg-tertiary: #1E293B;
    --t-bg-card: rgba(15, 23, 42, 0.8);
    --t-text: #F8FAFC;
    --t-text-secondary: #94A3B8;
    --t-text-muted: #64748B;
    --t-gold: #FBBF24;
    --t-gold-dim: #B8860B;
    --t-gold-glow: rgba(251, 191, 36, 0.2);
    --t-green: #22C55E;
    --t-green-dim: #16A34A;
    --t-green-glow: rgba(34, 197, 94, 0.2);
    --t-red: #EF4444;
    --t-blue: #3B82F6;
    --t-border: rgba(255, 255, 255, 0.06);
    --t-border-hover: rgba(255, 255, 255, 0.12);
    --t-glass: rgba(15, 23, 42, 0.6);
    --t-glass-border: rgba(255, 255, 255, 0.08);
    --t-radius: 16px;
    --t-radius-sm: 10px;
    --t-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
    --t-nav-height: 64px;
}

:root[data-theme="light"] {
    --t-bg: #F1F5F9;
    --t-bg-secondary: #FFFFFF;
    --t-bg-tertiary: #E2E8F0;
    --t-bg-card: rgba(255, 255, 255, 0.9);
    --t-text: #0F172A;
    --t-text-secondary: #475569;
    --t-text-muted: #94A3B8;
    --t-gold: #F59E0B;
    --t-gold-dim: #D97706;
    --t-gold-glow: rgba(245, 158, 11, 0.15);
    --t-green: #16A34A;
    --t-green-dim: #15803D;
    --t-green-glow: rgba(22, 163, 74, 0.15);
    --t-border: rgba(0, 0, 0, 0.08);
    --t-border-hover: rgba(0, 0, 0, 0.15);
    --t-glass: rgba(255, 255, 255, 0.7);
    --t-glass-border: rgba(0, 0, 0, 0.08);
    --t-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Outfit', sans-serif;
    background: var(--t-bg);
    color: var(--t-text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

a {
    color: var(--t-gold);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover { color: var(--t-green); }

/* ---------- Navbar ---------- */
.t-navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--t-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--t-glass-border);
    height: var(--t-nav-height);
}

.t-nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    height: 100%;
}

.t-nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--t-text) !important;
    font-weight: 700;
    font-size: 1.25rem;
}

.t-brand-icon {
    height: 36px;
    width: auto;
}

.t-brand-badge {
    background: var(--t-gold);
    color: #000;
    font-size: 0.6rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: 0.1em;
}

.t-nav-links {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    list-style: none;
}

.t-nav-link {
    color: var(--t-text-secondary) !important;
    padding: 0.5rem 0.85rem;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    text-decoration: none;
}

.t-nav-link:hover,
.t-nav-link.active {
    color: var(--t-gold) !important;
    text-shadow: 0 0 10px var(--t-gold-glow);
}

.t-nav-cta {
    color: var(--t-gold) !important;
    font-weight: 700;
}

.t-logout-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
}

.t-nav-points {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    background: rgba(251, 191, 36, 0.1);
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    border: 1px solid rgba(251, 191, 36, 0.2);
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--t-gold);
}

.points-count { font-size: 1rem; }
.points-label { font-size: 0.75rem; opacity: 0.7; }

/* Hamburger */
.t-nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1002;
}

.t-hamburger {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--t-text);
    position: relative;
    transition: background 0.3s ease;
}

.t-hamburger::before,
.t-hamburger::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 2px;
    background: var(--t-text);
    transition: transform 0.3s ease;
}

.t-hamburger::before { top: -7px; }
.t-hamburger::after { top: 7px; }

.t-nav-toggle.active .t-hamburger { background: transparent; }
.t-nav-toggle.active .t-hamburger::before { transform: rotate(45deg); top: 0; }
.t-nav-toggle.active .t-hamburger::after { transform: rotate(-45deg); top: 0; }

/* ---------- Messages ---------- */
.t-messages {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 1.5rem 0;
}

.t-message {
    padding: 0.75rem 1.25rem;
    border-radius: var(--t-radius-sm);
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: tSlideDown 0.3s ease;
}

.t-message-success { background: rgba(34, 197, 94, 0.15); color: var(--t-green); border: 1px solid rgba(34, 197, 94, 0.2); }
.t-message-warning { background: rgba(251, 191, 36, 0.15); color: var(--t-gold); border: 1px solid rgba(251, 191, 36, 0.2); }
.t-message-error { background: rgba(239, 68, 68, 0.15); color: var(--t-red); border: 1px solid rgba(239, 68, 68, 0.2); }
.t-message-info { background: rgba(59, 130, 246, 0.15); color: var(--t-blue); border: 1px solid rgba(59, 130, 246, 0.2); }

.t-message-close {
    background: none;
    border: none;
    cursor: pointer;
    color: inherit;
    opacity: 0.7;
    font-size: 1rem;
}

.t-message-close:hover { opacity: 1; }

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

/* ---------- Main ---------- */
.t-main {
    flex: 1;
    width: 100%;
}

/* ---------- Hero ---------- */
.t-hero {
    background: linear-gradient(135deg, #020617 0%, #0F172A 40%, #1a1a2e 70%, #16213e 100%);
    padding: 5rem 1.5rem 4rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--t-border);
}

.t-hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background:
        radial-gradient(ellipse at 20% 80%, var(--t-green-glow) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, var(--t-gold-glow) 0%, transparent 50%);
    pointer-events: none;
}

.t-hero-content {
    position: relative;
    z-index: 1;
    max-width: 700px;
    margin: 0 auto;
}

.t-hero-title {
    font-size: clamp(2.5rem, 7vw, 3.5rem);
    font-weight: 800;
    background: linear-gradient(135deg, #FFFFFF 0%, var(--t-gold) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
    line-height: 1.1;
}

.t-hero-subtitle {
    font-size: 1.15rem;
    color: var(--t-text-secondary);
    margin-bottom: 2rem;
    max-width: 550px;
    margin-left: auto;
    margin-right: auto;
}

.t-hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.t-hero-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2.5rem;
    position: relative;
    z-index: 1;
}

/* ---------- Buttons ---------- */
.t-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.75rem;
    border-radius: var(--t-radius-sm);
    font-weight: 700;
    font-size: 1rem;
    font-family: inherit;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.t-btn-gold {
    background: linear-gradient(135deg, var(--t-gold), #F59E0B);
    color: #000;
}

.t-btn-gold:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px var(--t-gold-glow);
    color: #000;
}

.t-btn-green {
    background: linear-gradient(135deg, var(--t-green), var(--t-green-dim));
    color: #fff;
}

.t-btn-green:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px var(--t-green-glow);
    color: #fff;
}

.t-btn-outline {
    background: transparent;
    color: var(--t-text);
    border: 2px solid var(--t-gold);
}

.t-btn-outline:hover {
    background: var(--t-gold);
    color: #000;
}

/* ---------- Sections ---------- */
.t-section {
    padding: 4rem 1.5rem;
}

.t-section-alt {
    background: var(--t-bg-secondary);
}

.t-section-container {
    max-width: 1100px;
    margin: 0 auto;
}

.t-section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.t-section-header h1,
.t-section-header h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.t-section-header p {
    color: var(--t-text-secondary);
    font-size: 1.05rem;
    max-width: 550px;
    margin: 0 auto;
}

.t-gold-line {
    display: inline-block;
    position: relative;
}

.t-gold-line::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--t-gold);
    border-radius: 2px;
}

/* ---------- Stat Cards ---------- */
.t-stat-card {
    background: var(--t-bg-card);
    border: 1px solid var(--t-border);
    border-radius: var(--t-radius-sm);
    padding: 1.25rem 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.t-stat-card:hover {
    border-color: var(--t-gold);
    box-shadow: 0 0 20px var(--t-gold-glow);
}

.t-stat-card.large {
    padding: 2rem;
}

.t-stat-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.5rem;
}

.t-stat-value {
    display: block;
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--t-gold);
}

.t-stat-card.large .t-stat-value {
    font-size: 2.25rem;
}

.t-stat-label {
    display: block;
    font-size: 0.85rem;
    color: var(--t-text-muted);
    margin-top: 0.25rem;
}

/* ---------- Path Cards ---------- */
.t-path-card {
    background: var(--t-bg-secondary);
    border: 1px solid var(--t-border);
    border-radius: var(--t-radius);
    padding: 2rem;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}

.t-path-card:hover {
    border-color: var(--t-border-hover);
}

.t-path-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.t-path-info {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.t-path-icon {
    font-size: 2.5rem;
}

.t-path-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.t-path-desc {
    color: var(--t-text-secondary);
    font-size: 0.95rem;
}

.t-path-meta {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

.t-room-count {
    color: var(--t-text-muted);
    font-size: 0.9rem;
}

/* Difficulty badges */
.t-difficulty {
    display: inline-block;
    padding: 0.2rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.t-difficulty-beginner, .t-difficulty-easy {
    background: rgba(34, 197, 94, 0.15);
    color: var(--t-green);
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.t-difficulty-intermediate, .t-difficulty-medium {
    background: rgba(251, 191, 36, 0.15);
    color: var(--t-gold);
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.t-difficulty-advanced, .t-difficulty-hard {
    background: rgba(239, 68, 68, 0.15);
    color: var(--t-red);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* ---------- Progress Bar ---------- */
.t-progress-bar-container {
    background: var(--t-bg-tertiary);
    border-radius: 10px;
    height: 8px;
    position: relative;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.t-progress-bar-container.large {
    height: 12px;
}

.t-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--t-green), var(--t-gold));
    border-radius: 10px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.t-progress-bar::after {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 20px;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3));
    border-radius: 0 10px 10px 0;
}

.t-progress-text {
    font-size: 0.8rem;
    color: var(--t-text-muted);
    font-weight: 600;
}

/* ---------- Room Grid ---------- */
.t-room-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.25rem;
}

.t-room-grid.compact {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.t-room-card {
    background: var(--t-bg-card);
    border: 1px solid var(--t-border);
    border-radius: var(--t-radius);
    padding: 1.5rem;
    text-decoration: none;
    color: var(--t-text);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.t-room-card:hover {
    transform: translateY(-4px);
    border-color: var(--t-gold);
    box-shadow: 0 8px 32px var(--t-gold-glow);
    color: var(--t-text);
}

.t-room-card.completed {
    border-color: var(--t-green);
}

.t-room-card.completed:hover {
    box-shadow: 0 8px 32px var(--t-green-glow);
}

.t-room-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.t-room-emoji {
    font-size: 2rem;
}

.t-room-badge {
    padding: 0.15rem 0.6rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.completed-badge {
    background: rgba(34, 197, 94, 0.2);
    color: var(--t-green);
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.free-badge {
    background: rgba(59, 130, 246, 0.2);
    color: var(--t-blue);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.t-room-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.t-room-desc {
    color: var(--t-text-secondary);
    font-size: 0.85rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    flex: 1;
}

.t-room-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.t-room-time {
    font-size: 0.8rem;
    color: var(--t-text-muted);
}

.t-room-difficulty {
    font-size: 0.75rem;
}

.t-room-progress {
    background: var(--t-bg-tertiary);
    border-radius: 4px;
    height: 4px;
    margin-bottom: 0.5rem;
    overflow: hidden;
}

.t-room-progress-fill {
    height: 100%;
    background: var(--t-gold);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.t-room-reward {
    font-size: 0.8rem;
    color: var(--t-gold);
    font-weight: 600;
}

/* ---------- Steps Grid (How it works) ---------- */
.t-steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.t-step-card {
    background: var(--t-bg-card);
    border: 1px solid var(--t-border);
    border-radius: var(--t-radius);
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
}

.t-step-card:hover {
    transform: translateY(-4px);
    border-color: var(--t-gold);
}

.t-step-num {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--t-gold), var(--t-green));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
}

.t-step-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
}

.t-step-card p {
    color: var(--t-text-secondary);
    font-size: 0.9rem;
}

/* ---------- Room Detail Page ---------- */
.t-room-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.t-room-header-section {
    margin-bottom: 2rem;
}

.t-back-link {
    color: var(--t-text-muted) !important;
    font-size: 0.9rem;
    display: inline-block;
    margin-bottom: 1.5rem;
    transition: color 0.2s;
}

.t-back-link:hover {
    color: var(--t-gold) !important;
}

.t-room-header-info {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.t-room-header-emoji {
    font-size: 3rem;
}

.t-room-header-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
}

.t-room-header-desc {
    color: var(--t-text-secondary);
    font-size: 1rem;
}

.t-room-header-meta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.t-meta-item {
    color: var(--t-text-muted);
    font-size: 0.9rem;
}

.t-room-progress-section {
    background: var(--t-bg-secondary);
    border: 1px solid var(--t-border);
    border-radius: var(--t-radius-sm);
    padding: 1.25rem;
}

.t-room-progress-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
}

/* ---------- Task Panels ---------- */
.t-tasks-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.t-task-panel {
    background: var(--t-bg-secondary);
    border: 1px solid var(--t-border);
    border-radius: var(--t-radius);
    overflow: hidden;
    transition: all 0.3s ease;
}

.t-task-panel:hover {
    border-color: var(--t-border-hover);
}

.t-task-panel.completed {
    border-color: rgba(34, 197, 94, 0.2);
}

.t-task-panel.completed .t-task-header {
    background: rgba(34, 197, 94, 0.05);
}

/* Task Header */
.t-task-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    cursor: pointer;
    transition: background 0.2s ease;
    user-select: none;
}

.t-task-header:hover {
    background: rgba(255, 255, 255, 0.02);
}

.t-task-header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.t-task-number {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: var(--t-bg-tertiary);
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--t-text-muted);
    flex-shrink: 0;
}

.t-task-panel.completed .t-task-number {
    background: var(--t-green);
    color: #fff;
}

.t-check {
    font-size: 1rem;
}

.t-task-title {
    font-size: 1.05rem;
    font-weight: 600;
}

.t-task-header-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.t-task-type-badge {
    padding: 0.2rem 0.65rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.t-task-type-badge.info { background: rgba(59, 130, 246, 0.15); color: var(--t-blue); }
.t-task-type-badge.quiz { background: rgba(251, 191, 36, 0.15); color: var(--t-gold); }
.t-task-type-badge.challenge { background: rgba(239, 68, 68, 0.15); color: var(--t-red); }
.t-task-type-badge.reflection { background: rgba(168, 85, 247, 0.15); color: #A855F7; }

.t-task-points {
    font-size: 0.8rem;
    color: var(--t-gold);
    font-weight: 600;
}

.t-task-chevron {
    color: var(--t-text-muted);
    font-size: 0.7rem;
    transition: transform 0.3s ease;
}

.t-task-chevron.open {
    transform: rotate(180deg);
}

/* Task Body */
.t-task-body {
    display: none;
    padding: 0 1.5rem 1.5rem;
    animation: taskExpand 0.3s ease;
}

.t-task-body.open {
    display: block;
}

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

.t-task-content {
    border-top: 1px solid var(--t-border);
    padding-top: 1.25rem;
    margin-bottom: 1.5rem;
    color: var(--t-text-secondary);
    line-height: 1.8;
    font-size: 0.95rem;
}

.t-task-content h4 {
    color: var(--t-text);
    margin: 1rem 0 0.5rem;
}

.t-task-content strong {
    color: var(--t-gold);
}

.t-task-content code {
    background: var(--t-bg-tertiary);
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85em;
}

.t-task-content ul, .t-task-content ol {
    padding-left: 1.5rem;
    margin: 0.75rem 0;
}

.t-task-content li {
    margin-bottom: 0.35rem;
}

.t-task-content img {
    max-width: 100%;
    border-radius: var(--t-radius-sm);
    margin: 1rem 0;
    border: 1px solid var(--t-border);
}

/* Question */
.t-task-question {
    background: var(--t-bg-tertiary);
    border-left: 3px solid var(--t-gold);
    padding: 1rem 1.25rem;
    border-radius: 0 var(--t-radius-sm) var(--t-radius-sm) 0;
    margin-bottom: 1rem;
}

.t-question-text {
    font-weight: 600;
    color: var(--t-text);
}

/* Quiz Options */
.t-task-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.t-option-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1.25rem;
    background: var(--t-bg-tertiary);
    border: 2px solid var(--t-border);
    border-radius: var(--t-radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.95rem;
}

.t-option-label:hover {
    border-color: var(--t-gold);
    background: rgba(251, 191, 36, 0.05);
}

.t-option-label.selected {
    border-color: var(--t-gold);
    background: rgba(251, 191, 36, 0.1);
}

.t-option-label.correct {
    border-color: var(--t-green) !important;
    background: rgba(34, 197, 94, 0.1) !important;
}

.t-option-label.incorrect {
    border-color: var(--t-red) !important;
    background: rgba(239, 68, 68, 0.1) !important;
}

.t-option-radio {
    accent-color: var(--t-gold);
    width: 18px;
    height: 18px;
}

/* Input areas */
.t-task-input-area {
    margin-bottom: 1rem;
}

.t-task-input {
    width: 100%;
    padding: 0.85rem 1.25rem;
    background: var(--t-bg-tertiary);
    border: 2px solid var(--t-border);
    border-radius: var(--t-radius-sm);
    color: var(--t-text);
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.t-task-input:focus {
    outline: none;
    border-color: var(--t-gold);
    box-shadow: 0 0 0 3px var(--t-gold-glow);
}

.t-task-textarea {
    width: 100%;
    padding: 0.85rem 1.25rem;
    background: var(--t-bg-tertiary);
    border: 2px solid var(--t-border);
    border-radius: var(--t-radius-sm);
    color: var(--t-text);
    font-family: inherit;
    font-size: 1rem;
    resize: vertical;
    transition: all 0.3s ease;
}

.t-task-textarea:focus {
    outline: none;
    border-color: var(--t-gold);
    box-shadow: 0 0 0 3px var(--t-gold-glow);
}

/* Feedback */
.t-task-feedback {
    margin-bottom: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: var(--t-radius-sm);
    font-weight: 600;
    display: none;
}

.t-task-feedback.show { display: block; }
.t-task-feedback.success {
    background: rgba(34, 197, 94, 0.15);
    color: var(--t-green);
    border: 1px solid rgba(34, 197, 94, 0.3);
}
.t-task-feedback.error {
    background: rgba(239, 68, 68, 0.15);
    color: var(--t-red);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Hint */
.t-task-hint {
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.2);
    padding: 0.75rem 1rem;
    border-radius: var(--t-radius-sm);
    font-size: 0.9rem;
    color: var(--t-gold);
    margin-bottom: 0.75rem;
}

.hidden { display: none !important; }

/* Completed message */
.t-task-completed-msg {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: var(--t-radius-sm);
    color: var(--t-green);
    font-weight: 600;
}

.t-completed-icon { font-size: 1.25rem; }

.t-user-answer {
    color: var(--t-text-muted);
    font-weight: 400;
    margin-left: auto;
    font-size: 0.85rem;
}

/* Task Action */
.t-task-action {
    display: flex;
    justify-content: flex-end;
}

.t-submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ---------- Room Complete ---------- */
.t-room-complete {
    margin-top: 2rem;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), rgba(251, 191, 36, 0.1));
    border: 2px solid var(--t-green);
    border-radius: var(--t-radius);
    padding: 3rem;
    text-align: center;
}

.t-complete-content .t-complete-icon {
    font-size: 4rem;
    display: block;
    margin-bottom: 1rem;
}

.t-complete-content h2 {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    background: linear-gradient(135deg, var(--t-green), var(--t-gold));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.t-complete-content p {
    color: var(--t-text-secondary);
    margin-bottom: 1.5rem;
}

/* ---------- Completion Modal ---------- */
.t-modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.t-modal-content {
    background: var(--t-bg-secondary);
    border: 2px solid var(--t-gold);
    border-radius: var(--t-radius);
    padding: 3rem;
    text-align: center;
    max-width: 450px;
    width: 90%;
    position: relative;
    animation: scaleIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes scaleIn { from { transform: scale(0.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.t-modal-icon {
    font-size: 4rem;
    display: block;
    margin-bottom: 1rem;
}

.t-modal-content h2 {
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
}

.t-modal-content p {
    color: var(--t-text-secondary);
    margin-bottom: 1.5rem;
}

.t-modal-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

/* ---------- Profile Page ---------- */
.t-profile-page {
    padding: 2rem 0;
}

.t-profile-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.25rem;
    margin-bottom: 3rem;
}

.t-profile-section {
    margin-bottom: 3rem;
}

.t-profile-section h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--t-border);
}

.t-path-progress-card {
    background: var(--t-bg-card);
    border: 1px solid var(--t-border);
    border-radius: var(--t-radius-sm);
    padding: 1.25rem;
    margin-bottom: 0.75rem;
}

.t-path-progress-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.t-progress-pct {
    color: var(--t-gold);
}

.t-muted {
    color: var(--t-text-muted);
}

/* ---------- Titles ---------- */
.t-current-title-display {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.1), rgba(34, 197, 94, 0.1));
    border: 1px solid rgba(251, 191, 36, 0.25);
    padding: 0.5rem 1.25rem;
    border-radius: 24px;
    margin-top: 0.75rem;
}

.t-title-icon { font-size: 1.25rem; }
.t-title-label {
    font-weight: 700;
    font-size: 0.95rem;
    background: linear-gradient(135deg, var(--t-gold), var(--t-green));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.t-titles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.t-title-card {
    background: var(--t-bg-card);
    border: 1px solid var(--t-border);
    border-radius: var(--t-radius-sm);
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.t-title-card:hover {
    border-color: var(--t-gold);
    transform: translateY(-2px);
}

.t-title-card.active {
    border-color: var(--t-gold);
    background: rgba(251, 191, 36, 0.05);
    box-shadow: 0 0 15px rgba(251, 191, 36, 0.1);
}

.t-title-card-icon { font-size: 2.5rem; display: block; margin-bottom: 0.75rem; }
.t-title-card h4 { margin-bottom: 0.25rem; }
.t-title-card p { color: var(--t-text-secondary); font-size: 0.85rem; }
.t-title-date { color: var(--t-text-muted); font-size: 0.75rem; display: block; margin-top: 0.5rem; }

/* ---------- Pending Titles ---------- */
.t-pending-titles {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.05), rgba(34, 197, 94, 0.05));
    border: 1px solid rgba(251, 191, 36, 0.2);
    border-radius: var(--t-radius);
    padding: 2rem;
    margin-bottom: 3rem;
}

.t-pending-titles h2 {
    font-size: 1.35rem;
    margin-bottom: 0.5rem;
}

.t-pending-titles .t-muted {
    margin-bottom: 1.25rem;
}



/* ---------- Admin Dashboard ---------- */
.t-admin-page { padding: 2rem 0; }

.t-admin-actions { margin-bottom: 3rem; }
.t-admin-actions h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.t-action-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.t-action-card {
    background: var(--t-bg-card);
    border: 1px solid var(--t-border);
    border-radius: var(--t-radius-sm);
    padding: 1.5rem;
    text-align: center;
    text-decoration: none;
    color: var(--t-text);
    transition: all 0.3s ease;
}

.t-action-card:hover {
    border-color: var(--t-gold);
    transform: translateY(-2px);
    color: var(--t-text);
}

.t-action-icon { font-size: 2rem; display: block; margin-bottom: 0.5rem; }
.t-action-card h4 { margin-bottom: 0.25rem; }
.t-action-card p { color: var(--t-text-secondary); font-size: 0.8rem; }

/* Admin Table */
.t-admin-table-wrapper {
    overflow-x: auto;
    border-radius: var(--t-radius-sm);
    border: 1px solid var(--t-border);
}

.t-admin-table {
    width: 100%;
    border-collapse: collapse;
}

.t-admin-table th {
    background: var(--t-bg-tertiary);
    padding: 0.85rem 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--t-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.t-admin-table td {
    padding: 0.85rem 1rem;
    border-top: 1px solid var(--t-border);
    font-size: 0.9rem;
}

.t-admin-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.t-status-badge {
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.t-status-badge.published {
    background: rgba(34, 197, 94, 0.15);
    color: var(--t-green);
}

.t-status-badge.preview {
    background: rgba(245, 158, 11, 0.15);
    color: #F59E0B;
}

.t-status-badge.draft {
    background: rgba(107, 114, 128, 0.15);
    color: #9CA3AF;
}

.t-table-link {
    color: var(--t-gold) !important;
    font-weight: 600;
    font-size: 0.85rem;
}

/* ---------- Empty State ---------- */
.t-empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--t-bg-secondary);
    border: 1px dashed var(--t-border);
    border-radius: var(--t-radius);
}

.t-empty-icon { font-size: 4rem; display: block; margin-bottom: 1rem; }
.t-empty-state h3 { margin-bottom: 0.5rem; }
.t-empty-state p { color: var(--t-text-muted); }

/* ---------- Admin Preview System ---------- */

/* Preview banner shown at top of preview rooms */
.t-preview-banner {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(245, 158, 11, 0.05));
    border: 2px solid rgba(245, 158, 11, 0.4);
    border-radius: var(--t-radius);
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    animation: previewPulse 3s ease-in-out infinite;
}

@keyframes previewPulse {
    0%, 100% { border-color: rgba(245, 158, 11, 0.4); }
    50% { border-color: rgba(245, 158, 11, 0.7); }
}

.t-preview-banner-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.t-preview-banner-icon {
    font-size: 1.75rem;
}

.t-preview-banner-text {
    flex: 1;
    min-width: 200px;
}

.t-preview-banner-text strong {
    display: block;
    color: #F59E0B;
    font-size: 1rem;
    margin-bottom: 0.15rem;
}

.t-preview-banner-text span {
    color: var(--t-text-muted);
    font-size: 0.85rem;
}

.t-btn-sm {
    padding: 0.4rem 1rem;
    font-size: 0.8rem;
    border-radius: 8px;
}

.t-btn-preview-action {
    background: rgba(245, 158, 11, 0.15);
    color: #F59E0B;
    border: 1px solid rgba(245, 158, 11, 0.3);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.t-btn-preview-action:hover {
    background: rgba(245, 158, 11, 0.25);
    color: #F59E0B;
}

/* Preview badge shown inline on path cards */
.t-preview-badge-inline {
    background: rgba(245, 158, 11, 0.12);
    color: #F59E0B;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.3rem 0.85rem;
    border-radius: 8px;
    display: inline-block;
    margin-bottom: 0.75rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

/* Preview card border accent */
.t-preview-card {
    border-color: rgba(245, 158, 11, 0.3) !important;
}

/* Preview room card border */
.t-preview-room {
    border-color: rgba(245, 158, 11, 0.3) !important;
}

.t-preview-room:hover {
    border-color: rgba(245, 158, 11, 0.5) !important;
}

/* Preview badge on room cards */
.t-room-badge.preview-badge {
    background: rgba(245, 158, 11, 0.15);
    color: #F59E0B;
    font-size: 0.7rem;
    font-weight: 700;
}

/* ---------- Footer ---------- */
.t-footer {
    background: var(--t-bg-secondary);
    border-top: 1px solid var(--t-border);
    padding: 2rem 1.5rem;
    margin-top: auto;
    text-align: center;
}

.t-footer-container {
    max-width: 1200px;
    margin: 0 auto;
}

.t-footer-links {
    margin-bottom: 1rem;
}

.t-footer-links a {
    color: var(--t-text-muted);
    font-size: 0.9rem;
    transition: color 0.2s;
}

.t-footer-links a:hover { color: var(--t-gold); }
.t-footer-sep { color: var(--t-text-muted); opacity: 0.3; margin: 0 0.5rem; }

.t-footer-copy {
    color: var(--t-text-muted);
    font-size: 0.8rem;
    opacity: 0.6;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .t-nav-toggle { display: block; }

    .t-nav-links {
        display: none;
        flex-direction: column;
        position: fixed;
        top: 0;
        right: 0;
        width: 75%;
        max-width: 320px;
        height: 100vh;
        background: var(--t-bg);
        padding: 5rem 1.5rem 2rem;
        border-left: 2px solid var(--t-gold);
        gap: 0.5rem;
        z-index: 1001;
        list-style: none;
        overflow-y: auto;
    }

    .t-nav-links.active {
        display: flex;
        animation: tSlideInRight 0.3s ease;
    }

    @keyframes tSlideInRight {
        from { transform: translateX(100%); }
        to { transform: translateX(0); }
    }

    .t-hero { padding: 3rem 1rem; }
    .t-hero-stats { flex-direction: column; gap: 0.75rem; align-items: center; }
    .t-steps-grid { grid-template-columns: 1fr; }
    .t-profile-stats { grid-template-columns: repeat(2, 1fr); }
    .t-action-grid { grid-template-columns: repeat(2, 1fr); }
    .t-room-grid { grid-template-columns: 1fr; }
    .t-room-header-info { flex-direction: column; }

    .t-task-header { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
    .t-task-header-right { flex-wrap: wrap; }
}

@media (max-width: 480px) {
    .t-profile-stats { grid-template-columns: 1fr; }
    .t-action-grid { grid-template-columns: 1fr; }
    .t-path-header { flex-direction: column; }
}
