/**
 * JUICER V2 — global page design layer (all EJS surfaces).
 * Scoped to body.juicer-v2-page; seasonal/overlay exceptions preserved.
 */

body.juicer-v2-page:not(.xmas-body):not(.bonushunt-bg) {
    background-color: var(--bg-dark, #0a0b12);
    background-image: linear-gradient(rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.8)), url('/images/background.jpg');
    background-attachment: fixed;
    background-position: center;
    background-size: cover;
    color: #f1f5f9;
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    min-height: 100vh;
    margin: 0;
}

body.juicer-v2-page {
    padding-bottom: 48px;
}

body.juicer-v2-page .juicer-v2-main {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: var(--jb-shell-width, 1440px);
    margin: 0 auto;
    padding: 28px clamp(20px, 4vw, 56px) 64px;
    box-sizing: border-box;
}

body.juicer-v2-page .juicer-v2-wide,
body.juicer-v2-page .juicer-v2-leaderboard {
    max-width: min(1520px, 98vw);
}

body.juicer-v2-page .juicer-v2-narrow {
    max-width: min(1240px, 96vw);
}

body.juicer-v2-page.juicer-v2-welcome .juicer-v2-main {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 72px);
}

body.juicer-v2-page .juicer-v2-leaderboard {
    font-family: 'Rajdhani', 'Inter', sans-serif;
}

body.juicer-v2-page .juicer-v2-medium {
    max-width: min(1320px, 96vw);
}

body.juicer-v2-page {
    --accent: var(--v2-accent, #fbbf24);
    --accent-glow: var(--v2-glow, rgba(251, 191, 36, 0.35));
    --premium-gold: var(--v2-accent, #fbbf24);
    --premium-border: rgba(251, 191, 36, 0.22);
    --jb-shell-width: 1440px;
}

.juicer-v2-page-hero {
    text-align: left;
    margin: 0 0 32px;
    padding: 0;
    max-width: none;
}

.juicer-v2-kicker {
    text-transform: uppercase;
    letter-spacing: 0.22em;
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--v2-accent, #fbbf24);
    margin-bottom: 8px;
}

.juicer-v2-page-title {
    font-family: 'Rajdhani', 'Inter', sans-serif;
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #fff;
    margin: 0 0 6px;
    text-shadow: 0 0 28px rgba(251, 191, 36, 0.25);
}

.juicer-v2-page-sub {
    color: rgba(255, 255, 255, 0.62);
    font-size: 1rem;
    margin: 0 auto;
    max-width: 640px;
}

.juicer-v2-hero-line {
    width: 72px;
    height: 3px;
    margin: 16px 0 0;
    border-radius: 99px;
    background: linear-gradient(90deg, var(--v2-accent), var(--v2-accent-2, #ff8000), transparent);
}

.juicer-v2-page-hero.text-start .juicer-v2-hero-line,
.juicer-v2-page-hero:not(.text-center) .juicer-v2-hero-line {
    margin-left: 0;
}

.juicer-v2-page-hero.text-center .juicer-v2-hero-line {
    margin-left: auto;
    margin-right: auto;
}

.juicer-v2-page-sub {
    max-width: 72ch;
    line-height: 1.55;
}

body.juicer-v2-page .jb-page-shell,
body.juicer-v2-page .container.jb-page-shell {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
}

body.juicer-v2-page .jb-hero-title,
body.juicer-v2-page .juicer-v2-page-title {
    color: #fff;
}

body.juicer-v2-page .jb-hero-subtitle,
body.juicer-v2-page .jb-hero-subtitle-mono {
    color: rgba(255, 255, 255, 0.58);
}

body.juicer-v2-page .glass-card,
body.juicer-v2-page .guild-card,
body.juicer-v2-page .quest-card,
body.juicer-v2-page .jb-card,
body.juicer-v2-page .premium-card,
body.juicer-v2-page .stat-card,
body.juicer-v2-page .news-card,
body.juicer-v2-page .achievement-card,
body.juicer-v2-page .hunt-card,
body.juicer-v2-page .mod-log-card {
    border-radius: var(--premium-radius, 14px);
}

body.juicer-v2-page .btn-cyber,
body.juicer-v2-page .btn-primary,
body.juicer-v2-page .btn-warning {
    background: linear-gradient(135deg, #fbbf24, #ff8000) !important;
    border: none !important;
    color: #0a0a0c !important;
    font-weight: 800;
    letter-spacing: 0.04em;
    border-radius: 999px !important;
    box-shadow: 0 8px 24px rgba(251, 191, 36, 0.25);
}

body.juicer-v2-page .btn-outline-custom,
body.juicer-v2-page .btn-outline-warning,
body.juicer-v2-page .btn-outline-light {
    border-radius: 999px !important;
    font-weight: 700;
    letter-spacing: 0.03em;
}

body.juicer-v2-page .btn-outline-warning {
    border-color: rgba(251, 191, 36, 0.5) !important;
    color: var(--v2-accent) !important;
}

body.juicer-v2-page .btn-outline-warning:hover {
    background: rgba(251, 191, 36, 0.15) !important;
    color: #fff !important;
}

body.juicer-v2-page .table {
    --bs-table-bg: transparent;
    --bs-table-color: #fff;
    --bs-table-hover-bg: rgba(251, 191, 36, 0.06);
    border-color: var(--v2-border);
}

body.juicer-v2-page .table thead th {
    color: var(--v2-accent) !important;
    text-transform: uppercase;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    border-bottom: 2px solid rgba(251, 191, 36, 0.35) !important;
    font-weight: 800;
}

body.juicer-v2-page .sticky-thead {
    background: rgba(8, 8, 12, 0.95) !important;
    backdrop-filter: blur(14px);
}

body.juicer-v2-page .nav-tabs {
    border-bottom: 1px solid var(--v2-border);
    gap: 6px;
}

body.juicer-v2-page .nav-tabs .nav-link {
    color: rgba(255, 255, 255, 0.45);
    border: none;
    border-bottom: 2px solid transparent;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-radius: 10px 10px 0 0;
}

body.juicer-v2-page .nav-tabs .nav-link.active {
    color: var(--v2-accent);
    background: rgba(251, 191, 36, 0.08);
    border-bottom-color: var(--v2-accent);
}

body.juicer-v2-page .form-control,
body.juicer-v2-page .form-select,
body.juicer-v2-page textarea {
    background: rgba(0, 0, 0, 0.35) !important;
    border: 1px solid var(--v2-border) !important;
    color: #fff !important;
    border-radius: 12px !important;
}

body.juicer-v2-page .form-control:focus,
body.juicer-v2-page .form-select:focus,
body.juicer-v2-page textarea:focus {
    border-color: rgba(251, 191, 36, 0.5) !important;
    box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.12) !important;
}

body.juicer-v2-page .alert {
    border-radius: 14px;
    border: 1px solid var(--v2-border);
    background: var(--v2-surface);
}

body.juicer-v2-page .alert-warning {
    border-color: rgba(251, 191, 36, 0.35);
    color: #fde68a;
}

body.juicer-v2-page .progress,
body.juicer-v2-page .progress-custom {
    background: rgba(0, 0, 0, 0.45) !important;
    border-radius: 99px !important;
    overflow: hidden;
}

body.juicer-v2-page .progress-bar,
body.juicer-v2-page .progress-fill {
    background: linear-gradient(90deg, #fbbf24, #ff8000) !important;
    box-shadow: 0 0 12px rgba(251, 191, 36, 0.4);
}

body.juicer-v2-page .dropdown-menu {
    background: rgba(10, 10, 14, 0.98);
    border: 1px solid var(--v2-border);
    border-radius: 14px;
}

body.juicer-v2-page .badge,
body.juicer-v2-page .fragment-badge {
    border-radius: 999px;
    font-weight: 800;
    letter-spacing: 0.04em;
}

body.juicer-v2-page .leaderboard-container {
    max-width: 1100px;
    margin: 12px auto 40px;
}

body.juicer-v2-page .scroll-container {
    border: 1px solid var(--v2-border);
    border-radius: 0 0 16px 16px;
    background: rgba(8, 8, 12, 0.5);
}

body.juicer-v2-page .top-three .podium-card,
body.juicer-v2-page .podium-user {
    filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.5));
}

body.juicer-v2-page .particles-container {
    opacity: 0.35;
    pointer-events: none;
}

body.juicer-v2-page .text-accent {
    color: var(--v2-accent) !important;
}

body.juicer-v2-page .jb-divider-line {
    background: linear-gradient(90deg, transparent, var(--v2-accent), transparent);
}

/* Wrapped / profile polish */
body.juicer-v2-page .wrapped-section,
body.juicer-v2-page .profile-header-card {
    border-radius: 18px;
    border: 1px solid var(--v2-border);
    background: var(--v2-surface);
}

/* Mod center legacy */
body.juicer-v2-page .mod-center-shell .card {
    margin-bottom: 12px;
}

/* Overlay pages (OBS) — frame only, keep transparency */
body.juicer-v2-page.juicer-v2-overlay {
    background: transparent !important;
    background-image: none !important;
}

body.juicer-v2-page.juicer-v2-overlay .v2-overlay-badge {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 50;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(8, 8, 12, 0.75);
    border: 1px solid var(--v2-border);
    color: var(--v2-accent);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

/* Maintenance standalone */
body.juicer-v2-page.juicer-v2-maintenance {
    display: grid;
    place-items: center;
    min-height: 100vh;
    background-image: none !important;
    background: var(--v2-bg) !important;
}

body.juicer-v2-page .juicer-v2-maint-card {
    max-width: 720px;
    width: 92%;
    padding: 36px 28px;
    text-align: center;
    background: var(--v2-surface);
    border: 1px solid var(--v2-border);
    border-radius: 20px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}

/* Xmas: V2 tokens without killing event art */
body.juicer-v2-page.xmas-body .xmas-pre-cinema,
body.juicer-v2-page.xmas-admin-page {
    font-family: 'Rajdhani', 'Inter', sans-serif;
}

@media (max-width: 768px) {
    body.juicer-v2-page .jb-page-shell,
    body.juicer-v2-page .juicer-v2-main {
        padding: 0 12px;
        margin-top: 12px;
    }
}
