@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg:               #1e1e1e;
    --surface:          #2a2a2a;
    --surface2:         #242424;
    --accent:           #f0c040;
    --accent-dim:       #c8a84b;
    --title-accent:     #feffd9;
    --subtitle-accent:  #fdf18d;
    --text:             #ffffff;
    --text-muted:       #aaaaaa;
    --radius:           8px;
    --nav-h:            56px;
}

html { scroll-behavior: smooth; }

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

a { color: inherit; text-decoration: none; }

code {
    font-family: 'Courier New', Courier, monospace;
    color: var(--accent);
    background: rgba(240,192,64,.12);
    padding: 1px 5px;
    border-radius: 4px;
    font-size: .875em;
}

/* ── Nav ── */
nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--nav-h);
    background: rgba(30,30,30,.96);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 48px;
    z-index: 1000;
    border-bottom: 1px solid rgba(255,255,255,.06);
}

.nav-logo {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: .12em;
    color: var(--accent);
    text-transform: uppercase;
    flex-shrink: 0;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 28px;
    list-style: none;
}

.nav-links li a {
    font-size: .75rem;
    font-weight: 500;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--text-muted);
    transition: color .2s;
}

.nav-links li a:hover,
.nav-links li a.active { color: var(--text); }

.nav-links li a.active { font-weight: 700; }

.nav-sep { color: var(--text-muted); font-size: .6rem; }

.nav-links li a.nav-external { color: var(--text-muted); }
.nav-links li a.nav-external:hover { color: var(--accent); }

/* Burger button */
.nav-burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 6px 4px;
    z-index: 1001;
}
.nav-burger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: opacity .2s;
}

/* Mobile nav */
@media (max-width: 768px) {
    nav { padding: 0 24px; }

    .nav-burger { display: flex; }

    .nav-links {
        display: none;
        position: absolute;
        top: var(--nav-h);
        right: 0;
        background: rgba(26,26,26,.98);
        backdrop-filter: blur(8px);
        flex-direction: column;
        align-items: flex-start;
        padding: 20px 28px;
        gap: 20px;
        min-width: 220px;
        border-left: 1px solid rgba(255,255,255,.08);
        border-bottom: 1px solid rgba(255,255,255,.08);
    }

    .nav-links.open { display: flex; }

    .nav-sep { display: none; }
}

/* ── Hero ── */
.hero {
    position: relative;
    height: 100vh;
    min-height: 500px;
    background: url('../assets/background.jpg') center center / cover no-repeat;
    display: flex;
    align-items: flex-end;
    padding: 0 80px 72px;
}

@media (max-width: 600px) {
    .hero { padding: 0 28px 56px; }
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.52);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 540px;
}

.hero-title {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: .04em;
    line-height: 1.2;
    margin-bottom: 10px;
    color: var(--title-accent);
}

.hero-subtitle {
    font-size: .95rem;
    margin-bottom: 24px;
    line-height: 1.5;
    color: var(--subtitle-accent);
}

.btn-invite {
    display: inline-block;
    padding: 8px 22px;
    border: 1.5px solid var(--accent);
    border-radius: 999px;
    color: var(--accent);
    font-size: .82rem;
    font-weight: 600;
    letter-spacing: .06em;
    transition: background .2s, color .2s;
}
.btn-invite:hover {
    background: var(--accent);
    color: #1e1e1e;
}

/* ── Carousel ── */
.carousel-section {
    background: var(--bg);
    padding: 64px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.carousel-arrow {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    cursor: pointer;
    opacity: .65;
    transition: opacity .2s;
    background: none;
    border: none;
    padding: 0;
}
.carousel-arrow:hover { opacity: 1; }
.carousel-arrow img { width: 100%; height: 100%; object-fit: contain; }

.carousel-viewport {
    overflow: hidden;
    /* width is clamped: room for up to 3 cards + gaps, capped to viewport minus arrows */
    width: min(980px, calc(100vw - 140px));
}

.carousel-inner {
    display: flex;
    gap: 20px;
    transition: transform .42s cubic-bezier(.25,.46,.45,.94);
    will-change: transform;
}

.carousel-card {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 40px 28px;
    background: var(--surface);
    border-radius: 12px;
    min-height: 280px;
    /* width is set by JS */
}

.carousel-icon {
    width: 64px;
    height: 64px;
    border: 2.5px solid var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    overflow: hidden;
}
.carousel-icon img { width: 38px; height: 38px; object-fit: contain; }

.carousel-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--title-accent);
    margin-bottom: 12px;
}

.carousel-card p {
    font-size: .875rem;
    color: var(--text-muted);
    line-height: 1.65;
}

/* ── Info panels ── */
.info-panel {
    padding: 52px 80px;
    border-top: 1px solid rgba(255,255,255,.06);
}

@media (max-width: 600px) {
    .info-panel { padding: 40px 28px; }
}

.info-panel h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--title-accent);
}

.info-panel p {
    font-size: .9rem;
    color: var(--text-muted);
    max-width: 640px;
    line-height: 1.65;
    margin-bottom: 18px;
}

.btn-outline {
    display: inline-block;
    padding: 6px 18px;
    border: 1.5px solid var(--accent);
    border-radius: 6px;
    color: var(--accent);
    font-size: .8rem;
    font-weight: 600;
    transition: background .2s, color .2s;
}
.btn-outline:hover {
    background: var(--accent);
    color: #1e1e1e;
}

.link-plain {
    color: var(--accent);
    font-size: .88rem;
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.link-plain:hover { color: #fff; }

/* ── Stats / Achievements ── */
.stats-section {
    padding: 52px 80px;
    border-top: 1px solid rgba(255,255,255,.06);
}

@media (max-width: 600px) {
    .stats-section { padding: 40px 28px; }
}

.stats-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.stat-box {
    flex: 1 1 180px;
    background: var(--surface);
    border-radius: 12px;
    padding: 36px 24px;
    text-align: center;
}

.stat-number {
    font-size: 2.4rem;
    font-weight: 700;
    color: var(--accent);
    display: block;
    margin-bottom: 8px;
}

.stat-label {
    font-size: .9rem;
    color: var(--text-muted);
}

/* ── 404 page ── */
.not-found-page {
    min-height: calc(100vh - var(--nav-h));
    padding-top: calc(var(--nav-h) + 80px);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding-bottom: 60px;
}

.not-found-page h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--title-accent);
    margin-bottom: 40px;
}

.not-found-page img {
    max-width: min(480px, 90vw);
    height: auto;
    opacity: .9;
}

/* ── Footer ── */
footer {
    text-align: center;
    padding: 24px 16px;
    font-size: .78rem;
    color: var(--text-muted);
    border-top: 1px solid rgba(255,255,255,.06);
}

/* ── Commands page ── */
.commands-page {
    padding-top: calc(var(--nav-h) + 40px);
    min-height: 100vh;
}

.tabs {
    display: flex;
    justify-content: center;
    gap: 0;
    margin-bottom: 36px;
}

.tab-btn {
    padding: 9px 28px;
    font-size: .85rem;
    font-weight: 600;
    letter-spacing: .04em;
    cursor: pointer;
    background: transparent;
    color: var(--text-muted);
    border: 1.5px solid rgba(255,255,255,.15);
    transition: all .2s;
}

.tab-btn:first-child { border-radius: 6px 0 0 6px; }
.tab-btn:last-child  { border-radius: 0 6px 6px 0; }

.tab-btn.active {
    border-color: var(--accent);
    color: var(--text);
    background: rgba(240,192,64,.08);
}

.cmd-title {
    text-align: center;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 32px;
    color: var(--title-accent);
}

.cmd-table-wrap {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 24px 80px;
}

table.cmd-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .875rem;
}

table.cmd-table thead tr th {
    background: var(--subtitle-accent);
    color: #1e1e1e;
    font-weight: 700;
    text-align: left;
    padding: 11px 14px;
}

table.cmd-table thead tr th:first-child { border-radius: 4px 0 0 0; }
table.cmd-table thead tr th:last-child  { border-radius: 0 4px 0 0; }

table.cmd-table tbody tr.group-row td {
    background: #1a1a1a;
    color: var(--accent);
    font-weight: 600;
    font-size: .78rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    padding: 7px 14px;
}

table.cmd-table tbody tr.cmd-row {
    background: var(--surface);
    border-bottom: 1px solid rgba(255,255,255,.04);
}

table.cmd-table tbody tr.cmd-row:hover { background: #303030; }

table.cmd-table tbody tr.cmd-row td {
    padding: 12px 14px;
    vertical-align: top;
    color: var(--text);
}

/* Command column: never wrap, sizes itself to longest name */
table.cmd-table td:first-child,
table.cmd-table th:first-child {
    white-space: nowrap;
    width: 1%;
}

.cmd-name {
    font-family: 'Courier New', Courier, monospace;
    color: var(--accent);
    font-size: .85rem;
    display: block;
}
.cmd-aliases {
    font-family: 'Courier New', Courier, monospace;
    color: var(--text-muted);
    font-size: .78rem;
    margin-top: 3px;
    display: block;
}

/* Hide Notes column on narrow screens */
@media (max-width: 640px) {
    table.cmd-table th:last-child,
    table.cmd-table td:last-child { display: none; }
}

.param-entry { margin-bottom: 8px; }
.param-entry:last-child { margin-bottom: 0; }
.param-name {
    font-weight: 600;
    font-size: .82rem;
}
.param-req  { color: var(--text); }
.param-opt  { color: var(--text-muted); }
.param-desc {
    font-size: .8rem;
    color: var(--text-muted);
    display: block;
    margin-top: 1px;
}

.note-dm {
    font-size: .8rem;
    color: var(--text-muted);
    white-space: nowrap;
}

/* ── Text pages (privacy / tos) ── */
.text-page {
    padding-top: calc(var(--nav-h) + 64px);
    padding-bottom: 80px;
    max-width: 780px;
    margin: 0 auto;
    padding-left: 32px;
    padding-right: 32px;
}

.text-page h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.text-page .page-date {
    font-size: .85rem;
    color: var(--accent);
    font-style: italic;
    margin-bottom: 36px;
    display: block;
}

.text-page p {
    font-size: .9rem;
    color: var(--text-muted);
    line-height: 1.75;
    margin-bottom: 16px;
}

.text-page h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    margin-top: 36px;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255,255,255,.12);
}

.text-page h4 {
    font-size: .9rem;
    font-weight: 700;
    color: var(--text);
    margin-top: 20px;
    margin-bottom: 6px;
}

.text-page ul {
    margin: 0 0 16px 0;
    padding-left: 20px;
}

.text-page li {
    font-size: .9rem;
    color: var(--text-muted);
    line-height: 1.75;
    margin-bottom: 6px;
}

.text-page a {
    color: #6ab0f5;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.text-page a:hover { color: #9ccfff; }
