/*
 * Animated Fluent - AvalonCS Edition overlay
 * Loaded AFTER theme.css. Adds the visual identity of the original
 * animated-fluent theme (proserver.sk) 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 (AvalonCS amber) === */
:root {
    --af-accent: #BA6F00;
    --af-accent-soft: rgba(186, 111, 0, 0.18);
    --af-accent-text: #ffb84d;
}

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

/* === 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);
}
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 === */
.sidebar__brand {
    align-items: center;
}
.sidebar__brand-mark {
    height: 36px;
    width: auto;
    max-width: 140px;
    object-fit: contain;
}
.sidebar__brand-tagline {
    font-size: 0.68rem;
    line-height: 1.25;
    color: var(--text-faint, #9ca3af);
    margin-top: 2px;
}

/* === Language switcher (fixed, top-right) === */
#lang-switcher {
    position: fixed;
    top: 9px;
    right: 14px;
    z-index: 1100;
    font-family: inherit;
}
.lang-switcher-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: rgba(17, 17, 17, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #fff;
    border: 1px solid 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: rgba(34, 34, 34, 0.92); }
.lang-switcher-btn:active { transform: scale(0.97); }
.lang-switcher-btn[aria-expanded="true"] { background: rgba(34, 34, 34, 0.95); }
.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;
    margin: 6px 0 0 0;
    padding: 4px;
    list-style: none;
    min-width: 180px;
    background: rgba(17, 17, 17, 0.98);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid 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: #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: rgba(255, 255, 255, 0.08);
    outline: none;
    color: #fff !important;
}
#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; }
html:not(.dark) .lang-switcher-btn {
    background: rgba(255, 255, 255, 0.95);
    color: #222;
    border-color: rgba(0, 0, 0, 0.15);
}
html:not(.dark) .lang-switcher-btn:hover { background: #fff; }
html:not(.dark) #lang-switcher-menu {
    background: rgba(255, 255, 255, 0.98);
    border-color: rgba(0, 0, 0, 0.15);
}
html:not(.dark) #lang-switcher-menu a { color: #222 !important; }
html:not(.dark) #lang-switcher-menu a:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #000 !important;
}
@media screen and (max-width: 980px) {
    #lang-switcher { top: 9px; right: auto; left: 8px; }
}

/* === Dashboard button grid (ported from the old home page) === */
.dashboard-buttons-grid {
    display: grid;
    grid-template-columns: repeat(4, 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, 1fr); }
}

/* === 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;
    }
}
