/*
 * Animated Fluent - Vudira Edition overlay
 * Loaded AFTER theme.css. Adds the visual identity of the original
 * animated-fluent theme (sourcebans.vudira.com) on top of the SourceBans++ 2.0
 * chrome: particle canvas, Poppins typography, glass surfaces,
 * brand accent, language switcher and the dashboard button grid.
 */

/* === Typography === */
body,
.sidebar,
.card,
button,
input,
select,
textarea {
    font-family: 'Poppins', 'Inter', system-ui, -apple-system, sans-serif;
}

/* === Brand accent (Vudira amber) === */
:root {
    --af-accent: #BA6F00;
    --af-accent-soft: rgba(186, 111, 0, 0.18);
    --af-accent-text: #ffb84d;
    --brand-500: #d98a1a;
    --brand-600: #BA6F00;
    --brand-700: #9a5c00;
    --accent-soft: rgba(186, 111, 0, 0.12);
}
html.dark {
    --accent: #d98a1a;
    --accent-hover: #ffb84d;
    --accent-soft: rgba(186, 111, 0, 0.22);
}

/* === Skip link (WCAG) === */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 100;
    background: var(--accent, #BA6F00);
    color: #fff;
    padding: 8px 14px;
    border-radius: 0 0 8px 0;
    font-weight: 600;
}
.skip-link:focus {
    left: 0;
}

/* === Particle canvas === */
#particles-js {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}
#particles-js canvas {
    display: block;
}
.app {
    position: relative;
}

/* === Glass surfaces (dark mode) === */
html.dark .card,
html.dark .sidebar {
    background: rgba(17, 17, 22, 0.82);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-color: rgba(255, 255, 255, 0.08);
}

/* === Mobile drawer === */
@media (max-width: 1024px) {
    .sidebar.is-open {
        width: min(15rem, 85vw);
        height: 100dvh;
        z-index: 41;
    }
    html.dark .sidebar.is-open {
        background: rgba(15, 15, 20, 0.97);
    }
}
@media (max-width: 640px) {
    .topbar { padding: 0 0.75rem; }
    .topbar__breadcrumbs { min-width: 0; overflow: hidden; }
    .topbar__breadcrumbs a:not([aria-current]),
    .topbar__breadcrumbs i,
    .topbar__breadcrumbs svg { display: none; }
    .topbar__breadcrumbs [aria-current] {
        display: block;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}
html.dark body {
    background:
        radial-gradient(1200px 600px at 80% -10%, rgba(186, 111, 0, 0.12), transparent 60%),
        radial-gradient(900px 500px at -10% 110%, rgba(186, 111, 0, 0.08), transparent 55%),
        var(--bg-page, #09090b);
}

/* === Sidebar brand block (text-only, logo removed) === */
.sidebar__brand {
    align-items: center;
    min-width: 0;
    overflow: hidden;
}
.sidebar__brand > div {
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
}
.sidebar__brand .font-semibold {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sidebar__brand-tagline {
    font-size: 0.68rem;
    line-height: 1.25;
    color: var(--text-faint, #9ca3af);
    margin-top: 2px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* === Language switcher (inline in the topbar, next to the theme toggle) === */
#lang-switcher {
    position: relative;
    font-family: inherit;
    flex: 0 0 auto;
}
.lang-switcher-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: transparent;
    color: var(--text, #fff);
    border: 1px solid var(--border, rgba(255, 255, 255, 0.12));
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
    line-height: 1;
}
.lang-switcher-btn:hover { background: var(--bg-hover, rgba(255, 255, 255, 0.06)); }
.lang-switcher-btn:active { transform: scale(0.97); }
.lang-switcher-btn[aria-expanded="true"] { background: var(--bg-hover, rgba(255, 255, 255, 0.08)); }
.lang-switcher-flag { font-size: 16px; line-height: 1; }
.lang-switcher-label { font-weight: 600; letter-spacing: 0.3px; }
.lang-switcher-arrow { font-size: 9px; opacity: 0.7; }
#lang-switcher-menu {
    position: absolute;
    top: 100%;
    right: 0;
    z-index: 1100;
    margin: 6px 0 0 0;
    padding: 4px;
    list-style: none;
    min-width: 180px;
    background: var(--bg-surface, rgba(17, 17, 17, 0.98));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border, rgba(255, 255, 255, 0.12));
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}
#lang-switcher-menu[hidden] { display: none !important; }
#lang-switcher-menu li { margin: 0; padding: 0; list-style: none; }
#lang-switcher-menu a {
    display: flex !important;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    color: var(--text, #e8e8e8) !important;
    text-decoration: none !important;
    border-radius: 4px;
    font-size: 13px;
    line-height: 1.2;
    transition: background 0.1s;
    cursor: pointer;
}
#lang-switcher-menu a:hover,
#lang-switcher-menu a:focus {
    background: var(--bg-hover, rgba(255, 255, 255, 0.08));
    outline: none;
}
#lang-switcher-menu a[aria-current="true"] {
    background: var(--af-accent-soft);
    color: var(--af-accent-text) !important;
    font-weight: 600;
}
#lang-switcher-menu .f { font-size: 15px; line-height: 1; }
/* Mobile: keep only the flag + arrow so the topbar row (hamburger,
   breadcrumb, search, language, theme toggle) fits without wrapping. */
@media screen and (max-width: 768px) {
    .lang-switcher-label { display: none; }
    .lang-switcher-btn { padding: 6px 8px; }
}

/* === Dashboard button grid (ported from the old home page) === */
.dashboard-buttons-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}
.dashboard-btn,
.dashboard-buttons-grid a {
    padding: 12px 10px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.3px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7), 0 0 12px rgba(0, 0, 0, 0.45);
}
.dashboard-btn:hover { transform: translateY(-2px); filter: brightness(1.08); }
.dashboard-btn span,
.dashboard-buttons-grid a span {
    font-size: 16px;
    margin-right: 7px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}
@media screen and (max-width: 980px) {
    .dashboard-buttons-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media screen and (max-width: 480px) {
    .dashboard-buttons-grid { grid-template-columns: 1fr; }
    .dashboard-hero .dashboard-title { font-size: 1.4rem !important; }
    .dashboard-hero .dashboard-hero-text { font-size: 13px !important; }
    .dashboard-hero img { max-width: 60px !important; }
}

/* === Legacy sb_button styling (input.btn from the ported plugin) === */
input.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0.9rem;
    border-radius: 8px;
    border: 1px solid var(--border, rgba(255, 255, 255, 0.12));
    background: var(--af-accent);
    color: #fff;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: filter 0.15s, transform 0.1s;
}
input.btn:hover { filter: brightness(1.1); }
input.btn:active { transform: scale(0.98); }
input.btn.ok { background: var(--af-accent); }

/* === Steam login image button === */
.steam-login-img {
    display: inline-block;
    line-height: 0;
    transition: filter 0.15s, transform 0.1s;
}
.steam-login-img:hover { filter: brightness(1.1); }
.steam-login-img:active { transform: scale(0.98); }
.steam-login-img img { border-radius: 6px; }

/* Respect reduced-motion: the particle loader already skips itself,
   this covers the CSS transitions too. */
@media (prefers-reduced-motion: reduce) {
    .dashboard-btn, input.btn, .lang-switcher-btn, .steam-login-img {
        transition: none;
    }
}

/* === Footer legal block === */
.af-footer-legal {
    flex-basis: 100%;
    width: 100%;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border, rgba(255, 255, 255, 0.08));
    text-align: center;
}
.af-footer-legal p {
    margin: 0 auto 6px;
    max-width: min(1280px, 94%);
    font-size: 12px;
    line-height: 1.6;
    color: var(--text-faint, #9ca3af);
}
.af-footer-legal a {
    color: var(--text-muted, #aaa);
    text-decoration: underline;
}
.af-footer-legal a:hover { color: var(--af-accent-text); }
.af-footer-credits {
    font-size: 12px;
    font-weight: 500;
}

/* === Footer: reopen consent bar === */
.af-footer-consent{background:none;border:0;padding:0;font:inherit;font-size:inherit;
color:inherit;opacity:.75;cursor:pointer;text-decoration:underline}
.af-footer-consent:hover{opacity:1}
.af-footer-consent:focus-visible{outline:2px solid #f0b429;outline-offset:2px}
