/* ===== RESET & BASE ===== */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    background: #e5e7eb;
    min-height: 100vh;
    padding-bottom: 80px;
    display: flex;
    justify-content: center;
}



/* ===== PAGE WRAPPER ===== */
.page-wrapper {
    width: 100%;
    max-width: 480px;
    background: #f3f4f6;
    min-height: 100vh;
    position: relative;
    margin: 0 auto;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.15);
}

/* ===== SHIMMER PRELOADER ===== */
@keyframes shimmer {
    0% {
        background-position: -600px 0;
    }

    100% {
        background-position: 600px 0;
    }
}

#preloader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: #f3f5fb;
    display: flex;
    justify-content: center;
    transition: opacity 0.3s ease;
}


.shimmer-inner {
    width: 100%;
    max-width: 480px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.shimmer-bar {
    border-radius: 10px;
    background: linear-gradient(90deg, #e5e7eb 25%, #d1d5db 50%, #e5e7eb 75%);
    background-size: 800px 100%;
    animation: shimmer 1.2s infinite linear;
}

.shimmer-bar.tall {
    height: 42px;
}

.shimmer-bar.card {
    height: 88px;
    border-radius: 14px;
}

.shimmer-row {
    display: flex;
    gap: 12px;
}

.shimmer-row .shimmer-bar {
    flex: 1;
    height: 48px;
}

/* ===== HEADER ===== */
.top-header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: linear-gradient(180deg, #fb923c 0%, #f97316 100%);
    padding: 14px 16px 22px;
    border-radius: 0 0 24px 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.header-logo {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.header-title {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 0.05em;
    color: #fff;
}

.balance-badge {
    background: #facc15;
    color: #000;
    padding: 5px 12px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 13px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.login-btn {
    width: auto;
    border: 2px solid #facc15;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 12px;
    font-weight: bold;
    padding: 5px;
    text-decoration: none;
    transition: transform 0.15s;
}

.login-btn:hover {
    transform: scale(1.05);
    color: #fff;
}

/* ===== SLIDERS ===== */
.slider-wrap {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
    height: 160px;
}

.slider-dark {
    background: #000;
    height: 140px;
}

.slider-track {
    display: flex;
    height: 100%;
    transition: transform 0.5s ease;
}

.slide-img {
    min-width: 100%;
    height: 100%;
    object-fit: cover;
}

.featured-img {
    object-fit: contain;
}

.dots {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transition: background 0.3s;
    cursor: pointer;
}

.dot.active {
    background: #fff;
}

/* ===== MARQUEE ===== */
.marquee-bar {
    background: #facc15;
    color: #000;
    font-size: 12px;
    font-weight: 500;
    padding: 7px 14px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

/* ===== CATEGORY BAR ===== */
.category-bar {
    background: #fff;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    padding: 10px 0 8px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.cat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    font-size: 11px;
    color: #9ca3af;
    cursor: pointer;
    transition: color 0.2s;
}

.cat-item i {
    font-size: 18px;
}

.cat-item.active,
.cat-item:hover {
    color: #ef4444;
    font-weight: 600;
}

/* ===== PROVIDER TABS ===== */
.provider-tabs {
    display: flex;
    gap: 16px;
    font-size: 13px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.provider-tabs::-webkit-scrollbar {
    display: none;
}

.provider-tab {
    color: #9ca3af;
    cursor: pointer;
    white-space: nowrap;
    padding-bottom: 4px;
    transition: color 0.2s;
}

.provider-tab.active {
    color: #ef4444;
    font-weight: 700;
    border-bottom: 2px solid #ef4444;
}

/* ===== SEARCH ===== */
.search-box {
    background: #fff;
    border-radius: 999px;
    display: flex;
    align-items: center;
    padding: 8px 16px;
    gap: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
}

.search-box input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 13px;
    background: transparent;
}

.search-box i {
    color: #9ca3af;
}



.game-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s;
}

.game-card:hover {
    transform: scale(1.04);
}

.game-card img {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
}

.game-card p {
    font-size: 11px;
    font-weight: 600;
    text-align: center;
    padding: 5px 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #374151;
    margin: 0;
}

/* ===== EARNINGS CARD ===== */
.earnings-card {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.07);
}

.earnings-title {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 14px 0;
}

.title-bar {
    width: 4px;
    height: 22px;
    background: #ef4444;
    border-radius: 4px;
}

.earnings-title h2 {
    font-size: 16px;
    font-weight: 800;
    color: #1f2937;
    margin: 0;
}

/* TOP 3 */
.top3-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    align-items: flex-end;
    padding: 0 8px;
}

.top3-item {
    text-align: center;
}

.top3-avatar {
    position: relative;
    width: 64px;
    height: 64px;
    margin: 0 auto;
}

.top3-avatar img {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #bfdbfe;
}

.top3-avatar--lg {
    width: 80px;
    height: 80px;
}

.top3-avatar--lg img {
    width: 80px;
    height: 80px;
    border-color: #fde68a;
}

.crown {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 18px;
}

.crown--lg {
    font-size: 22px;
    top: -14px;
}

.rank-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    border-radius: 4px;
    padding: 2px 10px;
    margin-top: 4px;
}

.rank-1 {
    background: #facc15;
    color: #c2410c;
}

.rank-2 {
    background: #dbeafe;
    color: #3b82f6;
}

.rank-3 {
    background: #fed7aa;
    color: #ea580c;
}

.rank-bar {
    border-radius: 12px 12px 0 0;
    margin-top: 6px;
    padding: 12px 4px;
    background: linear-gradient(180deg, #f87171, #ef4444);
    color: #fff;
}

.rank-bar-1 {
    padding: 24px 6px;
}

.rank-name {
    font-size: 11px;
    font-weight: 700;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-amount {
    margin: 8px 0 0;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 999px;
    padding: 5px 4px;
    font-size: 11px;
    font-weight: 800;
}

/* RANK LIST */
.rank-list {
    background: #f9fafb;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rank-row {
    background: #fff;
    border-radius: 10px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.rank-num {
    font-size: 18px;
    font-weight: 800;
    color: #9ca3af;
    width: 20px;
}

.rank-row img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.rank-row p {
    flex: 1;
    font-size: 13px;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-pill {
    background: #fca5a5;
    color: #fff;
    font-weight: 800;
    border-radius: 999px;
    padding: 6px 16px;
    font-size: 13px;
}

/* ===== LICENSE ===== */
.license-card {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    padding: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
}

.license-card img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

/* ===== FLOATING BUTTONS ===== */
#floatingSupport {
    position: fixed;
    right: 14px;
    bottom: 90px;
    z-index: 49;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#floatingSupport.hidden {
    opacity: 0;
    transform: translateY(16px);
    pointer-events: none;
}

.float-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #fff;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.15s ease;
}

.float-btn:hover {
    transform: scale(1.08);
    color: #fff;
}

.float-btn:active {
    transform: scale(0.94);
}

.float-refresh {
    background: linear-gradient(160deg, #38bdf8, #0ea5e9);
}

.float-telegram {
    background: linear-gradient(160deg, #2AABEE, #1d8fc4);
}

.float-support {
    background: linear-gradient(160deg, #f87171, #ef4444);
}

/* ===== BOTTOM NAV ===== */
#bottomNav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    background: #fff;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -3px 18px rgba(0, 0, 0, 0.10);
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    padding: 8px 0 10px;
    z-index: 50;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    font-size: 11px;
    color: #9ca3af;
    text-decoration: none;
    transition: color 0.2s ease;
}

.nav-item i {
    font-size: 20px;
    line-height: 1;
}

.nav-item.active {
    color: #ef4444;
}

.nav-item--center {
    margin-top: -26px;
}

.center-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(145deg, #ef4444, #dc2626);
    border: 4px solid #fecaca;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.4);
    font-size: 22px;
    color: #fff;
}

.nav-item--center span {
    margin-top: 2px;
}


/* ===== GAME GRID ===== */
.game-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding-bottom: 16px;
}

/* ===== GAME CARD ===== */
.game-card-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 14px;
}

.game-card {
    display: block;
    position: relative;
    text-decoration: none;
}

.game-card img {
    width: 100%;
    border-radius: 14px;
    display: block;
}

.game-card p {
    margin-top: 6px;
    text-align: center;
    font-size: 13px;
}

/* ===== FLOATING BUTTONS ===== */
.floating-buttons {
    position: absolute;
    left: 0;
    bottom: 45px;
    width: 100%;

    display: flex;
    justify-content: center;
    gap: 8px;

    opacity: 0;
    transform: translateY(10px);

    transition: all 0.3s ease;
}

/* Show on hover */
.game-card-wrapper:hover .floating-buttons {
    opacity: 1;
    transform: translateY(0);
}

/* Buttons */
.demo-btn,
.play-btn {
    padding: 7px 12px;
    border-radius: 5px;
    font-size: 10px;
    font-weight: 600;
    text-decoration: none;
    color: white;
    backdrop-filter: blur(8px);
}

.demo-btn:hover,
.play-btn:hover {
    color: white !important;
}

/* Demo */
.demo-btn {
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.35);
}

/* Play */
.play-btn {
    background: linear-gradient(135deg, #ff9800, #ff5722);
}

/* Mobile */
@media(max-width:768px) {

    .game-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .floating-buttons {
        opacity: 1;
        transform: translateY(0);
        bottom: 40px;
    }

    .demo-btn,
    .play-btn {
        font-size: 11px;
        padding: 6px 10px;
    }
}