/* =========================================
   1. GLOBAL VARIABLES & RESET
========================================= */
:root {
    --brutal-black: #1e293b;
    --brutal-white: #ffffff;
    --brutal-blue: #2563eb;
    --brutal-blue-hover: #1d4ed8;
    --brutal-amber: #f59e0b;
    --brutal-border: 3px solid #1e293b;
    --brutal-shadow: 6px 6px 0px #1e293b;
    --bg-light: #f0f2f5;
    --text-muted: #64748b;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

html, body {
    background-color: var(--bg-light);
    color: var(--brutal-black);
    overflow-x: hidden; 
}

/* =========================================
   2. TYPOGRAPHY & BUTTONS
========================================= */
.brutal-btn {
    padding: 12px 24px;
    border: var(--brutal-border);
    background: var(--brutal-white);
    box-shadow: 4px 4px 0px var(--brutal-black);
    font-weight: 800;
    cursor: pointer;
    transition: all 0.1s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--brutal-black);
}

.brutal-btn:active {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0px var(--brutal-black);
}

.brutal-btn.primary { background: var(--brutal-blue); color: white; }
.brutal-btn.accent { background: var(--brutal-amber); color: var(--brutal-black); }

/* =========================================
   3. NAVIGATION HEADER
========================================= */
.brutal-header {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 40px;
    background: var(--brutal-white);
    border-bottom: 4px solid var(--brutal-black);
    z-index: 1000;
}

.header-left, .header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.nav-link {
    font-weight: 800;
    color: var(--brutal-black);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.15s ease;
    text-transform: uppercase;
}

.nav-link:hover, .nav-link.active {
    color: var(--brutal-blue);
}

.logo h2 { color: var(--brutal-blue); font-weight: 900; }

.nav-links { display: flex; gap: 30px; align-items: center; }
.nav-links a { text-decoration: none; color: var(--text-muted); font-weight: 700; transition: 0.2s; }
.nav-links a:hover { color: var(--brutal-blue); }

#mode-badge {
    background: var(--brutal-amber);
    padding: 5px 15px;
    border: 2px solid var(--brutal-black);
    font-weight: 900;
    box-shadow: 3px 3px 0px var(--brutal-black);
}

/* =========================================
   4. MARKETING HERO CAROUSEL
========================================= */
.hero-carousel-wrapper {
    position: relative;
    max-width: 1400px;
    width: calc(100% - 40px);
    margin: 0 auto;
    height: auto;
    min-height: 460px;
    overflow: hidden;
    background: var(--brutal-black);
    border: 4px solid var(--brutal-black);
    border-radius: 16px;
    box-shadow: 8px 8px 0px var(--brutal-black);
}

.carousel-track {
    display: flex;
    width: 600%;
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.77, 0, 0.175, 1);
}

.edge-slide {
    width: calc(100% / 6);
    flex: 0 0 calc(100% / 6);
    min-height: 460px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 30px 4% 65px 4%;
    gap: 30px;
    box-sizing: border-box;
}

.slide-content {
    flex: 1;
    max-width: 750px; 
    padding-top: 10px; 
    padding-bottom: 10px; 
    z-index: 10;
}

.edge-slide:not(:has(.slide-graphic)) .slide-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 950px;
    margin: 0 auto;
}

.seo-badge {
    display: inline-block;
    background: var(--brutal-amber);
    color: var(--brutal-black);
    font-weight: 900;
    padding: 4px 12px;
    border: 2px solid var(--brutal-black);
    box-shadow: 3px 3px 0px var(--brutal-black);
    margin-bottom: 15px;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.mega-title {
    font-size: clamp(2rem, 3.8vw, 3.4rem); 
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 15px;
    text-shadow: 4px 4px 0px rgba(0,0,0,0.2);
}

.slide-subtitle {
    font-size: clamp(1rem, 1.3vw, 1.15rem);
    font-weight: 600;
    margin-bottom: 25px;
    line-height: 1.5;
}

.massive-btn { font-size: 1.05rem; padding: 12px 32px; }

.slide-graphic { flex: 1; display: flex; justify-content: flex-end; align-items: center; }

.brutal-code-block {
    background: #1e1e1e;
    color: #4ec9b0;
    padding: 30px;
    border: 4px solid var(--brutal-black);
    box-shadow: 10px 10px 0px rgba(0,0,0,0.4);
    font-family: 'Fira Code', 'Courier New', monospace;
    font-size: 1.1rem;
    transform: rotate(-3deg);
}

.carousel-controls {
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%); 
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 50;
    background: white;
    padding: 6px 15px;
    border: 3px solid var(--brutal-black);
    box-shadow: 4px 4px 0px var(--brutal-black);
}

.control-btn { 
    background: transparent; 
    border: none; 
    font-size: 1.2rem; 
    color: var(--brutal-black); 
    cursor: pointer;
    font-weight: 900;
    padding: 0 5px;
}
.carousel-dots { display: flex; gap: 8px; }
.dot {
    width: 12px;
    height: 12px;
    border: 3px solid var(--brutal-black);
    border-radius: 50%;
    cursor: pointer;
    transition: 0.3s;
    background: transparent;
}
.dot.active { background: var(--brutal-black); transform: scale(1.1); }

/* =========================================
   4.5 HERO CAROUSEL FEATURE SLIDES (NEW)
========================================= */

.tracetable-slide {
    background-color: #06b6d4; /* Vibrant Cyan */
    background-image: radial-gradient(var(--brutal-black) 3px, transparent 3px);
    background-size: 35px 35px;
    background-position: center;
}

.practice-slide {
    background: #3b82f6;
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 25%, #1d4ed8 70%, #0284c7 100%);
    background-image: 
        radial-gradient(rgba(255, 255, 255, 0.18) 2.5px, transparent 2.5px),
        linear-gradient(135deg, #1e1b4b 0%, #312e81 25%, #1d4ed8 70%, #0284c7 100%);
    background-size: 32px 32px, 100% 100%;
    background-position: center;
    position: relative;
    overflow: hidden;
    min-height: 510px !important;
    padding: 26px 4% 95px 4% !important;
}

/* ── Flagship Revamped Practice Slide Elements ── */
.revamp-flagship-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fde047;
    color: #0f172a;
    font-weight: 900;
    font-size: 0.8rem;
    padding: 5px 13px;
    border: 3px solid #0f172a;
    box-shadow: 3px 3px 0px #0f172a;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    animation: gentleWiggle 3s ease-in-out infinite;
}

@keyframes gentleWiggle {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-2px); }
}

.revamp-flagship-pill .revamp-dot {
    width: 9px;
    height: 9px;
    background: #ef4444;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 8px #ef4444;
    animation: brutalPulse 1s infinite;
}

.revamp-hero-title {
    color: #ffffff !important;
    text-shadow: 4px 4px 0px #0f172a !important;
    font-weight: 900;
    font-size: clamp(1.75rem, 2.4vw, 2.65rem) !important;
    line-height: 1.15 !important;
    margin: 4px 0 10px 0 !important;
    word-break: keep-all !important;
}

.revamp-title-tag {
    background: #fde047;
    color: #0f172a !important;
    padding: 3px 14px;
    border: 3.5px solid #0f172a;
    box-shadow: 5px 5px 0px #0f172a;
    display: inline-block;
    transform: rotate(-1deg);
    margin-top: 5px;
    text-shadow: none !important;
    border-radius: 6px;
    white-space: nowrap !important;
    font-size: 0.92em !important;
}

.revamp-subtitle-card {
    background: #ffffff !important;
    color: #0f172a !important;
    border: 3.5px solid #0f172a !important;
    padding: 12px 16px !important;
    border-radius: 10px !important;
    box-shadow: 5px 5px 0px #0f172a !important;
    margin-bottom: 16px !important;
    max-width: 610px !important;
    line-height: 1.4 !important;
}

.revamp-feat-pill {
    background: #f8fafc;
    color: #0f172a;
    border: 2px solid #0f172a;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    box-shadow: 2px 2px 0px #0f172a;
}

.revamp-launch-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: #fde047;
    color: #0f172a !important;
    font-family: inherit;
    font-weight: 900;
    font-size: 1.05rem;
    padding: 12px 24px;
    border: 3.5px solid #0f172a;
    box-shadow: 6px 6px 0px #0f172a;
    border-radius: 10px;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    position: relative;
    overflow: visible;
}

.revamp-launch-btn:hover {
    transform: translate(-3px, -3px);
    box-shadow: 9px 9px 0px #0f172a;
    background: #fef08a;
}

.revamp-launch-btn:active {
    transform: translate(2px, 2px);
    box-shadow: 3px 3px 0px #0f172a;
}

.revamp-launch-btn .btn-badge-ping {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 20px;
    height: 20px;
    border-radius: 9999px;
    background: #ef4444;
    animation: ping 1.2s cubic-bezier(0, 0, 0.2, 1) infinite;
    opacity: 0.75;
}

.revamp-launch-btn .btn-badge-solid {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 20px;
    height: 20px;
    border-radius: 9999px;
    background: #dc2626;
    border: 2px solid #0f172a;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 10px;
    font-weight: 900;
}


.flowchart-slide {
    background-color: #a3e635; /* Bright brutalist lime */
    background-image: radial-gradient(var(--brutal-black) 3px, transparent 3px);
    background-size: 35px 35px;
    background-position: center;
}

.content-box {
    background: white;
    padding: 40px !important;
    border: 4px solid var(--brutal-black);
    box-shadow: 10px 10px 0px var(--brutal-black);
    transform: rotate(-1deg);
    z-index: 10;
    max-width: 600px !important;
}

.ribbon-marquee {
    position: absolute;
    top: 40px;
    left: 50%;
    transform: translateX(-50%) rotate(-2deg);
    background: var(--brutal-amber);
    color: var(--brutal-black);
    border: 4px solid var(--brutal-black);
    box-shadow: 6px 6px 0px var(--brutal-black);
    padding: 10px 0;
    width: 85%;
    max-width: 700px;
    z-index: 20;
    overflow: hidden;
    border-radius: 50px;
}

@keyframes scrollMarquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

@keyframes brutalPulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(0, 0, 0, 0.7); }
    50% { transform: scale(1.05); box-shadow: 0 0 0 10px rgba(0, 0, 0, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(0, 0, 0, 0); }
}

.pulsing-btn {
    animation: brutalPulse 2s infinite;
}

/* Graphic Container */
.flowchart-graphic {
    perspective: 1000px;
}

.anim-code-window {
    width: 250px;
    flex-shrink: 0;
    background: var(--brutal-white);
    border: var(--brutal-border);
    box-shadow: 6px 6px 0px var(--brutal-black);
    transform: rotate(-3deg);
    animation: floatCode 4s ease-in-out infinite;
    z-index: 2;
}

.anim-window-header {
    background: #e2e8f0;
    padding: 8px 12px;
    border-bottom: var(--brutal-border);
    display: flex;
    gap: 6px;
}

.anim-window-header span {
    width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--brutal-black);
}
.anim-window-header span:nth-child(1) { background: #ef4444; }
.anim-window-header span:nth-child(2) { background: #f59e0b; }
.anim-window-header span:nth-child(3) { background: #10b981; }

.anim-window-body {
    background: var(--brutal-black);
    color: #e2e8f0;
    font-family: 'Fira Code', monospace;
    font-size: 0.95rem;
    font-weight: bold;
    padding: 20px;
    line-height: 1.6;
}

.anim-highlight {
    color: #10b981;
    background: rgba(16, 185, 129, 0.2);
    padding: 2px 5px;
    border-radius: 3px;
    display: inline-block;
}

.anim-arrow-container {
    width: 60px;
    flex-shrink: 0;
    height: 8px;
    background: repeating-linear-gradient(90deg, var(--brutal-black) 0, var(--brutal-black) 15px, transparent 15px, transparent 25px);
    position: relative;
    animation: slideArrow 1s linear infinite;
    z-index: 3;
}

.anim-arrow-head {
    position: absolute;
    right: -20px;
    top: -16px;
    width: 0;
    height: 0;
    border-top: 20px solid transparent;
    border-bottom: 20px solid transparent;
    border-left: 25px solid var(--brutal-black);
}

.anim-flow-diamond {
    width: 120px;
    height: 120px;
    flex-shrink: 0;
    background: #fde047;
    border: 4px solid var(--brutal-black);
    box-shadow: 6px 6px 0px var(--brutal-black);
    transform: rotate(45deg);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.anim-flow-diamond span {
    transform: rotate(-45deg);
    font-weight: 900;
    font-size: 1.1rem;
    color: var(--brutal-black);
}

@keyframes floatCode {
    0%, 100% { transform: translateY(0) rotate(-3deg); }
    50% { transform: translateY(-10px) rotate(-1deg); }
}

@keyframes floatGroup {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes floatDiamond {
    0%, 100% { transform: translateY(0) rotate(45deg); box-shadow: 6px 6px 0px var(--brutal-black); }
    50% { transform: translateY(-10px) rotate(45deg); box-shadow: 12px 12px 0px var(--brutal-black); }
}

@keyframes slideArrow {
    0% { background-position: 0 0; }
    100% { background-position: 24px 0; }
}

/* =========================================
   5. MARKETING FEATURE GRID & FAQ
========================================= */
.page-section {
    padding: 80px 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.section-header { text-align: center; margin-bottom: 50px; }
.section-header h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 900;
    text-transform: uppercase;
    text-shadow: 4px 4px 0px var(--brutal-amber);
    margin-bottom: 15px;
}
.section-header p { font-size: 1.2rem; color: var(--text-muted); font-weight: 600; max-width: 600px; margin: 0 auto;}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
    gap: 30px;
}

.feature-box {
    padding: 30px;
    transition: transform 0.2s;
}
.feature-box:hover { transform: translateY(-5px); box-shadow: 8px 8px 0px var(--brutal-black); }
.feature-icon { font-size: 3rem; margin-bottom: 20px; }
.feature-box h3 { font-size: 1.5rem; color: var(--brutal-blue); margin-bottom: 15px; font-weight: 800; }
.feature-box p { font-size: 1.05rem; line-height: 1.6; font-weight: 500; }

.faq-container { max-width: 800px; margin: 0 auto; display: flex; flex-direction: column; gap: 15px; }
.brutal-accordion {
    background: var(--bg-light);
    border: var(--brutal-border);
    box-shadow: 4px 4px 0px var(--brutal-black);
    padding: 20px;
    transition: all 0.3s;
}
.brutal-accordion[open] { background: white; box-shadow: 6px 6px 0px var(--brutal-blue); }
.brutal-accordion summary {
    font-size: 1.2rem;
    font-weight: 800;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
}
.brutal-accordion summary::-webkit-details-marker { display: none; }
.brutal-accordion summary::after { content: '+'; font-size: 1.5rem; color: var(--brutal-blue); }
.brutal-accordion[open] summary::after { content: '−'; }
.accordion-content {
    margin-top: 15px; padding-top: 15px;
    border-top: 2px dashed var(--text-muted);
    font-size: 1.1rem; line-height: 1.6; color: var(--text-muted); font-weight: 500;
}

/* =========================================
   6. IDE & DASHBOARD LAYOUTS
========================================= */
.ide-container {
    padding: 20px;
    max-width: 1600px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 90px);
    min-height: 0;
}

.dashboard-grid {
    padding: 20px;
    max-width: 1600px;
    width: 100%;
    margin: 0 auto;
    display: grid;
    gap: 25px;
    height: calc(100vh - 100px);
    grid-template-columns: 250px 1fr;
}

.ide-grid { 
    display: grid; 
    grid-template-columns: 1fr 400px; 
    gap: 25px; 
    flex: 1;
    min-height: 0;
    height: auto;
}

.brutal-card {
    background: var(--brutal-white);
    border: var(--brutal-border);
    box-shadow: var(--brutal-shadow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.brutal-toolbar { display: flex; justify-content: space-between; margin-bottom: 15px; gap: 15px; }
.brutal-input { padding: 12px; border: var(--brutal-border); box-shadow: 4px 4px 0px var(--brutal-black); font-weight: 700; width: 300px; }

/* --- AUTOSAVE STRIP TOGGLE --- */
.autosave-toggle-container {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    user-select: none;
    background: #18181b;
    padding: 3px 10px;
    border-radius: 9999px;
    border: 1.5px solid #27272a;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.autosave-toggle-container:hover {
    border-color: #3f3f46;
    background: #202024;
}

.autosave-toggle-container.active {
    border-color: #059669;
    background: #022c22;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.25);
}

.autosave-switch {
    position: relative;
    display: inline-block;
    width: 32px;
    height: 18px;
    cursor: pointer;
    margin: 0;
    flex-shrink: 0;
}

.autosave-switch input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
    margin: 0;
}

.autosave-slider {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #3f3f46;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 20px;
}

.autosave-slider:before {
    position: absolute;
    content: "";
    height: 12px;
    width: 12px;
    left: 3px;
    bottom: 3px;
    background-color: #a1a1aa;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 50%;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.autosave-switch input:checked + .autosave-slider {
    background-color: #10b981;
}

.autosave-switch input:checked + .autosave-slider:before {
    transform: translateX(14px);
    background-color: #ffffff;
    box-shadow: 0 0 6px rgba(16, 185, 129, 0.8);
}

.autosave-label-text {
    font-size: 0.76rem;
    font-weight: 700;
    color: #e4e4e7;
    letter-spacing: 0.3px;
    cursor: pointer;
    line-height: 1;
}

.autosave-status-pill {
    font-size: 0.68rem;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    line-height: 1;
    transition: all 0.2s ease;
}

.autosave-status-pill.off {
    background: #27272a;
    color: #71717a;
    border: 1px solid #3f3f46;
}

.autosave-status-pill.saved {
    background: #064e3b;
    color: #34d399;
    border: 1px solid #059669;
}

.autosave-status-pill.pending {
    background: #78350f;
    color: #fbbf24;
    border: 1px solid #d97706;
    animation: autosave-pulse 1.2s infinite ease-in-out;
}

.autosave-status-pill.saving {
    background: #1e3a8a;
    color: #93c5fd;
    border: 1px solid #3b82f6;
    animation: autosave-pulse 0.9s infinite ease-in-out;
}

.autosave-status-pill.error {
    background: #7f1d1d;
    color: #fca5a5;
    border: 1px solid #ef4444;
}

@keyframes autosave-pulse {
    0% { transform: scale(0.92); opacity: 0.8; }
    50% { transform: scale(1.08); opacity: 1; }
    100% { transform: scale(0.92); opacity: 0.8; }
}

.card-header {
    background: var(--brutal-black); color: white;
    padding: 10px 15px; font-weight: 700;
    display: flex; justify-content: space-between; align-items: center;
}

#monaco-editor-container { flex: 1; width: 100%; min-height: 200px; }
.side-panel { display: flex; flex-direction: column; gap: 20px; height: 100%; min-height: 0; }


/* =========================================
   7. SIDEBAR DRAWER (Syntax Guide)
========================================= */
.sidebar-drawer {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100%;
    background: white;
    border-left: 4px solid var(--brutal-black);
    box-shadow: -10px 0 30px rgba(0,0,0,0.1);
    z-index: 2000;
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 30px;
    display: flex;
    flex-direction: column;
}
.sidebar-drawer.open { right: 0; }

/* =========================================
   8. BRUTALIST LOGIN
========================================= */
.login-container { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.form {
    padding: 40px; background: var(--brutal-white); display: flex; flex-direction: column;
    gap: 20px; border: var(--brutal-border); box-shadow: var(--brutal-shadow); width: 400px; max-width: 90%;
}
.form > p { font-weight: 800; font-size: 24px; display: flex; flex-direction: column; margin-bottom: 10px;}
.form > p > span { color: var(--text-muted); font-size: 16px; }
.oauthButton {
    display: flex; justify-content: center; align-items: center; gap: 10px; width: 100%; height: 50px;
    border: var(--brutal-border); background-color: var(--brutal-white); box-shadow: 4px 4px 0px var(--brutal-black);
    font-size: 16px; font-weight: 700; cursor: pointer; transition: 0.2s; position: relative; z-index: 1;
}
.oauthButton::before {
    content: ""; position: absolute; top: 0; left: 0; height: 100%; width: 0;
    background-color: var(--brutal-black); z-index: -1; transition: 0.3s;
}
.oauthButton:hover { color: white; }
.oauthButton:hover::before { width: 100%; }
.oauthButton:hover svg { fill: white; }
.separator { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; }
.separator > div { flex: 1; height: 3px; background-color: var(--text-muted); }
.text-link { background: transparent; border: none; color: #94a3b8; cursor: pointer; text-decoration: underline; font-size: 12px; }
.text-link:hover { color: white; }

/* =========================================
   9. MOBILE RESPONSIVENESS (CONSOLIDATED)
========================================= */
@media (max-width: 1024px) {
    .hide-mobile { display: none !important; }
    .slide-graphic { display: none; }
    .edge-slide { justify-content: center; text-align: center; }
    .slide-content { display: flex; flex-direction: column; align-items: center; padding-top: 40px; padding-bottom: 120px; }
    .ide-container { height: auto !important; }
    .ide-grid, .dashboard-grid { grid-template-columns: 1fr; height: auto; }
    .brutal-toolbar { flex-direction: column; align-items: flex-start; }
    .sidebar-drawer { width: 100%; right: -100%; }
    .split-section, .split-section.reverse {
        flex-direction: column;
        text-align: center;
    }
    .brutal-list { align-items: center; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    /* Stack the header elements */
    .brutal-header {
        flex-direction: column;
        padding: 15px;
        text-align: center;
        gap: 15px;
    }
    
    .header-left, .header-right {
        justify-content: center;
        width: 100%;
        flex-wrap: wrap;
    }

    .nav-links, .header-nav {
        margin-top: 15px;
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    /* Stack the data type badges vertically */
    .data-type-card {
        flex-direction: column;
        text-align: center;
        padding: 15px;
    }
    
    .data-type-badge {
        width: 100%;
    }
    
    /* Stack the 'Next Guide' navigation buttons */
    .next-guide-nav {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .next-guide-nav div {
        text-align: center !important;
        width: 100%;
    }
}

@media (max-width: 600px) {
    .footer-grid { grid-template-columns: 1fr; text-align: center; }
    .footer-col p { margin: 0 auto; }
}

/* =========================================
   10. SPLIT SECTIONS & MAC WINDOWS
========================================= */
.split-section {
    display: flex;
    align-items: center;
    gap: 50px;
    padding: 80px 5%;
}

.split-section.reverse {
    flex-direction: row-reverse;
}

.split-text {
    flex: 1;
}

.split-text h2 {
    font-size: clamp(2rem, 3.5vw, 3rem);
    font-weight: 900;
    margin-bottom: 20px;
    text-shadow: 3px 3px 0px var(--brutal-amber);
}

.split-text p {
    font-size: 1.15rem;
    line-height: 1.6;
    color: var(--text-muted);
    margin-bottom: 25px;
    font-weight: 500;
}

.brutal-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.brutal-list li {
    font-size: 1.2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.split-visual {
    flex: 1;
    display: flex;
    justify-content: center;
}

.brutal-window {
    width: 100%;
    max-width: 500px;
    background: var(--brutal-white);
    border: var(--brutal-border);
    box-shadow: 8px 8px 0px var(--brutal-black);
    border-radius: 8px;
    overflow: hidden;
    transform: rotate(-2deg);
    transition: transform 0.3s;
}

.brutal-window:hover {
    transform: rotate(0deg);
}

.window-header {
    background: #e2e8f0;
    padding: 10px 15px;
    border-bottom: var(--brutal-border);
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.window-header span {
    display: block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid var(--brutal-black);
}
.window-header span:nth-child(1) { background: #ef4444; }
.window-header span:nth-child(2) { background: #f59e0b; }
.window-header span:nth-child(3) { background: #10b981; }

.window-body {
    background: #1e1e1e;
    padding: 20px;
    color: #e2e8f0;
    font-family: 'Fira Code', 'Courier New', monospace;
    font-size: 1.1rem;
    line-height: 1.5;
    overflow-x: auto;
}

/* =========================================
   11. STATS BANNER
========================================= */
.stats-banner {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    background: var(--brutal-amber);
    border-top: 4px solid var(--brutal-black);
    border-bottom: 4px solid var(--brutal-black);
    padding: 40px 5%;
    gap: 30px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: clamp(3rem, 5vw, 4.5rem);
    font-weight: 900;
    color: var(--brutal-black);
    text-shadow: 3px 3px 0px white;
    margin-bottom: 5px;
}

.stat-item p {
    font-size: 1.2rem;
    font-weight: 800;
    text-transform: uppercase;
}

/* =========================================
   12. SEO FOOTER
========================================= */
.seo-footer,
.brutal-footer {
    background: var(--brutal-black) !important;
    color: white !important;
    border-top: 4px solid var(--brutal-amber);
    padding: 60px 5% 20px;
}

/* --- FOOTER LOGO SHINE --- */
@keyframes shineEffect {
    0% { filter: drop-shadow(0 0 0px transparent); }
    50% { filter: drop-shadow(0 0 12px var(--brutal-amber)); }
    100% { filter: drop-shadow(0 0 0px transparent); }
}
.footer-logo {
    height: 45px;
    width: auto;
    object-fit: contain;
    margin-bottom: 15px;
    animation: shineEffect 3s infinite ease-in-out;
}


.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    max-width: 1400px;
    margin: 0 auto;
    border-bottom: 2px solid #334155;
    padding-bottom: 40px;
}

.footer-col h4 {
    color: white;
    font-size: 1.2rem;
    margin-bottom: 20px;
    font-weight: 800;
}

.footer-col p {
    color: #94a3b8;
    line-height: 1.6;
    max-width: 300px;
}

.footer-col a {
    display: block;
    color: #94a3b8;
    text-decoration: none;
    margin-bottom: 12px;
    font-weight: 600;
    transition: 0.2s;
}

.footer-col a:hover {
    color: var(--brutal-amber);
    transform: translateX(5px);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    color: #64748b;
    font-weight: 600;
}

/* =========================================
   13. CONTENT BLOCKS, TABLES & CODE
========================================= */
.table-responsive-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    margin-bottom: 40px;
    border: var(--brutal-border);
    box-shadow: var(--brutal-shadow);
    background: white;
}

.comparison-table {
    width: 100%;
    min-width: 600px; /* Forces scroll on small screens instead of squishing text */
    border-collapse: collapse;
    margin-bottom: 0;
}

/* Ensure code blocks don't break the screen width */
pre {
    overflow-x: auto;
    white-space: pre;
    max-width: 100%;
}

/* Fix for the massive SVG icons */
.icon { 
    width: 24px !important; 
    height: 24px !important; 
    min-width: 24px;
    transition: fill 0.2s; 
    flex-shrink: 0; 
}

/* --- IDE WALKTHROUGH TOUR --- */
#tour-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9998;
    pointer-events: auto;
    /* Spotlight cutout: a transparent box with a massive blurred shadow */
    background: none;
    /* We draw the dark area with an inset box on a pseudo-element */
}

#tour-overlay::before {
    content: "";
    position: absolute;
    top: var(--spot-top, 0);
    left: var(--spot-left, 0);
    width: var(--spot-width, 0);
    height: var(--spot-height, 0);
    border-radius: 8px;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.6);
    z-index: 9998;
    pointer-events: none;
    transition: top 0.35s ease, left 0.35s ease, width 0.35s ease, height 0.35s ease;
}

#tour-callout-box {
    position: fixed;
    z-index: 10001;
    background: var(--brutal-amber, #fbbf24);
    color: var(--brutal-black, #1e293b);
    padding: 22px 24px;
    border: 4px solid var(--brutal-black, #1e293b);
    box-shadow: 8px 8px 0px var(--brutal-black, #1e293b);
    max-width: 420px;
    width: min(420px, 92vw);
    opacity: 0;
    transition: opacity 0.25s ease, top 0.3s ease, left 0.3s ease;
    pointer-events: auto;
}

#tour-callout-box.visible {
    opacity: 1;
}

#tour-callout-box h3 {
    margin: 0 0 10px 0;
    font-size: 1.25rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#tour-callout-box p {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.5;
    margin: 0 0 12px 0;
}

/* Macro Ribbon for Panel Actions */
.tour-ribbon {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 10px 0 12px 0;
    background: #ffffff;
    border: 3px solid var(--brutal-black, #1e293b);
    box-shadow: 4px 4px 0px var(--brutal-black, #1e293b);
    padding: 10px 12px;
}

.tour-ribbon-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tour-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    padding: 3px 8px;
    border: 2px solid var(--brutal-black, #1e293b);
    box-shadow: 2px 2px 0px var(--brutal-black, #1e293b);
    white-space: nowrap;
    flex-shrink: 0;
}

.tour-pill.reset { background: #f1f5f9; color: #1e293b; }
.tour-pill.mode { background: #eff6ff; color: #2563eb; }
.tour-pill.run { background: #fef08a; color: #854d0e; }
.tour-pill.aieval { background: #2563eb; color: #ffffff; }
.tour-pill.primary { background: #2563eb; color: #ffffff; }
.tour-pill.accent { background: #f59e0b; color: #1e293b; }
.tour-pill.bug { background: #fee2e2; color: #dc2626; }

.tour-ribbon-desc {
    font-size: 0.82rem;
    font-weight: 700;
    color: #334155;
    line-height: 1.3;
}

.tour-hint-text {
    font-size: 0.8rem;
    font-weight: 700;
    color: #475569;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
    line-height: 1.4;
}

.tour-box-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tour-step-counter {
    font-size: 0.85rem;
    font-weight: 800;
    opacity: 0.6;
}

.tour-box-actions {
    display: flex;
    gap: 10px;
}

.tour-box-actions button {
    padding: 8px 18px;
    border: 3px solid var(--brutal-black, #1e293b);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.15s;
    box-shadow: 3px 3px 0px var(--brutal-black, #1e293b);
}

.tour-box-actions button:active {
    transform: translate(2px, 2px);
    box-shadow: 1px 1px 0px var(--brutal-black, #1e293b);
}

.tour-box-actions button#tour-skip-btn {
    background: #e2e8f0;
    color: var(--brutal-black, #1e293b);
}

.tour-box-actions button.tour-primary {
    background: var(--brutal-blue, #2563eb);
    color: white;
}

/* =========================================
   14. ANIMATED BUTTONS (GLOBAL)
   ========================================= */
.animated-btn-wrapper { 
    display: flex; 
    justify-content: center; 
    align-items: center; 
}
.animated-btn-wrapper button { 
    width: 150px; 
    height: 45px; 
    background-color: var(--brutal-black); 
    color: white; 
    position: relative; 
    overflow: hidden; 
    font-size: 13px; 
    letter-spacing: 0.5px; 
    font-weight: 800; 
    text-transform: uppercase; 
    transition: all 0.3s ease; 
    cursor: pointer; 
    border: 2px solid var(--brutal-black); 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    border-radius: 4px; 
    box-shadow: 2px 2px 0px var(--brutal-amber); 
}
.animated-btn-wrapper button:before, .animated-btn-wrapper button:after { 
    content: ""; 
    position: absolute; 
    width: 0; 
    height: 2px; 
    background-color: var(--brutal-amber); 
    transition: all 0.3s cubic-bezier(0.35, 0.1, 0.25, 1); 
}
.animated-btn-wrapper button:before { right: 0; top: 0; transition: all 0.5s cubic-bezier(0.35, 0.1, 0.25, 1); }
.animated-btn-wrapper button:after { left: 0; bottom: 0; }
.animated-btn-wrapper button span:not(.btn-text) { width: 100%; height: 100%; position: absolute; left: 0; top: 0; margin: 0; padding: 0; z-index: 1; pointer-events: none; }
.animated-btn-wrapper button span:not(.btn-text):before, .animated-btn-wrapper button span:not(.btn-text):after { 
    content: ""; 
    position: absolute; 
    width: 2px; 
    height: 0; 
    background-color: var(--brutal-amber); 
    transition: all 0.3s cubic-bezier(0.35, 0.1, 0.25, 1); 
}
.animated-btn-wrapper button span:not(.btn-text):before { right: 0; top: 0; transition: all 0.5s cubic-bezier(0.35, 0.1, 0.25, 1); }
.animated-btn-wrapper button span:not(.btn-text):after { left: 0; bottom: 0; }
.animated-btn-wrapper button p,
.animated-btn-wrapper button .btn-text { 
    padding: 0; 
    margin: 0; 
    transition: all 0.4s cubic-bezier(0.35, 0.1, 0.25, 1); 
    position: absolute; 
    width: 100%; 
    height: 100%; 
    display: block;
    left: 0;
    top: 0;
    pointer-events: none;
}
.animated-btn-wrapper button p:before, .animated-btn-wrapper button p:after,
.animated-btn-wrapper button .btn-text:before, .animated-btn-wrapper button .btn-text:after { 
    position: absolute; 
    width: 100%; 
    transition: all 0.4s cubic-bezier(0.35, 0.1, 0.25, 1); 
    z-index: 1; 
    left: 0; 
    text-align: center;
}
.animated-btn-wrapper button p:before,
.animated-btn-wrapper button .btn-text:before { 
    content: attr(data-title); 
    top: 50%; 
    transform: translateY(-50%); 
}
.animated-btn-wrapper button p:after,
.animated-btn-wrapper button .btn-text:after { 
    content: attr(data-text); 
    top: 150%; 
    color: var(--brutal-amber); 
}
.animated-btn-wrapper button:hover:before, .animated-btn-wrapper button:hover:after { width: 100%; }
.animated-btn-wrapper button:hover span:not(.btn-text) { z-index: 1; }
.animated-btn-wrapper button:hover span:not(.btn-text):before, .animated-btn-wrapper button:hover span:not(.btn-text):after { height: 100%; }
.animated-btn-wrapper button:hover p:before,
.animated-btn-wrapper button:hover .btn-text:before { 
    top: -50%; 
    transform: rotate(5deg); 
}
.animated-btn-wrapper button:hover p:after,
.animated-btn-wrapper button:hover .btn-text:after { 
    top: 50%; 
    transform: translateY(-50%); 
}
.animated-btn-wrapper button:active { outline: none; border: none; transform: translate(2px, 2px); box-shadow: 0px 0px 0px var(--brutal-amber); }

/* Flowchart Green Button Variant */
.animated-btn-wrapper button.green-btn {
    box-shadow: 2px 2px 0px #10b981;
}
.animated-btn-wrapper button.green-btn:before, .animated-btn-wrapper button.green-btn:after {
    background-color: #10b981;
}
.animated-btn-wrapper button.green-btn span:not(.btn-text):before, .animated-btn-wrapper button.green-btn span:not(.btn-text):after {
    background-color: #10b981;
}
.animated-btn-wrapper button.green-btn p:after,
.animated-btn-wrapper button.green-btn .btn-text:after {
    color: #10b981;
}
.animated-btn-wrapper button.green-btn:active {
    box-shadow: 0px 0px 0px #10b981;
}

/* =========================================
   15. NEOBRUTALIST DROPDOWN MENU
   ========================================= */
.brutal-dropdown {
    position: relative;
    display: inline-block;
}

.brutal-dropdown .dropdown-trigger {
    background: transparent;
    color: var(--brutal-black);
    border: none;
    font-weight: 800;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    transition: all 0.2s ease;
}

.brutal-dropdown .dropdown-trigger:hover {
    color: var(--brutal-blue);
}

.brutal-dropdown .dropdown-trigger .arrow {
    font-size: 0.75rem;
    transition: transform 0.2s ease;
}

.brutal-dropdown:hover .dropdown-trigger .arrow {
    transform: rotate(180deg);
}

.brutal-dropdown .dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--brutal-white);
    border: 3px solid var(--brutal-black);
    box-shadow: 4px 4px 0px var(--brutal-black);
    min-width: 200px;
    z-index: 1000;
    margin-top: 4px;
    border-radius: 4px;
    overflow: visible;
}

.brutal-dropdown .dropdown-menu::before {
    content: '';
    position: absolute;
    top: -15px;
    left: 0;
    right: 0;
    height: 15px;
    background: transparent;
}

.brutal-dropdown:hover .dropdown-menu {
    display: block;
    animation: dropDownPop 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes dropDownPop {
    from {
        opacity: 0;
        transform: translate(-50%, -5px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

.brutal-dropdown .dropdown-menu a {
    display: block;
    padding: 12px 16px;
    color: var(--brutal-black) !important;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    border-bottom: 2px solid var(--brutal-black);
    transition: all 0.15s ease;
    text-align: center;
}

.brutal-dropdown .dropdown-menu a:last-child {
    border-bottom: none;
}

.brutal-dropdown .dropdown-menu a:hover {
    background: var(--brutal-blue);
    color: var(--brutal-white) !important;
}

@media (max-width: 992px) {
    .hero-carousel-wrapper {
        min-height: 480px;
    }
    .edge-slide {
        flex-direction: column;
        justify-content: center;
        text-align: center;
        padding: 25px 20px 65px 20px;
    }
    .slide-graphic {
        display: none !important;
    }
    .slide-content {
        max-width: 100% !important;
    }
    .mega-title {
        font-size: clamp(1.8rem, 6vw, 2.5rem);
    }
}

/* =========================================
   AI Magic Button (PseudoAI)
========================================= */
.ai-magic-btn {
  --black-700: var(--brutal-black);
  --border_radius: 9999px;
  --transtion: 0.3s ease-in-out;
  --offset: 2px;

  cursor: pointer;
  position: relative;

  display: flex;
  align-items: center;
  gap: 0.4rem;

  transform-origin: center;

  padding: 8px 18px;
  background-color: transparent;

  border: none;
  border-radius: var(--border_radius);
  transform: scale(calc(1 + (var(--active, 0) * 0.05)));

  transition: transform var(--transtion);
  font-family: inherit;
  z-index: 1;
}

.ai-magic-btn::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);

  width: 100%;
  height: 100%;
  background-color: var(--black-700);

  border-radius: var(--border_radius);
  box-shadow: inset 0 0.5px hsl(0, 0%, 100%), inset 0 -1px 2px 0 hsl(0, 0%, 0%),
    0px 4px 10px -4px hsla(0 0% 0% / calc(1 - var(--active, 0))),
    0 0 0 calc(var(--active, 0) * 0.2rem) var(--brutal-blue),
    inset 0 0 15px rgba(56, 189, 248, 0.2);

  transition: all var(--transtion);
  z-index: 0;
}

.ai-magic-btn::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);

  width: 100%;
  height: 100%;
  background-color: var(--brutal-blue);
  background-image: radial-gradient(
      at 51% 89%,
      var(--brutal-amber) 0px,
      transparent 50%
    ),
    radial-gradient(at 100% 100%, var(--brutal-amber) 0px, transparent 50%),
    radial-gradient(at 22% 91%, var(--brutal-amber) 0px, transparent 50%);
  background-position: top;

  opacity: var(--active, 0);
  border-radius: var(--border_radius);
  transition: opacity var(--transtion);
  z-index: 2;
}

.ai-magic-btn:is(:hover, :focus-visible) {
  --active: 1;
}
.ai-magic-btn:active {
  transform: scale(1);
}

.ai-magic-btn .dots_border {
  --size_border: calc(100% + 8px);

  overflow: hidden;

  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);

  width: var(--size_border);
  height: var(--size_border);
  background-color: transparent;

  border-radius: var(--border_radius);
  z-index: -1;
}

.ai-magic-btn .dots_border::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 300px;
  height: 300px;
  margin-top: -150px;
  margin-left: -150px;
  background: conic-gradient(from 0deg, #f59e0b00 0%, #f59e0b00 40%, var(--brutal-amber) 70%, #a855f7 85%, #38bdf8 100%);
  animation: ai_magic_rotate 2.5s linear infinite;
  filter: blur(1px);
}

@keyframes ai_magic_rotate {
  to {
    transform: rotate(360deg);
  }
}

.ai-magic-btn .text_button {
  position: relative;
  z-index: 10;
  
  font-size: 0.9rem;
  font-weight: 800;
  color: white;
  letter-spacing: 0.5px;
}
/* AI Thinking Dots Animation */
@keyframes aiThinkingBounce {
  0%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-5px); }
}
.ai-thinking-dots {
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 4px 0;
}
.ai-thinking-dots span {
  width: 8px;
  height: 8px;
  background-color: #1e293b;
  border-radius: 50%;
  display: inline-block;
  animation: aiThinkingBounce 1.4s infinite ease-in-out both;
}
.ai-thinking-dots span:nth-child(1) { animation-delay: -0.32s; }
.ai-thinking-dots span:nth-child(2) { animation-delay: -0.16s; }


/* Practice Sidebar Dropdowns */
.sidebar-select {
    width: 100%;
    appearance: none;
    -webkit-appearance: none;
    background-color: #0f172a;
    color: #e2e8f0;
    border: 1px solid #334155;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    cursor: pointer;
    outline: none;
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%2394a3b8%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpolyline%20points%3D%226%209%2012%2015%2018%209%22%3E%3C%2Fpolyline%3E%3C%2Fsvg%3E');
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.sidebar-select:hover {
    border-color: #475569;
}
.sidebar-select:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.2);
}
.sidebar-select option {
    background: #0f172a;
    color: #f8fafc;
    font-weight: 500;
}

/* AI Chat Selection Mode Styles */
.selectable-chat-item {
    transition: transform 0.15s ease, filter 0.15s ease;
    border-radius: 8px;
    padding: 4px;
}
.selectable-chat-item:hover {
    filter: brightness(0.96);
    transform: translateY(-1px);
}
.selectable-chat-item:active {
    transform: translateY(0px);
}
.chat-item-selected .chat-bubble {
    animation: selectPop 0.18s ease-out;
}
@keyframes selectPop {
    0% { transform: scale(0.98); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

/* =========================================
   17. GUIDE RELATED TOPICS COMPONENT
   ========================================= */
.guide-related-topics {
    background: #ffffff;
    border: 4px solid var(--brutal-black);
    box-shadow: 6px 6px 0px var(--brutal-black);
    border-radius: 6px;
    padding: clamp(20px, 4vw, 30px);
    margin: 40px auto 25px;
    text-align: left;
    box-sizing: border-box;
    width: 100%;
}

.guide-related-topics .related-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.guide-related-topics .related-badge {
    background: var(--brutal-amber);
    color: var(--brutal-black);
    font-size: 0.75rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 10px;
    border: 2px solid var(--brutal-black);
    border-radius: 4px;
    display: inline-block;
    box-shadow: 2px 2px 0px var(--brutal-black);
}

.guide-related-topics h3 {
    margin: 0;
    font-size: clamp(1.2rem, 3.5vw, 1.4rem);
    font-weight: 900;
    text-transform: uppercase;
    color: var(--brutal-black);
    letter-spacing: 0.5px;
}

.guide-related-topics .related-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 12px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.guide-related-topics .related-link-item {
    margin: 0;
    list-style: none;
}

.guide-related-topics .related-link-item a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    background: #f8fafc;
    border: 2px solid var(--brutal-black);
    box-shadow: 3px 3px 0px var(--brutal-black);
    border-radius: 5px;
    color: var(--brutal-black);
    text-decoration: none;
    font-weight: 800;
    font-size: 0.95rem;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
    line-height: 1.4;
}

.guide-related-topics .related-link-item a:hover {
    background: var(--brutal-amber);
    transform: translate(-2px, -2px);
    box-shadow: 5px 5px 0px var(--brutal-black);
    color: var(--brutal-black);
}

.guide-related-topics .related-link-item a .related-arrow {
    margin-left: auto;
    font-size: 1rem;
    font-weight: 900;
    color: var(--brutal-blue);
    transition: transform 0.15s ease, color 0.15s ease;
}

.guide-related-topics .related-link-item a:hover .related-arrow {
    transform: translateX(4px);
    color: var(--brutal-black);
}

/* Fallback if raw .brutal-card is used on guide pages */
.guide-container > .brutal-card {
    background: #ffffff;
    border: 4px solid var(--brutal-black);
    box-shadow: 6px 6px 0px var(--brutal-black);
    border-radius: 6px;
    padding: clamp(20px, 4vw, 30px);
    margin: 40px auto 25px;
    box-sizing: border-box;
}

.guide-container > .brutal-card h3 {
    margin-top: 0;
    margin-bottom: 16px;
    font-size: clamp(1.2rem, 3.5vw, 1.4rem);
    font-weight: 900;
    text-transform: uppercase;
    color: var(--brutal-black);
}

.guide-container > .brutal-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 12px;
}

.guide-container > .brutal-card li {
    list-style: none;
    margin: 0;
}

.guide-container > .brutal-card li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    background: #f8fafc;
    border: 2px solid var(--brutal-black);
    box-shadow: 3px 3px 0px var(--brutal-black);
    border-radius: 5px;
    color: var(--brutal-black);
    text-decoration: none;
    font-weight: 800;
    font-size: 0.95rem;
    transition: all 0.15s ease;
}

.guide-container > .brutal-card li a:hover {
    background: var(--brutal-amber);
    transform: translate(-2px, -2px);
    box-shadow: 5px 5px 0px var(--brutal-black);
}


