/* ============================================================
   ServerBuilder — Global styles
   Dark theme by default, same design language as FastFinger
   ============================================================ */

:root {
    --bg:      #0d1117;
    --bg2:     #161b22;
    --bg3:     #21262d;
    --bg4:     #30363d;
    --border:  #30363d;
    --text:    #e6edf3;
    --muted:   #8b949e;
    --sub:     #6e7681;
    --primary: #58a6ff;
    --green:   #3fb950;
    --orange:  #d29922;
    --red:     #f85149;
    --purple:  #bc8cff;
    --teal:    #39d353;
    --shadow:  rgba(0,0,0,0.4);

    /* Terminal */
    --term-bg:   #0d1117;
    --term-text: #c9d1d9;
    --term-green:#39d353;
    --term-amber:#f0a500;
    --term-blue: #79c0ff;
    --term-red:  #ff7b72;
    --term-cyan: #56d4dd;
    --term-dim:  #6e7681;
}

[data-theme="light"] {
    --bg:      #f6f8fa;
    --bg2:     #ffffff;
    --bg3:     #f0f2f5;
    --bg4:     #e1e4e8;
    --border:  #d0d7de;
    --text:    #1f2328;
    --muted:   #57606a;
    --sub:     #6e7781;
    --shadow:  rgba(0,0,0,0.1);
    --term-bg: #1b1f23;
    --term-text:#c9d1d9;
}

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

body {
    font-family: 'Outfit', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
}

/* ── Navbar ─────────────────────────────────────────────── */
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    height: 56px;
    background: var(--bg2);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}
.nav-brand {
    display: flex;
    align-items: center;
    gap: .6rem;
    font-weight: 700;
    font-size: 1.1rem;
}
.nav-logo { font-size: 1.3rem; }
.nav-badge {
    font-size: .65rem;
    background: var(--primary);
    color: #fff;
    padding: 1px 6px;
    border-radius: 20px;
    font-weight: 600;
    letter-spacing: .04em;
}
.nav-links { display: flex; align-items: center; gap: 1rem; }
.nav-link {
    color: var(--muted);
    text-decoration: none;
    font-size: .9rem;
    transition: color .2s;
}
.nav-link:hover { color: var(--text); }
.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 4px 6px;
    border-radius: 6px;
    transition: background .2s;
}
.btn-icon:hover { background: var(--bg3); }

/* ── Home ───────────────────────────────────────────────── */
.home-main {
    max-width: 860px;
    margin: 0 auto;
    padding: 3rem 1.5rem 4rem;
}
.hero {
    text-align: center;
    margin-bottom: 3rem;
}
.hero-icon { font-size: 3.5rem; margin-bottom: 1rem; }
.hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: .8rem;
}
.hero-sub { color: var(--muted); font-size: 1.05rem; }
.hero-sub + .hero-sub { margin-top: .4rem; }

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
    margin-bottom: 3rem;
}
.scenario-card {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.4rem;
    display: flex;
    flex-direction: column;
    gap: .8rem;
    position: relative;
    transition: border-color .2s, transform .15s;
}
.card-available {
    cursor: pointer;
    border-color: var(--primary);
}
.card-available:hover {
    border-color: var(--green);
    transform: translateY(-2px);
}
.card-soon { opacity: .55; }
.card-icon { font-size: 2rem; }
.card-content h2 { font-size: 1rem; font-weight: 600; margin-bottom: .4rem; }
.card-content p { font-size: .85rem; color: var(--muted); }
.card-tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .6rem; }
.card-arrow {
    position: absolute;
    bottom: 1.2rem;
    right: 1.2rem;
    color: var(--primary);
    font-size: 1.2rem;
}
.card-badge {
    position: absolute;
    top: .8rem;
    right: .8rem;
    font-size: .7rem;
    background: var(--bg4);
    color: var(--muted);
    padding: 2px 8px;
    border-radius: 20px;
}

/* Tags */
.tag {
    font-size: .7rem;
    padding: 2px 8px;
    border-radius: 20px;
    background: var(--bg3);
    color: var(--muted);
    border: 1px solid var(--border);
    white-space: nowrap;
}
.tag-green { background: rgba(63,185,80,.15); color: var(--green); border-color: rgba(63,185,80,.3); }
.tag-blue  { background: rgba(88,166,255,.15); color: var(--primary); border-color: rgba(88,166,255,.3); }
.tag-orange{ background: rgba(210,153,34,.15); color: var(--orange); border-color: rgba(210,153,34,.3); }

/* Scenarios list */
.scenarios-list h2 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .06em;
    font-size: .8rem;
}
.scenario-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.2rem;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-bottom: .6rem;
    transition: border-color .2s, background .2s;
}
.scenario-row.active { cursor: pointer; }
.scenario-row.active:hover {
    border-color: var(--primary);
    background: var(--bg3);
}
.scenario-row.disabled { opacity: .5; }
.sr-icon { font-size: 1.4rem; flex-shrink: 0; }
.sr-info { flex: 1; }
.sr-info strong { display: block; font-size: .95rem; margin-bottom: .2rem; }
.sr-info span { font-size: .82rem; color: var(--muted); }

/* ── Footer ─────────────────────────────────────────────── */
.footer {
    text-align: center;
    padding: 1.5rem;
    color: var(--sub);
    font-size: .8rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}
.footer-link { color: var(--muted); text-decoration: none; }
.footer-link:hover { color: var(--primary); }

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .55rem 1.2rem;
    border-radius: 8px;
    font-family: inherit;
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background .15s, transform .1s;
    text-decoration: none;
}
.btn:active { transform: scale(.97); }
.btn-primary {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}
.btn-primary:hover { background: #388bfd; }
.btn-ghost {
    background: transparent;
    color: var(--muted);
    border-color: var(--border);
}
.btn-ghost:hover { background: var(--bg3); color: var(--text); }
.btn-green {
    background: var(--green);
    color: #000;
}
.btn-green:hover { background: #2ea043; }

/* ── Scrollbar ───────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bg4); border-radius: 3px; }

/* ── Utilities ───────────────────────────────────────────── */
.muted { color: var(--muted); }
