/* ============================================================
   Medivia Botthi - public site
   Identidade visual: Bocchi Space (slate escuro + azul + lime)
   ============================================================ */
:root {
    --brand-primary: #105CAF;
    --brand-primary-dark: #0D4A8F;
    --brand-primary-light: #2b7fd4;
    --brand-gold: #CCEE03;
    --brand-gold-dark: #B8D603;
    --brand-gold-light: #d4f520;
    --brand-whatsapp: #00C82B;

    --slate-950: #0b1120;
    --slate-900: #0f172a;
    --slate-800: #1e293b;
    --slate-700: #334155;
    --slate-600: #475569;
    --slate-500: #64748b;
    --slate-400: #94a3b8;
    --slate-300: #cbd5e1;

    --surface: rgba(15, 23, 42, 0.92);
    --surface-solid: #131d33;
    --surface-alt: rgba(30, 41, 59, 0.5);
    --border: rgba(51, 65, 85, 0.6);
    --border-light: rgba(71, 85, 105, 0.8);

    --text: #f1f5f9;
    --text-muted: #94a3b8;
    --text-dim: #64748b;

    --success: #22C55E;
    --error: #EF4444;
    --warning: #F59E0B;
    --info: #3B82F6;

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-full: 9999px;

    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;

    --font: 'Ubuntu', 'Segoe UI', system-ui, -apple-system, sans-serif;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    --shadow-glow: 0 8px 28px rgba(16, 92, 175, 0.25);
    --container: 1240px;
}

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

body.site {
    background: linear-gradient(135deg, var(--slate-900) 0%, var(--slate-800) 55%, var(--brand-primary-dark) 140%) fixed;
    color: var(--text);
    font-family: var(--font);
    min-height: 100vh;
    line-height: 1.6;
    font-size: 16px;
    position: relative;
}
body.site::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background-image:
        radial-gradient(circle at 15% 10%, rgba(204, 238, 3, 0.06) 0%, transparent 45%),
        radial-gradient(circle at 85% 90%, rgba(16, 92, 175, 0.18) 0%, transparent 50%),
        linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
    background-size: 100% 100%, 100% 100%, 60px 60px, 60px 60px;
}
.topnav, .container, .site-footer { position: relative; z-index: 1; }

a { color: var(--brand-primary-light); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--brand-gold); }

h1, h2, h3, h4 { color: var(--text); font-weight: 700; line-height: 1.25; }

/* ---------- Top navigation ---------- */
.topnav {
    background: rgba(11, 17, 32, 0.8);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}
.topnav-inner {
    max-width: var(--container);
    margin: 0 auto;
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0.4rem var(--space-md);
    padding: 0.5rem var(--space-lg);
    min-height: 64px;
}
.brand {
    display: flex;
    align-items: center;
    font-size: 1.45rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--text);
    white-space: nowrap;
}
.brand span { color: var(--brand-gold); }
.brand .dot { color: var(--brand-primary-light); }

.nav-links { display: flex; align-items: center; gap: 0.1rem; flex-wrap: nowrap; }
.nav-links a {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.5rem 0.62rem;
    border-radius: var(--radius-md);
    border-bottom: 2px solid transparent;
    white-space: nowrap;
}
.nav-links a:hover { color: var(--text); background: var(--surface-alt); }
.nav-links a.active { color: var(--brand-gold); border-bottom-color: var(--brand-gold); }

.dropdown { position: relative; }
.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 190px;
    background: var(--surface-solid);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
    padding: 0.35rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: all 0.15s;
    z-index: 120;
}
.dropdown:hover .dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-menu a { display: block; border-radius: var(--radius-sm); border-bottom: none; }

.nav-spacer { flex: 1 1 auto; min-width: 0.5rem; }

.search { position: relative; width: 210px; flex-shrink: 0; }
.search input {
    width: 100%;
    background: var(--surface-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    color: var(--text);
    padding: 0.55rem 0.9rem 0.55rem 2.2rem;
    font-family: var(--font);
    font-size: 0.9rem;
    outline: none;
    transition: all 0.15s;
}
.search input::placeholder { color: var(--slate-500); }
.search input:focus { border-color: var(--brand-gold); box-shadow: 0 0 0 3px rgba(204, 238, 3, 0.15); }
.search .search-ico { position: absolute; left: 0.8rem; top: 50%; transform: translateY(-50%); color: var(--slate-500); }
.search-results {
    position: absolute;
    top: calc(100% + 6px);
    left: 0; right: 0;
    background: var(--surface-solid);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
    overflow: hidden;
    z-index: 110;
    display: none;
}
.search-results.show { display: block; }
.search-results a {
    display: flex; justify-content: space-between; gap: 0.5rem;
    padding: 0.6rem 0.9rem; color: var(--text); border-bottom: 1px solid var(--border);
}
.search-results a:last-child { border-bottom: none; }
.search-results a:hover { background: var(--surface-alt); }
.search-results .sr-meta { color: var(--slate-500); font-size: 0.82rem; }

/* Laptops/tablets: keep the nav on a single row by dropping the search to
   its own full-width row below it. */
@media (max-width: 1180px) {
    .search { order: 3; flex-basis: 100%; width: 100%; }
}
/* Phones: let the nav itself wrap and the brand take the first row. */
@media (max-width: 760px) {
    .topnav-inner { padding: 0.6rem var(--space-md); }
    .brand { flex-basis: 100%; }
    .nav-links { flex-wrap: wrap; order: 2; }
    .nav-spacer { display: none; }
}

/* ---------- Container ---------- */
.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--space-lg); }
.content { padding: var(--space-xl) 0; }

/* ---------- Hero ---------- */
.hero {
    text-align: center;
    padding: 3rem 1rem 2.5rem;
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-primary-dark));
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-xl);
    box-shadow: var(--shadow-glow);
}
.hero h1 { color: #fff; font-size: 2.4rem; }
.hero h1 .accent { color: var(--brand-gold); }
.hero p { color: rgba(255, 255, 255, 0.85); margin-top: 0.5rem; }
.hero-search { max-width: 520px; margin: 1.5rem auto 0; }
.hero-search .search { width: 100%; }
.hero-search .search input { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.2); color: #fff; }
.hero-search .search input::placeholder { color: rgba(255, 255, 255, 0.6); }

/* ---------- Cards / grid ---------- */
.grid { display: grid; gap: var(--space-lg); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 980px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
    background: var(--surface);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}
.card-head {
    padding: 1rem 1.2rem;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    color: var(--text);
    display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
}
.card-head .accent-bar { color: var(--brand-gold); }
.card-body { padding: 1.2rem; }

.stat-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-lg); margin-bottom: var(--space-xl); }
@media (max-width: 760px) { .stat-tiles { grid-template-columns: repeat(2, 1fr); } }
.stat-tile {
    background: var(--surface);
    border: 1px solid var(--border);
    border-top: 3px solid var(--brand-gold);
    border-radius: var(--radius-lg);
    padding: 1.1rem 1.2rem;
    box-shadow: var(--shadow-sm);
}
.stat-tile .label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--slate-500); font-weight: 600; }
.stat-tile .value { font-size: 1.7rem; font-weight: 700; margin-top: 0.3rem; color: var(--text); }
.stat-tile .value.gold { color: var(--brand-gold); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
table.data th {
    text-align: left;
    color: var(--slate-400);
    font-weight: 600;
    font-size: 0.73rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.75rem 0.9rem;
    border-bottom: 1px solid var(--border-light);
    white-space: nowrap;
    background: var(--surface-alt);
}
table.data td { padding: 0.7rem 0.9rem; border-bottom: 1px solid var(--border); color: var(--text); }
table.data tr:last-child td { border-bottom: none; }
table.data tbody tr:hover { background: var(--surface-alt); }
table.data .rank { color: var(--slate-500); width: 48px; font-weight: 600; }
table.data .num { text-align: right; font-variant-numeric: tabular-nums; }
.pos { color: var(--success); font-weight: 600; }
.neg { color: var(--error); font-weight: 600; }

/* ---------- Filters ---------- */
.filters { display: flex; flex-wrap: wrap; gap: var(--space-md); margin-bottom: var(--space-lg); }
.filters .field { display: flex; flex-direction: column; gap: 0.25rem; }
.filters label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--slate-500); font-weight: 600; }
select, .filters input {
    background: var(--surface-alt);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    color: var(--text);
    padding: 0.5rem 0.75rem;
    font-family: var(--font);
    font-size: 0.9rem;
    outline: none;
}
select:focus, .filters input:focus { border-color: var(--brand-gold); box-shadow: 0 0 0 3px rgba(204, 238, 3, 0.12); }
select option { background: var(--slate-900); }

/* ---------- Badges ---------- */
.badge { display: inline-block; padding: 0.18rem 0.6rem; border-radius: var(--radius-full); font-size: 0.72rem; font-weight: 600; }
.badge.pve { background: rgba(59, 130, 246, 0.15); color: #7fb0ff; }
.badge.pvp { background: rgba(239, 68, 68, 0.15); color: #ff8a8a; }
.badge.online { background: rgba(34, 197, 94, 0.16); color: #4ade80; }
.badge.offline { background: var(--surface-alt); color: var(--slate-400); }
.badge.world { background: rgba(16, 92, 175, 0.25); color: #8fc0ff; text-transform: capitalize; }

.voc { color: var(--slate-400); }
.name-link { color: var(--brand-primary-light); font-weight: 600; }
.name-link:hover { color: var(--brand-gold); }

.section-title { font-size: 1.5rem; font-weight: 700; margin: 0 0 var(--space-lg); color: var(--text); }
.section-title .accent { color: var(--brand-gold); }

/* ---------- Player profile ---------- */
.profile-head {
    display: flex; align-items: center; gap: 1.2rem;
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-primary-dark));
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 1.4rem 1.5rem;
    margin-bottom: var(--space-lg);
    color: #fff;
    box-shadow: var(--shadow-glow);
}
.profile-head .pavatar {
    width: 68px; height: 68px; border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.12); border: 2px solid var(--brand-gold);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.8rem; font-weight: 700; color: #fff;
}
.profile-head h1 { color: #fff; font-size: 1.9rem; display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.profile-head .sub { color: rgba(255, 255, 255, 0.85); margin-top: 0.2rem; }

.kv { width: 100%; }
.kv tr td { padding: 0.5rem 0; border-bottom: 1px solid var(--border); }
.kv tr:last-child td { border-bottom: none; }
.kv td:first-child { color: var(--slate-400); }
.kv td:last-child { text-align: right; font-weight: 600; color: var(--text); }

.skillbars { display: flex; flex-direction: column; gap: 0.65rem; }
.skillbar .top { display: flex; justify-content: space-between; font-size: 0.88rem; margin-bottom: 0.25rem; color: var(--text-muted); }
.skillbar .track { height: 8px; background: var(--surface-alt); border-radius: var(--radius-full); overflow: hidden; }
.skillbar .fill { height: 100%; background: linear-gradient(90deg, var(--brand-primary), var(--brand-gold)); border-radius: var(--radius-full); }

.empty-note { color: var(--slate-400); font-size: 0.92rem; padding: 1.25rem; text-align: center; }

/* Interactive chart tooltip */
.chartbox { position: relative; }
.chart-tip {
    position: absolute;
    transform: translateX(-50%);
    background: var(--slate-900);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 0.3rem 0.55rem;
    font-size: 0.8rem;
    color: var(--text);
    white-space: nowrap;
    pointer-events: none;
    z-index: 20;
    box-shadow: var(--shadow);
}
.chart-tip b { color: var(--brand-gold); }
.chart-tip .tip-t { display: block; color: var(--slate-400); font-size: 0.72rem; }

.chip-filter { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 1rem; }
.chip {
    background: var(--surface-alt);
    border: 1px solid var(--border-light);
    color: var(--slate-400);
    border-radius: var(--radius-full);
    padding: 0.28rem 0.7rem;
    font-family: var(--font);
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: capitalize;
    cursor: pointer;
    transition: all 0.12s;
}
.chip:hover { border-color: var(--brand-gold); color: var(--text); }
.chip.on { background: rgba(16, 92, 175, 0.25); border-color: var(--brand-primary); color: #cfe2ff; }
.chip-preset { background: transparent; border-color: var(--brand-gold); color: var(--brand-gold); text-transform: none; }
.chip-preset:hover { background: rgba(204, 238, 3, 0.12); color: var(--brand-gold); }
.chip-sep { width: 1px; align-self: stretch; background: var(--border-light); margin: 0 0.25rem; }

.half-label { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 0.4rem; }
.half-label.pos { color: var(--success); }
.half-label.neg { color: var(--error); }
.split-half table.data td { padding: 0.45rem 0.5rem; }

.tag-list { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.tag { background: var(--surface-alt); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0.3rem 0.65rem; font-size: 0.82rem; color: var(--text-muted); }
.tag b { color: var(--brand-gold); }
.tag b.pos { color: var(--success); }
.tag b.neg { color: var(--error); }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; gap: 0.4rem;
    background: linear-gradient(90deg, var(--brand-gold), var(--brand-gold-dark));
    color: var(--slate-900);
    border: none; border-radius: var(--radius-md);
    padding: 0.6rem 1.1rem; font-family: var(--font); font-weight: 700; font-size: 0.92rem;
    cursor: pointer; transition: all 0.15s;
    box-shadow: 0 4px 14px rgba(204, 238, 3, 0.18);
}
.btn:hover { background: linear-gradient(90deg, var(--brand-gold-light), var(--brand-gold)); color: var(--slate-900); transform: translateY(-1px); }
.btn-primary { background: var(--brand-primary); color: #fff; box-shadow: none; }
.btn-primary:hover { background: var(--brand-primary-dark); color: #fff; }
.btn-ghost { background: transparent; border: 1px solid var(--border-light); color: var(--text-muted); padding: 0.45rem 0.9rem; border-radius: var(--radius-md); font-weight: 600; font-size: 0.88rem; box-shadow: none; }
.btn-ghost:hover { background: var(--surface-alt); color: var(--brand-gold); border-color: var(--brand-gold); transform: none; }

.pagination { display: flex; gap: 0.5rem; align-items: center; justify-content: flex-end; margin-top: var(--space-md); color: var(--slate-500); font-size: 0.85rem; }

/* ---------- Footer ---------- */
.site-footer {
    border-top: 1px solid var(--border);
    background: rgba(11, 17, 32, 0.6);
    padding: var(--space-xl) 0;
    margin-top: var(--space-xl);
    color: var(--slate-500);
    font-size: 0.88rem;
}
.site-footer .container { display: flex; justify-content: space-between; align-items: center; gap: var(--space-md); flex-wrap: wrap; }
.site-footer a { color: var(--slate-400); }

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--slate-600); }
