/* ============================================================
 * THEME WINTER — "Winter is Coming · The Frost Awakens"
 * Palet TERANG & ceria (putih salju + biru langit). Palet gelap
 * "Malam" ada di night.css dan dipilih dari halaman pengaturan.
 * ------------------------------------------------------------
 * Semua aset tema ini ada di themes/winter/assets/ (path relatif
 * terhadap file ini), jadi ganti theme = ganti seluruh tampilan
 * tanpa menyentuh folder images/ milik theme lain.
 *
 * Pengaturan khusus tema ini TIDAK ada di sini, tetapi di:
 *   themes/winter/defaults.php   nilai bawaan
 *   themes/winter/settings.json  nilai yang disimpan dari Panel GM
 *   themes/winter/admin.php      halaman pengaturan (GM Panel)
 * dan dirender lewat hook-head.php / hook-body.php.
 *
 * PALET TERANG
 *   Snow       #ffffff   kartu, header
 *   Sky        #cfe9ff   latar lembut, tabel
 *   Ice blue   #2f9bff   aksen utama, CTA
 *   Deep blue  #1c5fb8   judul
 *   Ink        #1e3a5f   teks utama
 *   Aurora     #19c9a6   aksen kedua
 *   Sun        #ffd45e   aksen hangat
 *
 * TIPOGRAFI
 *   Heading  Cinzel  — serif klasik, kesan kerajaan es
 *   Body     Outfit  — sans modern, terbaca
 *
 * Tata letak situs (flex/grid/ukuran) tidak diubah — hanya warna,
 * huruf, cahaya, dan dekorasi.
 * ============================================================ */

@import url("https://fonts.googleapis.com/css2?family=Cinzel:wght@600;700;800;900&family=Outfit:wght@400;500;600;700;800&display=swap");

:root {
    --font-display: "Cinzel", "Palatino Linotype", Palatino, serif;
    --font-body: "Outfit", "Segoe UI", sans-serif;

    /* Lapisan di atas latar; nilai persis diatur hook-head.php */
    --page-overlay: linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(225, 240, 255, 0.25));

    --card-bg: rgba(233, 244, 255, 0.95);
    --card-text: #1e3a5f;
    --card-border: rgba(90, 160, 230, 0.45);
    --muted-text: #5b7ea6;
    --heading-color: #1c5fb8;

    --accent: #2f9bff;
    --accent-dark: #1a73d9;
    --accent-contrast: #ffffff;
    --accent-2: #19c9a6;
    --accent-soft: rgba(47, 155, 255, 0.14);
    --accent-gold: #ffd45e;

    --header-bg: linear-gradient(90deg, rgba(255, 255, 255, 0.97) 0%, rgba(225, 242, 255, 0.97) 100%);
    --header-text: #1d4f91;
    --header-border: rgba(90, 160, 230, 0.5);

    --table-head-bg: linear-gradient(90deg, #e1f1ff, #cfe7ff);
    --table-head-text: #1c5fb8;
    --table-border: rgba(90, 160, 230, 0.22);

    --input-bg: #ffffff;
    --input-border: #a9cdf0;
    --input-text: #1e3a5f;

    --link-color: #1a73d9;

    --status-green: #1f9d63;
    --status-red: #d64545;
    --status-orange: #e07a1f;
    --status-purple: #7a5ad6;
    --status-teal: #0f9aa8;
    --status-yellow: #c58a00;

    --footer-bg: linear-gradient(135deg, #2b7fd8 0%, #5bb6ff 52%, #2a6fc0 100%);
    --footer-headline: #ffffff;
    --footer-text: #eaf5ff;
    --footer-muted: #cfe6fb;
    --footer-accent: #ffe08a;

    --card-shadow: 0 12px 28px rgba(50, 110, 180, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.9);

    /* ---- Token khusus tema (night.css menimpa semuanya) ---- */
    --wi-icicles: url("assets/icicles.svg");
    /* Bingkai kotak: tiap bagian bisa dimatikan dari hook-head.php */
    --wi-cap: url("assets/snow-cap.png");
    --wi-base: url("assets/snow-base.png");
    --wi-crystal-l: url("assets/crystal-l.png");
    --wi-crystal-r: url("assets/crystal-r.png");
    --wi-mascot: url("assets/mascot-penguin.png");
    --wi-scene: url("assets/scene-faint.svg");
    --wi-divider: url("assets/divider.svg");
    --wi-sheen: linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(212, 233, 252, 0.55));
    --wi-ring: 0 0 0 4px rgba(196, 226, 252, 0.92), 0 0 0 5px rgba(110, 170, 230, 0.55), inset 0 0 0 2px rgba(255, 255, 255, 0.9), inset 0 0 22px rgba(140, 200, 250, 0.3);
    --wi-box-title: #1450a8;
    --wi-box-title-shadow: 0 1px 0 #ffffff, 0 0 12px rgba(255, 255, 255, 0.95);
    --wi-item-bg: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(212, 233, 252, 0.82));
    --wi-item-border: rgba(140, 196, 240, 0.85);
    --wi-item-ring: #8fc4f2;
    --wi-user: #1a73d9;
    --wi-time-bg: rgba(255, 255, 255, 0.8);
    --wi-time-text: #2a5a9a;
    --wi-flake: url("assets/snowflake.svg");
    --wi-card-glow-1: rgba(120, 190, 255, 0.22);
    --wi-card-glow-2: rgba(25, 201, 166, 0.08);
    --wi-hover-border: rgba(47, 155, 255, 0.85);
    --wi-hover-shadow: 0 16px 34px rgba(50, 110, 180, 0.35), 0 0 22px rgba(47, 155, 255, 0.3);

    --wi-header-line: rgba(47, 155, 255, 0.55);
    --wi-header-line-2: rgba(25, 201, 166, 0.45);
    --wi-header-shadow: 0 8px 22px rgba(50, 110, 180, 0.28);

    --wi-btn-bg: linear-gradient(180deg, #5cc0ff 0%, #2f9bff 52%, #1a73d9 100%);
    --wi-btn-border: rgba(255, 255, 255, 0.9);
    --wi-btn-shadow: 0 0 0 1px rgba(47, 155, 255, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 8px 18px rgba(26, 115, 217, 0.4);
    --wi-btn-text-shadow: 0 1px 2px rgba(10, 60, 130, 0.55);

    --wi-frame-border: rgba(255, 255, 255, 0.95);
    --wi-frame-shadow: 0 0 0 2px rgba(47, 155, 255, 0.5), 0 0 26px rgba(120, 200, 255, 0.7), 0 14px 32px rgba(50, 110, 180, 0.35);
    --wi-caption-bg: linear-gradient(90deg, rgba(20, 75, 160, 0.88), rgba(47, 155, 255, 0.82));
    --wi-caption-text: #ffffff;

    --wi-title-fill: linear-gradient(180deg, #ffffff 0%, #eaf6ff 100%);
    --wi-title-stroke: #2a6bc4;
    --wi-title-filter: drop-shadow(0 4px 0 #1d4f91) drop-shadow(0 8px 14px rgba(30, 80, 160, 0.45));
    --wi-badge-bg: linear-gradient(180deg, #3aa5ff, #1a73d9);
    --wi-badge-text: #ffffff;
    --wi-badge-border: rgba(255, 255, 255, 0.95);
    --wi-badge-glow: rgba(255, 255, 255, 0.8);
    --wi-flake-filter: drop-shadow(0 2px 6px rgba(30, 90, 170, 0.45));

    --wi-panel-bg: linear-gradient(180deg, rgba(225, 241, 255, 0.95), rgba(204, 230, 252, 0.95));
    --wi-panel-bg-2: rgba(240, 248, 255, 0.95);
    --wi-panel-border: rgba(90, 160, 230, 0.4);
    --wi-panel-row: rgba(90, 160, 230, 0.2);
    --wi-foot-bg: rgba(47, 155, 255, 0.12);
    --wi-foot-border: rgba(47, 155, 255, 0.4);
    --wi-foot-text: #1a73d9;
    --wi-foot-icon-bg: #2f9bff;
    --wi-foot-icon-text: #ffffff;

    --wi-logo-filter: drop-shadow(0 8px 12px rgba(30, 80, 150, 0.4)) drop-shadow(0 0 12px rgba(255, 255, 255, 0.9));
    --wi-heading-shadow: 0 1px 0 rgba(255, 255, 255, 0.9);
    --wi-link-glow: rgba(47, 155, 255, 0.45);
    --wi-select-bg: rgba(47, 155, 255, 0.35);
    --wi-select-text: #0b2a55;
    --wi-focus: 0 0 0 2px rgba(47, 155, 255, 0.45), 0 0 12px rgba(47, 155, 255, 0.35);
    --wi-row-hover: rgba(47, 155, 255, 0.09);
    --wi-scroll-a: #5cc0ff;
    --wi-scroll-b: #19c9a6;
    --wi-scroll-track: rgba(220, 238, 255, 0.9);
    --wi-login-title: #1c5fb8;
}

/* ------------------------------------------------------------
 * 1. ATMOSFER
 * Latar (SVG di assets/) dipasang oleh hook-head.php supaya bisa
 * diganti dari halaman pengaturan tema. Overlay = body::before.
 * ------------------------------------------------------------ */
body {
    font-family: var(--font-body);
    color: var(--card-text);
}

body::before {
    background: var(--page-overlay) !important;
}

::selection {
    background: var(--wi-select-bg);
    color: var(--wi-select-text);
}

/* Lapisan salju (canvas) dari hook-body.php */
#wi-snow {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 60;
}

/* Boneka salju & ornamen di belakang konten */
.wi-decor {
    position: fixed;
    pointer-events: none;
    z-index: -1;
    height: auto;
    filter: drop-shadow(0 8px 12px rgba(30, 80, 150, 0.35));
    animation: wi-bob 6s ease-in-out infinite alternate;
}

.wi-decor:nth-of-type(2) { animation-duration: 7.4s; }
.wi-decor:nth-of-type(3) { animation-duration: 5.2s; }

@keyframes wi-bob {
    from { transform: translateY(0); }
    to { transform: translateY(-8px); }
}

/* ------------------------------------------------------------
 * 1b. BINGKAI SALJU — tumpukan salju di pojok & tepi layar
 * Gambar PNG di assets/snow-*.png. Dipasang tepat di bawah header
 * (tinggi header dibaca JS ke --wi-header-h) agar menu tidak tertutup.
 * pointer-events: none → tidak menghalangi klik.
 * ------------------------------------------------------------ */
.wi-snowframe {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 900;
    --wi-s: var(--wi-user, 1);
    --wi-h: 60px;
}

.wi-sf {
    position: absolute;
    height: auto;
    width: calc(280px * var(--wi-s));
    filter: drop-shadow(0 6px 8px rgba(40, 100, 170, 0.28));
}

.wi-sf.tl { top: var(--wi-h); left: 0; }
.wi-sf.tr { top: var(--wi-h); right: 0; }
.wi-sf.bl { bottom: 0; left: 0; width: calc(230px * var(--wi-s)); }
.wi-sf.br { bottom: 0; right: 0; width: calc(230px * var(--wi-s)); }

.wi-sf-edge {
    position: absolute;
    left: 0;
    right: 0;
    background-repeat: repeat-x;
    filter: drop-shadow(0 4px 6px rgba(40, 100, 170, 0.22));
}

.wi-sf-edge.top {
    top: var(--wi-h);
    height: calc(64px * var(--wi-s));
    background-image: url("assets/snow-edge-top.png");
    background-position: left top;
    background-size: auto 100%;
}

.wi-sf-edge.bottom {
    bottom: 0;
    height: calc(44px * var(--wi-s));
    background-image: url("assets/snow-edge-bottom.png");
    background-position: left bottom;
    background-size: auto 100%;
}

@media (max-width: 768px) {
    .wi-snowframe { --wi-s: calc(var(--wi-user, 1) * 0.5); }
}

/* ------------------------------------------------------------
 * 2. JUDUL HERO  (index saja, dari hook-body.php)
 * ------------------------------------------------------------ */
.wi-hero {
    position: absolute;
    top: 74px;
    left: 0;
    right: 0;
    z-index: 950; /* di atas bingkai salju (900), di bawah header (1000) */
    text-align: center;
    pointer-events: none;
    padding: 0 16px;
}

.wi-hero-flake {
    position: absolute;
    top: 50%;
    width: clamp(56px, 7vw, 110px);
    height: clamp(56px, 7vw, 110px);
    opacity: 0.95;
    background: var(--wi-flake) center / contain no-repeat;
    filter: var(--wi-flake-filter);
    animation: wi-spin 40s linear infinite;
}

.wi-hero-flake.l { left: calc(50% - clamp(210px, 28vw, 430px)); transform: translateY(-50%); }
.wi-hero-flake.r { left: calc(50% + clamp(120px, 20vw, 330px)); transform: translateY(-50%); animation-direction: reverse; }

@keyframes wi-spin {
    from { rotate: 0deg; }
    to { rotate: 360deg; }
}

.wi-hero-l1,
.wi-hero-l2 {
    font-family: var(--font-display);
    text-transform: uppercase;
    margin: 0;
    line-height: 1;
}

.wi-hero-l1 {
    font-size: clamp(30px, 5.4vw, 78px);
    font-weight: 900;
    letter-spacing: 0.04em;
    background: var(--wi-title-fill);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent !important;
    -webkit-text-stroke: 2px var(--wi-title-stroke);
    paint-order: stroke fill;
    text-shadow: none !important;
    filter: var(--wi-title-filter);
}

.wi-hero-l2 {
    display: inline-block;
    margin-top: 10px;
    padding: 5px 38px 7px;
    font-size: clamp(13px, 1.7vw, 24px);
    font-weight: 800;
    letter-spacing: 0.1em;
    color: var(--wi-badge-text);
    background: var(--wi-badge-bg);
    border: 1px solid var(--wi-badge-border);
    clip-path: polygon(14px 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 14px 100%, 0 50%);
    text-shadow: 0 0 10px var(--wi-badge-glow);
    box-shadow: 0 6px 20px rgba(30, 80, 160, 0.4);
}

@media (max-width: 1100px) {
    .wi-hero { top: 64px; }
    .wi-hero-flake { display: none; }
}

@media (max-width: 768px) {
    .wi-hero { top: 56px; }
    .wi-hero-l2 { padding: 4px 22px 5px; }
}

/* ------------------------------------------------------------
 * 3. TIPOGRAFI
 * ------------------------------------------------------------ */
h1, h2, h3, h4,
.news-title,
.main-title,
.card-title,
.footer-headline,
.carousel-caption {
    font-family: var(--font-display);
    letter-spacing: 0.04em;
}

h1, h2, h3 {
    text-shadow: var(--wi-heading-shadow);
}

p, li, label, input, button, select, textarea, .news-content {
    font-family: var(--font-body);
}

a {
    transition: color 0.2s ease, text-shadow 0.2s ease;
}

a:hover {
    text-shadow: 0 0 10px var(--wi-link-glow);
}

/* ------------------------------------------------------------
 * 4. HEADER
 * ------------------------------------------------------------ */
.main-header {
    box-shadow: var(--wi-header-shadow), 0 2px 0 var(--wi-header-line);
    animation: wi-frost-line 4.2s ease-in-out infinite;
}

@keyframes wi-frost-line {
    0%, 100% { box-shadow: var(--wi-header-shadow), 0 2px 0 var(--wi-header-line); }
    50% { box-shadow: var(--wi-header-shadow), 0 2px 0 var(--wi-header-line-2); }
}

.left-menu a,
.right-menu a {
    font-family: var(--font-body);
    letter-spacing: 0.06em;
}

.left-menu a:hover,
.left-menu a.active,
.right-menu a:hover {
    text-shadow: 0 0 12px var(--wi-link-glow);
}

/* ------------------------------------------------------------
 * 5. KOTAK (side box & main box) — bingkai es
 * Cincin es berlapis, topi salju tebal di tepi atas, kristal es +
 * tumpukan salju di dua pojok bawah, maskot kecil di kotak status.
 * Dekorasi memakai ::before / ::after (tanpa mengubah tata letak).
 * ------------------------------------------------------------ */
.container,
.box,
.main-box,
.login-box,
.container-large,
.container-small,
.account-info-box,
.status-feed-box,
.calendar-box,
.patcher-news-card,
.char-card,
.news-list-wrapper {
    background-color: var(--card-bg) !important;
    background-image:
        var(--wi-sheen),
        radial-gradient(220px 140px at 0% 0%, var(--wi-card-glow-1), transparent 72%),
        radial-gradient(200px 120px at 100% 100%, var(--wi-card-glow-2), transparent 70%) !important;
    background-repeat: no-repeat !important;
    background-position: left top, left top, right bottom !important;
    background-size: auto !important;
    border: 1px solid var(--card-border) !important;
    border-radius: 16px;
    box-shadow: var(--wi-ring), var(--card-shadow) !important;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    transition: box-shadow 0.35s ease, border-color 0.35s ease;
}

/* Pembungkus besar halaman depan: transparan, kotak di dalamnya yang berbingkai */
.news-section {
    background: transparent !important;
    background-image: none !important;
    border: 0 !important;
    box-shadow: none !important;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}

.box:hover,
.status-feed-box:hover,
.calendar-box:hover,
.news-list-wrapper:hover,
.char-card:hover {
    border-color: var(--wi-hover-border) !important;
    box-shadow: var(--wi-ring), var(--wi-hover-shadow) !important;
}

/* Titik acuan untuk dekorasi; :where() = tidak menimpa position yang sudah ada */
:where(.box, .status-feed-box, .news-list-wrapper, .main-box) {
    position: relative;
    isolation: isolate; /* dekorasi z-index:-1 tetap di atas latar kotak, di bawah isinya */
}

/* Topi salju di tepi atas */
.box::before,
.status-feed-box:not(.server-info-container)::before,
.news-list-wrapper::before,
.main-box::before {
    content: "";
    position: absolute;
    left: -8px;
    right: -8px;
    top: -17px;
    height: 36px;
    z-index: 3;
    pointer-events: none;
    background: var(--wi-cap) center bottom / auto 36px repeat-x;
    filter: drop-shadow(0 3px 3px rgba(40, 100, 170, 0.25));
}

/* Kotak status: maskot duduk di atas topi salju */
.status-feed-box:not(.server-info-container)::before {
    top: -86px;
    height: 105px;
    background:
        var(--wi-cap) center bottom / auto 36px repeat-x,
        var(--wi-mascot) left 18px bottom 15px / auto 84px no-repeat;
}

/* Kristal es + tumpukan salju di dua pojok bawah */
.box::after,
.status-feed-box:not(.server-info-container)::after,
.news-list-wrapper::after,
.main-box::after {
    content: "";
    position: absolute;
    left: -26px;
    right: -26px;
    bottom: -24px;
    height: 84px;
    z-index: -1;
    pointer-events: none;
    background:
        var(--wi-crystal-l) left bottom / auto 100% no-repeat,
        var(--wi-crystal-r) right bottom / auto 100% no-repeat,
        var(--wi-base) center bottom / auto 24px repeat-x;
}

@media (max-width: 768px) {
    .box::before,
    .status-feed-box:not(.server-info-container)::before,
    .news-list-wrapper::before,
    .main-box::before { top: -14px; height: 28px; background-size: auto 28px; }
    .status-feed-box:not(.server-info-container)::before {
        top: -62px;
        height: 76px;
        background:
            var(--wi-cap) center bottom / auto 28px repeat-x,
            var(--wi-mascot) left 12px bottom 12px / auto 62px no-repeat;
    }
    .box::after,
    .status-feed-box:not(.server-info-container)::after,
    .news-list-wrapper::after,
    .main-box::after { left: -14px; right: -14px; bottom: -18px; height: 60px; }
}

/* Judul kotak: tengah, biru tegas, hiasan salju kiri-kanan + garis berlian */
.box > h2,
.status-feed-box > h3,
.main-box > h2:first-child {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
    font-family: var(--font-display);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--wi-box-title) !important;
    -webkit-text-fill-color: var(--wi-box-title) !important;
    text-shadow: var(--wi-box-title-shadow) !important;
    border-bottom: 0 !important;
    padding-bottom: 22px !important;
    background: var(--wi-divider) center bottom / 200px 14px no-repeat !important;
    background-clip: border-box !important;
    -webkit-background-clip: border-box !important;
}

.box > h2::before,
.box > h2::after,
.status-feed-box > h3::before,
.status-feed-box > h3::after,
.main-box > h2:first-child::before,
.main-box > h2:first-child::after {
    content: "";
    display: block;
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    background: var(--wi-flake) center / contain no-repeat;
}

/* Balon status pemain: kaca es + siluet kastil samar + penanda waktu */
.status-feed-item {
    background: var(--wi-item-bg), var(--wi-scene) right bottom / auto 100% no-repeat !important;
    border: 1px solid var(--wi-item-border) !important;
    border-radius: 22px !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 3px 10px rgba(60, 120, 190, 0.18) !important;
    overflow: hidden;
}

.status-feed-item:hover {
    background: var(--wi-item-bg), var(--wi-scene) right bottom / auto 100% no-repeat !important;
    filter: brightness(1.03);
}

.status-feed-img {
    border: 3px solid #ffffff !important;
    box-shadow: 0 0 0 2px var(--wi-item-ring), 0 4px 10px rgba(40, 100, 170, 0.35) !important;
}

.status-user {
    color: var(--wi-user) !important;
    font-weight: 800 !important;
    font-size: 15px;
}

.status-text {
    font-weight: 600;
    font-size: 14px;
}

.status-time {
    display: table !important;
    margin: 8px 0 0 auto !important;
    padding: 3px 12px;
    background: var(--wi-time-bg);
    border: 1px solid var(--wi-item-border);
    border-radius: 14px;
    color: var(--wi-time-text) !important;
    font-size: 11px !important;
    font-weight: 700;
}

/* ------------------------------------------------------------
 * 6. TOMBOL
 * ------------------------------------------------------------ */
.btn-primary,
.btn-login {
    font-family: var(--font-body) !important;
    letter-spacing: 0.1em;
    color: #ffffff !important;
    background: var(--wi-btn-bg) !important;
    border: 1px solid var(--wi-btn-border) !important;
    box-shadow: var(--wi-btn-shadow) !important;
    text-shadow: var(--wi-btn-text-shadow);
}

.btn-primary:hover,
.btn-login:hover {
    box-shadow:
        0 0 22px rgba(92, 192, 255, 0.9),
        inset 0 1px 0 rgba(255, 255, 255, 0.7),
        0 10px 22px rgba(26, 115, 217, 0.45) !important;
    filter: brightness(1.08);
}

/* ------------------------------------------------------------
 * 7. HERO — carousel + kartu masuk
 * ------------------------------------------------------------ */
.slider-frame,
.carousel-container {
    border: 3px solid var(--wi-frame-border) !important;
    border-radius: 14px !important;
    box-shadow: var(--wi-frame-shadow) !important;
}

.carousel-caption {
    background: var(--wi-caption-bg) !important;
    color: var(--wi-caption-text) !important;
    text-shadow: 0 1px 6px rgba(0, 30, 90, 0.6);
    border-top: 1px solid rgba(255, 255, 255, 0.6);
}

.login-section h2 {
    color: var(--wi-login-title) !important;
}

.logo-floating,
.hero-logo-corner img,
.hero-logo-corner video {
    filter: var(--wi-logo-filter);
}

/* ------------------------------------------------------------
 * 8. RANKING — panggung sprite & tabel
 * ------------------------------------------------------------ */
.hw-split-visual {
    background: var(--wi-panel-bg) !important;
    border: 1px solid var(--wi-panel-border) !important;
    color: var(--card-text);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.hw-split-visual .hw-map-wrap,
.hw-map-placeholder {
    background: var(--wi-panel-bg-2) !important;
    border-color: var(--wi-panel-border) !important;
    color: var(--muted-text) !important;
}

.hw-split-table .hw-table-scroll {
    background: var(--wi-panel-bg-2) !important;
    border: 1px solid var(--wi-panel-border) !important;
}

.hw-tab-content th,
.hw-tab-content td {
    border-bottom-color: var(--wi-panel-row) !important;
}

.hw-split-visual h4,
.hw-split-table h4 {
    color: var(--heading-color) !important;
}

.hw-rank-foot {
    background: var(--wi-foot-bg) !important;
    border-color: var(--wi-foot-border) !important;
    color: var(--wi-foot-text) !important;
}

.hw-rank-foot .hw-i {
    background: var(--wi-foot-icon-bg) !important;
    color: var(--wi-foot-icon-text) !important;
}

/* ------------------------------------------------------------
 * 9. FORM, TABEL, SCROLLBAR
 * ------------------------------------------------------------ */
input:focus,
select:focus,
textarea:focus {
    box-shadow: var(--wi-focus) !important;
}

tr:hover td {
    background-color: var(--wi-row-hover);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--wi-scroll-a), var(--wi-scroll-b));
    border-radius: 8px;
}

::-webkit-scrollbar-track {
    background: var(--wi-scroll-track);
}

@media (prefers-reduced-motion: reduce) {
    .main-header,
    .wi-decor,
    .wi-hero-flake {
        animation: none !important;
    }
    #wi-snow {
        display: none;
    }
}

/* ------------------------------------------------------------
 * Badai salju: kabut putih tipis yang berdenyut di atas halaman
 * ------------------------------------------------------------ */
.wi-haze {
    position: fixed;
    inset: 0;
    z-index: 59;
    pointer-events: none;
    background:
        radial-gradient(ellipse at 20% 30%, rgba(255, 255, 255, 0.5), transparent 60%),
        radial-gradient(ellipse at 80% 70%, rgba(235, 246, 255, 0.5), transparent 55%),
        rgba(240, 248, 255, 0.18);
    animation: wi-haze-pulse 7s ease-in-out infinite;
}
@keyframes wi-haze-pulse { 0%, 100% { opacity: 0.55; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .wi-haze { animation: none; opacity: 0.7; } }

/* ------------------------------------------------------------
 * Bingkai carousel bersalju: topi salju + es menggantung di atas,
 * kristal es & tumpukan salju di pojok bawah (dapat dimatikan dari
 * Pengaturan Winter -> Bingkai carousel)
 * ------------------------------------------------------------ */
.slider-wrapper::before {
    content: "";
    position: absolute;
    left: -9px;
    right: -9px;
    top: -19px;
    height: 62px;
    z-index: 6;
    pointer-events: none;
    background:
        url("assets/snow-cap.png") center top / auto 38px repeat-x,
        var(--wi-icicles) center 30px / 120px 24px repeat-x;
    -webkit-mask: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 16px), transparent 100%);
            mask: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 16px), transparent 100%);
}
.slider-wrapper::after {
    content: "";
    position: absolute;
    left: -24px;
    right: -24px;
    bottom: -26px;
    height: 88px;
    z-index: 6;
    pointer-events: none;
    background:
        url("assets/crystal-l.png") left bottom / auto 100% no-repeat,
        url("assets/crystal-r.png") right bottom / auto 100% no-repeat,
        url("assets/snow-base.png") center bottom / auto 24px repeat-x;
}
@media (max-width: 768px) {
    .slider-wrapper::before { height: 44px; top: -13px; background-size: auto 28px, 90px 18px; background-position: center top, center 22px; }
    .slider-wrapper::after { height: 56px; left: -10px; right: -10px; bottom: -16px; }
}
