/* =========================================
   1. VARIABLES & RESET
   ========================================= */
:root {
    --bg-body: #0b1120;       /* Deep Navy */
    --bg-card: #1e293b;       /* Slate */
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    
    /* THEME COLORS */
    --theme-image: #2dd4bf;   /* Teal */
    --theme-image-glow: rgba(45, 212, 191, 0.15);
    
    --theme-video: #a78bfa;   /* Purple */
    --theme-video-glow: rgba(167, 139, 250, 0.15);

    --success: #4ade80;       /* Green */
    --danger: #f87171;        /* Red */
    
    --radius: 16px;
    --transition: all 0.25s ease;
}

html { scroll-behavior: smooth; }
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.5;
    padding-bottom: 50px;
}

.container { max-width: 1000px; margin: 0 auto; padding: 0 20px; }

/* =========================================
   2. HEADER & NAV
   ========================================= */
header {
    text-align: center;
    padding: 60px 0 40px;
}

h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 10px;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle { color: var(--text-muted); font-size: 1.2rem; margin-bottom: 40px; }

/* NAV PILLS */
.category-nav {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.cat-btn {
    text-decoration: none;
    color: var(--text-main);
    background: var(--bg-card);
    padding: 15px 30px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    border: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
}

.cat-btn:hover { transform: translateY(-3px); }

.image-btn:hover { border-color: var(--theme-image); box-shadow: 0 0 20px var(--theme-image-glow); }
.video-btn:hover { border-color: var(--theme-video); box-shadow: 0 0 20px var(--theme-video-glow); }
.tool-btn:hover { border-color: #fff; }

.search-container input {
    width: 100%;
    max-width: 500px;
    padding: 15px 25px;
    border-radius: 50px;
    border: 2px solid #334155;
    background: #0f172a;
    color: white;
    font-size: 1rem;
    outline: none;
    transition: var(--transition);
}
.search-container input:focus { border-color: #fff; }

/* =========================================
   3. ZONES (THEMES)
   ========================================= */
.zone {
    background: rgba(30, 41, 59, 0.4);
    border-radius: 24px;
    padding: 40px;
    margin-bottom: 60px;
    border: 1px solid transparent;
}

/* Image Zone Styling */
.image-theme {
    border-color: var(--theme-image-glow);
    background: linear-gradient(180deg, rgba(45, 212, 191, 0.03) 0%, rgba(30, 41, 59, 0) 100%);
}
.image-theme h2 { color: var(--theme-image); }
.image-theme .card.local { border-top: 4px solid var(--theme-image); }

/* Video Zone Styling */
.video-theme {
    border-color: var(--theme-video-glow);
    background: linear-gradient(180deg, rgba(167, 139, 250, 0.03) 0%, rgba(30, 41, 59, 0) 100%);
}
.video-theme h2 { color: var(--theme-video); }
.video-theme .card.local { border-top: 4px solid var(--theme-video); }

.zone-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 30px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 20px;
}

h2 { font-size: 2rem; margin: 0; }
.zone-tag { text-transform: uppercase; font-size: 0.8rem; letter-spacing: 1px; color: var(--text-muted); font-weight: bold; }

.guide-label {
    color: #fff; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 1px; opacity: 0.7; margin-bottom: 15px; display: block;
}

/* =========================================
   4. SAFETY SWAP CARDS
   ========================================= */
.swap-container {
    display: flex;
    gap: 20px;
    margin-bottom: 50px;
    align-items: stretch;
}
@media (max-width: 768px) { .swap-container { flex-direction: column; } .swap-arrow { transform: rotate(90deg); } }

.swap-card {
    flex: 1;
    background: #1e293b;
    border-radius: var(--radius);
    padding: 25px;
    border: 1px solid #334155;
    position: relative;
}

.swap-card.danger { border-left: 5px solid var(--danger); background: rgba(248, 113, 113, 0.05); }
.swap-card.safe { border-left: 5px solid var(--success); background: rgba(74, 222, 128, 0.05); }

.card-top { display: flex; align-items: center; gap: 10px; margin-bottom: 15px; }
.card-top h4 { font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.5px; margin: 0; color: #fff; }
.icon-indicator { font-size: 1.2rem; }

.bad-list, .good-list { list-style: none; padding: 0; margin-bottom: 15px; font-weight: 700; font-size: 1.1rem; }
.bad-list li { color: #fca5a5; text-decoration: line-through; opacity: 0.7; margin-bottom: 5px; }
.good-list li { color: #86efac; margin-bottom: 5px; }

.warning-text, .success-text { font-size: 0.85rem; color: var(--text-muted); font-style: italic; }
.swap-arrow { display: flex; align-items: center; justify-content: center; font-size: 2rem; color: #475569; }

/* =========================================
   5. MODEL CARDS
   ========================================= */
.options-grid { display: grid; grid-template-columns: 1fr; gap: 25px; }
@media (min-width: 768px) { .options-grid { grid-template-columns: 1fr 1fr; } }

.card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 30px;
    border: 1px solid #334155;
    transition: var(--transition);
}
.card:hover { transform: translateY(-5px); background: #253146; }

.card-header h3 { font-size: 1.4rem; margin: 0 0 10px 0; display: flex; justify-content: space-between; align-items: center; }
.badge { font-size: 0.7rem; background: #334155; padding: 4px 8px; border-radius: 4px; color: #fff; font-weight: 400; text-transform: uppercase; }

.card-desc { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 20px; }

/* Lists & Chips */
.chip-container { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { background: #0f172a; padding: 6px 12px; border-radius: 20px; font-size: 0.85rem; border: 1px solid #334155; color: #cbd5e1; }
.chip:hover { border-color: #fff; color: #fff; }

.model-list { list-style: none; }
.model-list li { margin-bottom: 12px; padding-left: 10px; border-left: 2px solid #334155; }
.model-name { font-weight: 700; display: block; color: #e2e8f0; }
.model-desc { font-size: 0.85rem; color: #94a3b8; }

/* =========================================
   6. TOOLKIT
   ========================================= */
.pro-tip-box {
    background: linear-gradient(90deg, rgba(251, 191, 36, 0.1), transparent);
    border-left: 4px solid #fbbf24;
    padding: 20px;
    border-radius: 8px;
    display: flex;
    gap: 15px;
    margin-bottom: 40px;
    align-items: flex-start;
}
.pro-icon { font-size: 2rem; }
.pro-content h3 { margin: 0 0 5px 0; color: #fbbf24; font-size: 1.1rem; }
.pro-content p { margin: 0; font-size: 0.95rem; color: #e2e8f0; }

.glossary-grid { display: flex; flex-direction: column; gap: 10px; }
.term-row { display: flex; justify-content: space-between; border-bottom: 1px solid #334155; padding-bottom: 8px; }
.term { font-weight: 700; color: var(--theme-image); }
.def { color: var(--text-muted); text-align: right; font-size: 0.9rem; }

table { width: 100%; border-collapse: collapse; margin-top: 10px; }
th, td { text-align: left; padding: 12px; border-bottom: 1px solid #334155; font-size: 0.9rem; }
th { color: #fff; opacity: 0.7; }
.license-open { color: var(--success); font-weight: 700; }
.license-closed { color: var(--danger); font-weight: 700; }

.resource-btn {
    display: block; width: 100%; text-align: center;
    padding: 12px; background: #334155; color: #fff;
    text-decoration: none; border-radius: 8px; font-weight: 600;
    transition: var(--transition);
}
.resource-btn:hover { background: #fff; color: #000; }

/* UTILS */
.hidden-item { display: none !important; }
#backToTop { position: fixed; bottom: 20px; right: 20px; width: 50px; height: 50px; border-radius: 50%; background: #fff; border: none; font-size: 1.5rem; cursor: pointer; opacity: 0.9; transition: var(--transition); }
#backToTop:hover { transform: scale(1.1); }
#backToTop.hidden { opacity: 0; pointer-events: none; }

footer { text-align: center; color: #475569; padding-top: 50px; font-size: 0.9rem; }