/* ============================================================
   GOALMASTER v2 — Modern Retro Football Manager
   Mobile-first. Game feel. Your club. Your story.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&family=Oswald:wght@400;500;600;700&family=Barlow+Condensed:wght@400;600;700&display=swap');

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

/* ── DESIGN TOKENS ────────────────────────────────────────── */
:root {
    /* Core palette */
    --gm-bg:          #0d1117;
    --gm-bg2:         #161b22;
    --gm-bg3:         #1c2430;
    --gm-bg4:         #21262d;
    --gm-border:      #30363d;
    --gm-border-lit:  #484f58;

    /* Brand colors */
    --gm-green:       #3fb950;
    --gm-green-dim:   #238636;
    --gm-green-glow:  rgba(63,185,80,0.15);
    --gm-yellow:      #e3b341;
    --gm-yellow-dim:  #bb8009;
    --gm-red:         #f85149;
    --gm-red-dim:     #da3633;
    --gm-blue:        #58a6ff;
    --gm-purple:      #bc8cff;
    --gm-orange:      #ff7b72;

    /* Text */
    --gm-white:       #f0f6fc;
    --gm-text:        #c9d1d9;
    --gm-muted:       #8b949e;
    --gm-subtle:      #484f58;

    /* Typography */
    --gm-font-mono:   'Share Tech Mono', 'Courier New', monospace;
    --gm-font-head:   'Oswald', sans-serif;
    --gm-font-ui:     'Barlow Condensed', sans-serif;

    /* Layout */
    --gm-topbar-h:    60px;
    --gm-bottomnav-h: 58px;
    --gm-sidebar-w:   200px;
    --gm-chat-w:      260px;
    --gm-radius:      8px;
    --gm-radius-sm:   4px;
}

/* ── LIGHT THEME ─────────────────────────────────────────── */
body.gm-light {
    /* Grass-green backgrounds */
    --gm-bg:          #c8e6c0;
    --gm-bg2:         #f5fbf3;
    --gm-bg3:         #dff0d8;
    --gm-bg4:         #cfe8c6;
    --gm-border:      #b2d4a8;
    --gm-border-lit:  #8bbf80;

    /* Text — dark for readability on light bg */
    --gm-white:       #1a2e16;
    --gm-text:        #243d1e;
    --gm-muted:       #4a6b40;
    --gm-subtle:      #7a9e70;

    /* Keep brand colors but slightly richer for light bg */
    --gm-green:       #2d8a3e;
    --gm-green-dim:   #1e6b2e;
    --gm-green-glow:  rgba(45,138,62,0.12);
    --gm-yellow:      #b8860b;
    --gm-yellow-dim:  #9a6f00;
    --gm-red:         #c0392b;
    --gm-red-dim:     #a93226;
    --gm-blue:        #1a6fb5;
    --gm-purple:      #7b4fb5;
    --gm-orange:      #d4561a;
}

/* Stadium pitch stripe background */
body.gm-light {
    background-image: repeating-linear-gradient(
        180deg,
        rgba(255,255,255,0.13) 0px,
        rgba(255,255,255,0.13) 48px,
        transparent            48px,
        transparent            96px
    );
    background-attachment: fixed;
}

/* Topbar shadow softer on light */
body.gm-light .gm-topbar {
    box-shadow: 0 1px 4px rgba(0,80,0,0.1);
    border-bottom-color: var(--gm-border);
}

/* Cards need a white base so they stand out from the green bg */
body.gm-light .gm-card {
    background: #ffffff;
    border-color: var(--gm-border);
    box-shadow: 0 1px 4px rgba(0,60,0,0.08);
}

/* Nav active item readable on light */
body.gm-light .gm-nav-item.active {
    color: var(--gm-green);
    background: rgba(45,138,62,0.12);
}
body.gm-light .gm-nav-item:hover {
    background: rgba(45,138,62,0.07);
    color: var(--gm-text);
}

/* Ghost button stays readable */
body.gm-light .gm-btn-ghost {
    color: var(--gm-text);
    border-color: var(--gm-border-lit);
}
body.gm-light .gm-btn-ghost:hover {
    background: var(--gm-bg4);
    color: var(--gm-white);
    border-color: var(--gm-green);
}

/* Light mode: inactive buttons get dark text for contrast on light green bg */
body.gm-light .gm-btn:not(.gm-btn-ghost):not(.gm-btn-red):not(.gm-btn-yellow):not(.active-tactic) {
    color: #1a3a1a;
    background: #c8e6c0;
    border-color: #8bbf80;
}
body.gm-light .gm-btn:not(.gm-btn-ghost):not(.gm-btn-red):not(.gm-btn-yellow):not(.active-tactic):hover {
    background: #b2d4a8;
    color: #1a3a1a;
}

/* Currency pills */
body.gm-light .gm-currency-pill {
    background: rgba(255,255,255,0.7);
}

/* Alerts adjust for light bg */
body.gm-light .gm-alert-info {
    background: rgba(26,111,181,0.08);
    color: #1a5fa0;
    border-color: #5b9bd5;
}
body.gm-light .gm-alert-success {
    background: rgba(45,138,62,0.08);
    color: #1e6b2e;
    border-color: var(--gm-green);
}
body.gm-light .gm-alert-danger {
    background: rgba(192,57,43,0.08);
    color: #a93226;
    border-color: var(--gm-red);
}
body.gm-light .gm-alert-warning {
    background: rgba(184,134,11,0.08);
    color: #9a6f00;
    border-color: var(--gm-yellow);
}

/* Table rows */
body.gm-light .gm-table th {
    background: var(--gm-bg3);
    color: var(--gm-muted);
}
body.gm-light .gm-table tr:hover td {
    background: var(--gm-bg3);
}

/* Inputs */
body.gm-light .gm-input,
body.gm-light .gm-select,
body.gm-light .gm-textarea {
    background: #ffffff;
    color: var(--gm-white);
    border-color: var(--gm-border);
}
body.gm-light .gm-input:focus,
body.gm-light .gm-select:focus,
body.gm-light .gm-textarea:focus {
    border-color: var(--gm-green);
}

/* Stat boxes */
body.gm-light .gm-stat-box {
    background: #ffffff;
    border-color: var(--gm-border);
}

/* Footer */
body.gm-light .gm-footer {
    background: var(--gm-bg2);
    border-top-color: var(--gm-border);
    color: var(--gm-muted);
}

/* Page title */
body.gm-light .gm-page-title {
    color: var(--gm-white);
}

/* Text utilities — keep brand colors legible on light bg */
body.gm-light .gm-text-green  { color: var(--gm-green)  !important; }
body.gm-light .gm-text-yellow { color: var(--gm-yellow) !important; }
body.gm-light .gm-text-red    { color: var(--gm-red)    !important; }
body.gm-light .gm-text-blue   { color: var(--gm-blue)   !important; }
body.gm-light .gm-text-gray   { color: var(--gm-muted)  !important; }
body.gm-light .gm-small       { color: var(--gm-muted); }

/* Theme toggle button */
.gm-theme-toggle {
    background: var(--gm-bg3);
    border: 1px solid var(--gm-border);
    border-radius: 20px;
    width: 38px;
    height: 22px;
    cursor: pointer;
    position: relative;
    transition: background 0.2s;
    flex-shrink: 0;
}
.gm-theme-toggle::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--gm-muted);
    transition: transform 0.2s, background 0.2s;
}
body.gm-light .gm-theme-toggle::after {
    transform: translateX(16px);
    background: var(--gm-green);
}
.gm-theme-toggle-wrap {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    color: var(--gm-muted);
}

/* ── BASE ─────────────────────────────────────────────────── */
html { height: 100%; scroll-behavior: smooth; overflow-x: hidden; }
body {
    min-height: 100%;
    background: var(--gm-bg);
    color: var(--gm-text);
    font-family: var(--gm-font-ui);
    font-size: 15px;
    line-height: 1.5;
    overflow-x: hidden; /* prevent any element from causing horizontal page scroll */
    -webkit-font-smoothing: antialiased;
}
a { color: var(--gm-green); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--gm-yellow); }
img { max-width: 100%; display: block; }

/* ── TOPBAR ───────────────────────────────────────────────── */
.gm-topbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--gm-topbar-h);
    background: var(--gm-bg2);
    border-bottom: 1px solid var(--gm-border);
    display: flex;
    align-items: center;
    padding: 0 12px;
    gap: 10px;
    z-index: 100;
    box-shadow: 0 1px 0 rgba(0,0,0,0.3);
}

.gm-logo {
    font-family: var(--gm-font-head);
    font-size: 22px;
    font-weight: 700;
    color: var(--gm-green);
    letter-spacing: 2px;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
}
.gm-logo span { color: var(--gm-yellow); }
.gm-logo:hover { color: var(--gm-green); }

/* Club identity in topbar */
.gm-topbar-center {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
    min-width: 0;
}

.gm-club-crest {
    width: 38px;
    height: 38px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--gm-font-head);
    font-weight: 700;
    font-size: 13px;
    color: var(--gm-white);
    flex-shrink: 0;
    border: 2px solid rgba(255,255,255,0.15);
    overflow: hidden;
    background: var(--gm-bg3);
}
.gm-club-crest img { width: 100%; height: 100%; object-fit: cover; }

.gm-topbar-club-info {
    min-width: 0;
    overflow: hidden;
}
.gm-topbar-club-name {
    font-family: var(--gm-font-head);
    font-size: 16px;
    font-weight: 600;
    color: var(--gm-white);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}
.gm-topbar-club-meta {
    font-size: 11px;
    color: var(--gm-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gm-topbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.gm-currency-pill {
    display: flex;
    align-items: center;
    gap: 4px;
    background: var(--gm-bg3);
    border: 1px solid var(--gm-border);
    border-radius: 20px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}
.gm-currency-pill.budget { color: var(--gm-green);  border-color: var(--gm-green-dim);  }

.gm-avatar-btn {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--gm-bg3);
    border: 2px solid var(--gm-border-lit);
    overflow: hidden;
    cursor: pointer;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}
.gm-avatar-btn img { width: 100%; height: 100%; object-fit: cover; }

/* ── LAYOUT WRAPPER ───────────────────────────────────────── */
.gm-wrapper {
    display: flex;
    min-height: calc(100vh - var(--gm-topbar-h));
    padding-top: var(--gm-topbar-h);
}

/* ── SIDEBAR (desktop) ────────────────────────────────────── */
.gm-sidebar {
    width: var(--gm-sidebar-w);
    flex-shrink: 0;
    background: var(--gm-bg2);
    border-right: 1px solid var(--gm-border);
    position: fixed;
    top: var(--gm-topbar-h);
    bottom: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    padding: 12px 0;
    z-index: 90;
}

.gm-nav-section {
    padding: 10px 12px 2px;
    font-size: 9px;
    letter-spacing: 1.5px;
    color: var(--gm-subtle);
    text-transform: uppercase;
    font-family: var(--gm-font-mono);
    margin-top: 2px;
}
.gm-nav-section:first-child { margin-top: 0; }

.gm-nav-item {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 6px 14px;
    color: var(--gm-muted);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.12s;
    text-decoration: none;
    border-left: 3px solid transparent;
    font-family: var(--gm-font-ui);
}
.gm-nav-item:hover {
    color: var(--gm-text);
    background: var(--gm-bg3);
    border-left-color: var(--gm-border-lit);
}
.gm-nav-item.active {
    color: var(--gm-green);
    background: var(--gm-green-glow);
    border-left-color: var(--gm-green);
}
.gm-nav-icon { font-size: 14px; flex-shrink: 0; }
.gm-nav-label { font-family: var(--gm-font-ui); font-size: 12px; font-weight: 600; }

/* Mobile: bottom nav bar */
@media (max-width: 767px) {
    .gm-sidebar {
        width: 100%;
        top: auto;
        bottom: 0;
        height: var(--gm-bottomnav-h);
        flex-direction: row;
        border-right: none;
        border-top: 1px solid var(--gm-border);
        overflow-x: auto;
        overflow-y: hidden;
        padding: 0;
        background: var(--gm-bg2);
        box-shadow: 0 -1px 0 rgba(0,0,0,0.3);
        scrollbar-width: none;
    }
    .gm-sidebar::-webkit-scrollbar { display: none; }
    .gm-nav-section { display: none; }
    .gm-nav-item {
        flex-direction: column;
        gap: 2px;
        padding: 8px 14px;
        border-left: none;
        border-top: 2px solid transparent;
        min-width: 60px;
        justify-content: center;
        flex-shrink: 0;
    }
    .gm-nav-item.active {
        border-top-color: var(--gm-green);
        border-left-color: transparent;
    }
    .gm-nav-icon  { font-size: 18px; }
    .gm-nav-label { font-size: 9px; letter-spacing: 0.5px; }
    .gm-content   { padding-bottom: calc(var(--gm-bottomnav-h) + 16px); }
}

/* ── MAIN CONTENT ─────────────────────────────────────────── */
.gm-content {
    flex: 1;
    margin-left: var(--gm-sidebar-w);
    padding: 14px 14px 20px;
    max-width: 1100px;
    width: 100%;
    overflow-x: hidden; /* prevent any child from causing horizontal page scroll */
}
@media (max-width: 767px) {
    .gm-content { margin-left: 0; padding: 10px 10px 20px; }
}

/* ── PAGE TITLE ───────────────────────────────────────────── */
.gm-page-title {
    font-family: var(--gm-font-head);
    font-size: 24px;
    font-weight: 700;
    color: var(--gm-white);
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--gm-border);
    display: flex;
    align-items: center;
    gap: 10px;
}
.gm-page-title-sub {
    font-size: 13px;
    color: var(--gm-muted);
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    margin-left: auto;
}

/* ── CARDS ────────────────────────────────────────────────── */
.gm-card {
    background: var(--gm-bg2);
    border: 1px solid var(--gm-border);
    border-radius: var(--gm-radius);
    padding: 12px 14px;
    margin-bottom: 12px;
}
.gm-card-title {
    font-family: var(--gm-font-head);
    font-size: 11px;
    font-weight: 600;
    color: var(--gm-muted);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--gm-border);
}

/* Colored top-border cards */
.gm-card-green  { border-top: 3px solid var(--gm-green);  }
.gm-card-yellow { border-top: 3px solid var(--gm-yellow); }
.gm-card-red    { border-top: 3px solid var(--gm-red);    }
.gm-card-blue   { border-top: 3px solid var(--gm-blue);   }

/* ── GRID ─────────────────────────────────────────────────── */
.gm-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.gm-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.gm-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
/* Grid children must not overflow their cell */
.gm-grid-2 > *, .gm-grid-3 > *, .gm-grid-4 > * { min-width: 0; }
@media (max-width: 900px) {
    .gm-grid-3 { grid-template-columns: 1fr 1fr; }
    .gm-grid-4 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 767px) {
    .gm-grid-2 { grid-template-columns: 1fr !important; } /* single column on all phones */
}
@media (max-width: 600px) {
    .gm-grid-3 { grid-template-columns: 1fr; }
    .gm-grid-4 { grid-template-columns: 1fr 1fr !important; } /* stat boxes stay 2×2 */
}

/* ── STAT BOXES ───────────────────────────────────────────── */
.gm-stat-box {
    background: var(--gm-bg3);
    border: 1px solid var(--gm-border);
    border-radius: var(--gm-radius);
    padding: 10px 12px;
    text-align: center;
}
.gm-stat-icon {
    font-size: 18px;
    line-height: 1;
    margin-bottom: 4px;
    opacity: .85;
}
.gm-stat-value {
    font-family: var(--gm-font-head);
    font-size: 26px;
    font-weight: 700;
    color: var(--gm-white);
    line-height: 1;
    margin-bottom: 3px;
}
.gm-stat-label {
    font-size: 10px;
    color: var(--gm-muted);
    letter-spacing: 1px;
    text-transform: uppercase;
    font-family: var(--gm-font-ui);
}

/* ── HERO MATCH CARD ──────────────────────────────────────── */
.gm-match-hero {
    background: linear-gradient(135deg, var(--gm-bg3) 0%, var(--gm-bg2) 100%);
    border: 1px solid var(--gm-border);
    border-radius: var(--gm-radius);
    padding: 14px;
    margin-bottom: 12px;
    position: relative;
    overflow: hidden;
}
.gm-match-hero::before {
    content: '⚽';
    position: absolute;
    right: -10px;
    bottom: -10px;
    font-size: 80px;
    opacity: 0.05;
    pointer-events: none;
}
.gm-match-hero-label {
    font-size: 10px;
    letter-spacing: 2px;
    color: var(--gm-muted);
    text-transform: uppercase;
    margin-bottom: 12px;
    font-family: var(--gm-font-mono);
}
.gm-match-hero-teams {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.gm-match-hero-team {
    flex: 1;
    font-family: var(--gm-font-head);
    font-size: 18px;
    font-weight: 700;
    color: var(--gm-white);
}
.gm-match-hero-team.away { text-align: right; }
.gm-match-hero-team.mine { color: var(--gm-green); }
.gm-match-hero-vs {
    font-family: var(--gm-font-head);
    font-size: 24px;
    font-weight: 700;
    color: var(--gm-yellow);
    padding: 0 8px;
    white-space: nowrap;
}
.gm-match-hero-meta {
    margin-top: 10px;
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: var(--gm-muted);
    flex-wrap: wrap;
}
.gm-match-hero-meta span { display: flex; align-items: center; gap: 4px; }

/* ── TABLE ────────────────────────────────────────────────── */
.gm-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.gm-table th {
    text-align: left;
    padding: 8px 10px;
    font-family: var(--gm-font-ui);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--gm-muted);
    border-bottom: 1px solid var(--gm-border);
    background: var(--gm-bg3);
}
.gm-table td {
    padding: 9px 10px;
    border-bottom: 1px solid var(--gm-border);
    color: var(--gm-text);
    vertical-align: middle;
}
.gm-table tr:last-child td { border-bottom: none; }
.gm-table tr:hover td { background: var(--gm-bg3); }
.gm-table tr.gm-my-club td {
    background: var(--gm-green-glow);
    color: var(--gm-green);
    font-weight: 600;
}
.gm-table .gm-promote { color: var(--gm-green); }
.gm-table .gm-relegate { color: var(--gm-red); }

/* ── MATCH RESULT ROWS ────────────────────────────────────── */
.gm-match-result {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--gm-bg3);
    border: 1px solid var(--gm-border);
    border-radius: var(--gm-radius-sm);
    padding: 7px 10px;
    margin-bottom: 6px;
    gap: 8px;
    transition: border-color 0.15s;
}
.gm-match-result:hover { border-color: var(--gm-border-lit); }
.gm-match-team { flex: 1; font-size: 13px; font-weight: 600; min-width: 0; }
.gm-match-team.away { text-align: right; }
.gm-match-score {
    font-family: var(--gm-font-head);
    font-size: 20px;
    font-weight: 700;
    color: var(--gm-yellow);
    padding: 0 12px;
    flex-shrink: 0;
    white-space: nowrap;
}
.gm-match-win  { border-left: 3px solid var(--gm-green); }
.gm-match-loss { border-left: 3px solid var(--gm-red);   }
.gm-match-draw { border-left: 3px solid var(--gm-yellow);}

/* Result badge */
.gm-result-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px; height: 22px;
    padding: 0 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 800;
    font-family: var(--gm-font-head);
    letter-spacing: 0.5px;
    white-space: nowrap;
    flex-shrink: 0;
    color: #fff;
}
.gm-result-badge.w { background: #1a7a35; }
.gm-result-badge.d { background: #a06000; }
.gm-result-badge.l { background: #b02020; }

/* ── FORM STRING ──────────────────────────────────────────── */
.gm-form-string { display: flex; gap: 4px; }
.gm-form-dot {
    height: 22px;
    padding: 0 8px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
    font-family: var(--gm-font-head);
    letter-spacing: 0.5px;
    white-space: nowrap;
}
.gm-form-dot.W { background: var(--gm-green);  color: #000; }
.gm-form-dot.D { background: var(--gm-yellow); color: #000; }
.gm-form-dot.L { background: var(--gm-red);    color: #fff; }

/* ── ALERTS ───────────────────────────────────────────────── */
.gm-alert {
    padding: 10px 14px;
    border-radius: var(--gm-radius-sm);
    margin-bottom: 12px;
    font-size: 13px;
    border: 1px solid;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}
.gm-alert-success {
    background: rgba(63,185,80,0.1);
    border-color: var(--gm-green-dim);
    color: var(--gm-green);
}
.gm-alert-danger {
    background: rgba(248,81,73,0.1);
    border-color: var(--gm-red-dim);
    color: var(--gm-red);
}
.gm-alert-warning {
    background: rgba(227,179,65,0.1);
    border-color: var(--gm-yellow-dim);
    color: var(--gm-yellow);
}
.gm-alert-info {
    background: rgba(88,166,255,0.1);
    border-color: #1f6feb;
    color: var(--gm-blue);
}

/* ── BUTTONS ──────────────────────────────────────────────── */
.gm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 18px;
    background: var(--gm-bg3);
    border: 1px solid var(--gm-border);
    color: var(--gm-muted);
    font-family: var(--gm-font-ui);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    border-radius: var(--gm-radius-sm);
    transition: all 0.15s;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
}
.gm-btn:hover {
    background: var(--gm-bg4);
    border-color: var(--gm-border-lit);
    color: var(--gm-white);
}
.gm-btn-red    {
    background: rgba(218,54,51,0.2);
    border-color: var(--gm-red);
    color: var(--gm-red);
}
.gm-btn-red:hover {
    background: var(--gm-red);
    color: #fff;
    box-shadow: 0 0 12px rgba(248,81,73,0.3);
}
.gm-btn-yellow {
    background: rgba(187,128,9,0.2);
    border-color: var(--gm-yellow);
    color: var(--gm-yellow);
}
.gm-btn-yellow:hover {
    background: var(--gm-yellow);
    color: #0d1117;
    box-shadow: 0 0 12px rgba(227,179,65,0.3);
}
.gm-btn-ghost {
    background: transparent;
    border-color: var(--gm-border-lit);
    color: var(--gm-text);
}
.gm-btn-ghost:hover {
    background: var(--gm-bg3);
    border-color: var(--gm-text);
    color: var(--gm-white);
    box-shadow: none;
}
.gm-btn-sm  { padding: 5px 12px; font-size: 12px; }
.gm-btn-lg  { padding: 12px 24px; font-size: 15px; }
.gm-btn-block { display: flex; width: 100%; white-space: normal; }

/* ── ICON BUTTONS (BM Professional style) ─────────────────── */
.gm-icon-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}
@media (max-width: 480px) {
    .gm-icon-grid { grid-template-columns: repeat(4, 1fr); }
}
.gm-icon-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 10px 6px;
    background: var(--gm-bg3);
    border: 1px solid var(--gm-border);
    border-radius: var(--gm-radius);
    color: var(--gm-text);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-align: center;
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
    font-family: var(--gm-font-ui);
}
.gm-icon-btn:hover {
    background: var(--gm-bg4);
    border-color: var(--gm-border-lit);
    color: var(--gm-white);
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0,0,0,0.3);
}
.gm-icon-btn.active {
    background: var(--gm-green-glow);
    border-color: var(--gm-green);
    color: var(--gm-green);
}
.gm-icon-btn-emoji { font-size: 20px; line-height: 1; }
.gm-icon-btn-label { font-size: 9px; text-transform: uppercase; letter-spacing: 0.5px; }

/* ── FORMS ────────────────────────────────────────────────── */
.gm-form-group { margin-bottom: 16px; }
.gm-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--gm-muted);
    text-transform: uppercase;
    margin-bottom: 6px;
    font-family: var(--gm-font-ui);
}
.gm-input, .gm-select, .gm-textarea {
    width: 100%;
    background: var(--gm-bg3);
    border: 1px solid var(--gm-border);
    color: var(--gm-white);
    font-family: var(--gm-font-ui);
    font-size: 14px;
    padding: 10px 12px;
    border-radius: var(--gm-radius-sm);
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    -webkit-appearance: none;
}
.gm-input:focus, .gm-select:focus, .gm-textarea:focus {
    border-color: var(--gm-green);
    box-shadow: 0 0 0 3px rgba(63,185,80,0.1);
}
.gm-input::placeholder { color: var(--gm-subtle); }
.gm-select option { background: var(--gm-bg2); color: var(--gm-white); }

/* ── POSITION BADGES ──────────────────────────────────────── */
.gm-pos-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: 700;
    border-radius: 3px;
    font-family: var(--gm-font-mono);
    background: var(--gm-bg3);
    border: 1px solid var(--gm-border);
    color: var(--gm-muted);
    letter-spacing: 0.5px;
}
.gm-pos-badge.GK  { background: rgba(227,179,65,0.15); border-color: var(--gm-yellow); color: var(--gm-yellow); }
.gm-pos-badge.ST  { background: rgba(248,81,73,0.15);  border-color: var(--gm-red);    color: var(--gm-red);    }
.gm-pos-badge.LW, .gm-pos-badge.RW, .gm-pos-badge.CAM
                  { background: rgba(255,123,114,0.15); border-color: var(--gm-orange); color: var(--gm-orange); }
.gm-pos-badge.CM, .gm-pos-badge.CDM
                  { background: rgba(88,166,255,0.15);  border-color: var(--gm-blue);   color: var(--gm-blue);   }
.gm-pos-badge.CB, .gm-pos-badge.LB, .gm-pos-badge.RB
                  { background: rgba(63,185,80,0.15);   border-color: var(--gm-green);  color: var(--gm-green);  }

/* ── SKILL BAR ────────────────────────────────────────────── */
.gm-skill-bar { display: flex; align-items: center; gap: 8px; }
.gm-skill-track {
    flex: 1;
    height: 6px;
    background: var(--gm-bg4);
    border-radius: 3px;
    overflow: hidden;
}
.gm-skill-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.4s ease;
    background: var(--gm-green);
}
.gm-skill-fill.high   { background: var(--gm-green); }
.gm-skill-fill.medium { background: var(--gm-yellow); }
.gm-skill-fill.low    { background: var(--gm-red); }
.gm-skill-num {
    font-size: 13px;
    font-weight: 700;
    color: var(--gm-white);
    min-width: 28px;
    text-align: right;
    font-family: var(--gm-font-mono);
}

/* ── PLAYER CARD (avatar style) ───────────────────────────── */
.gm-player-avatar {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: var(--gm-bg4);
    border: 2px solid var(--gm-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
    overflow: hidden;
}
.gm-player-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ── NEWS ITEMS ───────────────────────────────────────────── */
.gm-news-item {
    padding: 8px 0;
    border-bottom: 1px solid var(--gm-border);
    display: flex;
    gap: 8px;
    align-items: flex-start;
}
.gm-news-item:last-child { border-bottom: none; }
.gm-news-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 5px;
}
.gm-news-dot.breaking { background: var(--gm-red); box-shadow: 0 0 5px var(--gm-red); }
.gm-news-dot.news     { background: var(--gm-blue); }
.gm-news-dot.update   { background: var(--gm-muted); }
.gm-news-content { flex: 1; min-width: 0; }
.gm-news-badge {
    display: inline-block;
    font-size: 9px;
    padding: 1px 5px;
    border-radius: 2px;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    margin-bottom: 2px;
    font-weight: 700;
    font-family: var(--gm-font-mono);
}
/* Fix: bright text on colored background for readability */
.gm-news-badge.breaking { background: var(--gm-red);    color: #fff; }
.gm-news-badge.normal   { background: var(--gm-bg4);    color: var(--gm-muted); border: 1px solid var(--gm-border); }
.gm-news-badge.info     { background: var(--gm-blue);   color: #fff; }
.gm-news-headline {
    font-size: 13px;
    font-weight: 600;
    color: var(--gm-text);
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.gm-news-time { font-size: 10px; color: var(--gm-muted); margin-top: 1px; }

/* ── MATCH LOG ────────────────────────────────────────────── */
.gm-match-log {
    font-family: var(--gm-font-mono);
    font-size: 13px;
    background: var(--gm-bg);
    border: 1px solid var(--gm-border);
    border-radius: var(--gm-radius);
    padding: 14px;
    max-height: 420px;
    overflow-y: auto;
}
.gm-log-line {
    padding: 4px 0;
    border-bottom: 1px solid rgba(48,54,61,0.5);
    display: flex;
    gap: 8px;
}
.gm-log-minute {
    color: var(--gm-subtle);
    min-width: 32px;
    font-size: 12px;
}
.gm-log-goal   { color: var(--gm-green); font-weight: 700; }
.gm-log-card   { color: var(--gm-yellow); }
.gm-log-red    { color: var(--gm-red); }
.gm-log-injury { color: var(--gm-red); }
.gm-log-info   { color: var(--gm-muted); }

/* ── TABS ─────────────────────────────────────────────────── */
.gm-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--gm-border);
    margin-bottom: 16px;
    overflow-x: auto;
    scrollbar-width: none;
}
.gm-tabs::-webkit-scrollbar { display: none; }
.gm-tab {
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
    color: var(--gm-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    text-decoration: none;
    font-family: var(--gm-font-ui);
    white-space: nowrap;
    transition: color 0.15s;
}
.gm-tab:hover { color: var(--gm-text); }
.gm-tab.active {
    color: var(--gm-white);
    border-bottom-color: var(--gm-green);
}

/* ── BETTING POOLS ────────────────────────────────────────── */
.gm-pool-card {
    background: var(--gm-bg2);
    border: 1px solid var(--gm-border);
    border-radius: var(--gm-radius);
    padding: 16px;
    margin-bottom: 12px;
    border-top: 3px solid var(--gm-yellow);
    min-width: 0;
}
.gm-pool-title {
    font-family: var(--gm-font-head);
    font-size: 18px;
    font-weight: 700;
    color: var(--gm-yellow);
    margin-bottom: 8px;
}
.gm-predict-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--gm-border);
    gap: 6px;
}
.gm-predict-teams {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 12px;
    font-weight: 600;
}
.gm-predict-team-line {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.gm-predict-btns  { display: flex; gap: 3px; flex-shrink: 0; }
.gm-predict-btn {
    padding: 4px 9px;
    border: 1px solid var(--gm-border);
    background: var(--gm-bg3);
    color: var(--gm-muted);
    font-family: var(--gm-font-mono);
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    border-radius: 3px;
    transition: all 0.12s;
}
.gm-predict-btn:hover { border-color: var(--gm-yellow); color: var(--gm-yellow); }
.gm-predict-btn.selected {
    background: var(--gm-yellow-dim);
    color: var(--gm-yellow);
    border-color: var(--gm-yellow);
}

/* ── BETTING MOBILE ───────────────────────────────────────── */
@media (max-width: 600px) {
    /* Pool grid: always single column */
    .gm-bet-pools-grid { grid-template-columns: 1fr !important; }

    /* Pool title smaller */
    .gm-pool-title { font-size: 15px !important; }

    /* Predict row: stack teams above buttons */
    .gm-predict-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        padding: 10px 0;
    }
    .gm-predict-teams {
        font-size: 12px !important;
        width: 100%;
    }
    .gm-predict-team-line {
        white-space: normal !important;
    }
    .gm-predict-btns {
        width: 100%;
        gap: 6px;
    }
    .gm-predict-btn {
        flex: 1;
        text-align: center;
        padding: 7px 4px;
        font-size: 13px;
    }

    /* Recent bets table: hide slot col, overflow */
    .gm-bets-table { font-size: 11px; }
    .gm-bets-col-slot { display: none; }

    /* Payout summary line: wrap gracefully */
    .gm-payout-summary { font-size: 12px; }
}
@media (max-width: 480px) {
    /* Coins header: stack vertically */
    .gm-coins-header { flex-direction: column; align-items: flex-start !important; }
    .gm-coins-header .gm-coins-info { text-align: left !important; max-width: 100% !important; }
}

/* ── FINANCES ─────────────────────────────────────────────── */
.gm-finance-income  { color: var(--gm-green); font-weight: 600; }
.gm-finance-expense { color: var(--gm-red);   font-weight: 600; }

/* ── AUTH PAGES ───────────────────────────────────────────── */
.gm-auth-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gm-bg);
    padding: 20px;
    background-image:
        radial-gradient(ellipse at 20% 50%, rgba(63,185,80,0.04) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(88,166,255,0.04) 0%, transparent 60%);
}
.gm-auth-box {
    background: var(--gm-bg2);
    border: 1px solid var(--gm-border);
    border-radius: var(--gm-radius);
    padding: 32px 28px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}
.gm-auth-logo {
    font-family: var(--gm-font-head);
    font-size: 32px;
    font-weight: 700;
    color: var(--gm-green);
    letter-spacing: 3px;
    text-align: center;
    margin-bottom: 4px;
}
.gm-auth-logo span { color: var(--gm-yellow); }
.gm-auth-subtitle {
    text-align: center;
    color: var(--gm-muted);
    font-size: 12px;
    letter-spacing: 1.5px;
    margin-bottom: 28px;
    font-family: var(--gm-font-mono);
}

/* ── DIVIDER ──────────────────────────────────────────────── */
.gm-divider {
    border: none;
    border-top: 1px solid var(--gm-border);
    margin: 16px 0;
}

/* ── FOOTER ───────────────────────────────────────────────── */
.gm-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 10px;
    color: var(--gm-subtle);
    font-family: var(--gm-font-mono);
    padding: 10px 16px;
    border-top: 1px solid var(--gm-border);
    margin-top: 24px;
    margin-left: var(--gm-sidebar-w);
}
@media (max-width: 767px) {
    .gm-footer { display: none; }
}
.gm-footer-sep { opacity: 0.3; }

/* ── MOBILE FIXES ─────────────────────────────────────────── */

/* Topbar: compact layout on small screens */
@media (max-width: 480px) {
    /* Show toggle but hide the ☀️ 🌙 emoji labels — just the knob */
    .gm-theme-toggle-wrap span { display: none; }
    .gm-theme-toggle { width: 30px; height: 17px; }
    .gm-theme-toggle::after { width: 11px; height: 11px; top: 3px; left: 3px; }
    body.gm-light .gm-theme-toggle::after { transform: translateX(13px); }
    /* Budget pill compact */
    .gm-currency-pill.budget { font-size: 11px; padding: 3px 7px; }
    .gm-topbar { gap: 6px; padding: 0 8px; }
    .gm-topbar-club-name { font-size: 13px; }
    .gm-topbar-club-meta { display: none; }
    .gm-topbar-right { gap: 5px; }
    .gm-topbar-right .gm-btn { padding: 4px 7px; font-size: 10px; }
}

/* Match hero: scale down team names and hide server time on mobile */
@media (max-width: 600px) {
    /* Hero label: truncate long "NEXT MATCH · date · time · tz" line */
    .gm-match-hero-label {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }
    /* Team names: allow shrinking + truncate long club names */
    .gm-match-hero-team {
        font-size: 14px;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .gm-match-hero-vs   { font-size: 18px; padding: 0 4px; flex-shrink: 0; }
    .gm-match-hero-meta span:last-child { display: none; } /* hide server time */
    .gm-match-hero-meta { gap: 8px; font-size: 10px; }
    /* Match result rows: truncate long club names */
    .gm-match-team {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

/* Tables: always scrollable on mobile */
@media (max-width: 767px) {
    .gm-card .gm-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

/* Bottom nav: ensure it never wraps and shows scrollbar-free */
@media (max-width: 767px) {
    .gm-sidebar {
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-x: contain;
    }
    /* Page title smaller on mobile */
    .gm-page-title { font-size: 18px; letter-spacing: 0.5px; }
    .gm-page-title-sub { font-size: 11px; }
    /* Board expectations: stack on mobile */
    .gm-flex-between { flex-wrap: wrap; gap: 6px; }
    /* Stat boxes: keep 4-col but reduce padding */
    .gm-stat-box { padding: 10px 6px; }
    .gm-stat-icon { font-size: 15px; }
    .gm-stat-value { font-size: 22px; }
    .gm-stat-label { font-size: 9px; }
}

/* ── SCROLLBAR ────────────────────────────────────────────── */
::-webkit-scrollbar       { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--gm-bg2); }
::-webkit-scrollbar-thumb { background: var(--gm-border-lit); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gm-muted); }

/* ── UTILITY ──────────────────────────────────────────────── */
.gm-text-green   { color: var(--gm-green)  !important; }
.gm-text-yellow  { color: var(--gm-yellow) !important; }
.gm-text-red     { color: var(--gm-red)    !important; }
.gm-text-blue    { color: var(--gm-blue)   !important; }
.gm-text-gray    { color: var(--gm-muted)  !important; }
.gm-text-white   { color: var(--gm-white)  !important; }
.gm-text-center  { text-align: center; }
.gm-text-right   { text-align: right; }
.gm-bold         { font-weight: 700; }
.gm-mono         { font-family: var(--gm-font-mono); }
.gm-small        { font-size: 12px; color: var(--gm-muted); }
.gm-mt-8         { margin-top: 8px; }
.gm-mt-16        { margin-top: 16px; }
.gm-mb-16        { margin-bottom: 16px; }
.gm-mb-8         { margin-bottom: 8px; }
.gm-p-0          { padding: 0; }
.gm-flex         { display: flex; align-items: center; }
.gm-flex-between { display: flex; align-items: center; justify-content: space-between; }
.gm-gap-8        { gap: 8px; }
.gm-gap-12       { gap: 12px; }
.gm-truncate     { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── PULSE ANIMATION (live match) ────────────────────────── */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}
.gm-live { animation: pulse 1.5s ease-in-out infinite; color: var(--gm-red); }

/* ── GLOW EFFECTS ─────────────────────────────────────────── */
.gm-glow-green { box-shadow: 0 0 20px rgba(63,185,80,0.2); }
.gm-glow-yellow { box-shadow: 0 0 20px rgba(227,179,65,0.2); }

/* ── CHAT PANEL ───────────────────────────────────────────── */
.gm-chat-panel {
    width: var(--gm-chat-w);
    flex-shrink: 0;
    background: var(--gm-bg2);
    border-left: 1px solid var(--gm-border);
    position: fixed;
    top: var(--gm-topbar-h);
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    z-index: 90;
}
.gm-chat-header {
    padding: 10px 12px;
    border-bottom: 1px solid var(--gm-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}
.gm-chat-title {
    font-family: var(--gm-font-head);
    font-size: 13px;
    font-weight: 700;
    color: var(--gm-white);
    letter-spacing: 0.5px;
}
.gm-chat-online {
    font-size: 11px;
    color: var(--gm-green);
    display: flex;
    align-items: center;
    gap: 4px;
}
.gm-chat-online::before {
    content: '';
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--gm-green);
    display: inline-block;
    animation: pulse 2s ease-in-out infinite;
}
.gm-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    scroll-behavior: smooth;
}
.gm-chat-messages::-webkit-scrollbar { width: 4px; }
.gm-chat-messages::-webkit-scrollbar-track { background: transparent; }
.gm-chat-messages::-webkit-scrollbar-thumb { background: var(--gm-border); border-radius: 2px; }
.gm-chat-msg {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.gm-chat-msg-meta {
    display: flex;
    align-items: center;
    gap: 5px;
}
.gm-chat-badge {
    width: 16px; height: 16px;
    border-radius: 3px;
    font-size: 9px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
    font-family: var(--gm-font-head);
}
.gm-chat-msg-meta svg,
.gm-chat-msg-meta img {
    width: 16px !important;
    height: 16px !important;
    flex-shrink: 0;
}
.gm-chat-name {
    font-size: 11px;
    font-weight: 700;
    color: var(--gm-text);
    font-family: var(--gm-font-ui);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
}
.gm-chat-time {
    font-size: 10px;
    color: var(--gm-subtle);
    margin-left: auto;
    flex-shrink: 0;
}
.gm-chat-text {
    font-size: 12px;
    color: var(--gm-text);
    line-height: 1.4;
    padding: 5px 8px;
    background: var(--gm-bg3);
    border-radius: 0 6px 6px 6px;
    word-break: break-word;
}
.gm-chat-msg.gm-chat-mine .gm-chat-text {
    background: var(--gm-green-dim);
    color: #fff;
    border-radius: 6px 0 6px 6px;
    align-self: flex-end;
}
.gm-chat-msg.gm-chat-mine {
    align-items: flex-end;
}
.gm-chat-msg.gm-chat-mine .gm-chat-msg-meta {
    flex-direction: row-reverse;
}
.gm-chat-form {
    padding: 8px;
    border-top: 1px solid var(--gm-border);
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}
.gm-chat-input {
    flex: 1;
    background: var(--gm-bg4);
    border: 1px solid var(--gm-border);
    border-radius: var(--gm-radius-sm);
    color: var(--gm-text);
    font-size: 12px;
    padding: 6px 9px;
    font-family: var(--gm-font-ui);
    outline: none;
    transition: border-color 0.15s;
}
.gm-chat-input:focus { border-color: var(--gm-green); }
.gm-chat-input::placeholder { color: var(--gm-subtle); }
.gm-chat-send {
    background: var(--gm-green-dim);
    border: 1px solid var(--gm-green);
    color: #fff;
    border-radius: var(--gm-radius-sm);
    padding: 6px 10px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.15s;
    flex-shrink: 0;
}
.gm-chat-send:hover { background: var(--gm-green); }
.gm-chat-day-sep {
    text-align: center;
    font-size: 10px;
    color: var(--gm-subtle);
    margin: 4px 0;
    letter-spacing: 0.5px;
}

/* Shrink content when chat is visible */
@media (min-width: 1100px) {
    .gm-content { margin-right: var(--gm-chat-w); }
}
/* Mobile: hide fixed side panel, show as slide-up drawer instead */
@media (max-width: 1099px) {
    .gm-chat-panel {
        width: 100%;
        height: 70vh;
        top: auto;
        bottom: var(--gm-bottomnav-h);
        right: 0;
        left: 0;
        border-left: none;
        border-top: 2px solid var(--gm-green);
        border-radius: 16px 16px 0 0;
        transform: translateY(110%);
        transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
        z-index: 200;
    }
    .gm-chat-panel.gm-chat-open {
        transform: translateY(0);
    }
    /* Floating chat button */
    .gm-chat-fab {
        display: flex;
    }
    /* Bottom nav padding already handles scroll space */
    .gm-content { padding-bottom: calc(var(--gm-bottomnav-h) + 20px); }
}
@media (min-width: 1100px) {
    .gm-chat-fab { display: none !important; }
}

/* Floating Action Button */
.gm-chat-fab {
    display: none;
    position: fixed;
    bottom: calc(var(--gm-bottomnav-h) + 12px);
    right: 14px;
    z-index: 199;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--gm-green-dim);
    border: 2px solid var(--gm-green);
    color: #fff;
    font-size: 20px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(63,185,80,0.4);
    transition: background 0.15s, transform 0.15s;
}
.gm-chat-fab:hover { background: var(--gm-green); transform: scale(1.08); }
.gm-chat-fab-badge {
    position: absolute;
    top: -4px; right: -4px;
    background: var(--gm-red);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    border-radius: 10px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    display: none;
}

/* Mobile drawer close button */
.gm-chat-close {
    display: none;
    background: none;
    border: none;
    color: var(--gm-muted);
    font-size: 18px;
    cursor: pointer;
    padding: 2px 6px;
    line-height: 1;
}
@media (max-width: 1099px) {
    .gm-chat-close { display: block; }
}

/* Light theme chat adjustments */
body.gm-light .gm-chat-panel {
    background: #ffffff;
    border-left-color: var(--gm-border);
}
body.gm-light .gm-chat-text {
    background: var(--gm-bg3);
    color: var(--gm-text);
}
body.gm-light .gm-chat-msg.gm-chat-mine .gm-chat-text {
    background: var(--gm-green);
    color: #fff;
}
body.gm-light .gm-chat-input {
    background: var(--gm-bg4);
    color: var(--gm-text);
}

/* ── TROPHY CABINET ───────────────────────────────────────── */
.gm-trophy-cabinet {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}
.gm-trophy-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 84px;
    text-align: center;
}
.gm-trophy-name {
    font-size: 11px;
    font-weight: 700;
    margin-top: 4px;
    line-height: 1.2;
}
.gm-trophy-date { margin-top: 1px; }
