/* ============================================================
   Bulma-Lite for GameSense (locally hosted, production-ready)
   Clean • Lightweight • Modern • Dark-mode ready
   ============================================================ */

:root {
    --bg: #f7f8fb;
    --panel: #ffffff;
    --text: #1f2937;
    --muted: #6b7280;
    --border: #e5e7eb;

    --primary: #2563eb;
    --primary-2: #1d4ed8;
    --danger: #ef4444;
    --success: #10b981;
    --warning: #f59e0b;

    --radius: 14px;
    --shadow: 0 10px 25px rgba(17, 24, 39, .06);

    /* handy */
    --ring: 0 0 0 4px rgba(37, 99, 235, .12);
}

/* ---------------- Base ---------------- */
* {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

body {
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    color: var(--primary-2);
}

.container {
    width: min(1150px, calc(100% - 32px));
    margin-inline: auto;
}

.section {
    padding: 28px 0;
}

/* ---------------- Helpers ---------------- */
.hr {
    height: 1px;
    background: var(--border);
    margin: 18px 0;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, .72);
    color: var(--text);
    font-weight: 800;
    font-size: .9rem;
}

html[data-theme="dark"] .pill {
    background: rgba(255, 255, 255, .04);
    border-color: rgba(148, 163, 184, .18);
}

/* ---------------- Hero ---------------- */
.hero {
    padding: 46px 0;
    background: linear-gradient(180deg, #ffffff, rgba(255, 255, 255, .6));
    border-bottom: 1px solid var(--border);
}

.hero .title {
    font-size: 2rem;
    margin: 0 0 8px;
}

.hero .subtitle {
    color: var(--muted);
    margin: 0;
}

/* ---------------- Navbar ---------------- */
.navbar {
    background: rgba(255, 255, 255, .9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 40;
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 0;
}

/* brand never shrinks */
.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    flex: 0 0 auto;
    white-space: nowrap;
}

/* menu takes remaining space */
.navbar-menu {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    flex: 1 1 auto;
    min-width: 0;
    justify-content: center;
}

.navbar-item {
    padding: 8px 12px;
    border-radius: 10px;
    color: var(--text);
    font-weight: 700;
}

.navbar-item:hover {
    background: #f3f4f6;
}

.navbar-item.is-active {
    background: rgba(37, 99, 235, .10);
    color: var(--primary-2);
    font-weight: 800;
}

/* Focus ring (nice + accessible) */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: none;
    box-shadow: var(--ring);
    border-color: rgba(37, 99, 235, .45);
    border-radius: 12px;
}

/* ---------------- Breadcrumbs ---------------- */
.gs-breadcrumbs {
    padding: 10px 0;
    background: rgba(255, 255, 255, .55);
    border-bottom: 1px solid var(--border);
}

.gs-breadcrumbs a {
    color: var(--muted);
    font-weight: 700;
}

.gs-breadcrumbs a:hover {
    color: var(--primary);
}

.gs-bc-sep {
    margin: 0 8px;
    color: rgba(0, 0, 0, .35);
}

.gs-bc-current {
    font-weight: 800;
}

/* ---------------- Tags ---------------- */
.tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: .85rem;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--muted);
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* ---------------- Columns ---------------- */
.columns {
    display: flex;
    flex-wrap: wrap;
    margin-left: -0.75rem;
    margin-right: -0.75rem;
}

.column {
    padding: 0.75rem;
    flex: 1 1 0;
    min-width: 0;
}

.column.is-4 {
    flex: none;
    width: 33.333%;
}

.column.is-3 {
    flex: none;
    width: 25%;
}

.column.is-8 {
    flex: none;
    width: 66.666%;
}

.column.is-narrow {
    flex: none;
    width: auto;
}

@media(max-width:900px) {

    .column.is-4,
    .column.is-3,
    .column.is-8 {
        width: 100%;
    }
}

/* ---------------- Cards / Boxes ---------------- */
.box,
.card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.card {
    overflow: hidden;
}

.card-content {
    padding: 16px;
}

.card-image img {
    width: 100%;
    display: block;
}

/* ---------------- Typography ---------------- */
.title {
    font-size: 1.25rem;
    font-weight: 800;
    margin: 0;
}

.subtitle {
    font-size: 1rem;
    color: var(--muted);
}

.muted {
    color: var(--muted);
}

.small {
    font-size: .9rem;
}

/* ---------------- Forms ---------------- */
.field {
    margin-bottom: 12px;
}

.label {
    font-weight: 700;
    margin-bottom: 6px;
    display: block;
}

.input,
.textarea,
.select select {
    width: 100%;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: #fff;
}

.input:focus,
.textarea:focus,
.select select:focus {
    border-color: rgba(37, 99, 235, .45);
    box-shadow: var(--ring);
}

.textarea {
    min-height: 120px;
    resize: vertical;
}

/* ---------------- Buttons ---------------- */
.button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: #fff;
    font-weight: 700;
    cursor: pointer;
    transition: transform .12s ease, background .12s ease, border-color .12s ease;
}

.button:hover {
    transform: translateY(-1px);
}

.button.is-primary {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.button.is-primary:hover {
    background: var(--primary-2);
    border-color: var(--primary-2);
}

.button.is-light {
    background: #f9fafb;
}

.button.is-dark {
    background: #111827;
    border-color: #111827;
    color: #fff;
}

.button.is-small {
    padding: 7px 10px;
    border-radius: 999px;
    font-size: .85rem;
}

.buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* ---------------- Notifications ---------------- */
.notification {
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: #fff;
}

.notification.is-success {
    background: rgba(16, 185, 129, .08);
    border-color: rgba(16, 185, 129, .25);
}

.notification.is-danger {
    background: rgba(239, 68, 68, .08);
    border-color: rgba(239, 68, 68, .25);
}

/* ---------------- Grid ---------------- */
.grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

@media(max-width:1100px) {
    .grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media(max-width:900px) {
    .grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media(max-width:520px) {
    .grid {
        grid-template-columns: 1fr;
    }
}

/* ---------------- Dropdown (Categories – NO SCROLLBAR) ---------------- */
.gs-dropdown {
    position: relative;
}

.gs-dropbtn {
    background: none;
    border: 0;
    cursor: pointer;
    padding: 0;
}

.gs-caret {
    font-size: .85em;
    opacity: .7;
}

.gs-dropmenu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 240px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow);
    padding: 8px;
    display: none;
    z-index: 60;
}

/* ✅ NO max-height, NO overflow */
.gs-dropdown.is-open .gs-dropmenu {
    display: block;
}

.gs-dropitem {
    display: block;
    padding: 10px 12px;
    border-radius: 12px;
    font-weight: 700;
    color: var(--text);
}

.gs-dropitem:hover {
    background: rgba(0, 0, 0, .04);
}

.gs-dropsep {
    height: 1px;
    background: var(--border);
    margin: 8px 6px;
}

.gs-dropall {
    font-weight: 800;
    color: var(--primary);
}

.gs-dropall:hover {
    background: rgba(37, 99, 235, .10);
}

/* ---------------- Dark Mode ---------------- */
html[data-theme="dark"] {
    --bg: #0b1220;
    --panel: #0f172a;
    --text: #e5e7eb;
    --muted: #94a3b8;
    --border: rgba(148, 163, 184, .18);
    --shadow: 0 12px 30px rgba(0, 0, 0, .35);
    --ring: 0 0 0 4px rgba(37, 99, 235, .18);
}

html[data-theme="dark"] .navbar {
    background: rgba(15, 23, 42, .78);
}

html[data-theme="dark"] .navbar-item:hover {
    background: rgba(255, 255, 255, .06);
}

html[data-theme="dark"] .hero {
    background: linear-gradient(180deg, #0f172a, rgba(15, 23, 42, .7));
}

html[data-theme="dark"] .tag {
    background: rgba(255, 255, 255, .03);
}

html[data-theme="dark"] .input,
html[data-theme="dark"] .textarea,
html[data-theme="dark"] .select select {
    background: rgba(255, 255, 255, .03);
    color: var(--text);
}

/* dropdown hover dark */
html[data-theme="dark"] .gs-dropitem:hover {
    background: rgba(255, 255, 255, .06);
}

/* ---------------- Mobile Bottom Sheet ---------------- */
.gs-sheet {
    display: none;
}

@media(max-width:900px) {
    .gs-sheet {
        display: block;
    }

    .gs-sheet:not(.is-open) {
        pointer-events: none;
    }

    .gs-sheet-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, .35);
        opacity: 0;
        transition: opacity .18s ease;
        z-index: 80;
    }

    .gs-sheet.is-open .gs-sheet-backdrop {
        opacity: 1;
        pointer-events: auto;
    }

    .gs-sheet-panel {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--panel);
        border-top-left-radius: 18px;
        border-top-right-radius: 18px;
        border: 1px solid var(--border);
        box-shadow: 0 -12px 30px rgba(0, 0, 0, .18);
        transform: translateY(105%);
        transition: transform .22s ease;
        z-index: 90;
        max-height: 78vh;
        display: flex;
        flex-direction: column;
    }

    .gs-sheet.is-open .gs-sheet-panel {
        transform: translateY(0);
        pointer-events: auto;
    }

    .gs-sheet-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 14px 16px;
        border-bottom: 1px solid var(--border);
    }

    .gs-sheet-body {
        padding: 10px 12px 18px;
        overflow: auto;
    }

    .gs-sheet-item {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 12px 12px;
        border-radius: 14px;
        color: var(--text);
        font-weight: 800;
    }

    .gs-sheet-item:hover {
        background: rgba(0, 0, 0, .04);
    }

    html[data-theme="dark"] .gs-sheet-item:hover {
        background: rgba(255, 255, 255, .06);
    }

    .gs-sheet-ico {
        width: 22px;
        text-align: center;
    }

    .gs-sheet-name {
        flex: 1;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}