/* ==========================================================================
   Project Ideas Vault - Professional Design System
   Matches EduByte Dark / Light Theme & Mobile-First Best Practices
   ========================================================================== */

:root {
    --bg-main: #060d19;
    --bg-card: #0d1b2e;
    --bg-card-hover: #13243c;
    --bg-card-alt: rgba(13, 27, 46, 0.7);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-highlight: rgba(0, 242, 254, 0.3);
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --accent-blue: #00f2fe;
    --accent-cyan: #38bdf8;
    --accent-teal: #14b8a6;
    --accent-green: #10b981;
    --accent-yellow: #f59e0b;
    --accent-purple: #a855f7;
    --accent-rose: #f43f5e;
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-full: 9999px;
    
    --shadow-card: 0 4px 20px -2px rgba(0, 0, 0, 0.35);
    --shadow-glow: 0 0 20px rgba(0, 242, 254, 0.15);
}

body.light-theme {
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --bg-card-hover: #f1f5f9;
    --bg-card-alt: #f8fafc;
    --border-color: rgba(15, 23, 42, 0.09);
    --border-highlight: rgba(2, 132, 199, 0.35);
    
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    
    --shadow-card: 0 4px 16px -2px rgba(0, 0, 0, 0.06);
    --shadow-glow: 0 0 20px rgba(2, 132, 199, 0.12);
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: clip;
    padding-top: 58px;
    transition: background-color 0.25s ease, color 0.25s ease;
}

/* ==========================================================================
   1. Clean & Balanced Top Navigation Header - Fixed at Top
   ========================================================================== */
.app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    background: linear-gradient(135deg, #1e1b4b 0%, #0f172a 60%, #1e3a8a 100%);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border-color);
    height: 58px;
    display: flex;
    align-items: center;
}

body.light-theme .app-header {
    background: linear-gradient(135deg, #1e1b4b 0%, #0f172a 60%, #1e3a8a 100%);
    border-bottom-color: rgba(15, 23, 42, 0.08);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
}

.header-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

/* Left: Back Button + Title Container */
.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

/* Left: Back Button (C Programming Styled) */
.back-btn,
.nav-back-btn {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, #0d9488 0%, #059669 100%) !important;
    border: none !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff !important;
    text-decoration: none;
    flex-shrink: 0;
    transition: all 0.2s ease;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(13, 148, 136, 0.45) !important;
}

.back-btn:hover,
.nav-back-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 18px rgba(13, 148, 136, 0.55) !important;
}

body.light-theme .back-btn,
body.light-theme .nav-back-btn {
    color: #ffffff !important;
    background: linear-gradient(135deg, #0d9488 0%, #059669 100%) !important;
    border: none !important;
    box-shadow: 0 4px 14px rgba(13, 148, 136, 0.45) !important;
}

body.light-theme .back-btn:hover,
body.light-theme .nav-back-btn:hover {
    background: rgba(0, 0, 0, 0.08);
}

body.light-theme .nav-back-btn:hover {
    color: #0284c7;
    border-color: #0284c7;
    background: rgba(2, 132, 199, 0.06);
}

/* Brand / Title */
.header-brand {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    text-align: left;
    justify-content: flex-start;
    flex-shrink: 1;
}

.header-hub-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text-primary);
    white-space: nowrap;
    letter-spacing: -0.01em;
}

body.light-theme .header-hub-title {
    color: #0f172a !important;
}

.header-hub-pill {
    font-size: 0.65rem;
    font-weight: 700;
    background: rgba(0, 242, 254, 0.1);
    color: var(--accent-blue);
    border: 1px solid rgba(0, 242, 254, 0.25);
    padding: 2px 7px;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

body.light-theme .header-hub-pill {
    background: rgba(2, 132, 199, 0.08);
    color: #0284c7;
    border-color: rgba(2, 132, 199, 0.22);
}

/* Right: Top Saved Button */
.nav-saved-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 13px;
    border-radius: var(--radius-full);
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #f59e0b;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
    white-space: nowrap;
    flex-shrink: 0;
    user-select: none;
}

.nav-saved-btn:hover {
    background: rgba(245, 158, 11, 0.2);
    border-color: #f59e0b;
    transform: translateY(-1px);
    box-shadow: 0 2px 10px rgba(245, 158, 11, 0.25);
}

.nav-saved-btn:active {
    transform: scale(0.96);
}

.nav-saved-btn.active {
    background: #f59e0b;
    color: #051329;
    border-color: #f59e0b;
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.45);
}

.saved-star {
    font-size: 0.9rem;
    line-height: 1;
}

.saved-label {
    letter-spacing: 0.2px;
}

.saved-badge {
    background: rgba(245, 158, 11, 0.22);
    color: #f59e0b;
    font-size: 0.72rem;
    padding: 1px 7px;
    border-radius: 9999px;
    font-weight: 800;
    min-width: 18px;
    text-align: center;
    line-height: 1.3;
}

.nav-saved-btn.active .saved-badge {
    background: #051329;
    color: #f59e0b;
}

body.light-theme .nav-saved-btn {
    background: #fffbeb;
    border: 1px solid rgba(217, 119, 6, 0.3);
    color: #b45309;
    box-shadow: 0 1px 3px rgba(217, 119, 6, 0.08);
}

body.light-theme .nav-saved-btn:hover {
    background: #fef3c7;
    border-color: #d97706;
}

body.light-theme .nav-saved-btn.active {
    background: #d97706;
    color: #ffffff;
    border-color: #b45309;
    box-shadow: 0 2px 10px rgba(217, 119, 6, 0.3);
}

body.light-theme .nav-saved-btn.active .saved-badge {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
}

body.light-theme .saved-badge {
    background: rgba(217, 119, 6, 0.15);
    color: #92400e;
}

/* ==========================================================================
   2. Main Container & Hero
   ========================================================================== */
.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 16px 60px;
    width: 100%;
    flex: 1;
}

.hero-section {
    margin-bottom: 20px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    background: rgba(0, 242, 254, 0.08);
    border: 1px solid rgba(0, 242, 254, 0.2);
    color: var(--accent-blue);
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 1.85rem;
    font-weight: 800;
    margin-bottom: 6px;
    line-height: 1.2;
    color: var(--text-primary);
}

.text-gradient {
    background: linear-gradient(135deg, #00f2fe 0%, #10b981 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.hero-hint {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.search-bar-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.search-input-wrapper {
    flex: 1;
    position: relative;
}

.search-input-wrapper svg {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-input {
    width: 100%;
    padding: 11px 14px 11px 42px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: inherit;
    transition: all 0.2s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(0, 242, 254, 0.12);
}

.random-idea-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #0284c7, #0d9488);
    color: #ffffff;
    font-weight: 700;
    font-size: 0.86rem;
    padding: 11px 18px;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25);
}

.random-idea-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(2, 132, 199, 0.4);
}

/* ==========================================================================
   3. Filters Section
   ========================================================================== */
.filters-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.category-chips {
    display: flex;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.category-chips::-webkit-scrollbar {
    display: none;
}

.chip-btn {
    padding: 6px 14px;
    border-radius: var(--radius-full);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
    font-family: inherit;
}

.chip-btn:hover {
    border-color: var(--border-highlight);
    color: var(--text-primary);
}

.chip-btn.active {
    background: rgba(0, 242, 254, 0.12);
    border-color: var(--accent-blue);
    color: var(--accent-blue);
}

.results-bar {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-top: 4px;
}

.results-count-text {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 600;
}

.results-count-text {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 600;
}

/* ==========================================================================
   4. Projects Grid (Clean Title Boxes)
   ========================================================================== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}

.project-card.title-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    box-shadow: var(--shadow-card);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.project-card.title-box:hover {
    transform: translateY(-3px);
    border-color: var(--border-highlight);
    box-shadow: var(--shadow-glow);
}

.project-card.title-box:active {
    transform: scale(0.985);
}

.card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}

.category-tag {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: var(--radius-full);
    letter-spacing: 0.5px;
}

.cat-python { background: rgba(56, 189, 248, 0.12); color: #38bdf8; border: 1px solid rgba(56, 189, 248, 0.25); }
.cat-web { background: rgba(249, 115, 22, 0.12); color: #f97316; border: 1px solid rgba(249, 115, 22, 0.25); }
.cat-react { background: rgba(14, 165, 233, 0.12); color: #38bdf8; border: 1px solid rgba(14, 165, 233, 0.25); }
.cat-angular { background: rgba(239, 68, 68, 0.12); color: #ef4444; border: 1px solid rgba(239, 68, 68, 0.25); }
.cat-java { background: rgba(220, 38, 38, 0.12); color: #f87171; border: 1px solid rgba(220, 38, 38, 0.25); }
.cat-ai { background: rgba(168, 85, 247, 0.12); color: #c084fc; border: 1px solid rgba(168, 85, 247, 0.25); }
.cat-sql { background: rgba(20, 184, 166, 0.12); color: #2dd4bf; border: 1px solid rgba(20, 184, 166, 0.25); }
.cat-c { background: rgba(148, 163, 184, 0.12); color: #cbd5e1; border: 1px solid rgba(148, 163, 184, 0.25); }
.cat-agriculture { background: rgba(34, 197, 94, 0.12); color: #22c55e; border: 1px solid rgba(34, 197, 94, 0.25); }
.cat-banking { background: rgba(14, 165, 233, 0.12); color: #38bdf8; border: 1px solid rgba(14, 165, 233, 0.25); }
.cat-healthcare { background: rgba(20, 184, 166, 0.14); color: #2dd4bf; border: 1px solid rgba(20, 184, 166, 0.3); }
.cat-robotics { background: rgba(249, 115, 22, 0.14); color: #fb923c; border: 1px solid rgba(249, 115, 22, 0.3); }
.cat-cloud { background: rgba(99, 102, 241, 0.14); color: #818cf8; border: 1px solid rgba(99, 102, 241, 0.3); }
.cat-energy { background: rgba(16, 185, 129, 0.14); color: #10b981; border: 1px solid rgba(16, 185, 129, 0.3); }
.cat-edtech { background: rgba(168, 85, 247, 0.14); color: #c084fc; border: 1px solid rgba(168, 85, 247, 0.3); }
.cat-spatial { background: rgba(6, 182, 212, 0.14); color: #22d3ee; border: 1px solid rgba(6, 182, 212, 0.3); }
.cat-iot { background: rgba(0, 242, 254, 0.12); color: #00f2fe; border: 1px solid rgba(0, 242, 254, 0.25); }
.cat-ml { background: rgba(192, 132, 252, 0.12); color: #c084fc; border: 1px solid rgba(192, 132, 252, 0.25); }
.cat-cyber { background: rgba(239, 68, 68, 0.12); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.25); }

/* Card Top Row with Bookmark Button */
.card-bookmark-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1.05rem;
    color: #64748b;
    padding: 2px 5px;
    border-radius: 6px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.card-bookmark-btn:hover {
    transform: scale(1.22);
    color: #fbbf24;
}

.card-bookmark-btn.saved {
    color: #f59e0b;
    filter: drop-shadow(0 0 6px rgba(245, 158, 11, 0.6));
}

/* Saved Chip Highlight */
.chip-btn.saved-chip {
    border-color: rgba(245, 158, 11, 0.35);
    color: #f59e0b;
}

.chip-btn.saved-chip.active {
    background: #f59e0b !important;
    color: #051329 !important;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
}

.project-title {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0 0 10px;
    color: var(--text-primary);
    line-height: 1.35;
    transition: color 0.15s ease;
}

.project-card.title-box:hover .project-title {
    color: var(--accent-blue);
}

.tech-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 12px;
}

.tech-pill {
    font-size: 0.68rem;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.card-box-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--accent-blue);
    font-size: 0.8rem;
    font-weight: 700;
}

body.light-theme .card-box-action {
    border-top-color: rgba(15, 23, 42, 0.07);
}

.title-box:hover .action-text {
    color: var(--accent-green);
}

.title-box:hover .action-arrow {
    transform: translateX(4px);
    color: var(--accent-green);
}

.action-arrow {
    transition: transform 0.2s ease, color 0.2s ease;
    font-size: 1rem;
}

/* ==========================================================================
   5. Load More Button
   ========================================================================== */
.load-more-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 32px;
    padding: 10px 0;
}

.load-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border-highlight);
    color: var(--accent-blue);
    font-size: 0.9rem;
    font-weight: 700;
    padding: 11px 24px;
    border-radius: var(--radius-full);
    cursor: pointer;
    box-shadow: var(--shadow-card);
    transition: all 0.2s ease;
    font-family: inherit;
}

.load-more-btn:hover {
    background: var(--accent-blue);
    color: #051329;
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

/* ==========================================================================
   6. Modal Dialog (Abstract & Architecture Blueprint)
   ========================================================================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 99999 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: calc(var(--safe-area-top, 28px) + 20px) 16px 20px !important;
    box-sizing: border-box !important;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.25s;
}

.modal-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.modal-box {
    position: relative;
    background: #08111e;
    border: 1px solid rgba(0, 242, 254, 0.22);
    border-top: 3px solid var(--accent-blue);
    border-radius: 20px;
    width: 100%;
    max-width: 680px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.8), 0 0 35px rgba(0, 242, 254, 0.12);
    transform: scale(0.96) translateY(8px);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

body.light-theme .modal-box {
    background: #ffffff;
    border-color: rgba(2, 132, 199, 0.22);
    border-top-color: #0284c7;
    box-shadow: 0 25px 60px -10px rgba(15, 23, 42, 0.2), 0 0 25px rgba(2, 132, 199, 0.1);
}

.modal-overlay.open .modal-box {
    transform: scale(1) translateY(0);
}

/* Modal Header - Clean Two-Row Layout: Top Row for Badges & Close Button, Bottom Row for Full-Width Title */
#blueprint-modal .modal-header,
.modal-header {
    padding: 18px 22px 16px;
    border-bottom: 1px solid var(--border-color);
    background: rgba(13, 27, 46, 0.8);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

body.light-theme #blueprint-modal .modal-header,
body.light-theme .modal-header {
    background: rgba(248, 250, 252, 0.95);
}

.modal-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.modal-badge-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.modal-spec-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.25);
    padding: 3px 8px;
    border-radius: var(--radius-full);
}

body.light-theme .modal-spec-label {
    color: #0284c7;
    background: rgba(2, 132, 199, 0.08);
    border-color: rgba(2, 132, 199, 0.2);
}

.modal-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.38;
    margin: 0;
    word-break: break-word;
    width: 100%;
}

body.light-theme .modal-title {
    color: #0f172a;
}

/* Modal Close Button - Inline within Top Row (Never overlaps title text!) */
#blueprint-modal .modal-close-btn,
.modal-box .modal-close-btn {
    position: static !important;
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    background: rgba(244, 63, 94, 0.16) !important;
    border: 1.5px solid rgba(244, 63, 94, 0.35) !important;
    color: #fb7185 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
    box-shadow: 0 2px 8px rgba(244, 63, 94, 0.15) !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

#blueprint-modal .modal-close-btn:hover,
.modal-box .modal-close-btn:hover {
    background: rgba(244, 63, 94, 0.28) !important;
    color: #ffffff !important;
    border-color: #f43f5e !important;
    transform: rotate(90deg) scale(1.08) !important;
}

body.light-theme #blueprint-modal .modal-close-btn,
body.light-theme .modal-box .modal-close-btn {
    background: #ffe4e6 !important;
    border: 1.5px solid #fda4af !important;
    color: #e11d48 !important;
    box-shadow: 0 2px 8px rgba(225, 29, 72, 0.12) !important;
}

body.light-theme #blueprint-modal .modal-close-btn:hover,
body.light-theme .modal-box .modal-close-btn:hover {
    background: #fecdd3 !important;
    color: #be123c !important;
    border-color: #fb7185 !important;
}

/* Modal Body */
.modal-body {
    padding: 20px 22px 28px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 18px;
    scrollbar-width: none !important;
    
}

.modal-body::-webkit-scrollbar {
    width: 6px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: rgba(0, 242, 254, 0.2);
    border-radius: 4px;
}

/* Modal Action Bar */
.modal-action-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    padding-bottom: 2px;
}

.modal-quick-tags {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 15px;
    border-radius: var(--radius-full);
    background: rgba(0, 242, 254, 0.1);
    border: 1px solid rgba(0, 242, 254, 0.3);
    color: var(--accent-blue);
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.copy-btn:hover {
    background: var(--accent-blue);
    color: #051329;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0, 242, 254, 0.35);
}

.copy-btn:active {
    transform: scale(0.96);
}

.download-synopsis-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 15px;
    border-radius: var(--radius-full);
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.32);
    color: #34d399;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.download-synopsis-btn:hover {
    background: #10b981;
    color: #051329;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

.download-synopsis-btn:active {
    transform: scale(0.96);
}

.modal-save-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 15px;
    border-radius: var(--radius-full);
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.32);
    color: #fbbf24;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.modal-save-btn:hover {
    background: #f59e0b;
    color: #051329;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
}

.modal-save-btn:active {
    transform: scale(0.96);
}

.modal-btn-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.copy-btn:active {
    transform: scale(0.96);
}

/* Abstract Box */
.abstract-box {
    background: linear-gradient(135deg, rgba(0, 242, 254, 0.06) 0%, rgba(16, 185, 129, 0.03) 100%);
    border: 1px solid rgba(0, 242, 254, 0.22);
    border-left: 4px solid var(--accent-blue);
    border-radius: var(--radius-md);
    padding: 16px 18px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

body.light-theme .abstract-box {
    background: linear-gradient(135deg, #f0fdf4 0%, #f0f9ff 100%);
    border: 1px solid rgba(2, 132, 199, 0.22);
    border-left: 4px solid #0284c7;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

/* Explanation Box */
.explanation-box {
    background: rgba(13, 27, 46, 0.5);
    border: 1px solid rgba(16, 185, 129, 0.22);
    border-left: 4px solid var(--accent-green);
    border-radius: var(--radius-md);
    padding: 16px 18px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

body.light-theme .explanation-box {
    background: #f8fafc;
    border-color: rgba(16, 185, 129, 0.25);
    border-left-color: #10b981;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

/* Modal Card Section */
.modal-card-section {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px 18px;
}

body.light-theme .modal-card-section {
    background: #ffffff;
    border-color: rgba(15, 23, 42, 0.08);
}

.modal-section-title {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--accent-blue);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.2px;
}

.section-icon {
    font-size: 1rem;
    line-height: 1;
}

.explanation-title {
    color: var(--accent-green);
}

.evaluation-title {
    color: #a7f3d0;
}

body.light-theme .modal-section-title {
    color: #0284c7;
}

body.light-theme .explanation-title {
    color: #059669;
}

body.light-theme .evaluation-title {
    color: #065f46;
}

/* Justified clean typography */
.abstract-paragraph,
.explanation-paragraph {
    color: #e2e8f0;
    line-height: 1.7;
    font-size: 0.91rem;
    text-align: justify !important;
    text-justify: inter-word;
    letter-spacing: 0.01em;
    word-break: normal;
    margin: 0;
}

body.light-theme .abstract-paragraph,
body.light-theme .explanation-paragraph {
    color: #334155;
}

/* Architecture flow code block */
.arch-code-block {
    background: #040915;
    border: 1px solid rgba(0, 242, 254, 0.18);
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 0.82rem;
    color: var(--accent-blue);
    line-height: 1.6;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-word;
}

body.light-theme .arch-code-block {
    background: #f1f5f9;
    border-color: rgba(15, 23, 42, 0.12);
    color: #0369a1;
}

/* Features List */
.features-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.features-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: #cbd5e1;
    font-size: 0.88rem;
    line-height: 1.55;
}

body.light-theme .features-list li {
    color: #475569;
}

.feature-bullet {
    color: var(--accent-green);
    font-weight: 800;
    font-size: 0.82rem;
    flex-shrink: 0;
    margin-top: 1px;
}

/* Roadmap List with numbered steps */
.roadmap-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.roadmap-step {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.step-num {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(0, 242, 254, 0.12);
    border: 1px solid rgba(0, 242, 254, 0.35);
    color: var(--accent-blue);
    font-size: 0.74rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 1px;
}

.step-desc {
    font-size: 0.88rem;
    color: #cbd5e1;
    line-height: 1.55;
    text-align: justify;
    text-justify: inter-word;
}

body.light-theme .step-desc {
    color: #475569;
}

/* Evaluation Tip Box */
.resume-tip-box {
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.28);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    font-size: 0.86rem;
    line-height: 1.6;
    color: #a7f3d0;
}

body.light-theme .resume-tip-box {
    background: #ecfdf5;
    border-color: rgba(16, 185, 129, 0.35);
    color: #065f46;
}

.tip-highlight {
    font-weight: 800;
    color: #34d399;
}

body.light-theme .tip-highlight {
    color: #059669;
}

.empty-state {
    text-align: center;
    padding: 48px 16px;
    grid-column: 1 / -1;
    color: var(--text-muted);
}

.empty-state svg {
    margin-bottom: 12px;
    opacity: 0.5;
}

/* ==========================================================================
   7. Mobile & Tablet Responsive Adjustments
   ========================================================================== */
@media (max-width: 640px) {
    body {
        padding-top: 52px;
    }

    .app-header {
        height: 52px;
    }

    .header-container {
        padding: 0 10px;
        gap: 6px;
    }

    .header-hub-title {
        font-size: 0.95rem;
    }

    .header-hub-pill {
        display: none;
    }

    .nav-back-btn {
        padding: 5px 9px;
        font-size: 0.78rem;
        gap: 4px;
    }

    .nav-saved-btn {
        padding: 5px 10px;
        font-size: 0.78rem;
        gap: 5px;
    }

    .saved-badge {
        padding: 1px 5px;
        font-size: 0.7rem;
    }

    .main-container {
        padding: 14px 12px 40px;
    }

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

    .hero-hint {
        font-size: 0.8rem;
    }

    .search-bar-row {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .search-input {
        padding: 10px 12px 10px 38px;
        font-size: 0.84rem;
    }

    .random-idea-btn {
        width: 100%;
        justify-content: center;
        padding: 10px;
        font-size: 0.82rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .project-card.title-box {
        padding: 14px 15px;
    }

    .project-title {
        font-size: 1rem;
    }

    /* Clean Floating Mobile Modal with NO Big Void */
    .modal-overlay {
        padding: calc(var(--safe-area-top, 28px) + 24px) 12px 20px !important;
        align-items: center;
        z-index: 99999 !important;
    }

    .modal-box {
        max-height: 86vh !important;
        width: 100%;
        border-radius: 18px;
        box-shadow: 0 20px 45px rgba(0, 0, 0, 0.85);
    }

    #blueprint-modal .modal-header,
    .modal-header {
        padding: 15px 16px 13px;
        gap: 8px;
    }

    .modal-title {
        font-size: 1.06rem;
        line-height: 1.34;
    }

    #blueprint-modal .modal-close-btn,
    .modal-box .modal-close-btn {
        width: 36px !important;
        height: 36px !important;
        font-size: 1.25rem !important;
    }

    .modal-body {
        padding: 15px 15px 24px;
        gap: 14px;
    }

    .abstract-box,
    .explanation-box,
    .modal-card-section {
        padding: 13px 14px;
    }

    .abstract-paragraph,
    .explanation-paragraph {
        font-size: 0.87rem;
        line-height: 1.62;
    }

    .load-more-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 360px) {
    .saved-label {
        display: none;
    }
    .header-hub-title {
        font-size: 0.88rem;
    }
}

/* ==========================================================================
   STAR Resume Bullet Generator Styles (Removed as requested)
   ========================================================================== */
.copy-star-btn,
.card-star-quick-btn,
.star-resume-section {
    display: none !important;
}

.copy-star-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 15px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.18), rgba(56, 189, 248, 0.18));
    border: 1px solid rgba(168, 85, 247, 0.4);
    color: #e9d5ff;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.copy-star-btn:hover {
    background: linear-gradient(135deg, #a855f7, #38bdf8);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(168, 85, 247, 0.4);
}

.copy-star-btn:active {
    transform: scale(0.96);
}

body.light-theme .copy-star-btn {
    background: linear-gradient(135deg, rgba(147, 51, 234, 0.1), rgba(2, 132, 199, 0.1));
    border-color: rgba(147, 51, 234, 0.35);
    color: #7e22ce;
}

body.light-theme .copy-star-btn:hover {
    background: linear-gradient(135deg, #9333ea, #0284c7);
    color: #ffffff;
}

/* Card Quick STAR Bullets Button */
.card-star-quick-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px;
    border-radius: var(--radius-full);
    background: rgba(168, 85, 247, 0.12);
    border: 1px solid rgba(168, 85, 247, 0.3);
    color: #c084fc;
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.card-star-quick-btn:hover {
    background: #a855f7;
    color: white;
    transform: scale(1.04);
}

body.light-theme .card-star-quick-btn {
    background: rgba(147, 51, 234, 0.08);
    border-color: rgba(147, 51, 234, 0.25);
    color: #7e22ce;
}

body.light-theme .card-star-quick-btn:hover {
    background: #9333ea;
    color: white;
}

/* STAR Section in Blueprint Modal */
.star-resume-section {
    background: linear-gradient(145deg, rgba(168, 85, 247, 0.06) 0%, rgba(56, 189, 248, 0.04) 100%);
    border: 1px solid rgba(168, 85, 247, 0.3) !important;
    position: relative;
    overflow: hidden;
}

body.light-theme .star-resume-section {
    background: linear-gradient(145deg, #faf5ff 0%, #f0f9ff 100%);
    border-color: rgba(147, 51, 234, 0.25) !important;
}

.star-title {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.star-badge-pill {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, #10b981, #06b6d4);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.star-intro-text {
    font-size: 0.86rem;
    color: var(--text-secondary);
    line-height: 1.55;
    margin-bottom: 14px;
}

.star-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.star-item {
    background: rgba(6, 13, 25, 0.7);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

body.light-theme .star-item {
    background: #ffffff;
    border-color: rgba(15, 23, 42, 0.1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.star-item:hover {
    border-color: rgba(0, 242, 254, 0.35);
    transform: translateX(2px);
}

.star-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.star-letter {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.74rem;
    font-weight: 800;
    color: white;
    flex-shrink: 0;
}

.star-s .star-letter { background: #a855f7; }
.star-t .star-letter { background: #3b82f6; }
.star-a .star-letter { background: #06b6d4; }
.star-r .star-letter { background: #10b981; }

.star-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.star-mini-copy {
    margin-left: auto;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.68rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.star-mini-copy:hover {
    background: var(--accent-blue);
    color: #051329;
    border-color: var(--accent-blue);
}

body.light-theme .star-mini-copy {
    background: #f1f5f9;
}

.star-body {
    font-size: 0.86rem;
    color: #cbd5e1;
    line-height: 1.55;
    padding-left: 30px;
}

body.light-theme .star-body {
    color: #334155;
}

.star-actions-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 14px;
    flex-wrap: wrap;
}

.star-full-copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: linear-gradient(135deg, #a855f7 0%, #38bdf8 100%);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 15px rgba(168, 85, 247, 0.35);
    font-family: inherit;
}

.star-full-copy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(168, 85, 247, 0.5);
    filter: brightness(1.08);
}

.star-full-copy-btn:active {
    transform: scale(0.97);
}

.star-help-hint {
    font-size: 0.76rem;
    color: var(--text-muted);
}

/* Toast popup notification */
.edubyte-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #0f172a;
    color: #f8fafc;
    border: 1px solid rgba(0, 242, 254, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border-radius: var(--radius-full);
    padding: 10px 22px;
    font-size: 0.84rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.edubyte-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.edubyte-toast.success {
    border-color: rgba(16, 185, 129, 0.5);
}

/* ==========================================================================
   MOBILE & TABLET RESPONSIVE FIX - ZERO HORIZONTAL OVERFLOW / NO RIGHT CUTOFF
   ========================================================================== */
html, body {
    overflow-x: hidden !important;
    max-width: 100% !important;
    width: 100% !important;
}

.main-container,
.header-container,
.projects-grid,
.project-card,
.modal-container,
.modal-content,
.search-bar-row,
.category-chips {
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* Tablet Optimizations (769px to 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .main-container {
        padding: 20px 20px 50px !important;
    }
    .projects-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
        gap: 14px !important;
    }
}

/* Mobile Phone Optimizations (<= 768px) */
@media (max-width: 768px) {
    .main-container {
        padding: 14px 14px 40px !important;
    }

    .hero-title {
        font-size: 1.4rem !important;
        line-height: 1.25 !important;
    }

    .search-bar-row {
        flex-direction: column !important;
        gap: 8px !important;
        align-items: stretch !important;
    }

    .random-idea-btn {
        width: 100% !important;
        justify-content: center !important;
        padding: 9px 14px !important;
    }

    .projects-grid {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    .project-card.title-box {
        padding: 14px 12px !important;
    }

    .header-hub-title {
        font-size: 0.92rem !important;
    }

    .nav-back-btn,
    .nav-saved-btn {
        padding: 5px 8px !important;
        font-size: 0.74rem !important;
    }

    .modal-container {
        padding: 10px !important;
    }

    .modal-content {
        padding: 16px 12px !important;
        max-width: 100% !important;
        width: 100% !important;
    }
}

/* ==========================================================================
   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;
}

/* ==========================================================================
   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;
}


/* ==========================================================================
   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, #3b82f6 0%, #1d4ed8 100%) !important;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 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;
}
