* {
    box-sizing: border-box;
}

:root {
    --bg-1: #2d6970;
    --bg-2: #6caeb3;
    --surface: rgba(22, 70, 75, 0.45);
    --surface-strong: rgba(18, 56, 61, 0.88);
    --surface-soft: rgba(140, 205, 209, 0.2);
    --panel-1: rgba(18, 57, 62, 0.92);
    --panel-2: rgba(37, 97, 103, 0.85);
    --panel-3: rgba(122, 188, 193, 0.24);
    --border: rgba(255, 255, 255, 0.08);
    --text-main: #ffffff;
    --text-soft: #d5e9ec;
    --accent-1: #facc15;
    --accent-2: #f97316;
    --good: #22c55e;
}

body {
    margin: 0;
    font-family: "Segoe UI", sans-serif;
    color: var(--text-main);
    background:
        radial-gradient(circle at 12% 15%, rgba(255, 255, 255, 0.18), transparent 34%),
        radial-gradient(circle at 88% 78%, rgba(8, 36, 45, 0.3), transparent 32%),
        linear-gradient(125deg, #2e646b 0%, #5f9ea5 44%, #86c4ca 100%);
    overflow-x: hidden;
}

.layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 240px;
    background: linear-gradient(180deg, rgba(16, 49, 56, 0.96), rgba(26, 72, 78, 0.92));
    border-right: 1px solid rgba(168, 220, 224, 0.22);
    padding: 20px;
    overflow-y: auto;
}

.brand-area {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 18px;
    padding: 14px 0 18px;
}

.brand-area::before {
    content: "";
    position: absolute;
    width: 130px;
    height: 130px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(250, 204, 21, 0.3), transparent 70%);
    filter: blur(18px);
}

.brand-logo {
    position: relative;
    width: 180px;
    max-width: 100%;
    z-index: 1;
}

.sidebar-title {
    font-weight: 700;
    color: var(--accent-1);
    margin-bottom: 12px;
    font-size: 13px;
    letter-spacing: 1px;
}

#providerList {
    display: block;
}

.provider-item {
    padding: 9px 12px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 12px;
    color: #dbe2ef;
    transition: background 0.2s ease;
}

.provider-item:hover {
    background: rgba(59, 130, 246, 0.16);
}

.provider-item.active {
    background: linear-gradient(90deg, #ffd84f, #ffc21a);
    color: #101b20;
    font-weight: 700;
    box-shadow: none;
}

.wrapper {
    flex: 1;
    padding: 28px 32px 36px;
    min-width: 0;
    max-width: 1280px;
    margin: 0 auto;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 18px 22px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--panel-1), var(--panel-2));
    border: 1px solid rgba(155, 214, 219, 0.26);
    backdrop-filter: blur(8px);
    margin-bottom: 18px;
    box-shadow: 0 10px 22px rgba(8, 30, 36, 0.24);
}

.logo {
    font-size: 22px;
    font-weight: 800;
    background: linear-gradient(90deg, var(--accent-1), var(--accent-2));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stats {
    display: flex;
    gap: 18px;
}

.stat-box span {
    display: block;
    font-size: 11px;
    color: var(--text-soft);
}

.stat-box b {
    font-size: 15px;
    color: var(--accent-1);
}

.stat-box {
    padding: 8px 10px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(184, 229, 232, 0.18);
}

.countdown-warning {
    color: #ef4444 !important;
}

.hero-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 18px;
    border-radius: 14px;
    background: linear-gradient(125deg, rgba(12, 48, 54, 0.9), rgba(40, 106, 112, 0.76));
    border: 1px solid rgba(161, 220, 224, 0.28);
    margin-bottom: 14px;
    box-shadow: 0 12px 24px rgba(7, 28, 32, 0.2);
}

.hero-left h1 {
    margin: 0;
    font-size: 27px;
    background: linear-gradient(90deg, var(--accent-1), var(--accent-2));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-left p {
    margin-top: 8px;
    font-size: 13px;
    color: var(--text-soft);
}

.hero-card {
    background: linear-gradient(140deg, rgba(11, 42, 50, 0.9), rgba(27, 78, 86, 0.78));
    padding: 16px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid rgba(165, 220, 224, 0.26);
}

.hero-card-title {
    font-size: 12px;
    color: var(--text-soft);
    margin-bottom: 6px;
}

.hero-rtp {
    font-size: 24px;
    font-weight: 700;
    color: var(--accent-1);
}

.section-title {
    margin-top: 16px;
    margin-bottom: 10px;
    font-size: 13px;
    font-weight: 700;
    color: #e8f7f9;
    letter-spacing: 0.4px;
}

.featured {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 10px;
    background: var(--panel-3);
    border: 1px solid rgba(168, 220, 224, 0.32);
    border-radius: 12px;
    margin-bottom: 12px;
}

.featured-card {
    min-width: 200px;
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border);
}

.featured-overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 8px;
    font-size: 11px;
    color: var(--text-soft);
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.2));
    display: flex;
    align-items: center;
    gap: 6px;
}

.featured-name {
    flex: 1;
    min-width: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.2;
}

.hot {
    background: linear-gradient(90deg, #ef4444, #f97316);
    color: #fff;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 9px;
    margin-left: 6px;
}

.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 16px;
    padding: 12px;
    background: rgba(10, 48, 55, 0.38);
    border: 1px solid rgba(166, 221, 225, 0.25);
    border-radius: 12px;
    min-height: 200px;
}

.game-grid:empty::before {
    content: "Game belum tersedia";
    display: block;
    padding: 30px;
    text-align: center;
    color: #64748b;
}

.grid-card {
    background: linear-gradient(180deg, rgba(10, 42, 49, 0.85), rgba(18, 66, 73, 0.82));
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(156, 213, 218, 0.24);
    animation: fadeUp 0.5s ease forwards;
}

.grid-inner {
    background: rgba(2, 6, 23, 0.56);
    border-radius: 12px;
    overflow: hidden;
}

.grid-card img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    display: block;
}

.grid-info {
    padding: 8px 10px;
    font-size: 11px;
    display: flex;
    justify-content: space-between;
    gap: 8px;
    color: var(--text-soft);
    border-top: 1px solid var(--border);
}

.rtp {
    font-weight: 700;
    font-size: 13px;
}

.rtp-low {
    color: #ef4444;
}

.rtp-mid {
    color: #facc15;
}

.rtp-high {
    color: #22c55e;
}

.high-rtp {
    color: #22c55e;
    font-weight: 700;
}

.flash-update,
.reload-glow {
    animation: none;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ================= MOBILE ================= */
@media (max-width: 768px) {
    html,
    body {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    .layout {
        flex-direction: column;
        width: 100%;
        min-width: 0;
    }

    .sidebar {
        width: 100%;
        min-width: 0;
        position: static;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border);
        overflow-x: auto;
        overflow-y: hidden;
        padding: 12px 10px;
    }

    .brand-area {
        width: 100%;
        margin-bottom: 10px;
        padding: 8px 0 12px;
    }

    .brand-logo {
        width: 126px;
    }

    #providerList {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        padding-bottom: 4px;
    }

    .provider-item {
        flex: 0 0 auto;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        white-space: nowrap;
        min-height: 36px;
        padding: 8px 12px;
        border-radius: 14px;
    }

    .wrapper {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        padding: 14px 10px 20px;
    }

    .header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 14px;
        margin-bottom: 12px;
    }

    .logo {
        font-size: 18px;
    }

    .stats {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .stat-box {
        background: rgba(255, 255, 255, 0.03);
        border-radius: 10px;
        padding: 8px;
    }

    .stat-box span {
        font-size: 10px;
    }

    .stat-box b {
        font-size: 13px;
    }

    .hero-section {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
        gap: 10px;
        padding: 14px;
        margin-bottom: 12px;
    }

    .hero-left h1 {
        font-size: 18px;
        line-height: 1.25;
    }

    .hero-left p {
        font-size: 12px;
        line-height: 1.45;
    }

    .hero-right,
    .hero-card {
        display: none;
    }

    .section-title {
        font-size: 12px;
        margin-top: 14px;
        margin-bottom: 8px;
    }

    .featured {
        gap: 10px;
        margin-bottom: 12px;
    }

    .featured-card {
        min-width: 160px;
        border-radius: 10px;
    }

    .featured-overlay {
        font-size: 10px;
        padding: 7px;
    }

    .game-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
        padding: 4px 0;
    }

    .grid-card,
    .grid-inner,
    .grid-card img {
        width: 100%;
        min-width: 0;
    }

    .grid-info {
        font-size: 9px;
        padding: 6px;
    }

    .rtp {
        font-size: 10px;
    }
}

@media (max-width: 420px) {
    .stats {
        grid-template-columns: 1fr;
    }

    .featured-card {
        min-width: 132px;
    }

    .game-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 6px;
    }

    .grid-info {
        font-size: 8px;
        padding: 4px;
    }
}



.mobile-provider-section {
    display: none;
}

@media (max-width: 768px) {
    .mobile-provider-section {
        display: block;
        margin-bottom: 10px;
    }

    .mobile-provider-section .section-title {
        margin-top: 0;
        margin-bottom: 8px;
    }

    .provider-mobile-list {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        padding: 2px 44px 6px 4px;
        scroll-padding-inline: 4px 44px;
        scroll-snap-type: x mandatory;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-x: contain;
        touch-action: pan-x;
        scrollbar-width: none;
    }

    .provider-mobile-list::-webkit-scrollbar {
        display: none;
    }

    .provider-mobile-list .provider-item {
        flex: 0 0 auto;
        white-space: nowrap;
        scroll-snap-align: start;
        scroll-snap-stop: always;
    }

    .mobile-provider-hint {
        display: none;
        align-items: center;
        margin-bottom: 6px;
        padding: 4px 9px;
        width: fit-content;
        border-radius: 999px;
        font-size: 10px;
        font-weight: 700;
        color: #ecfeff;
        background: rgba(10, 62, 67, 0.55);
        border: 1px solid rgba(190, 237, 240, 0.38);
        animation: providerHintPulse 1.6s ease-in-out infinite;
    }

    .mobile-provider-hint.show {
        display: inline-flex;
    }

    .provider-mobile-wrap {
        position: relative;
        border-radius: 12px;
    }

    .provider-mobile-wrap::after {
        content: ">>";
        position: absolute;
        right: 4px;
        top: 50%;
        transform: translateY(-50%);
        padding: 4px 6px;
        border-radius: 999px;
        font-size: 10px;
        font-weight: 800;
        color: #dafeff;
        background: rgba(7, 50, 58, 0.62);
        border: 1px solid rgba(174, 229, 233, 0.32);
        pointer-events: none;
        opacity: 0.9;
        transition: opacity 0.2s ease;
    }

    .provider-mobile-wrap::before {
        content: "";
        position: absolute;
        right: 0;
        top: 0;
        bottom: 0;
        width: 38px;
        background: linear-gradient(90deg, rgba(45, 105, 112, 0), rgba(45, 105, 112, 0.95));
        pointer-events: none;
    }

    .provider-mobile-wrap.touched::after {
        opacity: 0.2;
    }

    .sidebar-title,
    .sidebar #providerList {
        display: none !important;
    }
}

/* ================= MOBILE LOGO BOOST ================= */
@media (max-width: 768px) {
    .brand-area {
        padding-top: 2px !important;
    }

    .brand-logo {
        width: 148px !important;
    }
}




/* ================= PATTERN MODAL ================= */
.pattern-clickable {
    cursor: pointer;
}

@keyframes providerHintPulse {
    0%,
    100% {
        transform: translateX(0);
        opacity: 0.95;
    }
    50% {
        transform: translateX(3px);
        opacity: 1;
    }
}

.pattern-clickable .grid-inner {
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.pattern-clickable:hover .grid-inner {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28);
}

.pattern-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 14px;
    z-index: 9999;
}

.pattern-modal.show {
    display: flex;
}

.pattern-modal-box {
    width: min(520px, 100%);
    background: linear-gradient(180deg, #4f0000, #8b0000);
    border: 2px solid rgba(255, 255, 255, 0.22);
    border-radius: 12px;
    color: #fff;
    padding: 16px 14px;
    position: relative;
    text-align: center;
}

.pattern-close {
    position: absolute;
    top: 6px;
    right: 8px;
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.pattern-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
}

.pattern-rtp {
    font-size: 34px;
    font-weight: 800;
    margin: 8px 0 12px;
}

.pattern-rows {
    border-top: 2px solid rgba(255, 255, 255, 0.7);
    border-bottom: 2px solid rgba(255, 255, 255, 0.7);
    margin: 8px 0 12px;
    padding: 10px 4px;
    font-size: 24px;
    line-height: 1.3;
    font-weight: 700;
}

.pattern-note {
    margin-top: 10px;
    font-size: 18px;
    font-weight: 700;
}

.pattern-bet {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 2px solid rgba(255, 255, 255, 0.7);
    font-size: 27px;
    font-weight: 800;
}

.pattern-foot {
    margin-top: 8px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.85);
}

@media (max-width: 768px) {
    .pattern-modal-box {
        padding: 14px 10px;
    }

    .pattern-title {
        font-size: 16px;
    }

    .pattern-rtp {
        font-size: 28px;
    }

    .pattern-rows {
        font-size: 19px;
    }

    .pattern-note {
        font-size: 15px;
    }

    .pattern-bet {
        font-size: 22px;
    }
}

/* ================= PATTERN MODAL MODERN OVERRIDE ================= */
.pattern-modal {
    backdrop-filter: blur(4px);
    background: rgba(2, 6, 23, 0.7);
}

.pattern-modal-box {
    width: min(540px, 100%);
    background: linear-gradient(145deg, rgba(16, 52, 60, 0.78), rgba(35, 92, 100, 0.72));
    border: 1px solid rgba(106, 174, 180, 0.58);
    box-shadow: 0 22px 45px rgba(2, 6, 23, 0.58), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    border-radius: 16px;
}

.pattern-close {
    background: rgba(106, 174, 180, 0.26);
    border: 1px solid rgba(183, 232, 236, 0.42);
}

.pattern-title {
    font-size: 18px;
    color: #f8fafc;
    letter-spacing: 0.2px;
}

.pattern-rtp {
    font-size: 32px;
    color: #d8f4f7;
    text-shadow: 0 0 14px rgba(171, 227, 232, 0.26);
}

.pattern-rows {
    border: 1px solid rgba(160, 223, 228, 0.3);
    border-radius: 12px;
    background: rgba(16, 61, 70, 0.42);
    padding: 10px;
}

.pattern-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 9px;
    background: rgba(106, 174, 180, 0.18);
}

.pattern-row + .pattern-row {
    margin-top: 6px;
}

.pattern-symbol {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 9px;
    font-size: 18px;
    line-height: 1;
    background: rgba(106, 174, 180, 0.22);
    color: #f3f8ff;
    box-shadow: inset 0 0 0 1px rgba(183, 232, 236, 0.42);
}

.pattern-symbol.ok {
    background: rgba(106, 174, 180, 0.22);
    box-shadow: inset 0 0 0 1px rgba(183, 232, 236, 0.42);
}

.pattern-symbol.no {
    background: rgba(106, 174, 180, 0.22);
    box-shadow: inset 0 0 0 1px rgba(183, 232, 236, 0.42);
}

.pattern-sep {
    opacity: 0.55;
    font-weight: 700;
}

.pattern-spin,
.pattern-dc {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.2px;
}

.pattern-spin {
    color: #f4fbff;
    background: rgba(106, 174, 180, 0.22);
    box-shadow: inset 0 0 0 1px rgba(183, 232, 236, 0.42);
}

.pattern-dc {
    color: #f4fbff;
    background: rgba(106, 174, 180, 0.22);
    box-shadow: inset 0 0 0 1px rgba(183, 232, 236, 0.42);
}

.pattern-note {
    font-size: 14px;
    font-weight: 600;
    color: #e6f8fa;
}

.pattern-bet {
    font-size: 23px;
    color: #eefbfd;
    border-top: 1px solid rgba(183, 232, 236, 0.36);
}

.pattern-foot {
    font-size: 11px;
    color: rgba(224, 244, 246, 0.78);
}

@media (max-width: 768px) {
    .pattern-modal-box {
        border-radius: 14px;
        padding: 12px 10px;
    }

    .pattern-rtp {
        font-size: 26px;
    }

    .pattern-row {
        gap: 6px;
        padding: 6px;
    }

    .pattern-symbol {
        width: 28px;
        height: 28px;
        font-size: 16px;
    }

    .pattern-spin,
    .pattern-dc {
        font-size: 11px;
        padding: 5px 8px;
    }

    .pattern-bet {
        font-size: 20px;
    }
}

/* ================= FEATURED DESKTOP MODERN ================= */
@media (min-width: 769px) {
    .featured.featured-desktop {
        position: relative;
        padding: 12px 16px;
        margin-bottom: 16px;
        gap: 14px;
        scroll-snap-type: x proximity;
        cursor: grab;
        scrollbar-width: none;
        overflow: hidden;
        background: linear-gradient(120deg, rgba(8, 50, 57, 0.58), rgba(101, 170, 176, 0.25));
        border: 1px solid rgba(181, 232, 236, 0.26);
        border-radius: 16px;
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 10px 20px rgba(8, 32, 35, 0.2);
    }

    .featured.featured-desktop.is-dragging {
        cursor: grabbing;
        user-select: none;
    }

    .featured.featured-desktop::before,
    .featured.featured-desktop::after {
        content: none;
    }

    .featured.featured-desktop .featured-card {
        min-width: clamp(220px, 21vw, 280px);
        border-radius: 14px;
        border: 1px solid rgba(188, 234, 238, 0.24);
        scroll-snap-align: start;
        transition: transform 0.24s ease, box-shadow 0.24s ease, filter 0.24s ease;
        filter: saturate(1.03);
    }

    .featured.featured-desktop .featured-card:nth-child(2n) {
        transform: none;
    }

    .featured.featured-desktop .featured-card:hover {
        transform: translateY(-6px) scale(1.01);
        box-shadow: 0 14px 26px rgba(3, 18, 24, 0.42);
        filter: saturate(1.08);
    }

    .featured.featured-desktop::-webkit-scrollbar {
        display: none;
    }

    .featured.featured-desktop .featured-overlay {
        padding: 10px;
        font-size: 12px;
        backdrop-filter: blur(2px);
        background: linear-gradient(to top, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.12));
    }
}


/* pattern close fallback */
.pattern-close {
    font-family: Arial, "Segoe UI", sans-serif;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ================= GAME CARD FX ================= */
.grid-card {
    position: relative;
    isolation: isolate;
    transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.grid-card::before {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: 13px;
    padding: 1px;
    background: linear-gradient(140deg, rgba(250, 204, 21, 0.55), rgba(249, 115, 22, 0.35), rgba(34, 197, 94, 0.25));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
}

.grid-card:hover {
    transform: translateY(-4px) scale(1.01);
    border-color: rgba(250, 204, 21, 0.35);
    box-shadow: 0 12px 24px rgba(2, 6, 23, 0.45);
}

.grid-card:hover::before {
    opacity: 1;
}

.grid-card::after {
    content: "";
    position: absolute;
    top: -18%;
    left: -55%;
    width: 42%;
    height: 140%;
    background: linear-gradient(
        110deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.06) 34%,
        rgba(255, 255, 255, 0.18) 50%,
        rgba(255, 255, 255, 0.06) 66%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: skewX(-18deg);
    pointer-events: none;
    opacity: 0.7;
    animation: glassSweep 4.8s ease-in-out infinite;
}

.grid-card img {
    transition: transform 0.35s ease;
}

.grid-card:hover img {
    transform: scale(1.035);
}

.game-grid .grid-card.reveal:nth-child(3n) {
    animation-delay: 0.05s;
}

.game-grid .grid-card.reveal:nth-child(3n + 1) {
    animation-delay: 0.1s;
}

.game-grid .grid-card.reveal:nth-child(3n + 2) {
    animation-delay: 0.15s;
}

@keyframes glassSweep {
    0% {
        left: -58%;
        opacity: 0;
    }
    18% {
        opacity: 0.82;
    }
    48% {
        left: 128%;
        opacity: 0;
    }
    100% {
        left: 128%;
        opacity: 0;
    }
}

@media (max-width: 768px) {
    .grid-card:hover {
        transform: none;
        box-shadow: none;
    }

    .grid-card::before {
        opacity: 0.28;
    }

    .grid-card::after {
        animation-duration: 5.6s;
        opacity: 0.55;
    }
}

@media (prefers-reduced-motion: reduce) {
    .grid-card,
    .grid-card img {
        transition: none;
    }

    .grid-card::after {
        animation: none;
        opacity: 0;
    }

    .game-grid .grid-card.reveal:nth-child(3n),
    .game-grid .grid-card.reveal:nth-child(3n + 1),
    .game-grid .grid-card.reveal:nth-child(3n + 2) {
        animation-delay: 0s;
    }
}

/* ================= HERO AUTH BUTTONS ================= */
.hero-auth-card {
    min-width: 190px;
}

.hero-auth-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 0;
    width: 100%;
}

.hero-auth-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 36px;
    border-radius: 10px;
    text-decoration: none;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.4px;
    border: 1px solid transparent;
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.hero-auth-btn.login {
    color: #062126;
    background: #6aaeb4;
    box-shadow: 0 8px 16px rgba(106, 174, 180, 0.32);
}

.hero-auth-btn.daftar {
    color: #f3f4f6;
    background: #6b7280;
    border-color: #6b7280;
}

.hero-auth-btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.05);
}





/* ================= MOBILE TOP AUTH ================= */
.mobile-top-auth {
    display: none;
}

@media (max-width: 768px) {
    .sidebar,
    .brand-area,
    .mobile-top-auth {
        background: #275f68;
    }

    .sidebar {
        margin-top: 8px;
        padding: 16px 10px 10px;
        border: 1px solid rgba(176, 226, 230, 0.22);
        border-radius: 18px;
        box-shadow: 0 6px 14px rgba(6, 28, 32, 0.12);
        backdrop-filter: none;
    }

    .brand-area {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        margin-bottom: 6px;
        padding: 10px 8px;
        border-radius: 14px;
        border: 1px solid rgba(176, 226, 230, 0.22);
        box-shadow: none;
        backdrop-filter: none;
    }

    .brand-area::before {
        display: none;
    }

    .brand-logo {
        width: 150px !important;
        max-width: 52vw;
    }

    .mobile-top-auth {
        display: flex;
        align-items: center;
        gap: 7px;
        margin-left: auto;
        padding: 2px;
        border-radius: 999px;
        border: 1px solid rgba(176, 226, 230, 0.22);
        box-shadow: none;
        backdrop-filter: none;
    }

    .mobile-auth-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        height: 30px;
        min-width: 68px;
        padding: 0 10px;
        border-radius: 999px;
        text-decoration: none;
        font-size: 10px;
        font-weight: 800;
        letter-spacing: 0.25px;
        border: 1px solid transparent;
        white-space: nowrap;
        box-shadow: 0 3px 8px rgba(6, 28, 32, 0.2);
        transition: transform 0.2s ease, filter 0.2s ease, box-shadow 0.2s ease;
    }

    .mobile-auth-btn.login {
        color: #07282e;
        background: linear-gradient(180deg, #86cbd2, #67aeb6);
        border-color: rgba(182, 235, 239, 0.5);
    }

    .mobile-auth-btn.daftar {
        color: #f2f6fb;
        background: linear-gradient(180deg, #7d8898, #646f80);
        border-color: rgba(206, 218, 234, 0.38);
    }

    .mobile-auth-btn:active {
        transform: translateY(1px) scale(0.99);
        filter: brightness(0.96);
        box-shadow: 0 1px 3px rgba(6, 28, 32, 0.2);
    }

    #providerList {
        margin-top: 0;
        padding: 8px 2px 3px;
        border-top: none;
    }

    .provider-mobile-list .provider-item,
    #providerList .provider-item {
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.08);
        border: 1px solid rgba(195, 235, 238, 0.22);
        transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
    }

    .provider-mobile-list .provider-item.active,
    #providerList .provider-item.active {
        background: linear-gradient(90deg, #ffd84f, #ffc21a);
        color: #101b20;
        border-color: transparent;
        box-shadow: none;
    }

    .provider-mobile-list .provider-item:active,
    #providerList .provider-item:active {
        transform: scale(0.98);
    }
}

/* ================= BRAND LOGO ANIMATION ================= */
.brand-logo {
    animation: logoFloat 3.6s ease-in-out infinite, logoGlow 2.6s ease-in-out infinite;
    transform-origin: center;
}

@keyframes logoFloat {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-3px);
    }
}

@keyframes logoGlow {
    0%,
    100% {
        filter: drop-shadow(0 0 0 rgba(250, 204, 21, 0));
    }
    50% {
        filter: drop-shadow(0 0 10px rgba(250, 204, 21, 0.42));
    }
}

@media (prefers-reduced-motion: reduce) {
    .brand-logo {
        animation: none;
    }
}

/* ================= MOBILE CLEAN OVERRIDE ================= */
@media (max-width: 768px) {
    .sidebar,
    .wrapper {
        width: calc(100% - 16px);
        margin-left: auto;
        margin-right: auto;
    }

    .sidebar {
        margin-top: 8px;
        padding: 10px;
        border-radius: 14px;
        background: #275f68;
        border: none;
        box-shadow: none;
    }

    .brand-area {
        margin: 0;
        padding: 8px;
        border-radius: 10px;
        background: #275f68;
        border: none;
    }

    .brand-logo {
        width: 132px !important;
        max-width: 48vw;
    }

    .mobile-top-auth {
        background: transparent;
        border: none;
        padding: 0;
        gap: 6px;
    }

    .mobile-auth-btn {
        height: 28px;
        min-width: 66px;
        padding: 0 10px;
        border-radius: 9px;
        font-size: 10px;
    }

    .wrapper {
        padding: 10px 0 18px;
    }

    .hero-section {
        margin-bottom: 10px;
        padding: 14px;
        border-radius: 12px;
    }

    .hero-left h1 {
        font-size: 19px;
        line-height: 1.2;
    }

    .hero-left p {
        margin-top: 6px;
        font-size: 12px;
        line-height: 1.45;
    }

    .header {
        margin-bottom: 10px;
        padding: 12px;
        border-radius: 12px;
    }

    .logo {
        font-size: 17px;
    }

    .stats {
        grid-template-columns: 1fr;
        gap: 7px;
    }

    .stat-box {
        padding: 8px;
        border-radius: 9px;
    }

    .stat-box b {
        font-size: 18px;
    }
}

/* ================= PGSOFT PATTERN LABEL ================= */
.pg-label {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    color: #f4fbff;
    background: rgba(106, 174, 180, 0.22);
    box-shadow: inset 0 0 0 1px rgba(183, 232, 236, 0.42);
}

@media (max-width: 768px) {
    .pg-label {
        font-size: 11px;
        padding: 5px 8px;
    }
}

/* ================= JILI PATTERN ARROW ================= */
.pattern-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    font-weight: 800;
    color: #facc15;
}

/* ================= DESKTOP LAYOUT ALIGNMENT ================= */
@media (min-width: 769px) {
    .layout {
        align-items: stretch;
    }

    .sidebar {
        width: 180px;
        padding: 16px 10px;
    }

    .brand-logo {
        width: 128px;
    }

    .wrapper {
        max-width: none;
        margin: 0;
        padding: 18px 20px 24px;
    }

    .hero-section {
        margin-bottom: 12px;
        padding: 16px 18px;
    }

    .hero-right {
        margin-left: auto;
    }

    .hero-auth-card {
        min-width: 180px;
        padding: 10px;
        border-radius: 12px;
    }

    .header {
        margin-bottom: 10px;
        padding: 14px 18px;
    }

    .stats {
        margin-left: auto;
        gap: 10px;
    }

    .stat-box {
    }

    .section-title {
        margin-top: 12px;
        margin-bottom: 8px;
    }
}

/* ================= WD TOAST ================= */
.wd-toast-container {
    position: fixed;
    left: 50%;
    bottom: 16px;
    transform: translateX(-50%) translateY(16px);
    opacity: 0;
    pointer-events: none;
    z-index: 1200;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.wd-toast-container.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.wd-toast {
    max-width: min(92vw, 520px);
    padding: 11px 14px;
    border-radius: 12px;
    border: 1px solid rgba(250, 204, 21, 0.35);
    background: linear-gradient(140deg, rgba(13, 45, 52, 0.95), rgba(24, 76, 83, 0.95));
    color: #f4fbff;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.1px;
    box-shadow: 0 10px 24px rgba(7, 29, 33, 0.35);
    text-align: center;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.wd-toast-bell {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    background: rgba(250, 204, 21, 0.18);
    border: 1px solid rgba(250, 204, 21, 0.32);
    font-size: 13px;
    line-height: 1;
}

.wd-toast-text {
    display: inline-block;
    text-align: left;
}

@media (max-width: 768px) {
    .wd-toast-container {
        bottom: 12px;
    }

    .wd-toast {
        max-width: calc(100vw - 16px);
        border-radius: 10px;
        padding: 10px 12px;
        font-size: 12px;
        gap: 7px;
    }

    .wd-toast-bell {
        width: 20px;
        height: 20px;
        font-size: 12px;
    }
}
