/* ==========================================================================
   EduByte Agent AI (Agentic AI & Autonomous Systems) - Custom Stylesheet
   Theme: Electric Cyan & Deep Indigo (#0ea5e9 / #6366f1)
   ========================================================================== */

:root {
    --accent-cyan: #0ea5e9;
    --accent-indigo: #6366f1;
    --accent-sky: #38bdf8;
    --accent-purple: #8b5cf6;
    --accent-emerald: #10b981;
    --accent-amber: #f59e0b;
    --accent-rose: #f43f5e;
}

body {
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    min-height: 100vh;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Dark Theme (Default) */
body.dark-theme {
    --bg-dark: #070d18;
    --bg-card: #0c162d;
    --bg-sidebar: #091122;
    --header-bg: linear-gradient(135deg, #1e1b4b 0%, #0f172a 60%, #1e3a8a 100%);
    --text-main: #f8fafc;
    --text-title: #ffffff;
    --text-body: #cbd5e1;
    --text-muted: #94a3b8;
    --border-color: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(14, 165, 233, 0.4);
    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
    background-color: var(--bg-dark);
    color: var(--text-main);
}

/* Light Theme */
body.light-theme {
    --bg-dark: #f0f4f9;
    --bg-card: #ffffff;
    --bg-sidebar: #f8fafc;
    --header-bg: linear-gradient(135deg, #1e1b4b 0%, #0f172a 60%, #1e3a8a 100%);
    --text-main: #0f172a;
    --text-title: #0f172a;
    --text-body: #334155;
    --text-muted: #64748b;
    --border-color: rgba(0, 0, 0, 0.1);
    --border-glow: rgba(14, 165, 233, 0.4);
    --card-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    background-color: var(--bg-dark);
    color: var(--text-main);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Header */
.app-header {
    background: var(--header-bg);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1;
}

.logo-icon {
    width: 36px !important;
    height: 36px !important;
    border-radius: 10px !important;
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.45) !important;
    flex-shrink: 0 !important;
    transition: all 0.2s ease !important;
    text-decoration: none !important;
}

.logo-icon:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 16px rgba(14, 165, 233, 0.4) !important;
}

.logo-icon svg {
    color: #ffffff !important;
    stroke: #ffffff !important;
}

.brand-text {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    overflow: hidden;
}

.brand-name {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1.32rem; font-weight: 800; letter-spacing: -0.015em;
    color: var(--text-main);
    letter-spacing: -0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1;
}

.brand-badge {
    display: none !important;
}

/* --------------------------------------------------------------------------
   Top-Right 3-Line Hamburger Menu Button (CSS3 Parity)
   -------------------------------------------------------------------------- */
.menu-toggle-btn {
    width: 40px !important;
    height: 40px !important;
    border-radius: 10px !important;
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.12)) !important;
    display: inline-flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
    cursor: pointer !important;
    transition: all 0.25s ease !important;
    flex-shrink: 0 !important;
    padding: 0 !important;
    z-index: 101 !important;
}

body.light-theme .menu-toggle-btn {
    background: rgba(0, 0, 0, 0.05) !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
}

.menu-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.16) !important;
    border-color: rgba(255, 255, 255, 0.28) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25) !important;
}

body.light-theme .menu-toggle-btn:hover {
    background: rgba(0, 0, 0, 0.08) !important;
    border-color: rgba(0, 0, 0, 0.18) !important;
}

.menu-toggle-btn:active {
    transform: scale(0.94) !important;
}

.menu-toggle-btn .bar {
    width: 20px !important;
    height: 2px !important;
    background-color: var(--text-main, #f8fafc) !important;
    border-radius: 2px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    transform-origin: center !important;
}

body.light-theme .menu-toggle-btn .bar {
    background-color: #0f172a !important;
}

/* Transformed X state when menu is open */
.menu-toggle-btn.open .bar-1 {
    transform: translateY(7px) rotate(45deg) !important;
}

.menu-toggle-btn.open .bar-2 {
    opacity: 0 !important;
    transform: scaleX(0) !important;
}

.menu-toggle-btn.open .bar-3 {
    transform: translateY(-7px) rotate(-45deg) !important;
}

@media (min-width: 901px) {
    .menu-toggle-btn {
        display: none !important;
    }
}

/* Main Layout */
.main-layout {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    min-height: calc(100vh - 65px);
}

/* Sidebar */
.sidebar {
    width: 320px;
    flex-shrink: 0;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    padding: 20px 16px;
    height: calc(100vh - 65px);
    position: sticky;
    top: 65px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sidebar-search-box {
    position: relative;
    margin-bottom: 6px;
}

.sidebar-search-box input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 10px 12px 10px 38px;
    color: var(--text-main);
    font-size: 0.88rem;
    outline: none;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.sidebar-search-box input:focus {
    border-color: var(--accent-purple, #9333ea);
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.15);
}

body.light-theme .sidebar-search-box input {
    background: #ffffff !important;
    border-color: #cbd5e1 !important;
    color: #0f172a !important;
}

body.light-theme .sidebar-search-box input:focus {
    border-color: #9333ea !important;
    box-shadow: 0 0 0 3px rgba(147, 51, 234, 0.18) !important;
}

.sidebar-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.9rem;
    pointer-events: none;
}

.topic-nav-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    overflow-y: auto;
}

.topic-nav-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 10px 14px;
    border-radius: 10px;
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-muted);
    font-size: 0.86rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
    gap: 10px;
    font-family: inherit;
    box-sizing: border-box;
}

body.light-theme .topic-nav-btn {
    color: #475569;
}

.topic-nav-btn:hover {
    background: rgba(168, 85, 247, 0.1);
    color: var(--text-main);
}

body.light-theme .topic-nav-btn:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.topic-nav-btn.active {
    background: linear-gradient(90deg, rgba(168, 85, 247, 0.3), rgba(59, 130, 246, 0.2));
    border: 1px solid rgba(168, 85, 247, 0.6);
    color: #ffffff !important;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(168, 85, 247, 0.25);
}

body.light-theme .topic-nav-btn.active {
    background: linear-gradient(90deg, #f3e8ff, #e0f2fe) !important;
    border: 1px solid #9333ea !important;
    color: #581c87 !important;
    font-weight: 700 !important;
    box-shadow: 0 4px 12px rgba(147, 51, 234, 0.15) !important;
}

.topic-nav-btn.active span:first-child {
    color: inherit !important;
}

.topic-status-icon {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 800;
    transition: all 0.25s ease;
    flex-shrink: 0;
    cursor: pointer;
}

body.light-theme .topic-status-icon {
    border-color: #cbd5e1;
}

.topic-status-icon:hover {
    border-color: #10b981;
    transform: scale(1.1);
}

.topic-nav-btn.completed .topic-status-icon {
    background: #10b981 !important;
    border-color: #10b981 !important;
    color: #ffffff !important;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

.topic-nav-btn.completed .topic-status-icon::after {
    content: '✓';
    color: #ffffff !important;
    font-size: 0.8rem;
    font-weight: 900;
}

/* Content Area */
.content-area {
    flex-grow: 1;
    padding: 30px;
    max-width: 1060px;
    margin: 0 auto;
    width: 100%;
}

.topic-section-card {
    display: none;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 0 24px 0 !important;
    box-shadow: none !important;
    animation: fadeIn 0.3s ease;
}

.topic-section-card.active-topic {
    display: block;
}

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

.topic-header {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.topic-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.7rem;
    font-weight: 800;
    color: var(--text-title);
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}

.topic-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(14, 165, 233, 0.15);
    color: #38bdf8;
    border: 1px solid rgba(14, 165, 233, 0.35);
}

.topic-description {
    font-size: 0.98rem;
    color: var(--text-body);
    line-height: 1.65;
    margin-bottom: 24px;
}

/* Subtopics */
.subtopic-group {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 22px;
    margin-bottom: 22px;
}

.subtopic-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #7dd3fc;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.feature-list {
    margin: 10px 0 10px 22px;
    line-height: 1.7;
    font-size: 0.9rem;
    color: var(--text-body);
}

.feature-list li {
    margin-bottom: 8px;
}

.feature-list strong, .feature-list b {
    color: var(--text-main);
}

/* Code Blocks & Tables */
.code-box {
    background: #030712;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    margin: 14px 0;
    overflow: hidden;
}

.code-header {
    background: rgba(255, 255, 255, 0.04);
    padding: 8px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'Fira Code', monospace;
    font-size: 0.8rem;
    color: #94a3b8;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.code-box pre {
    padding: 16px;
    overflow-x: auto;
    font-family: 'Fira Code', monospace;
    font-size: 0.85rem;
    line-height: 1.6;
    color: #e2e8f0;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin: 14px 0;
    font-size: 0.88rem;
}

.data-table th, .data-table td {
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    text-align: left;
}

.data-table th {
    background: rgba(14, 165, 233, 0.12);
    color: #38bdf8;
    font-weight: 700;
}

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

/* Responsive Visual Flow Diagram Components */
.flow-diagram-container {
    background: rgba(14, 165, 233, 0.04);
    border: 1px solid rgba(14, 165, 233, 0.22);
    border-radius: 14px;
    padding: 18px;
    margin: 18px 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.flow-step-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: transform 0.2s, border-color 0.2s;
}

.flow-step-box:hover {
    border-color: rgba(14, 165, 233, 0.45);
    transform: translateY(-1px);
}

.flow-step-icon {
    font-size: 1.5rem;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(14, 165, 233, 0.12);
    border-radius: 10px;
    color: #38bdf8;
    flex-shrink: 0;
}

.flow-step-content {
    flex-grow: 1;
}

.flow-step-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: #7dd3fc;
    margin-bottom: 2px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.flow-step-badge {
    font-size: 0.68rem;
    padding: 2px 7px;
    border-radius: 4px;
    background: rgba(14, 165, 233, 0.18);
    color: #38bdf8;
    font-weight: 700;
}

.flow-step-desc {
    font-size: 0.83rem;
    color: var(--text-body);
    line-height: 1.45;
}

.flow-divider-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #38bdf8;
    font-size: 1.1rem;
    font-weight: 800;
    margin: -3px 0;
}

.flow-grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
}

.flow-mini-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 14px;
    border-left: 3px solid #0ea5e9;
}

.flow-mini-card h4 {
    font-size: 0.9rem;
    color: #38bdf8;
    margin-bottom: 6px;
    font-weight: 700;
}

.flow-mini-card p {
    font-size: 0.82rem;
    color: var(--text-body);
    line-height: 1.45;
}

/* Interactive Live Agent Simulator */
/* ==========================================================================
   Interactive Live ReAct Agent Studio
   ========================================================================== */
.agent-simulator-card {
    background: radial-gradient(circle at top right, rgba(14, 165, 233, 0.12), transparent 45%),
                linear-gradient(145deg, rgba(15, 23, 42, 0.95), rgba(9, 14, 26, 0.98));
    border: 1px solid rgba(56, 189, 248, 0.35);
    border-radius: 16px;
    padding: 24px;
    margin: 26px 0;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

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

.sim-title {
    font-size: 1.18rem;
    font-weight: 800;
    color: #f8fafc;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sim-title-icon {
    font-size: 1.3rem;
    filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.6));
}

.agent-live-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(56, 189, 248, 0.3);
    color: #38bdf8;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    transition: all 0.3s ease;
}

.agent-pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #38bdf8;
    box-shadow: 0 0 10px #38bdf8;
    animation: simPulse 1.6s infinite ease-in-out;
}

@keyframes simPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.35); opacity: 0.5; }
}

.sim-intro-desc {
    font-size: 0.88rem;
    color: var(--text-muted, #94a3b8);
    line-height: 1.6;
    margin-bottom: 18px;
}

/* Scenario Chips */
.sim-scenario-chips {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
    margin-bottom: 18px;
}

.scenario-chip {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 12px 14px;
    text-align: left;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    gap: 3px;
    color: #cbd5e1;
}

.scenario-chip:hover {
    background: rgba(14, 165, 233, 0.08);
    border-color: rgba(56, 189, 248, 0.4);
    transform: translateY(-2px);
}

.scenario-chip.active {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.2), rgba(99, 102, 241, 0.18));
    border: 1px solid #38bdf8;
    box-shadow: 0 6px 18px rgba(14, 165, 233, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

.chip-icon {
    font-size: 1.25rem;
    margin-bottom: 2px;
}

.chip-label {
    font-weight: 700;
    font-size: 0.88rem;
    color: #f1f5f9;
}

.chip-sub {
    font-size: 0.72rem;
    color: #94a3b8;
    line-height: 1.3;
}

.scenario-chip.active .chip-sub {
    color: #bae6fd;
}

/* Active Goal Banner */
.agent-goal-banner {
    background: rgba(15, 23, 42, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-left: 4px solid #38bdf8;
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 18px;
    display: flex;
    align-items: baseline;
    gap: 10px;
    font-size: 0.86rem;
    line-height: 1.5;
}

.goal-label {
    font-weight: 800;
    color: #38bdf8;
    white-space: nowrap;
}

.goal-text {
    color: #e2e8f0;
}

/* Pipeline Tracker */
/* Pipeline Tracker - High-Tech Animated Node Flow */
.sim-pipeline-tracker {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 20px;
    padding: 12px 18px;
    background: radial-gradient(circle at center, rgba(14, 165, 233, 0.08), transparent 70%),
                rgba(2, 6, 23, 0.85);
    border: 1px solid rgba(56, 189, 248, 0.25);
    border-radius: 14px;
    overflow-x: auto;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.6);
}

.pipeline-step-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.82rem;
    font-weight: 700;
    color: #94a3b8;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    position: relative;
}

.pipeline-step-pill.active {
    transform: translateY(-2px) scale(1.05);
}

#pipe-step-thought.active {
    background: rgba(14, 165, 233, 0.25);
    border-color: #38bdf8;
    color: #e0f2fe;
    box-shadow: 0 0 16px rgba(56, 189, 248, 0.55), inset 0 0 8px rgba(56, 189, 248, 0.3);
}

#pipe-step-action.active {
    background: rgba(245, 158, 11, 0.25);
    border-color: #f59e0b;
    color: #fef3c7;
    box-shadow: 0 0 16px rgba(245, 158, 11, 0.55), inset 0 0 8px rgba(245, 158, 11, 0.3);
}

#pipe-step-obs.active {
    background: rgba(168, 85, 247, 0.25);
    border-color: #a855f7;
    color: #f3e8ff;
    box-shadow: 0 0 16px rgba(168, 85, 247, 0.55), inset 0 0 8px rgba(168, 85, 247, 0.3);
}

#pipe-step-final.active {
    background: rgba(16, 185, 129, 0.28);
    border-color: #10b981;
    color: #d1fae5;
    box-shadow: 0 0 18px rgba(16, 185, 129, 0.6), inset 0 0 8px rgba(16, 185, 129, 0.3);
}

.pipeline-step-pill.completed {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.4);
    color: #34d399;
}

.pipeline-arrow {
    color: #0284c7;
    font-size: 1rem;
    font-weight: 800;
    user-select: none;
    text-shadow: 0 0 8px rgba(14, 165, 233, 0.5);
    animation: arrowGlow 2s infinite ease-in-out;
}

@keyframes arrowGlow {
    0%, 100% { opacity: 0.6; transform: translateX(0); }
    50% { opacity: 1; transform: translateX(2px); }
}

/* Control Toolbar */
.sim-control-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.sim-ctrl-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.sim-btn-run {
    padding: 10px 20px;
    border-radius: 10px;
    background: linear-gradient(135deg, #0284c7, #2563eb);
    color: #ffffff;
    border: none;
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 6px 20px rgba(2, 132, 199, 0.4);
    transition: all 0.2s ease;
}

.sim-btn-run:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(2, 132, 199, 0.55);
}

.sim-btn-step {
    padding: 10px 18px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(56, 189, 248, 0.35);
    color: #38bdf8;
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.sim-btn-step:hover:not(:disabled) {
    background: rgba(56, 189, 248, 0.12);
    border-color: #38bdf8;
    transform: translateY(-1px);
}

.sim-btn-reset {
    padding: 10px 14px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #94a3b8;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.sim-btn-reset:hover {
    color: #f1f5f9;
    border-color: rgba(255, 255, 255, 0.25);
}

.sim-btn-run:disabled, .sim-btn-step:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
}

.sim-speed-selector {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    color: #94a3b8;
}

.btn-speed {
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    color: #94a3b8;
    font-size: 0.76rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-speed.active {
    background: #0284c7;
    border-color: #38bdf8;
    color: #ffffff;
}

/* Metrics HUD */
.sim-metrics-hud {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}

@media (max-width: 640px) {
    .sim-metrics-hud {
        grid-template-columns: repeat(2, 1fr);
    }
}

.metric-item {
    background: rgba(2, 6, 23, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.metric-label {
    font-size: 0.7rem;
    color: #64748b;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.metric-val {
    font-size: 1rem;
    font-weight: 800;
    color: #38bdf8;
    font-family: 'Fira Code', monospace;
}

/* Trace Output Box */
.sim-output-box {
    background: #030712;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px;
    min-height: 220px;
    max-height: 480px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.6);
}

.sim-empty-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 36px 16px;
    color: #64748b;
}

.empty-icon {
    font-size: 2.4rem;
    margin-bottom: 8px;
    opacity: 0.75;
}

.empty-title {
    font-size: 1rem;
    font-weight: 700;
    color: #94a3b8;
    margin: 0 0 6px 0;
}

.empty-sub {
    font-size: 0.82rem;
    color: #64748b;
    max-width: 380px;
    margin: 0;
    line-height: 1.5;
}

/* Trace Cards (Thought, Action, Observation, Final) */
.sim-trace-card {
    border-radius: 10px;
    padding: 14px 16px;
    animation: traceCardIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

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

.sim-trace-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.sim-trace-body {
    font-size: 0.86rem;
    line-height: 1.6;
}

/* Card Type Variants */
.card-thought {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.12), rgba(15, 23, 42, 0.7));
    border: 1px solid rgba(56, 189, 248, 0.4);
    border-left: 4px solid #38bdf8;
    color: #e0f2fe;
}
.card-thought .sim-trace-header {
    color: #38bdf8;
}

.card-action {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(15, 23, 42, 0.7));
    border: 1px solid rgba(245, 158, 11, 0.4);
    border-left: 4px solid #f59e0b;
    color: #fef3c7;
}
.card-action .sim-trace-header {
    color: #fbbf24;
}
.card-action .action-tool-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    background: rgba(245, 158, 11, 0.25);
    border: 1px solid #f59e0b;
    font-family: 'Fira Code', monospace;
    font-size: 0.78rem;
    color: #fde68a;
    font-weight: 700;
    margin-bottom: 4px;
}
.card-action pre {
    background: rgba(0, 0, 0, 0.45);
    border-radius: 6px;
    padding: 8px 12px;
    font-family: 'Fira Code', monospace;
    font-size: 0.8rem;
    color: #fde047;
    margin: 4px 0 0 0;
    overflow-x: auto;
}

.card-obs {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.12), rgba(15, 23, 42, 0.7));
    border: 1px solid rgba(139, 92, 246, 0.4);
    border-left: 4px solid #a855f7;
    color: #ede9fe;
}
.card-obs .sim-trace-header {
    color: #c084fc;
}
.card-obs .obs-status-tag {
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 12px;
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.4);
}
.card-obs pre {
    background: rgba(0, 0, 0, 0.45);
    border-radius: 6px;
    padding: 8px 12px;
    font-family: 'Fira Code', monospace;
    font-size: 0.8rem;
    color: #c4b5fd;
    margin: 4px 0 0 0;
    overflow-x: auto;
}

.card-final {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.16), rgba(15, 23, 42, 0.85));
    border: 1px solid rgba(16, 185, 129, 0.5);
    border-left: 5px solid #10b981;
    color: #d1fae5;
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.2);
}
.card-final .sim-trace-header {
    color: #34d399;
    font-size: 0.82rem;
}
.card-final .final-ans-content {
    font-size: 0.9rem;
    line-height: 1.65;
    color: #ecfdf5;
}

/* Quiz Section */
.quiz-section {
    background: rgba(14, 165, 233, 0.05);
    border: 1px solid rgba(14, 165, 233, 0.25);
    border-radius: 12px;
    padding: 22px;
    margin: 28px 0;
}

.quiz-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #38bdf8;
    margin-bottom: 14px;
}

.quiz-q-block {
    margin-bottom: 16px;
}

.quiz-q-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 10px;
    line-height: 1.5;
}

.quiz-opts-group {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.quiz-opt-btn {
    text-align: left;
    padding: 10px 14px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    color: var(--text-body);
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quiz-opt-btn:hover {
    background: rgba(14, 165, 233, 0.12);
    border-color: rgba(14, 165, 233, 0.35);
    color: var(--text-main);
}

.quiz-opt-btn.correct {
    background: rgba(16, 185, 129, 0.2) !important;
    border-color: #10b981 !important;
    color: #6ee7b7 !important;
    font-weight: 700;
}

.quiz-opt-btn.wrong {
    background: rgba(239, 68, 68, 0.2) !important;
    border-color: #ef4444 !important;
    color: #fca5a5 !important;
}

.quiz-ans-explanation {
    display: none;
    margin-top: 10px;
    padding: 10px 14px;
    border-radius: 8px;
    background: rgba(14, 165, 233, 0.12);
    border-left: 3px solid #0ea5e9;
    font-size: 0.86rem;
    color: var(--text-body);
    line-height: 1.5;
}

/* Interview Questions */
.interview-qa-section {
    margin: 28px 0;
}

.interview-section-header {
    margin-bottom: 14px;
}

.interview-section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #7dd3fc;
}

.interview-cards-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.interview-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    transition: border-color 0.2s;
}

.interview-card:hover {
    border-color: rgba(14, 165, 233, 0.35);
}

.interview-q-header {
    padding: 14px 18px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.interview-q-text {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-main);
}

.interview-toggle-icon {
    font-size: 0.75rem;
    color: var(--text-muted);
    transition: transform 0.2s;
}

.interview-card.open .interview-toggle-icon {
    transform: rotate(180deg);
}

.interview-a-box {
    display: none;
    padding: 14px 18px;
    border-top: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.15);
    font-size: 0.88rem;
    color: var(--text-body);
    line-height: 1.6;
}

.interview-card.open .interview-a-box {
    display: block;
}

/* Navigation Buttons */
.topic-footer-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.btn-nav-step {
    padding: 10px 20px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-nav-step:hover:not(:disabled) {
    background: rgba(14, 165, 233, 0.2);
    border-color: #0ea5e9;
}

.btn-next-step {
    background: linear-gradient(135deg, #0ea5e9, #6366f1);
    color: #ffffff;
    border: none;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.35);
}

/* Responsive */
@media (max-width: 900px) {
    .menu-toggle-btn {
        display: inline-flex !important;
    }

    .main-layout {
        display: block !important;
        grid-template-columns: 1fr !important;
    }

    .sidebar {
        position: fixed !important;
        top: 64px !important;
        left: 0 !important;
        width: 100vw !important;
        height: calc(100vh - 64px) !important;
        background: var(--bg-sidebar) !important;
        z-index: 999 !important;
        display: none !important;
        flex-direction: column !important;
        border-right: none !important;
        border-bottom: 1px solid var(--border-color) !important;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6) !important;
        padding: 16px !important;
        overflow-y: auto !important;
    }

    .sidebar.open {
        display: flex !important;
    }

    .content-area {
        padding: 16px;
    }

    .topic-section-card {
        padding: 0 0 16px 0 !important;
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
    }

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

/* ==========================================================================
   MOBILE SAFE AREA & STATUS BAR TOP INSET
   Prevents battery, wifi, and network icons from overlapping the navbar
   ========================================================================== */
:root {
    --safe-area-top: env(safe-area-inset-top, 0px);
    --safe-area-bottom: env(safe-area-inset-bottom, 0px);
}

@media screen and (max-width: 768px) {
    :root {
        --safe-area-top: max(env(safe-area-inset-top, 0px), 28px);
    }
}

html.is-mobile-app,
html.is-mobile-device {
    --safe-area-top: max(env(safe-area-inset-top, 0px), 28px);
}

.app-header, .navbar, .studio-header {
    padding-top: var(--safe-area-top) !important;
    min-height: calc(56px + var(--safe-area-top)) !important;
    box-sizing: border-box !important;
}


/* Quiz Option Font Size Upgrade */
.quiz-opt-btn {
    font-size: 0.95rem !important;
    line-height: 1.5 !important;
}
@media (max-width: 768px) {
    .quiz-opt-btn {
        font-size: 0.92rem !important;
    }
}

/* ==========================================================================
   INTERVIEW & QUIZ REFINEMENTS + MOBILE RIGHT-CUTOFF & MENU FIXES
   ========================================================================== */
/* 1. Big Unified Topic Container Card across All Courses */
.topic-section-card {
    background: linear-gradient(165deg, rgba(15, 23, 42, 0.85) 0%, rgba(10, 17, 34, 0.95) 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 18px !important;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45) !important;
    padding: 24px 22px 26px !important;
    margin-bottom: 24px !important;
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
}
body.light-theme .topic-section-card {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06) !important;
}
@media (max-width: 768px) {
    .topic-section-card {
        padding: 18px 14px 20px !important;
        border-radius: 14px !important;
        margin-bottom: 18px !important;
    }
}

/* 2. Standardized Font Sizes across All Courses */
.topic-title,
.topic-header h2,
.topic-header .topic-title {
    font-size: 1.35rem !important;
    font-weight: 800 !important;
    line-height: 1.35 !important;
    color: #f8fafc !important;
    margin-top: 0 !important;
    margin-bottom: 10px !important;
}
body.light-theme .topic-title,
body.light-theme .topic-header h2,
body.light-theme .topic-header .topic-title {
    color: #0f172a !important;
}
@media (max-width: 768px) {
    .topic-title,
    .topic-header h2,
    .topic-header .topic-title {
        font-size: 1.25rem !important;
    }
}

.topic-description,
.topic-description p,
.subtopic-group p,
.concept-card p,
.concept-explanation,
.content-area p {
    font-size: 0.96rem !important;
    line-height: 1.65 !important;
    color: #cbd5e1 !important;
}
body.light-theme .topic-description,
body.light-theme .topic-description p,
body.light-theme .subtopic-group p,
body.light-theme .concept-card p,
body.light-theme .concept-explanation,
body.light-theme .content-area p {
    color: #334155 !important;
}

.subtopic-title,
.section-subheading,
.concept-title {
    font-size: 1.12rem !important;
    font-weight: 700 !important;
    line-height: 1.4 !important;
    margin-top: 20px !important;
    margin-bottom: 12px !important;
}

/* 3. Standardized Previous & Next Navigation Buttons across All Courses */
.topic-bottom-nav,
.topic-footer-nav {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-top: 28px !important;
    padding-top: 20px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
    gap: 12px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}
body.light-theme .topic-bottom-nav,
body.light-theme .topic-footer-nav {
    border-top-color: #e2e8f0 !important;
}

.btn-nav-step,
.btn-nav,
.btn-nav-topic,
.btn-prev-topic,
.btn-next-topic,
.btn-next-step {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    padding: 10px 22px !important;
    min-height: 44px !important;
    border-radius: 10px !important;
    font-family: inherit !important;
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    text-decoration: none !important;
    box-sizing: border-box !important;
}

.btn-nav-step:not(.btn-next-step),
.btn-prev-topic,
.btn-nav:first-child:not(.btn-next-topic) {
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    color: #e2e8f0 !important;
    box-shadow: none !important;
}
.btn-nav-step:not(.btn-next-step):hover,
.btn-prev-topic:hover {
    background: rgba(255, 255, 255, 0.12) !important;
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
}
body.light-theme .btn-nav-step:not(.btn-next-step),
body.light-theme .btn-prev-topic {
    background: #f1f5f9 !important;
    border-color: #cbd5e1 !important;
    color: #475569 !important;
}

.btn-next-step,
.btn-next-topic,
.btn-nav.btn-next-topic {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important;
    border: 1px solid #38bdf8 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35) !important;
}
.btn-next-step:hover,
.btn-next-topic:hover {
    background: linear-gradient(135deg, #0369a1 0%, #075985 100%) !important;
    box-shadow: 0 6px 20px rgba(2, 132, 199, 0.5) !important;
    transform: translateY(-1px) !important;
}

.btn-nav-step:disabled,
.btn-prev-topic:disabled,
.btn-next-step:disabled,
.btn-next-topic:disabled,
button[disabled] {
    opacity: 0.4 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
    box-shadow: none !important;
    transform: none !important;
}

/* 4. Hide Triangle Dropdown Icons in All Interview Questions */
.interview-toggle-icon,
.accordion-arrow,
.interview-arrow,
.interview-question .accordion-arrow,
.interview-question .interview-arrow,
.interview-q-header .interview-toggle-icon,
.interview-card .accordion-arrow,
.interview-card .interview-arrow,
.interview-card .arrow-icon,
.interview-card .toggle-icon {
    display: none !important;
    visibility: hidden !important;
    width: 0 !important;
    height: 0 !important;
}

/* 5. Remove Outer Boxes for Quiz & Interview Sections */
.interview-section,
.interview-qa-section,
.topic-interview-section,
.quiz-section,
.topic-quiz-section,
.quiz-container {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-top: 20px !important;
}
body.light-theme .interview-section,
body.light-theme .interview-qa-section,
body.light-theme .topic-interview-section,
body.light-theme .quiz-section,
body.light-theme .topic-quiz-section,
body.light-theme .quiz-container {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* 6. Gap & Styling between Interview Cards (No Touching / Gap between cards) */
.interview-card,
.interview-item {
    margin-bottom: 14px !important;
    margin-top: 0 !important;
    border-radius: 10px !important;
    overflow: hidden !important;
}
.interview-card:last-child,
.interview-item:last-child {
    margin-bottom: 0 !important;
}
.interview-question {
    border-radius: 10px !important;
    cursor: pointer !important;
}

/* 7. Text Justification for Quiz & Interview Answers (Clean, No Huge Gaps) */

/* Force Left Alignment on All Questions, Headers & Option Buttons (Eliminates Huge Word Gaps) */
.interview-card,
.interview-q-header,
.interview-q-header *,
.interview-q-text,
.interview-question,
.interview-question *,
.quiz-q-title,
.quiz-question,
.quiz-question *,
.quiz-opt-btn,
.quiz-opts-group,
.quiz-opts-group * {
    text-align: left !important;
    text-justify: auto !important;
    word-spacing: normal !important;
    letter-spacing: normal !important;
}

/* Clean Text Justification for Paragraphs & Explanations (No Huge Word Gaps / Natural Flow) */
.topic-description,
.topic-description p,
.analogy-body,
.analogy-body p,
.feature-list li,
.subtopic-group p,
.concept-card p,
.callout-content,
.callout-content p,
.quiz-ans-explanation,
.quiz-ans-explanation p,
.quiz-explanation,
.quiz-explanation p,
.interview-a-box,
.interview-a-box p,
.interview-answer,
.interview-answer p,
.problem-statement,
.sol-step,
.sol-trick-highlight,
.problem-card p {
    text-align: justify !important;
    text-justify: inter-word !important;
    text-align-last: left !important;
    -webkit-hyphens: auto !important;
    -ms-hyphens: auto !important;
    hyphens: auto !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
    word-spacing: normal !important;
    letter-spacing: normal !important;
}

/* 8. Fix Menu First Topic Being Pushed Up Under Header */
@media (max-width: 900px) {
    .sidebar,
    .sidebar-panel,
    #sidebar-panel,
    .course-sidebar,
    .topics-drawer,
    .menu-drawer {
        top: calc(58px + var(--safe-area-top, 28px)) !important;
        height: calc(100vh - 58px - var(--safe-area-top, 28px)) !important;
        padding-top: 18px !important;
        box-sizing: border-box !important;
    }
    .topic-nav-list,
    .sidebar-topics,
    .topics-list,
    .nav-list {
        padding-top: 14px !important;
    }
    .topic-nav-list > .topic-nav-btn:first-child,
    .sidebar-topics > *:first-child,
    .topic-nav-list > *:first-child,
    .topics-list > *:first-child,
    .nav-list > *:first-child {
        margin-top: 12px !important;
    }
}

/* 9. Mobile Right-Side Content Cut-Off Prevention */
html, body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
    width: 100% !important;
}
*, *::before, *::after {
    box-sizing: border-box !important;
}
.main-layout,
.content-area,
.subtopic-group,
.topic-description,
.concept-card,
.interview-card,
.analogy-box,
.code-compiler-widget,
.editor-container,
.code-editor,
.terminal-output-block,
.terminal-screen,
.live-preview-box,
.quiz-card {
    max-width: 100% !important;
    box-sizing: border-box !important;
    min-width: 0 !important;
    overflow-wrap: break-word !important;
    word-break: break-word !important;
}
pre, code {
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: auto !important;
    white-space: pre-wrap !important;
    word-break: break-word !important;
}
table, .concept-table {
    max-width: 100% !important;
    width: 100% !important;
    display: block !important;
    overflow-x: auto !important;
    box-sizing: border-box !important;
}
@media (max-width: 768px) {
    .content-area {
        padding-left: 14px !important;
        padding-right: 14px !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
    }
}


/* Zero-Lag Mobile GPU Acceleration: Eliminate heavy Gaussian blur on mobile WebView */
@media (max-width: 900px) {
    .app-header, .navbar, .studio-header,
    .sidebar, .sidebar-panel, #sidebar-panel,
    .modal-box, .modal-content, .card, .hub-card, .topic-section-card {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }
}

/* ==========================================================================
   PERFECT NATURAL TEXT ALIGNMENT: JUSTIFIED INTERVIEW QUESTIONS & ANSWERS
   ========================================================================== */
.interview-q-header,
.interview-question {
    display: flex !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    gap: 12px !important;
    cursor: pointer !important;
    box-sizing: border-box !important;
}

.interview-q-text,
.interview-question span:first-child,
.interview-q-header span:first-child,
.question-text {
    display: block !important;
    flex: 1 !important;
    text-align: justify !important;
    text-justify: inter-word !important;
    text-align-last: left !important;
    -webkit-hyphens: auto !important;
    -ms-hyphens: auto !important;
    hyphens: auto !important;
    word-break: normal !important;
    overflow-wrap: break-word !important;
    line-height: 1.55 !important;
    word-spacing: normal !important;
    letter-spacing: normal !important;
    box-sizing: border-box !important;
}

.interview-a-box,
.interview-a-box p,
.interview-answer,
.interview-answer p,
.interview-body,
.interview-body p {
    text-align: justify !important;
    text-justify: inter-word !important;
    text-align-last: left !important;
    -webkit-hyphens: auto !important;
    -ms-hyphens: auto !important;
    hyphens: auto !important;
    word-break: normal !important;
    overflow-wrap: break-word !important;
    line-height: 1.65 !important;
    word-spacing: normal !important;
    letter-spacing: normal !important;
}

.interview-toggle-icon,
.accordion-arrow {
    flex-shrink: 0 !important;
    margin-left: auto !important;
    margin-top: 3px !important;
}

/* Quiz Questions & Options Left Aligned */
.quiz-q-title,
.quiz-question,
.quiz-opt-btn,
.quiz-opts-group {
    text-align: left !important;
    text-justify: auto !important;
    word-spacing: normal !important;
    letter-spacing: normal !important;
}


/* --------------------------------------------------------------------------
   Guaranteed High-Visibility Quiz Option Feedback (Correct Green / Wrong Red)
   -------------------------------------------------------------------------- */
.quiz-opt-btn:hover:not(.disabled):not(:disabled) {
    background: rgba(168, 85, 247, 0.15) !important;
    border-color: rgba(168, 85, 247, 0.45) !important;
    color: #ffffff !important;
}

.quiz-opt-btn.correct,
.quiz-opt-btn.correct:hover,
.quiz-opt-btn[data-correct="true"] {
    background: rgba(16, 185, 129, 0.28) !important;
    border-color: #10b981 !important;
    color: #34d399 !important;
    font-weight: 700 !important;
}

.quiz-opt-btn.wrong,
.quiz-opt-btn.wrong:hover,
.quiz-opt-btn.incorrect,
.quiz-opt-btn.incorrect:hover {
    background: rgba(239, 68, 68, 0.28) !important;
    border-color: #ef4444 !important;
    color: #f87171 !important;
    font-weight: 700 !important;
}

body.light-theme .quiz-opt-btn.correct,
body.light-theme .quiz-opt-btn.correct:hover {
    background: #dcfce7 !important;
    border-color: #22c55e !important;
    color: #15803d !important;
    font-weight: 700 !important;
}

body.light-theme .quiz-opt-btn.wrong,
body.light-theme .quiz-opt-btn.wrong:hover,
body.light-theme .quiz-opt-btn.incorrect,
body.light-theme .quiz-opt-btn.incorrect:hover {
    background: #fee2e2 !important;
    border-color: #ef4444 !important;
    color: #b91c1c !important;
    font-weight: 700 !important;
}


/* Ensure Navbar text is always crisp white on royal gradient */
.app-header .brand-name,
.navbar .brand-name,
.navbar .brand-title,
.brand-name,
.brand-title,
body.dark-theme .app-header .brand-name,
body.dark-theme .navbar .brand-name,
body.dark-theme .navbar .brand-title,
body.dark-theme .brand-name,
body.dark-theme .brand-title,
body.light-theme .app-header .brand-name,
body.light-theme .navbar .brand-name,
body.light-theme .navbar .brand-title {
    color: #ffffff !important;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.45) !important;
}
body.light-theme .app-header .logo-icon,
body.light-theme .navbar .back-btn,
body.light-theme .menu-toggle-btn,
body.dark-theme .app-header .logo-icon,
body.dark-theme .navbar .back-btn,
body.dark-theme .menu-toggle-btn {
    color: #ffffff !important;
}


/* ==========================================================================
   Zero-Lag GPU Acceleration & Virtual Lazy Rendering (Smooth 60FPS)
   ========================================================================== */
.subtopic-item-card,
.analogy-box,
.quiz-card,
.interview-q-card,
.code-compiler-widget,
.hub-card,
.feature-card,
.project-card {
    content-visibility: auto;
    contain-intrinsic-size: 1px 320px;
}


/* ==========================================================================
   Zero-Bug High-Contrast Quiz Colors (Green Correct / Red Wrong)
   ========================================================================== */
.quiz-opt-btn.correct,
.quiz-opt-btn.correct:hover,
.quiz-opt-btn.correct:focus,
.quiz-opt-btn.correct:active {
    background: #10b981 !important;
    border: 2px solid #059669 !important;
    color: #ffffff !important;
    font-weight: 800 !important;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.45) !important;
}

.quiz-opt-btn.wrong,
.quiz-opt-btn.wrong:hover,
.quiz-opt-btn.wrong:focus,
.quiz-opt-btn.wrong:active,
.quiz-opt-btn.incorrect,
.quiz-opt-btn.incorrect:hover,
.quiz-opt-btn.incorrect:focus,
.quiz-opt-btn.incorrect:active {
    background: #ef4444 !important;
    border: 2px solid #dc2626 !important;
    color: #ffffff !important;
    font-weight: 800 !important;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.45) !important;
}

body.light-theme .quiz-opt-btn.correct,
body.light-theme .quiz-opt-btn.correct:hover,
body.light-theme .quiz-opt-btn.correct:focus {
    background: #10b981 !important;
    border: 2px solid #059669 !important;
    color: #ffffff !important;
    font-weight: 800 !important;
}

body.light-theme .quiz-opt-btn.wrong,
body.light-theme .quiz-opt-btn.wrong:hover,
body.light-theme .quiz-opt-btn.wrong:focus,
body.light-theme .quiz-opt-btn.incorrect,
body.light-theme .quiz-opt-btn.incorrect:hover {
    background: #ef4444 !important;
    border: 2px solid #dc2626 !important;
    color: #ffffff !important;
    font-weight: 800 !important;
}

/* Course Hub Matching Theme Back Button */
.back-btn {
background: linear-gradient(135deg, #0ea5e9 0%, #6366f1 100%) !important;
    box-shadow: 0 4px 14px rgba(14, 165, 233, 0.45) !important;
    color: #ffffff !important;
}
/* Classic Old Blue Back Button for Course Lesson Pages */
.logo-icon {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important;
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.45) !important;
    color: #ffffff !important;
}
