/* ==========================================================================
   Site chrome: no side menu, account panel (model 2) and footer (model 2).
   Markup: header.php, partials/header/main-header.php, partials/footer/site-footer.php
   One accent (amber) for VIP and primary actions; everything else neutral.
   ========================================================================== */

.atv-acct,
.atv-ft {
    --c-surface: #1f222a;
    --c-surface-2: #282c36;
    --c-sunken: #17191f;
    --c-line: #30343f;
    --c-line-soft: #262a33;
    --c-text: #eef0f4;
    --c-text-2: #c3c8d2;
    --c-muted: #8b92a1;
    --c-accent: #f5b942;
    --c-accent-hover: #ffc75e;
    --c-accent-ink: #1c1503;
    --c-accent-text: #f5b942;
    --c-live: #3fc380;
    --c-danger: #ef7070;
}

#animetvApp.day .atv-acct,
#animetvApp.day .atv-ft {
    --c-surface: #ffffff;
    --c-surface-2: #eef1f6;
    --c-sunken: #f5f7fa;
    --c-line: #dfe3eb;
    --c-line-soft: #e7eaf0;
    --c-text: #0f172a;
    --c-text-2: #334155;
    --c-muted: #64748b;
    --c-accent: #f5b942;
    --c-accent-hover: #f0ab22;
    --c-accent-ink: #1c1503;
    --c-accent-text: #9a6200;
    --c-live: #16a34a;
    --c-danger: #dc2626;
}

/* ---------- Side menu removed: content uses the full width ---------- */
section.main-content {
    margin-right: 0;
}
@media (min-width: 821px) {
    body.animetv-native-body #animetvApp > section.main-content {
        width: 100% !important;
        max-width: 100% !important;
        margin-right: 0 !important;
    }
}
@media (max-width: 820px) {
    #animetvApp .main-content {
        margin-right: 0 !important;
        width: 100% !important;
        padding-bottom: 24px;
    }
}

/* ---------- Focus rings (header itself lives in site-header.css) ---------- */
.atv-acct a:focus-visible,
.atv-acct button:focus-visible,
.atv-ft a:focus-visible,
.atv-ft button:focus-visible {
    outline: 2px solid #f5b942;
    outline-offset: 2px;
}

/* ---------- Account panel ---------- */
.cmd-dock-profile-wrap {
    position: relative;
}
.atv-acct {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    z-index: 90;
    direction: rtl;
    text-align: right;
}
.atv-acct .atv-acct-backdrop {
    display: none;
}
.atv-acct-panel {
    width: 300px;
    max-height: calc(100vh - 110px);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 8px;
    box-sizing: border-box;
    border-radius: 16px;
    border: 1px solid var(--c-line);
    background: var(--c-surface);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
    scrollbar-width: thin;
}
#animetvApp.day .atv-acct-panel {
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.14);
}
.atv-acct-grip {
    display: none;
}
.atv-acct-user {
    display: none;
    align-items: center;
    gap: 10px;
    padding: 4px 4px 8px;
}
.atv-acct-user img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.atv-acct-user-text {
    min-width: 0;
    display: flex;
    flex-direction: column;
    line-height: 1.45;
}
.atv-acct-user-text strong {
    font-size: 14px;
    color: var(--c-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.atv-acct-user-text span {
    font-size: 12px;
    color: var(--c-muted);
}
.atv-acct .atv-acct-close {
    margin: 0 auto 0 0;
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--c-muted);
    font-size: 16px;
    cursor: pointer;
}
.atv-acct-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--c-line-soft);
}
.atv-acct .atv-acct-stat {
    display: flex;
    flex-direction: column;
    gap: 1px;
    padding: 10px 12px;
    border-radius: 11px;
    background: var(--c-sunken);
    line-height: 1.5;
    text-decoration: none;
    transition: background-color 0.15s;
}
.atv-acct .atv-acct-stat:hover {
    background: var(--c-surface-2);
}
.atv-acct-stat-lbl {
    font-size: 11.5px;
    color: var(--c-muted);
}
.atv-acct-stat-val {
    font-size: 15px;
    font-weight: 800;
    color: var(--c-text);
}
.atv-acct-stat-val small {
    font-size: 11.5px;
    font-weight: 500;
    color: var(--c-muted);
}
.atv-acct-stat-cta {
    font-size: 12px;
    color: var(--c-text-2);
}
.atv-acct-stat-cta.is-accent {
    color: var(--c-accent-text);
}
.atv-acct-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}
.atv-acct .atv-acct-item {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 40px;
    padding: 0 10px;
    border-radius: 9px;
    color: var(--c-text-2);
    font-size: 13.5px;
    text-decoration: none;
    transition: background-color 0.15s, color 0.15s;
}
.atv-acct .atv-acct-item:hover {
    background: var(--c-surface-2);
    color: var(--c-text);
}
.atv-acct-item i {
    width: 18px;
    text-align: center;
    font-size: 14px;
    color: var(--c-muted);
}
.atv-acct .atv-acct-item.is-logout:hover,
.atv-acct .atv-acct-item.is-logout:hover i {
    color: var(--c-danger);
}
.atv-acct-badge {
    margin-right: auto;
    min-width: 22px;
    height: 20px;
    padding: 0 6px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: var(--c-surface-2);
    color: var(--c-text);
    font-size: 11px;
    font-weight: 700;
}
.atv-acct-sep {
    height: 1px;
    margin: 4px 6px;
    background: var(--c-line-soft);
}

/* Phones: bottom sheet */
@media (max-width: 640px) {
    .atv-acct {
        position: fixed;
        inset: 0;
        z-index: 10050;
    }
    .atv-acct .atv-acct-backdrop {
        display: block;
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        margin: 0;
        padding: 0;
        border: 0;
        background: rgba(6, 8, 12, 0.6);
        cursor: pointer;
    }
    .atv-acct-panel {
        position: absolute;
        right: 0;
        left: 0;
        bottom: 0;
        width: auto;
        max-height: 85vh;
        padding: 10px 12px calc(14px + env(safe-area-inset-bottom, 0px));
        border-width: 1px 0 0;
        border-radius: 20px 20px 0 0;
        box-shadow: 0 -16px 40px rgba(0, 0, 0, 0.4);
    }
    .atv-acct-grip {
        display: block;
        align-self: center;
        width: 40px;
        height: 4px;
        border-radius: 4px;
        background: var(--c-line);
    }
    .atv-acct-user {
        display: flex;
    }
    .atv-acct .atv-acct-item {
        height: 44px;
    }
    body.animetv-native-body.atv-acct-open {
        overflow: hidden !important;
    }
}

/* ---------- Footer ---------- */
.atv-ft {
    margin-top: 56px;
    padding: 0 clamp(16px, 3vw, 36px);
    direction: rtl;
    color: var(--c-text);
    font-size: 14px;
    line-height: 1.75;
}
.atv-ft *,
.atv-ft *::before,
.atv-ft *::after {
    box-sizing: border-box;
}
.atv-ft-inner {
    max-width: 1360px;
    margin: 0 auto;
}
.atv-ft-cta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px 20px;
    padding: 22px 24px;
    border-radius: 18px;
    border: 1px solid var(--c-line-soft);
    background: var(--c-surface);
}
.atv-ft-cta-ico {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: var(--c-surface-2);
    color: var(--c-text-2);
    font-size: 18px;
}
.atv-ft-cta-text {
    flex: 1 1 360px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    line-height: 1.75;
}
.atv-ft-cta-text strong {
    font-size: 16px;
    font-weight: 800;
    color: var(--c-text);
}
.atv-ft-cta-text span {
    font-size: 13px;
    color: var(--c-muted);
}
.atv-ft-cta-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.atv-ft .atv-ft-btn {
    height: 44px;
    padding: 0 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 11px;
    border: 1px solid var(--c-line);
    color: var(--c-text-2);
    font-size: 13.5px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color 0.15s, color 0.15s;
}
.atv-ft .atv-ft-btn:hover {
    background: var(--c-surface-2);
    color: var(--c-text);
}
.atv-ft .atv-ft-btn.is-primary {
    background: var(--c-accent);
    border-color: var(--c-accent);
    color: var(--c-accent-ink);
    font-weight: 800;
}
.atv-ft .atv-ft-btn.is-primary:hover {
    background: var(--c-accent-hover);
    border-color: var(--c-accent-hover);
}

.atv-ft-cols {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1.3fr 1fr;
    gap: 40px;
    padding: 40px 0 32px;
}
.atv-ft-brand {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
/* Footer logo: the same glass capsule as the header (partials/header/brand-logo.php), subtitle under it. */
.atv-ft .atv-ft-brand-head {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    color: inherit;
    text-decoration: none;
}
.atv-ft-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 5px 6px 5px 18px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.13);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.03));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 14px 30px -16px rgba(0, 0, 0, 0.95);
    color: #ffffff;
    transition: transform 0.3s cubic-bezier(0.3, 1.4, 0.5, 1);
}
.atv-ft .atv-ft-brand-head:hover .atv-ft-logo {
    transform: translateY(-1px);
}
.atv-ft .atv-ft-brand-head:focus-visible {
    outline: none;
}
.atv-ft .atv-ft-brand-head:focus-visible .atv-ft-logo {
    outline: 2px solid #f5b942;
    outline-offset: 3px;
}
.atv-ft .atv-brand-tv {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: radial-gradient(circle at 50% 40%, rgba(253, 143, 0, 0.45), rgba(253, 143, 0, 0.12) 70%);
    box-shadow: inset 0 0 0 1px rgba(253, 143, 0, 0.5), 0 0 22px -4px rgba(253, 143, 0, 0.7);
}
.atv-ft .atv-brand-tv svg {
    display: block;
    width: 24.1px;
    height: 28px;
}
.atv-ft .atv-brand-wm {
    display: block;
    flex-shrink: 0;
    width: 106.4px;
    height: 26px;
}
#animetvApp.day .atv-ft-logo {
    border-color: #dfe3eb;
    background: linear-gradient(180deg, #ffffff, #f1f3f8);
    box-shadow: inset 0 1px 0 #ffffff, 0 10px 24px -16px rgba(15, 23, 42, 0.4);
    color: #0f172a;
}
#animetvApp.day .atv-ft .atv-brand-tv {
    background: radial-gradient(circle at 50% 40%, #ffb347, #fd8f00);
    box-shadow: 0 6px 16px -6px rgba(253, 143, 0, 0.9);
}
.atv-ft-brand-sub {
    display: block;
    font-size: 12.5px;
    color: var(--c-muted);
}
.atv-ft .atv-ft-desc {
    margin: 0;
    max-width: 360px;
    font-size: 13px;
    line-height: 2;
    color: var(--c-muted);
}
.atv-ft .atv-ft-heading {
    margin: 0 0 14px;
    font-size: 13px;
    font-weight: 700;
    color: var(--c-text-2);
}
.atv-ft .atv-ft-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 13.5px;
}
.atv-ft .atv-ft-links a {
    color: var(--c-muted);
    text-decoration: none;
    transition: color 0.15s;
}
.atv-ft .atv-ft-links a:hover {
    color: var(--c-text);
}
.atv-ft-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.atv-ft .atv-ft-chips a {
    padding: 2px 12px;
    border-radius: 999px;
    border: 1px solid var(--c-line-soft);
    background: var(--c-surface);
    color: var(--c-muted);
    font-size: 12.5px;
    line-height: 1.9;
    text-decoration: none;
    transition: color 0.15s, border-color 0.15s;
}
.atv-ft .atv-ft-chips a:hover {
    color: var(--c-text);
    border-color: var(--c-line);
}

.atv-ft-apps {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 12px;
    padding: 20px 0;
    border-top: 1px solid var(--c-line-soft);
}
.atv-ft-apps-title {
    margin-left: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--c-text-2);
}
.atv-ft .atv-ft-store {
    height: 46px;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border-radius: 11px;
    border: 1px solid var(--c-line);
    color: var(--c-text);
    text-decoration: none;
    transition: background-color 0.15s;
}
.atv-ft .atv-ft-store:hover {
    background: var(--c-surface-2);
    color: var(--c-text);
}
.atv-ft-store i {
    font-size: 18px;
}
.atv-ft-store > span {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}
.atv-ft-store small {
    font-size: 10.5px;
    color: var(--c-muted);
}
.atv-ft-store strong {
    font-size: 13px;
}

.atv-ft-bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 20px;
    padding: 18px 0 4px;
    border-top: 1px solid var(--c-line-soft);
    font-size: 12.5px;
    color: var(--c-muted);
}
.atv-ft-status {
    margin-right: auto;
    display: inline-flex;
    align-items: center;
    gap: 7px;
}
.atv-ft-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--c-live);
}
.atv-ft .atv-ft-up {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    margin: 0;
    padding: 0;
    border-radius: 10px;
    border: 1px solid var(--c-line);
    background: transparent;
    color: var(--c-text-2);
    cursor: pointer;
}
.atv-ft .atv-ft-up:hover {
    background: var(--c-surface-2);
}

@media (max-width: 1100px) {
    .atv-ft-cols {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 32px;
    }
}
@media (max-width: 640px) {
    .atv-ft {
        margin-top: 40px;
    }
    .atv-ft-cta {
        padding: 18px;
    }
    .atv-ft-cta-actions,
    .atv-ft-cta-actions .atv-ft-btn {
        width: 100%;
    }
    .atv-ft-cols {
        grid-template-columns: minmax(0, 1fr);
        gap: 28px;
        padding: 32px 0 24px;
    }
    .atv-ft-apps-title {
        width: 100%;
    }
    .atv-ft-store {
        flex: 1 1 0;
        padding: 0 10px;
    }
    .atv-ft-status {
        margin-right: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .atv-acct *,
    .atv-ft * {
        transition: none !important;
    }
}

/* ---------- Site-wide scrollbars: thin and dark ----------
   Standard properties (Chrome 121+, Firefox) plus the ::-webkit-scrollbar fallback (Safari, older Chrome).
   Overrides the old grey #BDBDBD bars in v2-base.css; a lighter variant follows day mode. */
html,
body {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) #0d0e13;
}
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
html::-webkit-scrollbar-track,
body::-webkit-scrollbar-track {
    background: #0d0e13;
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.18);
    border: 2px solid transparent;
    border-radius: 99px;
    background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover {
    background-color: rgba(245, 185, 66, 0.6);
}
::-webkit-scrollbar-corner {
    background: transparent;
}
html:has(#animetvApp.day),
html:has(#animetvApp.day) body {
    scrollbar-color: rgba(15, 23, 42, 0.28) #eef1f6;
}
html:has(#animetvApp.day) * {
    scrollbar-color: rgba(15, 23, 42, 0.25) transparent;
}
html:has(#animetvApp.day) ::-webkit-scrollbar-thumb {
    background-color: rgba(15, 23, 42, 0.25);
}
html:has(#animetvApp.day)::-webkit-scrollbar-track,
html:has(#animetvApp.day) body::-webkit-scrollbar-track {
    background: #eef1f6;
}
