/* ==========================================================================
   Mega888 Legend - Theme: royal-gold
   Engineered for Mobile Performance & High Visual Appeal
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@600;700;800;900&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #f59e0b;
    --primary-hover: #d97706;
    --secondary: #fbbf24;
    --accent: #ca8a04;
    --bg-dark: #080c12;
    --bg-surface: #141a24;
    --card-bg: rgba(20, 26, 36, 0.82);
    --card-border: rgba(245, 158, 11, 0.25);
    --text-main: #fefce8;
    --text-muted: #cbd5e1;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Cinzel', 'Inter', serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.65;
    overflow-x: hidden;
}

/* Typography Contrast Overrides */
.text-muted,
.text-secondary {
    color: var(--text-muted) !important;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--text-main);
    font-weight: 700;
    letter-spacing: -0.02em;
}

a {
    color: var(--secondary);
    text-decoration: none;
    transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover {
    color: var(--primary);
}

/* Navbar Styling - Clean text links, NO buttons */
.custom-navbar {
    background: rgba(10, 14, 26, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--card-border);
    padding: 0.85rem 1rem;
    transition: all 0.3s ease;
}

.navbar-brand {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-main) !important;
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.navbar-brand img {
    height: 38px;
    width: auto;
    object-fit: contain;
}

.brand-accent {
    color: var(--primary);
    text-shadow: 0 0 14px rgba(16, 185, 129, 0.35);
}

.nav-link {
    color: #e2e8f0 !important;
    font-size: 0.95rem;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    position: relative;
    transition: color 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--secondary) !important;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 1rem;
    right: 1rem;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
}

/* Primary Action Buttons */
.btn-primary-action {
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    color: #ffffff !important;
    font-weight: 700;
    padding: 0.75rem 1.75rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35), 0 0 15px rgba(16, 185, 129, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-transform: none;
}

.btn-primary-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45), 0 0 25px rgba(16, 185, 129, 0.4);
    color: #ffffff !important;
}

.btn-secondary-action {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-main) !important;
    font-weight: 600;
    padding: 0.75rem 1.6rem;
    border-radius: 8px;
    border: 1px solid var(--card-border);
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-secondary-action:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--secondary);
    transform: translateY(-2px);
}

/* Hero Badges */
.hero-badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    padding: 0.35rem 0.95rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--secondary);
    margin-bottom: 1.25rem;
}

/* Hero: thin full-width banner background */
.hero-section {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.hero-section-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    background-color: var(--bg-dark);
    background-image: var(--hero-banner);
    background-size: cover;
    background-position: 70% center;
    background-repeat: no-repeat;
    filter: brightness(1.15) saturate(1.05);
    pointer-events: none;
}

.hero-section-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        95deg,
        rgba(8, 12, 18, 0.92) 0%,
        rgba(8, 12, 18, 0.78) 32%,
        rgba(8, 12, 18, 0.35) 55%,
        rgba(8, 12, 18, 0.12) 78%,
        rgba(8, 12, 18, 0.22) 100%
    );
}

.hero-section > .container {
    z-index: 1;
}

@media (max-width: 991.98px) {
    .hero-section-bg {
        background-position: 55% center;
        filter: brightness(1.2) saturate(1.05);
    }

    .hero-section-bg::after {
        background: linear-gradient(
            180deg,
            rgba(8, 12, 18, 0.42) 0%,
            rgba(8, 12, 18, 0.28) 40%,
            rgba(8, 12, 18, 0.7) 100%
        );
    }
}

/* Stat Chips Grid */
.stat-chip-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 1.25rem 1rem;
    text-align: center;
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.stat-chip-card:hover {
    transform: translateY(-4px);
    border-color: var(--secondary);
}

.stat-chip-val {
    font-size: 1.65rem;
    font-weight: 800;
    color: var(--secondary);
    margin-bottom: 0.25rem;
}

.stat-chip-lbl {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Content Card */
.content-glass-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 14px;
    padding: 2rem;
    margin-bottom: 2rem;
}

/* Game Card */
.game-showcase-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 14px;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.game-showcase-card:hover {
    transform: translateY(-6px);
    border-color: var(--secondary);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
}

.game-thumb-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16/10;
    background: #000;
    overflow: hidden;
}

.game-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.game-showcase-card:hover .game-thumb-img {
    transform: scale(1.08);
}

.game-rtp-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.75);
    border: 1px solid var(--secondary);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    backdrop-filter: blur(4px);
}

.game-body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.game-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.game-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    flex-grow: 1;
}

/* Timeline / Installation Steps */
.step-item-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 1.5rem;
    height: 100%;
    position: relative;
}

.step-num-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary);
    color: #ffffff;
    font-weight: 800;
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

/* FAQ Accordion Styling */
.accordion-item {
    background: var(--card-bg) !important;
    border: 1px solid var(--card-border) !important;
    border-radius: 10px !important;
    margin-bottom: 0.85rem;
    overflow: hidden;
}

.accordion-button {
    background: var(--card-bg) !important;
    color: var(--text-main) !important;
    font-weight: 600;
    font-size: 1.05rem;
    padding: 1.1rem 1.25rem;
    box-shadow: none !important;
}

.accordion-button:not(.collapsed) {
    color: var(--secondary) !important;
    border-bottom: 1px solid var(--card-border);
}

.accordion-button::after {
    filter: invert(1);
}

.accordion-body {
    color: var(--text-muted);
    padding: 1.25rem;
    line-height: 1.7;
}

/* Banking Badges */
.bank-badge-item {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    background: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.4);
    padding: 0.45rem 0.85rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.85rem;
    color: #0f172a;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.bank-badge-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.bank-badge-item img {
    height: 20px;
    width: auto;
    max-width: 55px;
    object-fit: contain;
    display: inline-block;
}

/* CTA Showcase Box */
.cta-banner-box {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.08));
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 3rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-banner-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 20%;
    right: 20%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--secondary), transparent);
}

/* Footer */
.custom-footer {
    background: #04070d;
    border-top: 1px solid var(--card-border);
    padding: 3.5rem 0 2rem;
    margin-top: 4rem;
}

.footer-link {
    color: #94a3b8;
    display: inline-block;
    margin-bottom: 0.6rem;
    font-size: 0.92rem;
}

.footer-link:hover {
    color: var(--secondary);
}

.trust-badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    font-size: 0.78rem;
    color: #cbd5e1;
}


/* ==========================================================================
   APK Technical Specification Table (SEO & Information Architecture)
   ========================================================================== */
.apk-spec-table-card {
    background: var(--card-bg, rgba(18, 12, 38, 0.85));
    border: 1px solid var(--card-border, rgba(139, 92, 246, 0.3));
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    margin-bottom: 2.5rem;
}
.apk-spec-table-card .table {
    margin-bottom: 0;
    font-size: 0.93rem;
}
.apk-spec-table-card th {
    background: rgba(255, 255, 255, 0.04) !important;
    color: #cbd5e1 !important;
    font-weight: 600;
    border-color: rgba(255, 255, 255, 0.08) !important;
    padding: 0.85rem 1rem;
}
.apk-spec-table-card td {
    background: transparent !important;
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    padding: 0.85rem 1rem;
}
@media (max-width: 768px) {
    .apk-spec-table-card {
        padding: 1rem 0.75rem;
    }
    .apk-spec-table-card th,
    .apk-spec-table-card td {
        padding: 0.65rem 0.5rem;
        font-size: 0.85rem;
    }
}
