/**
 * DiwaGameList.org - Custom Theme & Responsive Stylesheet
 * Version: 1.2
 */

/* ==========================================================================
   1. Base & Global Resets
   ========================================================================== */
* {
    box-sizing: border-box;
}

html, body {
    overflow-x: hidden;
    width: 100%;
    margin: 0;
    padding: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.scrollbar-none::-webkit-scrollbar {
    display: none;
}
.scrollbar-none {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.Notice_Slider marquee {
    width: 100%;
    background: #fffbeb;
    color: #78350f;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 6px 8px;
    border: 1px solid #fde68a;
    border-radius: 10px;
    display: block;
}

/* ==========================================================================
   2. Responsive Utility Polyfills (Compensates for Missing Tailwind Classes)
   ========================================================================== */
.gap-1\.5 { gap: 0.375rem !important; }
.gap-2\.5 { gap: 0.625rem !important; }
.gap-3 { gap: 0.75rem !important; }
.gap-x-3 { column-gap: 0.75rem !important; }
.gap-y-1 { row-gap: 0.25rem !important; }
.gap-y-2 { row-gap: 0.5rem !important; }
.gap-y-3 { row-gap: 0.75rem !important; }
.gap-x-2 { column-gap: 0.5rem !important; }
.px-2\.5 { padding-left: 0.625rem !important; padding-right: 0.625rem !important; }
.py-2\.5 { padding-top: 0.625rem !important; padding-bottom: 0.625rem !important; }
.p-2\.5 { padding: 0.625rem !important; }
.text-\[10px\] { font-size: 10px !important; line-height: 1.2 !important; }
.text-\[11px\] { font-size: 11px !important; line-height: 1.25 !important; }
.shadow-xs { box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important; }
.shadow-2xs { box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.03) !important; }
.bg-amber-700 { background-color: #b45309 !important; color: #ffffff !important; }
.bg-slate-300 { background-color: #cbd5e1 !important; color: #0f172a !important; }
.bg-amber-400 { background-color: #fbbf24 !important; color: #78350f !important; }
.from-green-600 { --tw-gradient-from: #16a34a !important; --tw-gradient-to: rgba(22, 163, 74, 0) !important; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to) !important; }
.from-emerald-600 { --tw-gradient-from: #059669 !important; --tw-gradient-to: rgba(5, 150, 105, 0) !important; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to) !important; }
.to-green-600 { --tw-gradient-to: #16a34a !important; }
.to-emerald-600 { --tw-gradient-to: #059669 !important; }
.bg-gradient-to-r { background-image: linear-gradient(to right, var(--tw-gradient-stops, #16a34a, #059669)) !important; }

/* Mobile Guaranteed Download Button Style */
a[href*="/download/"] {
    background: #16a34a !important;
    background: linear-gradient(135deg, #16a34a 0%, #059669 100%) !important;
    color: #ffffff !important;
}

/* ==========================================================================
   3. Header & Navigation System
   ========================================================================== */
.site-header-wrap {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 50;
    box-shadow: 0 4px 15px rgba(11, 17, 70, 0.4);
}
.site-header-main {
    background: linear-gradient(180deg, #04462d 0%, #033724 100%);
    padding: 8px 12px;
    border-bottom: 2px solid #f5b400;
}
.site-header-container {
    max-width: 896px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.site-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none !important;
    min-width: 0;
}
.site-brand-logo {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, #f5b400 0%, #ffe36b 50%, #b87800 100%);
    padding: 2px;
    box-shadow: 0 2px 8px rgba(245, 180, 0, 0.4);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.site-brand-logo-inner {
    width: 100%;
    height: 100%;
    background: #0e1654;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.site-brand-logo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}
.site-brand-spade {
    font-size: 24px;
    line-height: 1;
    color: #f5b400;
    font-weight: 900;
}
.site-brand-title {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.15;
}
.site-brand-name {
    font-size: 21px;
    font-weight: 900;
    letter-spacing: 0.5px;
    color: #ffe36b !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8), 0 0 8px rgba(245, 180, 0, 0.4);
    white-space: nowrap;
    text-transform: uppercase;
}
.site-brand-sub {
    font-size: 10.5px;
    font-weight: 700;
    color: #ffffff !important;
    opacity: 0.92;
    letter-spacing: 0.8px;
    white-space: nowrap;
    text-transform: uppercase;
}
.site-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.site-tg-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #0088cc;
    color: #ffffff !important;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none !important;
    box-shadow: 0 2px 6px rgba(0, 136, 204, 0.4);
    white-space: nowrap;
    transition: transform 0.15s ease, background 0.15s ease;
}
.site-tg-btn:hover {
    background: #0077b5;
}
.site-tg-btn:active {
    transform: scale(0.95);
}
.site-menu-btn {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(245, 180, 0, 0.6);
    cursor: pointer;
    padding: 7px;
    box-sizing: border-box;
}
.site-menu-btn span {
    display: block;
    width: 22px;
    height: 2.5px;
    background: #ffe36b;
    border-radius: 2px;
    transition: all 0.2s ease;
}
.site-subnav-bar {
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    padding: 6px 8px;
    overflow-x: auto;
    scrollbar-width: none;
}
.site-subnav-bar::-webkit-scrollbar {
    display: none;
}
.site-subnav-inner {
    max-width: 896px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    white-space: nowrap;
}
.site-subnav-link {
    flex: 1;
    text-align: center;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 800;
    color: #334155 !important;
    text-decoration: none !important;
    transition: all 0.15s ease;
}
.site-subnav-link:hover {
    background: #f1f5f9;
    color: #0f172a !important;
}
.site-subnav-link.active {
    background: #085639;
    color: #ffffff !important;
}
.site-dropdown-menu {
    max-width: 896px;
    margin: 8px auto 4px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}
.site-dropdown-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    text-align: center;
}

@media (max-width: 640px) {
    .site-brand-name {
        font-size: 18px;
    }
    .site-brand-sub {
        font-size: 9.5px;
    }
    .site-brand-logo {
        width: 40px;
        height: 40px;
    }
    .site-dropdown-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ==========================================================================
   4. Floating Telegram Button (Bottom-Left FAB)
   ========================================================================== */
.floating-telegram-wrap {
    position: fixed !important;
    bottom: calc(20px + env(safe-area-inset-bottom, 0px)) !important;
    left: calc(16px + env(safe-area-inset-left, 0px)) !important;
    z-index: 99999 !important;
}
.floating-telegram-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    background: linear-gradient(135deg, #0088cc 0%, #006699 100%) !important;
    color: #ffffff !important;
    padding: 8px 16px 8px 12px !important;
    border-radius: 50px !important;
    border: 2px solid #ffffff !important;
    box-shadow: 0 4px 18px rgba(0, 136, 204, 0.55), 0 2px 6px rgba(0, 0, 0, 0.25) !important;
    text-decoration: none !important;
    cursor: pointer !important;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s ease !important;
    animation: tgPulse 2.5s infinite !important;
}
.floating-telegram-btn:hover {
    transform: scale(1.06) !important;
    box-shadow: 0 6px 24px rgba(0, 136, 204, 0.75), 0 3px 8px rgba(0, 0, 0, 0.3) !important;
    color: #ffffff !important;
}
.floating-telegram-btn:active {
    transform: scale(0.96) !important;
}
.floating-telegram-icon {
    width: 22px !important;
    height: 22px !important;
    fill: #ffffff !important;
    flex-shrink: 0 !important;
}
.floating-telegram-text {
    font-size: 13px !important;
    font-weight: 800 !important;
    color: #ffffff !important;
    letter-spacing: 0.4px !important;
    white-space: nowrap !important;
    line-height: 1 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25) !important;
}
@keyframes tgPulse {
    0%, 100% {
        box-shadow: 0 4px 18px rgba(0, 136, 204, 0.55), 0 0 0 0 rgba(0, 136, 204, 0.5);
    }
    50% {
        box-shadow: 0 4px 22px rgba(0, 136, 204, 0.75), 0 0 0 10px rgba(0, 136, 204, 0);
    }
}

/* ==========================================================================
   5. Step-by-Step APK Download Guide
   ========================================================================== */
.download-steps-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.download-step-card {
    display: flex;
    align-items: flex-start;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 13px 15px;
    transition: all 0.2s ease;
}
.download-step-card:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}
.download-step-badge {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    max-width: 32px !important;
    border-radius: 50% !important;
    background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%) !important;
    color: #ffffff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 14px !important;
    font-weight: 800 !important;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35) !important;
    flex-shrink: 0 !important;
    margin-right: 14px !important;
    margin-top: 1px !important;
}
.download-step-content {
    flex: 1;
    min-width: 0;
}
.download-step-title {
    font-size: 13.5px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 3px 0;
    line-height: 1.35;
}
.download-step-desc {
    font-size: 12px;
    color: #64748b;
    margin: 0;
    line-height: 1.55;
}

/* ==========================================================================
   5b. Game Detail Hero Card & Action Buttons
   ========================================================================== */
.game-hero-card {
    background: #ffffff;
    border-radius: 18px;
    border: 1px solid #f1f5f9;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03), 0 2px 8px rgba(0, 0, 0, 0.02);
    padding: 16px;
    margin-bottom: 16px;
    overflow: hidden;
}
.game-hero-icon {
    width: 88px;
    height: 88px;
    border-radius: 18px;
    object-fit: cover;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
    margin: 0 auto;
}
.game-hero-dl-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-weight: 800;
    font-size: 14.5px;
    line-height: 1.2;
    white-space: nowrap;
    color: #ffffff !important;
    background: linear-gradient(135deg, #16a34a 0%, #059669 100%) !important;
    border-radius: 12px;
    text-decoration: none !important;
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.35);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    flex-shrink: 0;
}
.game-hero-dl-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(22, 163, 74, 0.45);
}
.game-hero-dl-btn:active {
    transform: scale(0.97);
}
.game-hero-tg-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 12px 20px;
    font-weight: 700;
    font-size: 13.5px;
    line-height: 1.2;
    white-space: nowrap;
    color: #ffffff !important;
    background: linear-gradient(135deg, #0088cc 0%, #006699 100%) !important;
    border-radius: 12px;
    text-decoration: none !important;
    box-shadow: 0 3px 8px rgba(0, 136, 204, 0.35);
    border: none;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    flex-shrink: 0;
}
.game-hero-tg-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 14px rgba(0, 136, 204, 0.45);
}
.game-hero-tg-btn:active {
    transform: scale(0.97);
}

@media (max-width: 640px) {
    .game-hero-dl-btn, .game-hero-tg-btn {
        width: 100%;
        padding: 11px 16px;
        font-size: 14px;
    }
}

/* ==========================================================================
   6. Game List Cards (Matching User Screenshot & Homepage Design)
   ========================================================================== */
.related-games-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}
.related-game-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
    border: 1px solid #f1f5f9;
    border-radius: 16px;
    padding: 10px 14px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03), 0 2px 6px rgba(0, 0, 0, 0.02);
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
    text-decoration: none !important;
}
.related-game-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
    transform: translateY(-1px);
}
.related-game-left {
    display: flex;
    align-items: center;
    min-width: 0;
    flex: 1;
}
/* Rank Badge: Per-Rank Colors Exactly Matching Screenshot */
.related-game-rank {
    width: 28px;
    height: 28px;
    min-width: 28px;
    border-radius: 8px;
    background: #f1f5f9;
    color: #475569;
    font-size: 12px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    flex-shrink: 0;
}
.related-game-rank.rank-1 {
    background: #fbbf24 !important;
    color: #78350f !important;
}
.related-game-rank.rank-2 {
    background: #cbd5e1 !important;
    color: #0f172a !important;
}
.related-game-rank.rank-3 {
    background: #b45309 !important;
    color: #ffffff !important;
}
.related-game-logo {
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 12px;
    object-fit: cover;
    border: 1px solid #f1f5f9;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    margin-right: 12px;
    flex-shrink: 0;
}
.related-game-info {
    min-width: 0;
    flex: 1;
}
.related-game-name {
    font-size: 13.5px;
    font-weight: 800;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    line-height: 1.25;
    text-decoration: none !important;
    margin-bottom: 3px;
}
.related-game-name:hover {
    color: #1d4ed8;
}
.related-game-badges {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.related-bonus-badge {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #d1fae5;
    font-size: 11px;
    font-weight: 900;
    padding: 2px 8px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    line-height: 1.2;
}
.related-min-badge {
    color: #64748b;
    font-size: 11px;
    font-weight: 600;
}
.related-game-cta {
    flex-shrink: 0;
    margin-left: 8px;
}
.related-dl-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 7px 14px;
    background: linear-gradient(135deg, #16a34a 0%, #059669 100%) !important;
    color: #ffffff !important;
    font-size: 12px;
    font-weight: 800;
    border-radius: 10px;
    text-decoration: none !important;
    box-shadow: 0 2px 6px rgba(22, 163, 74, 0.3);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    white-space: nowrap;
}
.related-dl-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(22, 163, 74, 0.45);
}
.related-dl-btn:active {
    transform: scale(0.96);
}

/* ==========================================================================
   7. Footer & Category Pills
   ========================================================================== */
.footer {
    padding-bottom: 10px !important;
}
.footer-cat-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px 10px;
    margin: 14px auto;
    padding: 0 14px;
    max-width: 860px;
}
.footer-cat-link {
    display: inline-block;
    background: rgba(255, 255, 255, 0.12);
    color: #f1f5f9 !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    padding: 3px 10px;
    border-radius: 20px;
    text-decoration: none !important;
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.15);
}
.footer-cat-link:hover {
    background: rgba(255, 255, 255, 0.28);
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-1px);
}

