/* ============================================================================
   TRIGALIA � dark/purple premium template for MyAAC
   ----------------------------------------------------------------------------
   Plik: templates/trigalia/css/style.css
   Autor: (Twoja nazwa / studio)

   JAK ZMIENIC KOLORYSTYKE / BRANDING TEGO SZABLONU
   ----------------------------------------------------------------------------
   Wszystkie kolory, odstepy i promienie zaokraglen sterowane sa zmiennymi CSS
   zdefiniowanymi w bloku :root ponizej. Aby dopasowac szablon do swojego
   serwera, wystarczy zmienic wartosci w tym JEDNYM miejscu � reszta pliku
   (i caly layout) automatycznie sie do nich dostosuje.

   Nazwe serwera, logo i linki spolecznosciowe zmienia sie w:
     templates/trigalia/index.php   (sekcja "KONFIGURACJA SZABLONU" na g�rze)

   WAZNE (zgodnosc z rdzeniem MyAAC):
   MyAAC renderuje tresc wielu podstron (highscores, online, guilds, houses,
   bans, konta, itd.) korzystajac ze wsp�lnych, stalych klas HTML
   (np. .TableContainer, .CaptionContainer, .SmallBox, .LabelV, .LabelH).
   Ten plik celowo re-skinuje wlasnie te klasy � dzieki temu WSZYSTKIE
   podstrony systemu (nie tylko strona gl�wna) automatycznie dziedzicza
   ciemny/fioletowy motyw, nawet bez podmieniania kazdego pliku .twig.
   ========================================================================= */

:root {
    /* --- Tla --- */
    --bg-base: #0a0810;              /* tlo calej strony (prawie czarne, fiolet. podt�n) */
    --bg-elevated: #120e1c;          /* tlo nagl�wka / stopki */
    --bg-surface: #17131f;           /* tlo kart, box�w, kontener�w tresci */
    --bg-surface-alt: #1d1729;       /* tlo naprzemiennych wierszy tabel */
    --bg-surface-hover: #241c33;     /* hover na elementach interaktywnych */
    --bg-input: #14101d;             /* tlo p�l formularzy */

    /* --- Fiolet / akcent marki --- */
    --accent-900: #3b160d;
    --accent-700: #7b2415;
    --accent-600: #a52d1b;
    --accent-500: #c33a22;
    --accent-400: #d6a04a;
    --accent-300: #f0cd78;
    --accent-glow: rgba(195, 58, 34, 0.45);

    /* --- Tekst --- */
    --text-primary: #eee9f7;
    --text-secondary: #c4b59d;
    --text-muted: #857864;
    --text-on-accent: #fff0cc;

    /* --- Stany / komunikaty --- */
    --color-success: #34d399;
    --color-success-bg: rgba(52, 211, 153, 0.12);
    --color-danger: #f87171;
    --color-danger-bg: rgba(248, 113, 113, 0.12);
    --color-warning: #fbbf24;
    --color-warning-bg: rgba(251, 191, 36, 0.12);
    --color-online: #34d399;
    --color-offline: #6b6478;

    /* --- Obramowania --- */
    --border-subtle: #2a2338;
    --border-strong: #3d3352;
    --border-accent: #9a6a2a;

    /* --- Geometria --- */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --gap: 16px;

    /* --- Typografia --- */
    --font-heading: 'Playfair Display', Georgia, 'Times New Roman', serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

    --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.45);
    --shadow-glow: 0 0 24px var(--accent-glow);
}

/* ============================== RESET / BASE ============================= */

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    padding: 0;
    background:
        radial-gradient(ellipse 900px 500px at 15% -10%, rgba(166, 98, 28, 0.16), transparent 60%),
        radial-gradient(ellipse 700px 500px at 100% 10%, rgba(122, 34, 20, 0.12), transparent 55%),
        var(--bg-base);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--accent-400);
    text-decoration: none;
    transition: color .15s ease, text-shadow .15s ease;
}
a:hover { color: var(--accent-300); text-shadow: 0 0 12px var(--accent-glow); }

img { max-width: 100%; }

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    color: var(--text-primary);
    letter-spacing: .02em;
    margin: 0 0 .6em;
}

hr { border: none; border-top: 1px solid var(--border-subtle); margin: 20px 0; }

/* Scrollbar (Webkit) w klimacie motywu */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-700); }

/* =============================== LAYOUT ==================================== */

.page-wrapper {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- G�rny pasek (utility bar) --- */
.top-bar {
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border-subtle);
    font-size: 12.5px;
    color: var(--text-muted);
}
.top-bar .page-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 34px;
}
.top-bar a { color: var(--text-secondary); }
.top-bar a:hover { color: var(--accent-300); }
.top-bar .status-dot {
    display: inline-block;
    width: 7px; height: 7px;
    border-radius: 50%;
    margin-right: 6px;
    background: var(--color-online);
    box-shadow: 0 0 6px var(--color-online);
}
.top-bar .status-dot.offline { background: var(--color-offline); box-shadow: none; }

/* --- Nagl�wek / logo --- */
.site-header {
    background:
        linear-gradient(180deg, rgba(166,98,28,0.10), transparent 70%),
        var(--bg-elevated);
    border-bottom: 1px solid var(--border-subtle);
    padding: 22px 0 0;
}
.site-header .header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--gap);
    padding-bottom: 20px;
}
.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
}
.brand:hover { text-decoration: none; }
.brand-logo {
    width: 52px; height: 52px;
    display: flex; align-items: center; justify-content: center;
    border-radius: var(--radius-md);
    background: radial-gradient(circle at 35% 30%, var(--accent-500), var(--accent-900) 75%);
    box-shadow: 0 0 22px var(--accent-glow), inset 0 0 12px rgba(255,255,255,0.15);
    font-family: var(--font-heading);
    font-weight: 700;
    color: #fff;
    font-size: 22px;
}
.brand-text .brand-name {
    font-family: var(--font-heading);
    font-size: 26px;
    font-weight: 700;
    color: var(--text-primary);
    text-shadow: 0 0 18px var(--accent-glow);
    line-height: 1.1;
}
.brand-text .brand-tagline {
    font-size: 12px;
    color: var(--text-muted);
    letter-spacing: .12em;
    text-transform: uppercase;
}

.header-cta { display: flex; gap: 10px; align-items: center; }

/* --- Nawigacja gl�wna --- */
.main-nav {
    background: rgba(20, 15, 30, 0.9);
    backdrop-filter: blur(6px);
    border-bottom: 1px solid var(--border-subtle);
    position: sticky;
    top: 0;
    z-index: 100;
}
.main-nav .nav-inner {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-wrap: wrap;
}
.main-nav a.nav-link {
    display: inline-block;
    padding: 13px 14px;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text-secondary);
    border-bottom: 2px solid transparent;
    white-space: nowrap;
}
.main-nav a.nav-link:hover {
    color: var(--text-primary);
    border-bottom-color: var(--accent-500);
    text-shadow: none;
    background: rgba(166,98,28,0.08);
}
.main-nav a.nav-link.active {
    color: var(--accent-300);
    border-bottom-color: var(--accent-400);
}
.nav-toggle {
    display: none;
    background: none;
    border: 1px solid var(--border-strong);
    color: var(--text-primary);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    font-size: 15px;
    cursor: pointer;
}

/* --- Siatka gl�wna: tresc + sidebar --- */
.content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 24px;
    padding: 24px 0 40px;
    align-items: start;
}
.main-column { min-width: 0; }
.sidebar { display: flex; flex-direction: column; gap: 18px; position: sticky; top: 66px; }

/* =============================== KOMPONENTY ================================ */

/* --- Karta / panel og�lny (uzywane przez nasze wlasne boxy) --- */
.panel {
    background: linear-gradient(180deg, var(--bg-surface), var(--bg-elevated));
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    overflow: hidden;
}
.panel-header {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(90deg, rgba(166,98,28,0.14), transparent);
}
.panel-header h3 {
    font-size: 15px;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--accent-300);
}
.panel-body { padding: 16px 18px; }
.panel-body.no-pad { padding: 0; }
.panel-footer {
    padding: 10px 18px;
    border-top: 1px solid var(--border-subtle);
    font-size: 12.5px;
    color: var(--text-muted);
    text-align: center;
}

/* --- Przyciski --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 13.5px;
    letter-spacing: .02em;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.btn:hover { text-decoration: none; }
.btn-primary {
    background: linear-gradient(135deg, var(--accent-600), var(--accent-900));
    color: var(--text-on-accent);
    box-shadow: 0 0 0 rgba(0,0,0,0), 0 4px 14px rgba(122, 34, 20, 0.45);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 22px var(--accent-glow); color: #fff; }
.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border-color: var(--border-strong);
}
.btn-ghost:hover { border-color: var(--accent-500); color: var(--accent-300); }
.btn-block { width: 100%; }
.btn-sm { padding: 6px 12px; font-size: 12px; }

/* --- Formularze --- */
.form-group { margin-bottom: 14px; }
.form-group label {
    display: block;
    font-size: 12.5px;
    color: var(--text-secondary);
    margin-bottom: 6px;
    font-weight: 600;
}
.form-control,
input[type="text"],
input[type="password"],
input[type="email"],
select,
textarea {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    padding: 10px 12px;
    font-size: 13.5px;
    font-family: var(--font-body);
    transition: border-color .15s ease, box-shadow .15s ease;
}
.form-control:focus,
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--accent-500);
    box-shadow: 0 0 0 3px rgba(195, 58, 34, 0.18);
}
.form-hint { font-size: 11.5px; color: var(--text-muted); margin-top: 4px; }
.form-error {
    font-size: 12px;
    color: var(--color-danger);
    margin-top: 4px;
    display: block;
    min-height: 15px;
}
.form-check { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-secondary); }
.form-check input { width: auto; }

.field-status { display: inline-block; width: 14px; text-align: center; }

/* --- Komunikaty / alerty (bledy logowania, rejestracji itp.) --- */
.alert {
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    font-size: 13px;
    margin-bottom: 16px;
    border: 1px solid transparent;
    display: flex;
    gap: 10px;
    align-items: flex-start;
}
.alert-error { background: var(--color-danger-bg); border-color: rgba(248,113,113,0.35); color: #fecaca; }
.alert-success { background: var(--color-success-bg); border-color: rgba(52,211,153,0.35); color: #bbf7d0; }
.alert-warning { background: var(--color-warning-bg); border-color: rgba(251,191,36,0.35); color: #fde68a; }
.alert-info { background: rgba(195,58,34,0.10); border-color: rgba(195,58,34,0.35); color: var(--accent-300); }

/* --- Stan pusty (brak news�w, offline serwer, brak wynik�w) --- */
.empty-state {
    text-align: center;
    padding: 34px 20px;
    color: var(--text-muted);
}
.empty-state .empty-icon { font-size: 30px; margin-bottom: 10px; opacity: .6; }
.empty-state strong { display: block; color: var(--text-secondary); margin-bottom: 4px; font-size: 14px; }

/* --- Odznaki --- */
.badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    padding: 3px 9px;
    border-radius: 999px;
}
.badge-online { background: var(--color-success-bg); color: var(--color-success); }
.badge-offline { background: rgba(255,255,255,0.06); color: var(--text-muted); }

/* --- Tabele wlasne (news lista, itp.) --- */
table.aac-table { width: 100%; border-collapse: collapse; font-size: 13px; }
table.aac-table th {
    text-align: left;
    padding: 10px 12px;
    background: rgba(166,98,28,0.10);
    color: var(--accent-300);
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: .06em;
    border-bottom: 1px solid var(--border-subtle);
}
table.aac-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text-secondary);
}
table.aac-table tr:last-child td { border-bottom: none; }
table.aac-table tr:hover td { background: rgba(166,98,28,0.06); }

/* --- Ticker news�w --- */
.news-ticker {
    background: linear-gradient(90deg, var(--accent-900), var(--bg-surface));
    border: 1px solid var(--border-accent);
    border-radius: var(--radius-md);
    padding: 10px 16px;
    margin-bottom: 18px;
    font-size: 13px;
    display: flex;
    gap: 10px;
    align-items: center;
}
.news-ticker .ticker-label {
    text-transform: uppercase;
    font-size: 10.5px;
    letter-spacing: .08em;
    color: var(--accent-300);
    font-weight: 700;
    flex-shrink: 0;
}

/* --- Karta newsa --- */
.news-item {
    display: flex;
    gap: 14px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-subtle);
}
.news-item:last-child { border-bottom: none; }
.news-icon {
    width: 38px; height: 38px;
    flex-shrink: 0;
    border-radius: var(--radius-sm);
    background: var(--bg-surface-alt);
    border: 1px solid var(--border-subtle);
    display: flex; align-items: center; justify-content: center;
    font-size: 18px;
}
.news-body { flex: 1; min-width: 0; }
.news-meta {
    font-size: 11.5px;
    color: var(--text-muted);
    margin-bottom: 4px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.news-meta .news-author { color: var(--accent-400); }
.news-title { font-size: 15px; font-weight: 600; margin: 0 0 6px; color: var(--text-primary); }
.news-text { color: var(--text-secondary); font-size: 13.5px; }
.news-text p:first-child { margin-top: 0; }

/* --- Widget: gracze online w sidebarze --- */
.online-count-hero {
    text-align: center;
    padding: 18px 0 6px;
}
.online-count-hero .count {
    font-family: var(--font-heading);
    font-size: 42px;
    font-weight: 700;
    color: var(--accent-300);
    text-shadow: var(--shadow-glow);
    line-height: 1;
}
.online-count-hero .label {
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--text-muted);
    margin-top: 4px;
}
.player-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 18px;
    border-top: 1px solid var(--border-subtle);
    font-size: 13px;
}
.player-row .rank { color: var(--text-muted); width: 18px; flex-shrink: 0; }
.player-row .name { flex: 1; color: var(--text-primary); font-weight: 500; }
.player-row .lvl { color: var(--accent-400); font-size: 12px; flex-shrink: 0; }

/* --- Widget: highscores mini --- */
.hs-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 18px;
    border-top: 1px solid var(--border-subtle);
    font-size: 13px;
}
.hs-row .rank {
    width: 22px; height: 22px;
    border-radius: 50%;
    background: var(--bg-surface-alt);
    color: var(--text-secondary);
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 700; flex-shrink: 0;
}
.hs-row:nth-child(2) .rank { background: linear-gradient(135deg,#facc15,#a16207); color:#1a140d; }
.hs-row:nth-child(3) .rank { background: linear-gradient(135deg,#d1d5db,#6b7280); color:#1a140d; }
.hs-row:nth-child(4) .rank { background: linear-gradient(135deg,#f59e0b,#78350f); color:#fff; }
.hs-row .name { flex: 1; color: var(--text-primary); }
.hs-row .value { color: var(--accent-400); font-weight: 600; font-size: 12.5px; }

/* --- Stopka --- */
.site-footer {
    background: var(--bg-elevated);
    border-top: 1px solid var(--border-subtle);
    margin-top: 30px;
    padding: 34px 0 18px;
    color: var(--text-muted);
    font-size: 12.5px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 24px;
    padding-bottom: 24px;
}
.footer-col h4 {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--accent-300);
    margin-bottom: 12px;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 7px; }
.footer-col a { color: var(--text-muted); font-size: 12.5px; }
.footer-col a:hover { color: var(--accent-300); }
.footer-bottom {
    border-top: 1px solid var(--border-subtle);
    padding-top: 16px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}
.footer-bottom .credits a { color: var(--accent-400); }

/* =========== RE-SKIN RDZENIA MyAAC (klasy wsp�lne dla wielu podstron) ======
   Ponizsze klasy sa generowane bezposrednio przez system MyAAC (pliki .twig
   w system/templates/ oraz szablonach) na wielu podstronach: highscores,
   online, houses, guilds, bans, team, konto gracza itd. Nadpisanie ich tutaj
   sprawia, ze CALA witryna � a nie tylko strona gl�wna � zachowuje sp�jny,
   ciemny/fioletowy motyw.
   =========================================================================== */

.BoxContent, .ContentBox { color: var(--text-primary); }

.TableContainer { margin-bottom: 20px; }

.CaptionContainer {
    background: linear-gradient(90deg, var(--accent-900), var(--bg-surface));
    border: 1px solid var(--border-accent);
    border-bottom: none;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    padding: 10px 16px;
}
.CaptionContainer .Text,
.CaptionContainer .CaptionInnerContainer .Text {
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    letter-spacing: .02em;
}
/* Ukrywamy dekoracyjne, gifowe "narozniki" starego stylu � nasz box ma juz
   nowoczesne zaokraglone rogi i obramowanie, nie potrzebuje bitmap. */
.CaptionEdgeLeftTop, .CaptionEdgeRightTop, .CaptionEdgeLeftBottom, .CaptionEdgeRightBottom,
.CaptionBorderTop, .CaptionBorderBottom, .CaptionVerticalLeft, .CaptionVerticalRight,
.BoxFrameHorizontal, .BoxFrameVerticalLeft, .BoxFrameVerticalRight,
.BoxFrameEdgeLeftTop, .BoxFrameEdgeRightTop, .BoxFrameEdgeLeftBottom, .BoxFrameEdgeRightBottom,
.TableShadowContainerRightTop, .TableShadowRightTop, .TableShadowContainer,
.TableBottomShadow, .TableBottomLeftShadow, .TableBottomRightShadow,
.TopButtonContainer, .Border_1, .CornerWrapper-b, .Corner-bl, .Corner-br {
    display: none !important;
}

.InnerTableContainer, .TableContentAndRightShadow, .TableContentContainer {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-top: none;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
}

table.TableContent, table.Table3, table.Table5, table.Table, table.myaac-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
table.TableContent td, table.Table3 td, table.Table5 td, table.Table td, table.myaac-table td,
table.TableContent th, table.Table3 th, table.Table5 th, table.Table th, table.myaac-table th {
    padding: 9px 14px;
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text-secondary);
}
/* Wymuszamy nasze tlo naprzemienne wierszy nawet gdy silnik wstrzykuje inline
   style="background-color: ..." na podstawie ustawien koloru z panelu admina. */
table.TableContent tr,
table.Table3 tr,
table.Table5 tr {
    background-color: var(--bg-surface) !important;
}
table.TableContent tr:nth-child(even),
table.Table3 tr:nth-child(even),
table.Table5 tr:nth-child(even) {
    background-color: var(--bg-surface-alt) !important;
}
tr.LabelH, .LabelH {
    background: rgba(166,98,28,0.14) !important;
    color: var(--accent-300) !important;
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: .05em;
    font-weight: 700;
}
.LabelV { color: var(--text-muted); font-weight: 600; white-space: nowrap; width: 1%; }

.SmallBox, .Message, .MessageContainer {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    margin-bottom: 16px;
}

/* Linki paginacji / stron */
.PageNumber, .PageNavigator a, .pagination a {
    display: inline-block;
    padding: 6px 12px;
    margin: 2px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-strong);
    color: var(--text-secondary);
    font-size: 12.5px;
}
.PageNumber:hover, .PageNavigator a:hover, .pagination a:hover {
    border-color: var(--accent-500);
    color: var(--accent-300);
}
.PageNumberSelected, .PageNavigator a.active, .pagination a.active {
    background: var(--accent-600);
    border-color: var(--accent-600);
    color: #fff;
}

/* Natywne przyciski MyAAC (partiale buttons.*.html.twig skopiowane
   z domyslnego szablonu tibiacom � patrz README, sekcja instalacji).
   Dzieki temu formularze logowania/rejestracji/zarzadzania kontem
   zachowuja 100% oryginalnej, przetestowanej logiki backendu, a jedynie
   dziedzicza nasz wyglad. */
input[type="submit"], input[type="button"], button:not(.nav-toggle) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 13px;
    font-family: var(--font-body);
    border: 1px solid var(--border-strong);
    background: linear-gradient(135deg, var(--accent-600), var(--accent-900));
    color: var(--text-on-accent);
    cursor: pointer;
    transition: transform .12s ease, box-shadow .12s ease;
}
input[type="submit"]:hover, input[type="button"]:hover, button:not(.nav-toggle):hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px var(--accent-glow);
}
/* Stare przyciski oparte o obrazki (input[type=image]) z motywu tibiacom �
   jesli admin skopiuje oryginalne partiale z grafikami, sa one degradowane
   do przezroczystosci, aby nie kolidowaly z ciemnym tlem; zalecane jest
   podmienienie ich na zwykle input[type=submit] (patrz README). */
input[type="image"] { filter: drop-shadow(0 0 6px rgba(0,0,0,0.4)); }

/* Status online/offline w tabelach systemowych */
font[color="green"], font[color="#008000"] { color: var(--color-online) !important; font-weight: 600; }
font[color="red"] { color: var(--color-danger) !important; font-weight: 600; }

/* =============================== RESPONSYWNOSC ============================= */

@media (max-width: 1100px) {
    .content-grid { grid-template-columns: minmax(0, 1fr) 260px; }
    .footer-grid { grid-template-columns: 1.2fr 1fr 1fr; }
}

@media (max-width: 860px) {
    .content-grid { grid-template-columns: 1fr; }
    .sidebar { position: static; order: 2; }
    .main-column { order: 1; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
    .nav-toggle { display: inline-flex; }
    .main-nav .nav-inner {
        display: none;
        flex-direction: column;
        gap: 0;
        width: 100%;
        padding: 6px 0 12px;
    }
    .main-nav .nav-inner.open { display: flex; }
    .main-nav a.nav-link { width: 100%; border-bottom: 1px solid var(--border-subtle); border-left: 2px solid transparent; }
    .main-nav a.nav-link.active { border-left-color: var(--accent-500); border-bottom-color: var(--border-subtle); }
    .site-header .header-inner { flex-wrap: wrap; }
    .brand-text .brand-name { font-size: 21px; }
    .online-count-hero .count { font-size: 34px; }
}

@media (max-width: 560px) {
    .page-wrapper { padding: 0 14px; }
    .footer-grid { grid-template-columns: 1fr; gap: 18px; }
    .footer-bottom { flex-direction: column; text-align: center; }
    .header-cta .btn span.btn-label { display: none; }
    table.aac-table, table.TableContent, table.Table3, table.Table5 {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

/* ===================== TRIGALIA SIDEBAR LAYOUT v2 ===================== */
.top-actions .page-wrapper {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
}

.content-grid {
    grid-template-columns: 292px minmax(0, 1fr);
    gap: 28px;
}

.sidebar-left {
    grid-column: 1;
    position: sticky;
    top: 18px;
    order: initial;
}

.main-column {
    grid-column: 2;
    order: initial;
}

.content-shell {
    min-height: 520px;
    padding: 22px;
    background: linear-gradient(145deg, rgba(22, 17, 12, .94), rgba(10, 8, 6, .97));
    border: 1px solid rgba(214, 160, 74, .15);
    border-radius: 18px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .32), inset 0 1px 0 rgba(255, 255, 255, .025);
}

.server-card {
    transition: transform .24s ease, border-color .24s ease, box-shadow .24s ease;
}

.server-card:hover {
    transform: translateY(-3px);
    border-color: rgba(214, 160, 74, .35);
    box-shadow: 0 14px 36px rgba(88, 28, 135, .25);
}

.side-menu {
    overflow: hidden;
    background: rgba(12, 10, 7, .94);
    border: 1px solid rgba(214, 160, 74, .2);
    border-radius: 16px;
    box-shadow: 0 18px 48px rgba(0, 0, 0, .4);
}

.menu-group + .menu-group {
    border-top: 1px solid rgba(214, 160, 74, .12);
}

.menu-group summary {
    position: relative;
    display: grid;
    grid-template-columns: 30px 1fr 22px;
    align-items: center;
    min-height: 52px;
    padding: 0 14px;
    color: #f2eadc;
    font-family: 'Playfair Display', serif;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    list-style: none;
    user-select: none;
    background: linear-gradient(90deg, rgba(166, 98, 28, .2), rgba(47, 33, 18, .8) 58%, rgba(18, 14, 9, .96));
    transition: color .22s ease, background .22s ease, padding-left .22s ease;
}

.menu-group summary::-webkit-details-marker { display: none; }

.menu-group summary::after {
    content: '';
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(240, 205, 120, .45), transparent);
}

.menu-group summary:hover {
    color: #fff;
    padding-left: 18px;
    background: linear-gradient(90deg, rgba(195, 58, 34, .35), rgba(58, 37, 19, .9) 65%, rgba(18, 14, 9, .96));
}

.menu-icon {
    display: grid;
    width: 24px;
    height: 24px;
    place-items: center;
    color: #f0cd78;
    filter: drop-shadow(0 0 7px rgba(214, 160, 74, .45));
    transition: transform .25s ease, color .25s ease;
}

.menu-group summary:hover .menu-icon { transform: scale(1.18) rotate(-5deg); color: #fff; }
.menu-chevron { text-align: center; color: #9e8765; transition: transform .25s ease, color .25s ease; }
.menu-group[open] .menu-chevron { transform: rotate(180deg); color: #f0cd78; }

.menu-links {
    display: grid;
    padding: 7px;
    background: linear-gradient(180deg, rgba(10, 9, 7, .96), rgba(18, 14, 9, .97));
    animation: menuReveal .24s ease both;
}

@keyframes menuReveal {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

.side-link {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 35px;
    padding: 7px 10px 7px 14px;
    border-radius: 8px;
    color: #c4b59d;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: transform .18s ease, color .18s ease, background .18s ease, box-shadow .18s ease;
}

.side-link::before {
    content: '';
    position: absolute;
    left: 3px;
    width: 3px;
    height: 0;
    border-radius: 4px;
    background: linear-gradient(#f0cd78, #a52d1b);
    box-shadow: 0 0 10px rgba(195, 58, 34, .7);
    transition: height .18s ease;
}

.side-link:hover {
    color: #fff;
    transform: translateX(4px) scale(1.015);
    background: rgba(166, 98, 28, .16);
    box-shadow: inset 0 0 0 1px rgba(214, 160, 74, .08);
}

.side-link:hover::before, .side-link.active::before { height: 20px; }
.side-link.active { color: #fff; font-weight: 700; background: linear-gradient(90deg, rgba(166, 98, 28, .34), rgba(166, 98, 28, .08)); }
.link-arrow { opacity: 0; transform: translateX(-5px); color: #f0cd78; transition: opacity .18s ease, transform .18s ease; }
.side-link:hover .link-arrow, .side-link.active .link-arrow { opacity: 1; transform: translateX(0); }

@media (max-width: 1100px) {
    .content-grid { grid-template-columns: 255px minmax(0, 1fr); gap: 20px; }
}

@media (max-width: 860px) {
    .top-actions .page-wrapper { justify-content: center; }
    .content-grid { grid-template-columns: 1fr; }
    .sidebar-left { grid-column: 1; position: static; order: 1; }
    .main-column { grid-column: 1; order: 2; }
    .side-menu { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .menu-group + .menu-group { border-top: 0; }
    .menu-group { border-bottom: 1px solid rgba(214, 160, 74, .12); }
}

@media (max-width: 620px) {
    .top-actions { display: none; }
    .side-menu { grid-template-columns: 1fr; }
    .content-shell { padding: 14px; border-radius: 13px; }
}

/* ===================== OUTFIT + BRIGHTNESS CORRECTION v8 ===================== */
body {
    background-image:
        linear-gradient(180deg, rgba(7, 6, 4, .03), rgba(7, 5, 12, .12) 60%, rgba(6, 5, 11, .3)),
        radial-gradient(ellipse 50% 58% at 50% 22%, rgba(8, 6, 16, .2), transparent 72%),
        url('../images/trigalia-world-bg-v2.png');
}

@media (min-width: 1261px) {
    .content-grid { grid-template-columns: 270px minmax(0, 1fr) 285px; gap: 24px; }
}

.ranking-head { min-height: 58px; padding: 14px 16px; }
.ranking-head h2 { font-size: 19px; }
.ranking-list { padding: 10px 12px; }
.ranking-player {
    grid-template-columns: 32px 78px minmax(0, 1fr) 10px;
    gap: 10px;
    min-height: 96px;
    padding: 8px;
}
.ranking-position { width: 27px; height: 27px; font-size: 11px; }
.ranking-avatar {
    width: 78px;
    height: 78px;
    overflow: hidden;
    border-radius: 14px;
}
.ranking-avatar img {
    position: absolute;
    left: -60px;
    top: -60px;
    width: 132px;
    height: 132px;
    margin: 0;
    object-fit: contain;
    transform: none;
    image-rendering: pixelated;
}
.ranking-data strong { font-size: 14px; }
.ranking-data small { margin-top: 4px; font-size: 10px; }
.ranking-card footer { padding: 11px 15px; }

/* MyAAC character profile injects a legacy absolutely-positioned outfit box. */
.content-shell div[style*='width:64px'][style*='height:64px'][style*='border-radius:50px'] {
    position: relative !important;
    display: grid !important;
    width: 128px !important;
    height: 128px !important;
    margin: 4px auto 20px !important;
    padding: 0 !important;
    place-items: center;
    overflow: hidden;
    background: radial-gradient(circle at 50% 65%, rgba(195, 58, 34, .34), rgba(12, 9, 19, .94) 68%);
    border: 1px solid rgba(240, 205, 120, .36) !important;
    border-radius: 18px !important;
    box-shadow: 0 14px 34px rgba(0, 0, 0, .32), inset 0 0 24px rgba(166, 98, 28, .09);
}
.content-shell div[style*='width:64px'][style*='height:64px'][style*='border-radius:50px'] img[src*='outfit.php'] {
    position: absolute !important;
    left: -104px !important;
    top: -104px !important;
    bottom: auto !important;
    width: 224px !important;
    max-width: none !important;
    height: 224px !important;
    margin: 0 !important;
    object-fit: contain;
    transform: none !important;
    image-rendering: pixelated;
    filter: drop-shadow(0 7px 7px rgba(0, 0, 0, .5));
}

@media (min-width: 1021px) and (max-width: 1260px) {
    .content-grid { grid-template-columns: 235px minmax(400px, 1fr) 260px; }
    .ranking-player { grid-template-columns: 25px 78px minmax(0, 1fr); min-height: 96px; }
    .ranking-avatar { width: 78px; height: 78px; }
}
@media (max-width: 1020px) {
    .ranking-player { grid-template-columns: 26px 78px minmax(0, 1fr); min-height: 96px; }
    .ranking-avatar { width: 78px; height: 78px; }
}
@media (max-width: 700px) {
    .ranking-player { grid-template-columns: 28px 78px minmax(0, 1fr) 9px; }
    .ranking-avatar { width: 78px; height: 78px; }
}

/* Hall of Fame: show the complete 64x64 outfit canvas without cropping. */
.ranking-card .ranking-player {
    grid-template-columns: 30px 74px minmax(0, 1fr) 9px;
    gap: 10px;
    min-height: 92px;
    padding: 9px 10px;
}

.ranking-card .ranking-avatar {
    width: 74px;
    height: 74px;
    place-items: center;
    overflow: hidden;
    border-radius: 13px;
}

.ranking-card .ranking-avatar img {
    position: static;
    inset: auto;
    width: 64px;
    height: 64px;
    margin: 5px;
    transform: none;
    object-fit: contain;
    object-position: center;
}

.ranking-card .ranking-data strong { font-size: 13px; }
.ranking-card .ranking-data small { font-size: 10px; }

@media (max-width: 1260px) {
    .ranking-card .ranking-list {
        grid-template-columns: repeat(auto-fit, minmax(245px, 1fr));
    }
}

@media (max-width: 700px) {
    .ranking-card .ranking-list { grid-template-columns: 1fr; }
    .ranking-card .ranking-player {
        grid-template-columns: 30px 74px minmax(0, 1fr) 9px;
    }
}

/* ===================== COMPACT FOOTER + RANKING FIX v7 ===================== */
.footer-main { grid-template-columns: minmax(300px, 1.2fr) minmax(300px, .8fr); gap: 38px; padding: 24px 0 18px; }
.footer-logo { width: 46px; height: 46px; flex-basis: 46px; font-size: 21px; border-radius: 13px; }
.footer-brand h2 { margin-bottom: 3px; font-size: 18px; }
.footer-brand p { max-width: 470px; font-size: 10px; line-height: 1.5; }
.footer-links h3 { margin-bottom: 6px; }
.footer-links a { margin: 4px 0; }
.site-footer .footer-bottom { padding: 11px 0 13px; }
.footer-server { display: none !important; }

.ranking-list { padding: 8px 9px; }
.ranking-player {
    grid-template-columns: 28px 58px minmax(0, 1fr) 9px;
    gap: 8px;
    min-height: 76px;
    padding: 7px 6px;
    overflow: visible;
}
.ranking-position {
    display: grid;
    width: 24px;
    height: 24px;
    place-items: center;
    color: #c4b59d;
    background: rgba(214, 160, 74, .08);
    border: 1px solid rgba(214, 160, 74, .12);
    border-radius: 50%;
    font-family: Inter, sans-serif;
    font-size: 10px;
}
.ranking-player:first-child .ranking-position { color: #ffe38a; background: rgba(245, 215, 110, .1); border-color: rgba(245, 215, 110, .2); box-shadow: 0 0 12px rgba(245, 215, 110, .1); }
.ranking-avatar {
    position: relative;
    width: 58px;
    height: 62px;
    overflow: hidden;
    border-radius: 11px;
    background: radial-gradient(circle at 50% 62%, rgba(195, 58, 34, .34), rgba(10, 8, 6, .88) 68%);
}
.ranking-avatar::after { content: ''; position: absolute; left: 9px; right: 9px; bottom: 5px; height: 5px; background: rgba(166, 98, 28, .24); border-radius: 50%; filter: blur(3px); }
.ranking-avatar img {
    position: relative;
    z-index: 1;
    width: 82px;
    max-width: none;
    height: 82px;
    margin: -10px -12px;
    object-fit: contain;
    object-position: center bottom;
    transform: scale(1.25);
    transform-origin: center bottom;
}
.ranking-data strong { color: #f2eadc; font-size: 12px; }
.ranking-data small { color: #a99a83; font-size: 9px; }
.ranking-status { width: 8px; height: 8px; }

@media (min-width: 1021px) and (max-width: 1260px) {
    .ranking-player { grid-template-columns: 24px 52px minmax(0, 1fr); min-height: 72px; }
    .ranking-avatar { width: 52px; height: 58px; }
}
@media (max-width: 900px) {
    .footer-main { grid-template-columns: 1fr 1fr; gap: 24px; }
}
@media (max-width: 620px) {
    .footer-main { grid-template-columns: 1fr; padding: 21px 0 16px; }
    .ranking-player { grid-template-columns: 28px 58px minmax(0, 1fr) 9px; }
}

@media (prefers-reduced-motion: reduce) {
    .menu-links, .side-link, .menu-group summary, .menu-icon, .server-card { animation: none; transition: none; }
}

/* ===================== CONTENT COMPONENTS v3 ===================== */
.amy-section, .amy-news-card, .amy-data-section {
    overflow: hidden;
    margin: 0 0 24px;
    background: linear-gradient(145deg, rgba(24, 18, 12, .96), rgba(11, 9, 6, .98));
    border: 1px solid rgba(214, 160, 74, .16);
    border-radius: 14px;
    box-shadow: 0 14px 38px rgba(0, 0, 0, .24);
}

.amy-section-bar, .amy-data-title {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 58px;
    padding: 10px 17px;
    background: linear-gradient(90deg, rgba(122, 34, 20, .42), rgba(54, 35, 18, .78) 52%, rgba(18, 14, 9, .9));
    border-bottom: 1px solid rgba(240, 205, 120, .2);
}

.amy-section-bar h2, .amy-data-title h2 {
    margin: 0;
    color: #fff0cc;
    font-family: 'Playfair Display', serif;
    font-size: 18px;
    line-height: 1.2;
}

.amy-section-kicker {
    display: block;
    margin-bottom: 2px;
    color: #d6a04a;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.amy-section-icon {
    display: grid;
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    place-items: center;
    color: #f2eadc;
    background: linear-gradient(145deg, #a52d1b, #3b160d);
    border: 1px solid rgba(216, 180, 254, .4);
    border-radius: 9px;
    box-shadow: 0 0 18px rgba(166, 98, 28, .34);
}

.amy-section-line, .amy-data-line { height: 1px; flex: 1; background: linear-gradient(90deg, rgba(240, 205, 120, .38), transparent); }

.amy-ticker-list { padding: 8px 14px 12px; }
.amy-ticker { display: grid; grid-template-columns: 22px 92px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 11px 8px; border-bottom: 1px solid rgba(214, 160, 74, .1); transition: background .2s ease, transform .2s ease; }
.amy-ticker:last-child { border-bottom: 0; }
.amy-ticker:hover { transform: translateX(3px); background: rgba(166, 98, 28, .08); }
.amy-ticker-icon { width: 16px; height: 16px; image-rendering: auto; }
.amy-ticker time { color: #d6a04a; font-size: 12px; font-weight: 700; }
.amy-ticker-body { color: #c8baa4; font-size: 13px; }

.amy-news-card { transition: transform .24s ease, border-color .24s ease, box-shadow .24s ease; }
.amy-news-card:hover { transform: translateY(-2px); border-color: rgba(214, 160, 74, .3); box-shadow: 0 18px 44px rgba(47, 21, 10, .32); }
.amy-news-bar { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 72px; padding: 11px 16px; background: linear-gradient(100deg, rgba(111, 29, 18, .48), rgba(57, 37, 19, .86) 58%, rgba(18, 14, 9, .96)); border-bottom: 1px solid rgba(240, 205, 120, .22); }
.amy-news-leading { display: flex; align-items: center; min-width: 0; gap: 12px; }
.amy-news-icon { width: 38px; height: 38px; object-fit: contain; filter: drop-shadow(0 0 8px rgba(214, 160, 74, .28)); }
.amy-news-bar time { display: block; margin-bottom: 2px; color: #b99a6a; font-size: 11px; font-weight: 700; }
.amy-news-bar h2 { overflow-wrap: anywhere; margin: 0; color: #fff; font: 700 19px/1.2 'Playfair Display', serif; }
.amy-author { display: flex; align-items: center; flex: 0 0 auto; gap: 9px; padding: 7px 10px; background: rgba(8, 7, 5, .34); border: 1px solid rgba(214, 160, 74, .14); border-radius: 10px; }
.amy-author-avatar { display: grid; width: 30px; height: 30px; place-items: center; color: #fff; background: linear-gradient(145deg, #c33a22, #6f1d12); border-radius: 50%; box-shadow: 0 0 14px rgba(166, 98, 28, .34); }
.amy-author small, .amy-author strong { display: block; }
.amy-author small { color: #9e8765; font-size: 9px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.amy-author strong { max-width: 130px; overflow: hidden; color: #f2eadc; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.amy-news-content { padding: 18px 20px 20px; color: #d5c7b0; line-height: 1.7; }
.amy-news-content > :first-child { margin-top: 0; }
.amy-news-content > :last-child { margin-bottom: 0; }
.amy-news-footer { padding: 10px 18px; text-align: right; border-top: 1px solid rgba(214, 160, 74, .1); }
.amy-news-footer a { color: #e6b85e; font-size: 12px; font-weight: 700; }

.amy-featured-body { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 18px; padding: 18px; }
.amy-featured-image { width: 180px; height: 120px; object-fit: cover; border: 1px solid rgba(214, 160, 74, .2); border-radius: 11px; }
.amy-featured-copy h3 { margin: 0 0 8px; color: #fff; font-family: 'Playfair Display', serif; }
.amy-admin-actions { display: flex; gap: 6px; padding: 8px 14px 12px; }

.amy-data-title { min-height: 48px; }
.amy-data-gem { width: 9px; height: 9px; flex: 0 0 9px; transform: rotate(45deg); background: #d6a04a; box-shadow: 0 0 11px rgba(214, 160, 74, .7); }
.amy-data-title h2 { font-family: Inter, sans-serif; font-size: 14px; }
.amy-data-body { overflow-x: auto; padding: 12px; }

/* Kill legacy Tibia beige backgrounds and ornamental wrappers everywhere. */
.content-shell table, .content-shell .myaac-table, .amy-data-body table { width: 100%; border-collapse: separate; border-spacing: 0 !important; color: #d7cbb6; background: transparent !important; }
.content-shell table tr, .content-shell table tr[bgcolor], .content-shell table td[bgcolor], .content-shell .myaac-table > tbody > tr:nth-child(even), .content-shell .myaac-table > tbody > tr:nth-child(odd) { background: transparent !important; }
.content-shell table td, .content-shell table th { padding: 10px 9px !important; border-bottom: 1px solid rgba(214, 160, 74, .1); color: #d7cbb6 !important; }
.content-shell table tr:last-child > td { border-bottom: 0; }
.content-shell table tr:hover > td { background: rgba(166, 98, 28, .08) !important; }
.content-shell table .LabelH, .content-shell table tr.LabelH, .content-shell table thead tr { background: rgba(166, 98, 28, .18) !important; }
.content-shell table .LabelH td, .content-shell table tr.LabelH td, .content-shell table thead th, .content-shell table thead td { color: #f0cd78 !important; font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.content-shell .LabelV, .content-shell .LabelV150 { width: 230px; color: #c4ad88 !important; }
.content-shell input[type='text'], .content-shell input[type='password'], .content-shell input[type='email'], .content-shell select, .content-shell textarea { color: #f2eadc !important; background: #0f0c08 !important; border: 1px solid rgba(214, 160, 74, .26) !important; border-radius: 8px; }
.content-shell input:focus, .content-shell select:focus, .content-shell textarea:focus { border-color: #c33a22 !important; box-shadow: 0 0 0 3px rgba(166, 98, 28, .14) !important; outline: none; }
.content-shell input[type='submit'], .content-shell button:not(.nav-toggle), .amy-admin-actions a { color: #fff !important; background: linear-gradient(135deg, #a52d1b, #6f1d12) !important; border: 1px solid rgba(240, 205, 120, .22) !important; border-radius: 8px !important; box-shadow: 0 6px 16px rgba(111, 29, 18, .24); transition: transform .18s ease, filter .18s ease; }
.content-shell input[type='submit']:hover, .content-shell button:hover, .amy-admin-actions a:hover { transform: translateY(-2px); filter: brightness(1.14); }

@media (max-width: 700px) {
    .amy-news-bar { align-items: flex-start; flex-direction: column; }
    .amy-author { align-self: stretch; }
    .amy-ticker { grid-template-columns: 22px 1fr; }
    .amy-ticker time { grid-column: 2; }
    .amy-ticker-body { grid-column: 1 / -1; }
    .amy-featured-body { grid-template-columns: 1fr; }
    .amy-featured-image { width: 100%; height: 170px; }
    .content-shell .LabelV, .content-shell .LabelV150 { width: auto; }
}

/* ===================== BRIGHTER BACKDROP + FOOTER v6 ===================== */
body {
    background-image:
        linear-gradient(180deg, rgba(7, 6, 4, .16), rgba(7, 5, 12, .34) 58%, rgba(6, 5, 11, .56)),
        radial-gradient(ellipse 58% 62% at 50% 22%, rgba(12, 9, 22, .28), rgba(6, 5, 4, .2)),
        url('../images/trigalia-world-bg-v2.png');
}
body::before { background: linear-gradient(90deg, rgba(3, 3, 8, .02), transparent 22%, transparent 78%, rgba(3, 3, 8, .02)); }

.site-footer {
    position: relative;
    margin-top: 28px;
    color: #a99a83;
    background:
        radial-gradient(circle at 15% 0, rgba(166, 98, 28, .14), transparent 32%),
        linear-gradient(180deg, rgba(18, 14, 9, .95), rgba(8, 6, 14, .99));
    border-top: 1px solid rgba(214, 160, 74, .23);
    box-shadow: 0 -18px 60px rgba(0, 0, 0, .28);
    backdrop-filter: blur(14px);
}
.site-footer::before { content: ''; position: absolute; top: -1px; left: 12%; right: 12%; height: 1px; background: linear-gradient(90deg, transparent, rgba(214, 160, 74, .75), transparent); box-shadow: 0 0 16px rgba(166, 98, 28, .45); }
.footer-main { display: grid; grid-template-columns: minmax(300px, 1.35fr) minmax(300px, 1fr) 190px; align-items: center; gap: 50px; padding: 38px 0 30px; }
.footer-brand { display: flex; align-items: center; gap: 16px; }
.footer-logo { display: grid; width: 54px; height: 54px; flex: 0 0 54px; place-items: center; color: #fff; font: 700 24px 'Playfair Display', serif; background: linear-gradient(145deg, #c33a22, #3b160d); border: 1px solid rgba(221, 214, 254, .3); border-radius: 15px; box-shadow: 0 0 28px rgba(166, 98, 28, .35); }
.footer-brand h2 { margin: 0 0 6px; color: #fff; font: 700 21px 'Playfair Display', serif; }
.footer-brand p { max-width: 430px; margin: 0; color: #978870; font-size: 11px; line-height: 1.65; }
.footer-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.footer-links h3 { margin: 0 0 10px; color: #d5c7b0; font-family: Inter, sans-serif; font-size: 10px; letter-spacing: .13em; text-transform: uppercase; }
.footer-links a { display: block; width: fit-content; margin: 6px 0; color: #8f806a; font-size: 10px; transition: color .18s ease, transform .18s ease; }
.footer-links a:hover { color: #f0cd78; transform: translateX(3px); }
.footer-server { padding: 15px; text-align: center; background: rgba(8, 6, 14, .35); border: 1px solid rgba(214, 160, 74, .13); border-radius: 13px; }
.footer-status { display: flex; align-items: center; justify-content: center; gap: 6px; color: #9e8e75; font-size: 9px; font-weight: 700; text-transform: uppercase; }
.footer-status i { width: 7px; height: 7px; background: #6b6373; border-radius: 50%; }
.footer-status i.online { background: #34d399; box-shadow: 0 0 8px rgba(52, 211, 153, .7); }
.footer-server strong { display: block; margin: 7px 0 0; color: #fff; font: 700 28px 'Playfair Display', serif; }
.footer-server small { display: block; color: #857864; font-size: 9px; }
.footer-server a { display: inline-block; margin-top: 9px; color: #e6b85e; font-size: 9px; font-weight: 700; }
.site-footer .footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 15px 0 18px; border-top: 1px solid rgba(214, 160, 74, .1); color: #746957; font-size: 9px; }
.site-footer .credits { display: flex; align-items: center; flex-wrap: wrap; gap: 7px 14px; }
.site-footer .credits strong { color: #9b90aa; }
.site-footer .credits span { color: #746957; }
.site-footer .credits br { display: none; }
.site-footer .theme-credit { display: flex; align-items: center; gap: 6px; color: #8f806a; white-space: nowrap; }
.footer-gem { color: #d6a04a; text-shadow: 0 0 8px rgba(214, 160, 74, .65); }

@media (max-width: 900px) {
    .footer-main { grid-template-columns: 1fr 1fr; gap: 28px; }
    .footer-server { grid-column: 1 / -1; display: grid; grid-template-columns: auto auto auto 1fr; align-items: center; gap: 12px; text-align: left; }
    .footer-server strong, .footer-server small, .footer-server a { margin: 0; }
    .footer-server a { justify-self: end; }
}
@media (max-width: 620px) {
    .footer-main { grid-template-columns: 1fr; padding: 28px 0 22px; }
    .footer-links { grid-template-columns: 1fr 1fr; }
    .footer-server { grid-column: 1; grid-template-columns: auto 1fr; text-align: left; }
    .footer-server small { display: none; }
    .footer-server a { grid-column: 1 / -1; justify-self: stretch; text-align: center; }
    .site-footer .footer-bottom { align-items: flex-start; flex-direction: column; }
}

/* ===================== FANTASY BACKDROP + STABLE SIDEBARS v5 ===================== */
html { background: #080706; }
body {
    position: relative;
    min-height: 100vh;
    background-image:
        linear-gradient(180deg, rgba(7, 6, 4, .42), rgba(7, 5, 12, .72) 55%, rgba(6, 5, 11, .88)),
        radial-gradient(ellipse 70% 65% at 50% 20%, rgba(14, 10, 6, .18), rgba(6, 5, 4, .62)),
        url('../images/trigalia-world-bg-v2.png');
    background-color: #080706;
    background-position: center top;
    background-repeat: no-repeat;
    background-size: cover;
    background-attachment: fixed;
}
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background: linear-gradient(90deg, rgba(3, 3, 8, .08), transparent 18%, transparent 82%, rgba(3, 3, 8, .08));
}
.page-wrapper { max-width: 1500px; }
.top-bar, .main-nav { backdrop-filter: blur(12px); }
.site-header { background: linear-gradient(180deg, rgba(18, 14, 9, .88), rgba(12, 10, 7, .78)); backdrop-filter: blur(10px); }
.content-shell, .side-menu, .server-card, .ranking-card, .quick-card { backdrop-filter: blur(10px); }

.sidebar-left, .right-sidebar {
    align-self: start;
    height: max-content;
    max-height: calc(100vh - 36px);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: rgba(195, 58, 34, .45) transparent;
}
.right-sidebar { position: sticky; top: 18px; }
.right-sidebar > * { flex: 0 0 auto; }
.ranking-player { min-height: 68px; }
.ranking-avatar { width: 46px; height: 58px; overflow: visible; background: radial-gradient(circle at 50% 62%, rgba(166, 98, 28, .3), rgba(11, 9, 6, .84) 66%); }
.ranking-avatar img { display: block; width: 64px; max-width: none; height: 64px; margin: -5px -9px -1px; object-fit: contain; object-position: center bottom; image-rendering: pixelated; filter: drop-shadow(0 4px 5px rgba(0, 0, 0, .55)); }
.ranking-player { grid-template-columns: 25px 46px minmax(0, 1fr) 8px; }

@media (min-width: 1021px) and (max-width: 1260px) {
    .content-grid { grid-template-columns: 235px minmax(400px, 1fr) 205px; gap: 16px; }
    .right-sidebar { grid-column: 3; position: sticky; display: flex; }
    .ranking-list { display: block; }
    .ranking-player { grid-template-columns: 21px 42px minmax(0, 1fr); }
    .ranking-avatar { width: 42px; }
    .ranking-status { display: none; }
}
@media (max-width: 1020px) {
    .content-grid { grid-template-columns: 245px minmax(0, 1fr); }
    .right-sidebar { grid-column: 1 / -1; position: static; display: grid; grid-template-columns: minmax(0, 1fr) 230px; max-height: none; overflow: visible; }
    .ranking-list { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
    .ranking-player { grid-template-columns: 20px 42px minmax(0, 1fr); }
    .ranking-status { display: none; }
}
@media (max-width: 860px) {
    body { background-position: 35% top; background-size: auto 100vh; }
    .sidebar-left { max-height: none; overflow: visible; }
    .right-sidebar { grid-column: 1; }
}
@media (max-width: 700px) {
    body { background-attachment: scroll; }
    .right-sidebar { grid-template-columns: 1fr; }
    .ranking-list { grid-template-columns: 1fr; }
    .ranking-player { grid-template-columns: 25px 46px minmax(0, 1fr) 8px; }
    .ranking-status { display: block; }
}

/* ===================== THREE-COLUMN LAYOUT + PAGE BARS v4 ===================== */
.content-grid { grid-template-columns: 270px minmax(0, 1fr) 230px; gap: 22px; }
.right-sidebar { grid-column: 3; display: flex; flex-direction: column; gap: 18px; position: sticky; top: 18px; }

.page-section-bar {
    display: flex;
    align-items: center;
    gap: 13px;
    min-height: 74px;
    margin: -22px -22px 22px;
    padding: 12px 18px;
    background: linear-gradient(96deg, rgba(122, 34, 20, .5), rgba(42, 30, 60, .86) 55%, rgba(18, 14, 9, .95));
    border-bottom: 1px solid rgba(240, 205, 120, .22);
}
.page-section-icon { display: grid; width: 38px; height: 38px; flex: 0 0 38px; place-items: center; color: #fff; font-size: 18px; background: linear-gradient(145deg, #c33a22, #6f1d12); border: 1px solid rgba(221, 214, 254, .35); border-radius: 11px; box-shadow: 0 0 20px rgba(166, 98, 28, .36); }
.page-section-kicker { display: block; color: #d6a04a; font-size: 9px; font-weight: 800; letter-spacing: .17em; text-transform: uppercase; }
.page-section-bar h1 { margin: 1px 0 0; color: #fff; font: 700 21px/1.15 'Playfair Display', serif; }
.page-section-bar p { margin: 3px 0 0; color: #b3a58e; font-size: 11px; }
.page-section-line { height: 1px; flex: 1; background: linear-gradient(90deg, rgba(240, 205, 120, .35), transparent); }

.ranking-card, .quick-card { overflow: hidden; background: linear-gradient(155deg, rgba(24, 18, 12, .98), rgba(10, 8, 6, .99)); border: 1px solid rgba(214, 160, 74, .2); border-radius: 15px; box-shadow: 0 16px 44px rgba(0, 0, 0, .34); }
.ranking-head { display: flex; align-items: center; gap: 10px; padding: 13px; background: linear-gradient(110deg, rgba(166, 98, 28, .42), rgba(31, 23, 14, .92)); border-bottom: 1px solid rgba(240, 205, 120, .18); }
.ranking-crown { display: grid; width: 34px; height: 34px; place-items: center; color: #f5d76e; font-size: 19px; background: rgba(8, 7, 5, .42); border: 1px solid rgba(245, 215, 110, .2); border-radius: 10px; filter: drop-shadow(0 0 7px rgba(245, 215, 110, .25)); }
.ranking-head small { display: block; color: #d6a04a; font-size: 8px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.ranking-head h2 { margin: 1px 0 0; color: #fff; font: 700 17px/1.1 'Playfair Display', serif; }
.ranking-list { padding: 7px; }
.ranking-player { display: grid; grid-template-columns: 25px 38px minmax(0, 1fr) 8px; align-items: center; gap: 7px; min-height: 53px; padding: 6px; color: #d5c7b0; border-radius: 9px; transition: transform .2s ease, background .2s ease; }
.ranking-player + .ranking-player { border-top: 1px solid rgba(214, 160, 74, .08); }
.ranking-player:hover { color: #fff; transform: translateX(3px) scale(1.01); background: rgba(166, 98, 28, .13); }
.ranking-position { color: #978870; font: 700 12px 'Playfair Display', serif; text-align: center; }
.ranking-player:first-child .ranking-position { color: #f5d76e; }
.ranking-avatar { display: grid; width: 38px; height: 38px; place-items: center; overflow: hidden; color: #f0cd78; background: radial-gradient(circle, rgba(166, 98, 28, .28), rgba(11, 9, 6, .8)); border: 1px solid rgba(214, 160, 74, .14); border-radius: 9px; }
.ranking-avatar img { width: 54px; height: 54px; object-fit: contain; image-rendering: pixelated; }
.ranking-data { min-width: 0; }
.ranking-data strong, .ranking-data small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ranking-data strong { color: inherit; font-size: 11px; }
.ranking-data small { margin-top: 2px; color: #978870; font-size: 9px; }
.ranking-status { width: 7px; height: 7px; background: #5f566c; border-radius: 50%; }
.ranking-status.online { background: #34d399; box-shadow: 0 0 8px rgba(52, 211, 153, .65); }
.ranking-card footer { padding: 9px 12px; text-align: right; border-top: 1px solid rgba(214, 160, 74, .1); }
.ranking-card footer a { color: #e6b85e; font-size: 10px; font-weight: 700; }
.quick-card { padding: 17px; text-align: center; }
.quick-gem { display: grid; width: 35px; height: 35px; margin: 0 auto 9px; place-items: center; color: #fff; background: #9a6a2a; border-radius: 10px; box-shadow: 0 0 18px rgba(166, 98, 28, .35); }
.quick-card h3 { margin: 0 0 5px; color: #fff; font: 700 16px 'Playfair Display', serif; }
.quick-card p { margin: 0 0 13px; color: #9e8e75; font-size: 10px; line-height: 1.5; }

.amy-archive-list, .amy-change-list { padding: 8px 14px 13px; }

/* Sidebar widgets: keep cards intact and reset legacy outfit sprite offsets. */
.sidebar-left > .server-card {
    flex: 0 0 auto;
    min-height: max-content;
}

.sidebar-left > .server-card .online-count-hero {
    flex: 0 0 auto;
}

.ranking-card .ranking-avatar {
    position: relative;
    overflow: hidden;
}

.ranking-card .ranking-avatar img {
    position: static;
    inset: auto;
    display: block;
    width: 64px;
    max-width: none;
    height: 64px;
    margin: -5px;
    object-fit: contain;
    object-position: center;
    transform: none;
    image-rendering: pixelated;
    filter: drop-shadow(0 4px 5px rgba(0, 0, 0, .55));
}
.amy-archive-row { display: grid; grid-template-columns: 22px 92px minmax(0, 1fr) 18px; align-items: center; gap: 10px; min-height: 48px; padding: 8px; color: #d5c7b0; border-bottom: 1px solid rgba(214, 160, 74, .1); border-radius: 8px; transition: transform .18s ease, background .18s ease; }
.amy-archive-row:hover { color: #fff; transform: translateX(4px); background: rgba(166, 98, 28, .1); }
.amy-archive-row img { width: 16px; height: 16px; }
.amy-archive-row time, .amy-change-row time { color: #d6a04a; font-size: 11px; font-weight: 700; }
.amy-archive-row strong { font-size: 13px; }
.amy-change-row { display: grid; grid-template-columns: 46px 86px minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 54px; padding: 9px; color: #d5c7b0; border-bottom: 1px solid rgba(214, 160, 74, .1); }
.amy-change-row:hover { background: rgba(166, 98, 28, .08); }
.amy-change-icons { display: flex; align-items: center; gap: 6px; }
.amy-change-icons img { width: 16px; height: 16px; object-fit: contain; }
.amy-pagination { display: flex; justify-content: space-between; padding: 10px 16px; border-top: 1px solid rgba(214, 160, 74, .1); }

@media (max-width: 1260px) {
    .content-grid { grid-template-columns: 255px minmax(0, 1fr); }
    .right-sidebar { grid-column: 1 / -1; position: static; display: grid; grid-template-columns: minmax(0, 1fr) 230px; }
    .ranking-list { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
    .ranking-player { grid-template-columns: 22px 34px minmax(0, 1fr); }
    .ranking-status { display: none; }
}
@media (max-width: 860px) {
    .content-grid { grid-template-columns: 1fr; }
    .right-sidebar { grid-column: 1; order: 3; }
    .main-column { grid-column: 1; }
}
@media (max-width: 700px) {
    .page-section-bar { margin: -14px -14px 16px; }
    .page-section-line, .page-section-bar p { display: none; }
    .right-sidebar { grid-template-columns: 1fr; }
    .ranking-list { grid-template-columns: 1fr; }
    .ranking-player { grid-template-columns: 25px 38px minmax(0, 1fr) 8px; }
    .ranking-status { display: block; }
    .amy-archive-row { grid-template-columns: 22px 75px minmax(0, 1fr); }
    .amy-archive-row > span:last-child { display: none; }
    .amy-change-row { grid-template-columns: 40px minmax(0, 1fr); }
    .amy-change-row time, .amy-change-row > div { grid-column: 2; }
}

/* Final Hall of Fame sizing override (must stay last). */
.ranking-card .ranking-player {
    grid-template-columns: 30px 74px minmax(0, 1fr) 9px;
    gap: 10px;
    min-height: 92px;
    padding: 9px 10px;
}
.ranking-card .ranking-avatar {
    width: 74px;
    height: 74px;
    place-items: center;
    overflow: hidden;
    border-radius: 13px;
}
.ranking-card .ranking-avatar img {
    position: static;
    inset: auto;
    display: block;
    width: 64px;
    max-width: none;
    height: 64px;
    margin: 5px;
    transform: none;
    object-fit: contain;
    object-position: center;
}
.ranking-card .ranking-data strong { font-size: 13px; }
.ranking-card .ranking-data small { font-size: 10px; }
@media (max-width: 1260px) {
    .ranking-card .ranking-list { grid-template-columns: repeat(auto-fit, minmax(245px, 1fr)); }
}
@media (max-width: 700px) {
    .ranking-card .ranking-list { grid-template-columns: 1fr; }
    .ranking-card .ranking-player { grid-template-columns: 30px 74px minmax(0, 1fr) 9px; }
}

/* Hall of Fame card width and visual sprite centering. */
@media (min-width: 1261px) {
    .content-grid {
        grid-template-columns: 270px minmax(0, 1fr) 340px;
    }
}
.ranking-card .ranking-avatar img {
    margin: 5px;
    transform: translate(-14px, -14px);
}
.ranking-card .ranking-data small {
    overflow: visible;
    text-overflow: clip;
    white-space: nowrap;
}

/* ======================== TRIGALIA BRAND SYSTEM ======================== */
:root {
    --bg-base: #070706;
    --bg-elevated: #0d0b09;
    --bg-surface: #15110d;
    --bg-surface-alt: #1c160f;
    --bg-surface-hover: #282015;
    --bg-input: #0f0c09;
    --accent-900: #3b160d;
    --accent-700: #7b2415;
    --accent-600: #a52d1b;
    --accent-500: #c33a22;
    --accent-400: #d6a04a;
    --accent-300: #f0cd78;
    --accent-glow: rgba(196, 51, 27, .34);
    --text-primary: #f2eadc;
    --text-secondary: #c4b59d;
    --text-muted: #857864;
    --text-on-accent: #fff6e8;
    --border-subtle: #33281b;
    --border-strong: #554126;
    --border-accent: #9a6a2a;
}

html { background: #070706; }
body {
    background-image:
        linear-gradient(180deg, rgba(6, 5, 4, .48), rgba(8, 6, 4, .78) 55%, #070706 96%),
        radial-gradient(ellipse 62% 48% at 50% 8%, rgba(171, 111, 35, .17), transparent 70%),
        url('../images/trigalia-world-bg-v2.png');
    background-color: #070706;
}
body::before { background: linear-gradient(90deg, rgba(0,0,0,.3), transparent 22%, transparent 78%, rgba(0,0,0,.3)); }
a { color: #d6a04a; }
a:hover { color: #f0cd78; text-shadow: 0 0 12px rgba(214,160,74,.35); }
.top-bar, .main-nav { background: rgba(10, 8, 6, .92); border-color: rgba(180,126,51,.25); }
.site-header {
    background:
        radial-gradient(ellipse 42% 160% at 12% 20%, rgba(165,45,27,.18), transparent 65%),
        linear-gradient(180deg, rgba(20,16,11,.96), rgba(9,8,6,.9));
    border-bottom-color: rgba(194,139,60,.36);
}
.brand-logo, .footer-logo {
    position: relative;
    overflow: hidden;
    color: #f5d88a;
    background: radial-gradient(circle at 50% 40%, #332318, #090807 72%);
    border: 1px solid #a87532;
    border-radius: 50%;
    box-shadow: 0 0 0 3px #17110b, 0 0 0 4px #65431f, 0 0 24px rgba(190,47,24,.28), inset 0 0 16px #000;
}
.brand-logo::before, .footer-logo::before { content: ''; position: absolute; inset: 7px; border: 1px solid rgba(225,174,91,.48); border-radius: 50%; }
.brand-logo span, .footer-logo { font-family: 'Playfair Display', Georgia, serif; font-weight: 700; text-shadow: 0 2px 2px #000, 0 0 8px rgba(219,158,66,.52); }
.brand-text .brand-name { color: #e4b65f; letter-spacing: .08em; text-transform: uppercase; text-shadow: 0 2px 2px #000, 0 0 18px rgba(181,117,38,.25); }
.brand-text .brand-tagline { color: #9e8765; letter-spacing: .2em; }
.main-nav a.nav-link:hover { background: rgba(183,126,43,.09); border-bottom-color: #c9933f; }
.btn-primary, .content-shell input[type='submit'], .content-shell button:not(.nav-toggle), .amy-admin-actions a {
    color: #fff4df !important;
    background: linear-gradient(135deg, #b78234, #6c421b 58%, #8d2014) !important;
    border-color: rgba(242,200,112,.34) !important;
    box-shadow: 0 6px 18px rgba(55,22,9,.48), inset 0 1px rgba(255,225,160,.18);
}
.btn-ghost:hover { border-color: #b98239; color: #efc66e; }
.content-shell, .side-menu, .server-card, .ranking-card, .quick-card, .panel {
    background: linear-gradient(155deg, rgba(26,20,14,.97), rgba(9,8,6,.98));
    border-color: rgba(184,129,54,.24);
    box-shadow: 0 18px 50px rgba(0,0,0,.48), inset 0 1px rgba(255,225,160,.025);
}
.page-section-bar, .ranking-head, .CaptionContainer {
    background: linear-gradient(100deg, rgba(122,34,20,.72), rgba(67,42,20,.74) 52%, rgba(16,13,9,.96));
    border-color: rgba(226,174,84,.28);
}
.page-section-icon, .quick-gem { background: linear-gradient(145deg, #c58c38, #673817 62%, #941f13); border-color: rgba(247,208,126,.38); box-shadow: 0 0 20px rgba(181,52,27,.32); }
.page-section-kicker, .ranking-head small, .panel-header h3 { color: #e6b85e; }
.page-section-line { background: linear-gradient(90deg, rgba(224,173,83,.42), transparent); }
.ranking-crown { color: #f2c766; border-color: rgba(242,199,102,.25); }
.ranking-player + .ranking-player, .content-shell table td, .content-shell table th { border-color: rgba(210,157,70,.1); }
.ranking-player:hover, .content-shell table tr:hover > td { background: rgba(174,103,31,.1) !important; }
.ranking-avatar { background: radial-gradient(circle, rgba(166,101,34,.25), rgba(10,8,6,.9)); border-color: rgba(208,153,64,.18); }
.online-count-hero .count { color: #e7bc66; text-shadow: 0 0 22px rgba(177,104,30,.36); }
.side-link.active { color: #f0cb78; background: linear-gradient(90deg, rgba(155,43,24,.23), rgba(182,119,42,.08)); }
.content-shell input[type='text'], .content-shell input[type='password'], .content-shell input[type='email'], .content-shell select, .content-shell textarea { background: #0e0b08 !important; border-color: rgba(190,138,58,.29) !important; }
.content-shell input:focus, .content-shell select:focus, .content-shell textarea:focus { border-color: #b98239 !important; box-shadow: 0 0 0 3px rgba(185,130,57,.14) !important; }
.site-footer {
    background: radial-gradient(circle at 15% 0, rgba(142,36,20,.16), transparent 35%), linear-gradient(180deg, rgba(18,14,10,.97), #070706);
    border-top-color: rgba(197,142,61,.28);
}
.site-footer::before { background: linear-gradient(90deg, transparent, rgba(225,171,77,.68), #a62918, rgba(225,171,77,.68), transparent); box-shadow: 0 0 16px rgba(173,49,25,.34); }
.footer-brand h2, .footer-links h3 { color: #e1b45d; }
.footer-gem { color: #b72f1c; text-shadow: 0 0 9px rgba(201,44,24,.7); }
::-webkit-scrollbar-thumb { background: #50371e; }
::-webkit-scrollbar-thumb:hover { background: #9a6a2a; }

/* Final Trigalia cleanup: covers legacy MyAAC/Trigalia components. */
.site-header { padding: 4px 0 0; overflow: visible; }
.site-header .header-inner { min-height: 142px; padding-top: 4px; padding-bottom: 4px; position: relative; justify-content: flex-start; }
.trigalia-brand { align-self: stretch; display: flex; align-items: center; justify-content: center; width: 292px; min-width: 292px; }
.site-header .header-cta { position: absolute; right: 20px; top: 50%; transform: translateY(-50%); }
.trigalia-header-logo { display: block; width: 174px; height: 174px; max-width: none; object-fit: contain; filter: drop-shadow(0 10px 20px rgba(0,0,0,.72)) drop-shadow(0 0 12px rgba(185,48,25,.2)); }

.menu-group,
.menu-group summary,
.amy-data-card,
.amy-data-title,
.amy-news-card,
.amy-news-bar,
.amy-featured,
.TableContainer,
.CaptionContainer,
.InnerTableContainer,
.TableContentAndRightShadow,
.TableContentContainer {
    border-color: rgba(190,138,58,.24) !important;
}
.menu-group summary,
.amy-data-title,
.amy-news-bar,
.CaptionContainer {
    background: linear-gradient(100deg, rgba(122,34,20,.68), rgba(73,45,21,.72) 54%, rgba(16,13,9,.96)) !important;
}
.menu-group[open] summary { background: linear-gradient(100deg, rgba(112,55,23,.7), rgba(31,23,14,.94)) !important; }
.menu-group summary,
.menu-group summary span,
.menu-group[open] .menu-chevron,
.amy-section-kicker,
.amy-data-title,
.amy-data-title h2,
.amy-ticker time,
.amy-archive-row time,
.amy-change-row time,
.content-shell table .LabelH td,
.content-shell table tr.LabelH td,
.content-shell table thead th,
.content-shell table thead td { color: #f0cd78 !important; }
.menu-icon,
.amy-data-gem { color: #f0cd78 !important; filter: drop-shadow(0 0 7px rgba(214,160,74,.45)); }
.amy-data-gem { background: #c33a22 !important; box-shadow: 0 0 11px rgba(195,58,34,.65) !important; }
.side-link:hover,
.side-link.active,
.amy-ticker:hover,
.amy-archive-row:hover,
.amy-change-row:hover,
.content-shell table tr:hover > td { background: rgba(166,98,28,.12) !important; }
.side-link.active { color: #fff0cc !important; box-shadow: inset 3px 0 #c33a22; }
.link-arrow { color: #e6b85e !important; }
.content-shell table .LabelH,
.content-shell table tr.LabelH,
.content-shell table thead tr { background: rgba(145,78,25,.22) !important; }
.amy-section-line,
.amy-data-line { background: linear-gradient(90deg, rgba(224,173,83,.42), transparent) !important; }
.amy-author-avatar { background: linear-gradient(145deg, #c58c38, #8d2014) !important; box-shadow: 0 0 14px rgba(195,58,34,.34) !important; }
.amy-news-icon { filter: drop-shadow(0 0 8px rgba(214,160,74,.28)) !important; }
.amy-featured-image { border-color: rgba(190,138,58,.25) !important; }
.ranking-card footer a,
.footer-server a { color: #e6b85e !important; }

@media (max-width: 860px) {
    .site-header .header-inner { min-height: 112px; flex-wrap: nowrap; }
    .trigalia-brand { width: 100%; min-width: 0; }
    .site-header .header-cta { display: none; }
    .trigalia-header-logo { width: 132px; height: 132px; }

    /* Keep expanded menu groups reachable on short/mobile viewports. */
    .sidebar-left {
        max-height: calc(100vh - 24px);
        max-height: calc(100dvh - 24px);
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior-y: auto;
        scrollbar-gutter: stable;
        touch-action: pan-y;
        -webkit-overflow-scrolling: touch;
    }
}

/* The complete navigation must participate in the page height. */
.sidebar-left {
    position: static;
    max-height: none;
    overflow: visible;
    overscroll-behavior: auto;
    scrollbar-gutter: auto;
    touch-action: auto;
}
