/* =============================================================
   AddonVault – Main Stylesheet  (Light theme)
   Material Design aesthetics + Bootstrap 5
   ============================================================= */

/* ── CSS CUSTOM PROPERTIES ── */
:root {
    --av-bg:           #f4f5f7;
    --av-surface:      #ffffff;
    --av-surface-2:    #f0f2f5;
    --av-surface-3:    #e4e7ec;
    --av-border:       rgba(0,0,0,.09);
    --av-border-light: rgba(0,0,0,.06);

    --av-primary:      #5b52f0;
    --av-primary-dim:  rgba(91,82,240,.1);
    --av-primary-glow: rgba(91,82,240,.25);
    --av-accent:       #0097a7;
    --av-accent-dim:   rgba(0,151,167,.1);
    --av-success:      #2e7d32;
    --av-success-bg:   rgba(46,125,50,.1);
    --av-warning:      #f57f17;
    --av-error:        #c62828;

    --av-text:         #1a1c23;
    --av-text-muted:   #5a5e72;
    --av-text-dim:     #9499b0;

    --av-radius:       12px;
    --av-radius-sm:    8px;
    --av-radius-lg:    18px;
    --av-shadow:       0 2px 12px rgba(0,0,0,.08);
    --av-shadow-md:    0 4px 24px rgba(0,0,0,.12);
    --av-shadow-lg:    0 8px 40px rgba(0,0,0,.15);

    --av-font-display: 'Rajdhani', sans-serif;
    --av-font-body:    'Inter', sans-serif;
    --av-transition:   .2s cubic-bezier(.4,0,.2,1);
}

/* ── RESET & BASE ── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    background: var(--av-bg);
    color: var(--av-text);
    font-family: var(--av-font-body);
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--av-primary); text-decoration: none; transition: color var(--av-transition); }
a:hover { color: var(--av-accent); }
img { max-width: 100%; height: auto; display: block; }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--av-surface-2); }
::-webkit-scrollbar-thumb { background: var(--av-surface-3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--av-primary); }

/* ─────────────────────────────────────────────────────────────
   HEADER / NAVBAR
───────────────────────────────────────────────────────────── */
.av-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--av-border);
    box-shadow: var(--av-shadow);
}

.av-header .navbar { padding: .65rem 0; }

.av-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--av-font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--av-text) !important;
    letter-spacing: .02em;
}
.av-brand:hover { color: var(--av-primary) !important; }

.av-brand-icon { color: var(--av-primary); font-size: 28px; }

.av-brand-text {
    background: linear-gradient(90deg, var(--av-primary) 0%, var(--av-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.navbar-nav .nav-link {
    color: var(--av-text-muted) !important;
    font-size: .9rem;
    font-weight: 500;
    padding: .45rem .85rem !important;
    border-radius: var(--av-radius-sm);
    transition: all var(--av-transition);
}
.navbar-nav .nav-link:hover { color: var(--av-primary) !important; background: var(--av-primary-dim); }

.navbar-toggler {
    border: 1px solid var(--av-border);
    color: var(--av-text-muted);
    padding: 6px 10px;
    border-radius: var(--av-radius-sm);
}
.navbar-toggler .material-icons-round { font-size: 22px; }
.navbar-toggler:focus { box-shadow: none; }

.av-dropdown {
    background: var(--av-surface) !important;
    border: 1px solid var(--av-border) !important;
    border-radius: var(--av-radius) !important;
    box-shadow: var(--av-shadow-md) !important;
    padding: .5rem !important;
    min-width: 200px;
}
.av-dropdown .dropdown-item {
    color: var(--av-text-muted);
    border-radius: var(--av-radius-sm);
    padding: .45rem .75rem;
    font-size: .875rem;
    transition: all var(--av-transition);
}
.av-dropdown .dropdown-item:hover { background: var(--av-primary-dim); color: var(--av-primary); }

/* ── BUTTONS ── */
.av-btn-primary {
    background: var(--av-primary);
    color: #fff !important;
    border: none;
    border-radius: var(--av-radius);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    padding: .65rem 1.4rem;
    transition: all var(--av-transition);
    box-shadow: 0 4px 14px var(--av-primary-glow);
}
.av-btn-primary:hover { background: #4a43d4; transform: translateY(-1px); box-shadow: 0 6px 20px var(--av-primary-glow); }

.av-btn-ghost {
    background: transparent;
    color: var(--av-text-muted) !important;
    border: 1px solid var(--av-border);
    border-radius: var(--av-radius);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .85rem;
    font-weight: 500;
    transition: all var(--av-transition);
}
.av-btn-ghost:hover { border-color: var(--av-primary); color: var(--av-primary) !important; background: var(--av-primary-dim); }

.av-btn-browse {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-color: var(--av-border) !important;
    color: var(--av-text-muted) !important;
    border-radius: var(--av-radius) !important;
    font-size: .85rem !important;
    font-weight: 500 !important;
    background: var(--av-surface-2) !important;
}
.av-btn-browse:hover { border-color: var(--av-primary) !important; color: var(--av-primary) !important; background: var(--av-primary-dim) !important; }
.av-btn-browse .material-icons-round { font-size: 18px; }

.av-btn-download {
    background: linear-gradient(135deg, var(--av-primary) 0%, #7c6ff5 100%);
    color: #fff !important;
    border: none;
    border-radius: var(--av-radius);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-family: var(--av-font-display);
    letter-spacing: .03em;
    padding: .75rem 1.75rem;
    font-size: 1.05rem;
    transition: all var(--av-transition);
    box-shadow: 0 4px 16px var(--av-primary-glow);
}
.av-btn-download:hover { transform: translateY(-2px); box-shadow: 0 8px 28px var(--av-primary-glow); }

.av-btn-download-trigger {
    background: linear-gradient(135deg, #2e7d32 0%, #43a047 100%);
    color: #fff !important;
    border: none;
    border-radius: var(--av-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 700;
    font-family: var(--av-font-display);
    letter-spacing: .03em;
    padding: .8rem 1.5rem;
    font-size: 1rem;
    transition: all var(--av-transition);
    box-shadow: 0 4px 14px rgba(46,125,50,.3);
}
.av-btn-download-trigger:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(46,125,50,.4); }

.av-btn-paypal {
    background: #0070ba;
    color: #fff !important;
    border: none;
    border-radius: var(--av-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 600;
    padding: .8rem 1.5rem;
    transition: all var(--av-transition);
}
.av-btn-paypal:hover { background: #005ea6; transform: translateY(-1px); }

/* ─────────────────────────────────────────────────────────────
   HERO
───────────────────────────────────────────────────────────── */
.av-hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #ede9fe 0%, #e0f2fe 100%);
    border-bottom: 1px solid var(--av-border);
    padding: 72px 0 56px;
}

.av-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 70% at 90% 50%, rgba(91,82,240,.12) 0%, transparent 60%),
        radial-gradient(ellipse 40% 60% at 5% 80%, rgba(0,151,167,.08) 0%, transparent 60%);
    pointer-events: none;
}

.av-hero .container-xl { position: relative; z-index: 1; }

.av-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(91,82,240,.12);
    border: 1px solid rgba(91,82,240,.25);
    color: var(--av-primary);
    border-radius: 100px;
    padding: .3rem .9rem;
    font-size: .8rem;
    font-weight: 600;
    letter-spacing: .05em;
    text-transform: uppercase;
    margin-bottom: 20px;
}
.av-hero-badge .material-icons-round { font-size: 16px; }

.av-hero-title {
    font-family: var(--av-font-display);
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -.01em;
    margin-bottom: 16px;
    color: var(--av-text);
}

.av-hero-sub {
    font-size: 1.1rem;
    color: var(--av-text-muted);
    max-width: 520px;
    margin-bottom: 32px;
}

.av-hero-stats { display: flex; align-items: center; gap: 24px; margin-top: 40px; }

.av-stat { text-align: center; }
.av-stat-number {
    display: block;
    font-family: var(--av-font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--av-primary);
    line-height: 1;
}
.av-stat-label { font-size: .8rem; color: var(--av-text-muted); text-transform: uppercase; letter-spacing: .06em; }
.av-stat-divider { width: 1px; height: 40px; background: rgba(91,82,240,.2); }

.av-hero-glow {
    position: absolute;
    bottom: -60px; left: 50%;
    transform: translateX(-50%);
    width: 500px; height: 150px;
    background: radial-gradient(ellipse, rgba(91,82,240,.1) 0%, transparent 70%);
    pointer-events: none;
}

/* ─────────────────────────────────────────────────────────────
   GAME BLOCKS (Home)
───────────────────────────────────────────────────────────── */
.av-home-listings { padding: 48px 0 80px; }
.av-game-block { margin-bottom: 56px; }

.av-game-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--av-primary-dim);
}

.av-game-title-group { display: flex; align-items: center; gap: 12px; }

.av-game-icon { color: var(--av-primary); font-size: 24px; }

.av-game-title {
    font-family: var(--av-font-display);
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: .01em;
    margin: 0;
    color: var(--av-text);
}

.av-game-count {
    background: var(--av-primary-dim);
    color: var(--av-primary);
    border-radius: 100px;
    padding: .1rem .65rem;
    font-size: .75rem;
    font-weight: 600;
}

/* ─────────────────────────────────────────────────────────────
   ADDON CARD
───────────────────────────────────────────────────────────── */
.av-card {
    background: var(--av-surface);
    border: 1px solid var(--av-border);
    border-radius: var(--av-radius);
    overflow: hidden;
    transition: all var(--av-transition);
    height: 100%;
    box-shadow: var(--av-shadow);
}
.av-card:hover {
    border-color: var(--av-primary);
    transform: translateY(-3px);
    box-shadow: var(--av-shadow-md), 0 0 0 1px var(--av-primary);
}

.av-card-link { display: block; height: 100%; color: inherit !important; }

.av-card-thumb {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
    background: var(--av-surface-2);
}

.av-card-img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.av-card:hover .av-card-img { transform: scale(1.04); }

.av-card-no-thumb {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--av-text-dim);
}
.av-card-no-thumb .material-icons-round { font-size: 40px; }

.av-card-badges { position: absolute; top: 8px; left: 8px; display: flex; gap: 4px; flex-wrap: wrap; }

.av-card-overlay {
    position: absolute;
    inset: 0;
    background: rgba(91,82,240,.2);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--av-transition);
    backdrop-filter: blur(2px);
}
.av-card:hover .av-card-overlay { opacity: 1; }
.av-card-overlay-icon { font-size: 36px; color: #fff; }

.av-card-body { padding: 12px; }

.av-card-cat {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: .72rem;
    color: var(--av-primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: 4px;
}
.av-card-cat .material-icons-round { font-size: 12px; }

.av-card-title {
    font-size: .9rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 8px;
    color: var(--av-text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.av-card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: .73rem;
    color: var(--av-text-dim);
}
.av-card-date, .av-card-downloads { display: flex; align-items: center; gap: 3px; }
.av-card-date .material-icons-round,
.av-card-downloads .material-icons-round { font-size: 12px; }

/* ── BADGES ── */
.av-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    border-radius: 6px;
    padding: .15rem .5rem;
    font-size: .65rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}
.av-badge-free    { background: rgba(46,125,50,.12); color: #2e7d32; border: 1px solid rgba(46,125,50,.25); }
.av-badge-paid    { background: rgba(245,127,23,.12); color: #e65100; border: 1px solid rgba(245,127,23,.25); }
.av-badge-version { background: var(--av-surface-2); color: var(--av-text-muted); border: 1px solid var(--av-border); }
.av-badge-lg { font-size: .78rem; padding: .3rem .8rem; border-radius: var(--av-radius-sm); }

/* ─────────────────────────────────────────────────────────────
   ARCHIVE PAGE
───────────────────────────────────────────────────────────── */
.av-archive-header {
    background: var(--av-surface);
    border-bottom: 1px solid var(--av-border);
    padding: 28px 0 20px;
    box-shadow: var(--av-shadow);
}

.av-page-title {
    font-family: var(--av-font-display);
    font-size: 2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    color: var(--av-text);
}
.av-page-title .material-icons-round { color: var(--av-primary); }

.av-count-badge {
    background: var(--av-primary-dim);
    color: var(--av-primary);
    border: 1px solid rgba(91,82,240,.2);
    border-radius: 100px;
    padding: .1rem .75rem;
    font-size: 1rem;
    font-weight: 600;
}

/* ── SIDEBAR ── */
.av-sidebar-inner {
    background: var(--av-surface);
    border: 1px solid var(--av-border);
    border-radius: var(--av-radius);
    padding: 20px;
    position: sticky;
    top: 80px;
    box-shadow: var(--av-shadow);
}

.av-filter-group { margin-bottom: 24px; }
.av-filter-group:last-child { margin-bottom: 0; }

.av-filter-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: .75rem;
    font-weight: 700;
    color: var(--av-text-muted);
    text-transform: uppercase;
    letter-spacing: .07em;
    margin-bottom: 10px;
}
.av-filter-label .material-icons-round { font-size: 16px; }

.av-search-form { position: relative; }
.av-search-wrap { position: relative; }
.av-search-icon {
    position: absolute;
    left: 10px; top: 50%;
    transform: translateY(-50%);
    color: var(--av-text-dim);
    font-size: 18px;
    pointer-events: none;
}
.av-search-input {
    width: 100%;
    background: var(--av-surface-2);
    border: 1px solid var(--av-border);
    border-radius: var(--av-radius-sm);
    color: var(--av-text);
    padding: .5rem .75rem .5rem 36px;
    font-size: .85rem;
    transition: border-color var(--av-transition);
}
.av-search-input:focus { outline: none; border-color: var(--av-primary); background: var(--av-surface); box-shadow: 0 0 0 3px var(--av-primary-dim); }
.av-search-input::placeholder { color: var(--av-text-dim); }

.av-filter-type-btns { display: flex; gap: 6px; }
.av-type-btn {
    flex: 1;
    text-align: center;
    background: var(--av-surface-2);
    border: 1px solid var(--av-border);
    border-radius: var(--av-radius-sm);
    color: var(--av-text-muted);
    padding: .35rem .5rem;
    font-size: .8rem;
    font-weight: 600;
    transition: all var(--av-transition);
}
.av-type-btn:hover { border-color: var(--av-primary); color: var(--av-primary); background: var(--av-primary-dim); }
.av-type-btn.active { background: var(--av-primary); border-color: var(--av-primary); color: #fff; }

/* Filter tree */
.av-filter-tree { font-size: .875rem; }

.av-tree-all {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--av-text-muted);
    padding: .4rem .5rem;
    border-radius: var(--av-radius-sm);
    font-weight: 500;
    transition: all var(--av-transition);
    margin-bottom: 4px;
}
.av-tree-all .material-icons-round { font-size: 18px; }
.av-tree-all:hover, .av-tree-all.active { background: var(--av-primary-dim); color: var(--av-primary); }

.av-tree-game { margin-bottom: 2px; }

.av-tree-game-link {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--av-text);
    padding: .4rem .5rem;
    border-radius: var(--av-radius-sm);
    font-weight: 600;
    transition: all var(--av-transition);
    width: 100%;
}
.av-tree-chevron { font-size: 18px; transition: transform var(--av-transition); flex-shrink: 0; }
.av-tree-game.open .av-tree-chevron { transform: rotate(90deg); }
.av-tree-game-link:hover, .av-tree-game-link.active { background: var(--av-primary-dim); color: var(--av-primary); }

.av-tree-count {
    margin-left: auto;
    background: var(--av-surface-2);
    border: 1px solid var(--av-border);
    border-radius: 100px;
    padding: .05rem .45rem;
    font-size: .72rem;
    color: var(--av-text-dim);
    font-weight: 500;
}

.av-tree-cats { list-style: none; padding: 0 0 0 24px; margin: 2px 0 4px; }
.av-tree-cat-link {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--av-text-muted);
    padding: .3rem .5rem;
    border-radius: var(--av-radius-sm);
    font-size: .84rem;
    font-weight: 400;
    transition: all var(--av-transition);
}
.av-tree-cat-link .material-icons-round { font-size: 15px; }
.av-tree-cat-link:hover, .av-tree-cat-link.active { color: var(--av-accent); background: var(--av-accent-dim); }

/* ── RESULTS BAR ── */
.av-results-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--av-border);
}

.av-results-count { font-size: .9rem; color: var(--av-text-muted); margin-right: auto; }
.av-results-count strong { color: var(--av-text); }

.av-active-filters { display: flex; gap: 8px; flex-wrap: wrap; }

.av-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--av-primary-dim);
    border: 1px solid rgba(91,82,240,.2);
    color: var(--av-primary);
    border-radius: 100px;
    padding: .2rem .7rem;
    font-size: .8rem;
    font-weight: 500;
}
.av-filter-chip .material-icons-round { font-size: 14px; }

.av-chip-remove { color: var(--av-primary) !important; display: inline-flex; align-items: center; margin-left: 2px; opacity: .7; transition: opacity var(--av-transition); }
.av-chip-remove:hover { opacity: 1; }
.av-chip-remove .material-icons-round { font-size: 14px; }

.av-btn-filter-toggle {
    background: var(--av-surface);
    border: 1px solid var(--av-border);
    color: var(--av-text-muted);
    border-radius: var(--av-radius-sm);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .85rem;
}

/* ── PAGINATION ── */
.av-pagination { display: flex; justify-content: center; gap: 6px; margin-top: 40px; }
.av-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    background: var(--av-surface);
    border: 1px solid var(--av-border);
    border-radius: var(--av-radius-sm);
    color: var(--av-text-muted);
    font-size: .9rem;
    font-weight: 500;
    transition: all var(--av-transition);
    padding: 0 4px;
    box-shadow: var(--av-shadow);
}
.av-pagination .page-numbers:hover { border-color: var(--av-primary); color: var(--av-primary); background: var(--av-primary-dim); }
.av-pagination .page-numbers.current { background: var(--av-primary); border-color: var(--av-primary); color: #fff; box-shadow: 0 2px 10px var(--av-primary-glow); }

/* ── EMPTY STATE ── */
.av-empty-state { text-align: center; padding: 80px 24px; }
.av-empty-icon { font-size: 72px; color: var(--av-text-dim); display: block; margin-bottom: 16px; }
.av-empty-state h3 { color: var(--av-text-muted); margin-bottom: 8px; }
.av-empty-state p { color: var(--av-text-dim); margin-bottom: 24px; }

/* ─────────────────────────────────────────────────────────────
   SINGLE ADDON PAGE
───────────────────────────────────────────────────────────── */
.av-breadcrumb {
    background: var(--av-surface);
    border-bottom: 1px solid var(--av-border);
    padding: 12px 0;
}
.av-breadcrumb .breadcrumb { margin: 0; font-size: .82rem; }
.av-breadcrumb .breadcrumb-item { color: var(--av-text-dim); }
.av-breadcrumb .breadcrumb-item a { color: var(--av-text-muted); }
.av-breadcrumb .breadcrumb-item a:hover { color: var(--av-primary); }
.av-breadcrumb .breadcrumb-item.active { color: var(--av-text); }
.av-breadcrumb .breadcrumb-item + .breadcrumb-item::before { color: var(--av-text-dim); }

.av-alert-success {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--av-success-bg);
    border: 1px solid rgba(46,125,50,.3);
    color: var(--av-success);
    border-radius: var(--av-radius);
    padding: 14px 18px;
    margin-top: 20px;
    font-size: .9rem;
}
.av-alert-success .material-icons-round { font-size: 22px; flex-shrink: 0; }

.av-single-thumb {
    position: relative;
    border-radius: var(--av-radius-lg);
    overflow: hidden;
    margin-bottom: 24px;
    border: 1px solid var(--av-border);
    aspect-ratio: 16/7;
    background: var(--av-surface-2);
    box-shadow: var(--av-shadow-md);
}
.av-single-img { width: 100%; height: 100%; object-fit: cover; }
.av-single-thumb-badges { position: absolute; bottom: 12px; left: 12px; display: flex; gap: 6px; }

.av-single-header { margin-bottom: 24px; }

.av-single-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.av-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border-radius: 100px;
    padding: .25rem .8rem;
    font-size: .78rem;
    font-weight: 600;
    transition: all var(--av-transition);
}
.av-tag .material-icons-round { font-size: 14px; }
.av-tag-game { background: var(--av-primary-dim); border: 1px solid rgba(91,82,240,.2); color: var(--av-primary); }
.av-tag-game:hover { background: var(--av-primary); color: #fff; }
.av-tag-cat { background: var(--av-accent-dim); border: 1px solid rgba(0,151,167,.2); color: var(--av-accent); }
.av-tag-cat:hover { background: var(--av-accent); color: #fff; }

.av-single-title {
    font-family: var(--av-font-display);
    font-size: clamp(1.6rem, 4vw, 2.5rem);
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 12px;
    color: var(--av-text);
}

.av-single-meta-row { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.av-meta-item { display: flex; align-items: center; gap: 5px; font-size: .85rem; color: var(--av-text-muted); }
.av-meta-item .material-icons-round { font-size: 16px; color: var(--av-text-dim); }

.av-single-content { color: var(--av-text); line-height: 1.75; margin-bottom: 32px; }
.av-single-content p { margin-bottom: 1em; }
.av-single-content h2, .av-single-content h3 { color: var(--av-text); font-family: var(--av-font-display); margin-top: 1.5em; }

.av-legal-notice {
    display: flex;
    gap: 14px;
    background: rgba(198,40,40,.06);
    border: 1px solid rgba(198,40,40,.18);
    border-radius: var(--av-radius);
    padding: 16px 20px;
    margin-bottom: 32px;
    color: #c62828;
    font-size: .875rem;
    line-height: 1.6;
}
.av-legal-icon .material-icons-round { font-size: 22px; flex-shrink: 0; margin-top: 2px; }

/* Sidebar cards */
.av-single-sidebar { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 80px; }

.av-download-card {
    background: var(--av-surface);
    border: 1px solid var(--av-border);
    border-radius: var(--av-radius);
    overflow: hidden;
    box-shadow: var(--av-shadow-md);
}
.av-download-card-header {
    background: linear-gradient(135deg, var(--av-primary) 0%, #7c6ff5 100%);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--av-font-display);
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: .04em;
    color: #fff;
}
.av-download-card-body { padding: 20px; }
.av-download-info { font-size: .85rem; color: var(--av-text-muted); margin-bottom: 16px; line-height: 1.5; }

.av-price-display { display: flex; align-items: baseline; gap: 6px; margin-bottom: 16px; }
.av-price-amount { font-family: var(--av-font-display); font-size: 2.5rem; font-weight: 700; color: #e65100; }
.av-price-label { font-size: .8rem; color: var(--av-text-dim); }

.av-download-card-footer {
    background: var(--av-surface-2);
    padding: 10px 16px;
    font-size: .78rem;
    color: var(--av-text-dim);
    display: flex;
    align-items: center;
    gap: 6px;
    border-top: 1px solid var(--av-border);
}
.av-download-card-footer .material-icons-round { font-size: 16px; color: var(--av-success); }

.av-info-card, .av-share-card {
    background: var(--av-surface);
    border: 1px solid var(--av-border);
    border-radius: var(--av-radius);
    padding: 16px;
    box-shadow: var(--av-shadow);
}
.av-info-card-title {
    font-size: .8rem;
    font-weight: 700;
    color: var(--av-text-muted);
    text-transform: uppercase;
    letter-spacing: .07em;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.av-info-card-title .material-icons-round { font-size: 16px; }

.av-info-table { width: 100%; font-size: .84rem; border-collapse: collapse; }
.av-info-table tr { border-bottom: 1px solid var(--av-border); }
.av-info-table tr:last-child { border-bottom: none; }
.av-info-table td { padding: 8px 0; color: var(--av-text-muted); vertical-align: middle; }
.av-info-table td:first-child {
    color: var(--av-text-dim);
    white-space: nowrap;
    padding-right: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
}
.av-info-table td:first-child .material-icons-round { font-size: 15px; }
.av-info-table td:last-child { color: var(--av-text); text-align: right; font-weight: 500; }

.av-share-copy { display: flex; gap: 8px; margin-bottom: 8px; }
.av-share-input {
    flex: 1;
    background: var(--av-surface-2);
    border: 1px solid var(--av-border);
    border-radius: var(--av-radius-sm);
    color: var(--av-text-muted);
    font-size: .78rem;
    padding: .4rem .65rem;
}
.av-btn-copy {
    background: var(--av-surface-2);
    border: 1px solid var(--av-border);
    border-radius: var(--av-radius-sm);
    color: var(--av-text-muted);
    transition: all var(--av-transition);
    padding: .4rem .65rem;
}
.av-btn-copy:hover { border-color: var(--av-accent); color: var(--av-accent); }
.av-share-note { font-size: .75rem; color: var(--av-text-dim); margin: 0; }

.av-related-section { margin-top: 56px; padding-top: 40px; border-top: 1px solid var(--av-border); }
.av-section-title {
    font-family: var(--av-font-display);
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    color: var(--av-text);
}
.av-section-title .material-icons-round { color: var(--av-primary); }

/* ─────────────────────────────────────────────────────────────
   DOWNLOAD MODAL
───────────────────────────────────────────────────────────── */
.av-modal {
    background: var(--av-surface) !important;
    border: 1px solid var(--av-border) !important;
    border-radius: var(--av-radius-lg) !important;
    color: var(--av-text) !important;
    overflow: hidden;
    box-shadow: var(--av-shadow-lg) !important;
}

.av-modal-header {
    background: var(--av-surface-2) !important;
    border-bottom: 1px solid var(--av-border) !important;
    padding: 16px 20px !important;
}
.av-modal-title-group { display: flex; align-items: center; gap: 10px; }
.av-modal-icon { color: var(--av-primary); font-size: 24px; }
.av-modal .modal-title { color: var(--av-text) !important; font-family: var(--av-font-display); font-size: 1.1rem !important; font-weight: 600; letter-spacing: .02em; }

.av-modal-body { padding: 24px 20px !important; background: var(--av-surface); }

/* Timer */
.av-timer-section { text-align: center; margin-bottom: 28px; }

.av-timer-ring { position: relative; display: inline-block; width: 120px; height: 120px; margin-bottom: 12px; }
.av-timer-svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.av-timer-track { fill: none; stroke: var(--av-surface-3); stroke-width: 6; }
.av-timer-progress { fill: none; stroke: var(--av-primary); stroke-width: 6; stroke-linecap: round; transition: stroke-dashoffset 1s linear; }
.av-timer-progress.warning { stroke: var(--av-warning); }
.av-timer-progress.done { stroke: var(--av-success); }

.av-timer-countdown {
    position: absolute; inset: 0;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    font-family: var(--av-font-display); line-height: 1;
}
.av-timer-countdown span { font-size: 2rem; font-weight: 700; color: var(--av-text); }
.av-timer-countdown small { font-size: .65rem; color: var(--av-text-muted); text-transform: uppercase; letter-spacing: .06em; }

.av-timer-label { font-size: .85rem; color: var(--av-text-muted); margin: 0; }

.av-donation-section {
    background: var(--av-surface-2);
    border: 1px solid var(--av-border);
    border-radius: var(--av-radius);
    padding: 16px;
}
.av-donation-header { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 16px; }
.av-donation-header .material-icons-round { color: #e91e63; font-size: 26px; flex-shrink: 0; margin-top: 2px; }
.av-donation-header h6 { margin: 0 0 4px; font-weight: 700; font-size: .95rem; color: var(--av-text); }
.av-donation-text { margin: 0; font-size: .82rem; color: var(--av-text-muted); line-height: 1.5; }
.av-paypal-wrap { text-align: center; }

.av-paid-section { text-align: center; padding: 20px 0; }
.av-paid-icon { font-size: 56px; color: #e65100; display: block; margin-bottom: 12px; }
.av-paid-section h5 { font-family: var(--av-font-display); font-size: 1.4rem; margin-bottom: 8px; color: var(--av-text); }
.av-paid-section p { color: var(--av-text-muted); font-size: .9rem; max-width: 340px; margin: 0 auto 20px; }

.av-price-badge {
    display: inline-block;
    font-family: var(--av-font-display);
    font-size: 2rem;
    font-weight: 700;
    color: #e65100;
    background: rgba(245,127,23,.1);
    border: 1px solid rgba(245,127,23,.2);
    border-radius: var(--av-radius);
    padding: .4rem 1.5rem;
    margin-bottom: 20px;
}
.av-paid-note {
    display: flex; align-items: center; justify-content: center; gap: 5px;
    font-size: .78rem; color: var(--av-text-dim); margin-top: 12px; margin-bottom: 0;
}

.av-modal-footer {
    background: var(--av-surface-2) !important;
    border-top: 1px solid var(--av-border) !important;
    padding: 16px 20px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}
#timerWaitMsg { display: flex; align-items: center; gap: 8px; font-size: .85rem; color: var(--av-text-muted); }

/* ─────────────────────────────────────────────────────────────
   FOOTER
───────────────────────────────────────────────────────────── */
.av-footer {
    background: var(--av-surface);
    border-top: 1px solid var(--av-border);
    margin-top: auto;
}

.av-footer-brand {
    display: flex; align-items: center; gap: 10px;
    font-family: var(--av-font-display); font-size: 1.3rem; font-weight: 700;
    margin-bottom: 10px; color: var(--av-text);
}
.av-footer-brand .material-icons-round { color: var(--av-primary); }

.av-footer-tagline { font-size: .85rem; color: var(--av-text-dim); margin: 0; }

.av-footer-heading {
    font-size: .75rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .07em; color: var(--av-text-muted); margin-bottom: 12px;
}

.av-footer-links { list-style: none; padding: 0; margin: 0; }
.av-footer-links li { margin-bottom: 6px; }
.av-footer-links a {
    display: flex; align-items: center; gap: 6px;
    font-size: .875rem; color: var(--av-text-muted); transition: color var(--av-transition);
}
.av-footer-links a .material-icons-round { font-size: 16px; }
.av-footer-links a:hover { color: var(--av-primary); }

.av-footer-bottom {
    border-top: 1px solid var(--av-border); padding: 16px 0;
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 8px;
}
.av-footer-bottom p { margin: 0; font-size: .82rem; color: var(--av-text-dim); }

/* ── SIDEBAR CLOSE (mobile) ── */
.av-sidebar-close {
    width: 100%;
    background: var(--av-surface-2);
    border: 1px solid var(--av-border);
    border-radius: var(--av-radius-sm);
    color: var(--av-text-muted);
    display: flex; align-items: center; justify-content: center; gap: 6px;
    padding: .5rem; font-size: .85rem; font-weight: 500;
    cursor: pointer; transition: all var(--av-transition); margin-top: 8px;
}
.av-sidebar-close:hover { border-color: var(--av-error); color: var(--av-error); }

/* ─────────────────────────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────────────────────────── */
@media (max-width: 991.98px) {
    .av-sidebar-inner {
        position: fixed; top: 0; left: -100%; width: 280px; height: 100vh;
        overflow-y: auto; z-index: 1050; transition: left .3s ease; border-radius: 0;
    }
    .av-sidebar-inner.open { left: 0; }
    .av-single-sidebar { position: static; }
    .av-hero { padding: 48px 0 40px; }
}

@media (max-width: 575.98px) {
    .av-game-header { flex-direction: column; align-items: flex-start; gap: 10px; }
    .av-footer-bottom { flex-direction: column; text-align: center; }
    .av-single-meta-row { gap: 12px; }
}

/* ── ACCESSIBILITY ── */
:focus-visible { outline: 2px solid var(--av-primary); outline-offset: 2px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* ─────────────────────────────────────────────────────────────
   HOME SECTIONS
───────────────────────────────────────────────────────────── */
.av-home-section {
    padding: 48px 0;
    border-bottom: 1px solid var(--av-border);
}
.av-home-section:last-child { border-bottom: none; padding-bottom: 80px; }

.av-home-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.av-home-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--av-font-display);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--av-text);
}
.av-home-section-title .material-icons-round {
    color: var(--av-primary);
    font-size: 26px;
}

/* ── LATEST MODS — colonnes liste ── */
.av-latest-game-col {
    background: var(--av-surface);
    border: 1px solid var(--av-border);
    border-radius: var(--av-radius);
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: var(--av-shadow);
    transition: box-shadow var(--av-transition);
}
.av-latest-game-col:hover { box-shadow: var(--av-shadow-md); }

.av-latest-col-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 16px;
    background: linear-gradient(135deg, var(--av-primary-dim) 0%, var(--av-surface-2) 100%);
    border-bottom: 1px solid var(--av-border);
}
.av-latest-col-header .material-icons-round {
    color: var(--av-primary);
    font-size: 20px;
    flex-shrink: 0;
}

.av-latest-col-title {
    font-family: var(--av-font-display);
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0;
    flex: 1;
    color: var(--av-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.av-latest-col-more {
    color: var(--av-text-dim);
    display: flex;
    align-items: center;
    transition: color var(--av-transition);
    flex-shrink: 0;
}
.av-latest-col-more:hover { color: var(--av-primary); }
.av-latest-col-more .material-icons-round { font-size: 18px; }

.av-latest-list {
    list-style: none;
    padding: 0;
    margin: 0;
    flex: 1;
}

.av-latest-item {
    border-bottom: 1px solid var(--av-border);
}
.av-latest-item:last-child { border-bottom: none; }

.av-latest-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 16px;
    color: var(--av-text) !important;
    transition: background var(--av-transition);
}
.av-latest-link:hover {
    background: var(--av-primary-dim);
    color: var(--av-primary) !important;
}
.av-latest-link:hover .av-latest-title { color: var(--av-primary); }

.av-latest-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.av-latest-cat {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: .7rem;
    color: var(--av-text-dim);
    text-transform: uppercase;
    letter-spacing: .05em;
    font-weight: 600;
}
.av-latest-cat .material-icons-round { font-size: 11px; }

.av-latest-title {
    font-size: .875rem;
    font-weight: 500;
    color: var(--av-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color var(--av-transition);
}

.av-latest-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.av-latest-dl {
    display: flex;
    align-items: center;
    gap: 2px;
    font-size: .72rem;
    color: var(--av-text-dim);
}
.av-latest-dl .material-icons-round { font-size: 12px; }

.av-latest-badge {
    border-radius: 4px;
    padding: .1rem .4rem;
    font-size: .65rem;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    white-space: nowrap;
}
.av-latest-badge-free { background: rgba(46,125,50,.1); color: #2e7d32; }
.av-latest-badge-paid { background: rgba(245,127,23,.1); color: #e65100; }

.av-latest-col-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 16px;
    background: var(--av-surface-2);
    border-top: 1px solid var(--av-border);
    font-size: .82rem;
    font-weight: 600;
    color: var(--av-primary) !important;
    transition: background var(--av-transition);
}
.av-latest-col-footer .material-icons-round { font-size: 16px; }
.av-latest-col-footer:hover { background: var(--av-primary-dim); }

/* ── CARD : label jeu en overlay bas d'image ── */
.av-card-game-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,.72) 0%, transparent 100%);
    color: #fff;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    padding: 20px 8px 6px;
    display: flex;
    align-items: center;
    gap: 4px;
    z-index: 1;
}
.av-card-game-label .material-icons-round { font-size: 13px; opacity: .85; }

/* ── LATEST LIST : date ── */
.av-latest-date {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: .7rem;
    color: var(--av-text-dim);
    margin-top: 2px;
}
.av-latest-date .material-icons-round { font-size: 11px; }

/* ── CARD : vues ── */
.av-card-views {
    display: flex;
    align-items: center;
    gap: 3px;
    color: var(--av-text-dim);
}
.av-card-views .material-icons-round { font-size: 12px; }
