/* Fun88 Cambodia — Futuristic Gaming FX Layer */

:root {
    --primary: #00e5ff;
    --primary-dark: #0099cc;
    --neon-cyan: #00e5ff;
    --neon-purple: #b44bff;
    --neon-magenta: #ff2d95;
    --neon-gold: #ffd54a;
    --dark-bg: #030306;
    --dark-blue: #050508;
    --dark-blue-alt: #0a0a12;
    --card-bg: rgba(12, 14, 24, 0.72);
    --card-hover: rgba(18, 22, 38, 0.92);
    --border-color: rgba(0, 229, 255, 0.14);
    --border-glow: rgba(0, 229, 255, 0.45);
    --text-primary: #f0f6ff;
    --text-secondary: #a8b4cc;
    --text-muted: #6b7a94;
    --gradient-primary: linear-gradient(135deg, #00e5ff 0%, #b44bff 50%, #ff2d95 100%);
    --gradient-gold: linear-gradient(135deg, #ffd54a 0%, #ff9f1c 100%);
    --gradient-dark: linear-gradient(180deg, #030306 0%, #0a0a14 100%);
    --shadow-neon: 0 0 20px rgba(0, 229, 255, 0.25), 0 0 60px rgba(180, 75, 255, 0.12);
    --shadow-neon-strong: 0 0 30px rgba(0, 229, 255, 0.4), 0 8px 32px rgba(0, 0, 0, 0.6);
    --glass: rgba(8, 10, 18, 0.82);
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    --font-display: 'Orbitron', 'Segoe UI', sans-serif;
    --font-body: 'Rajdhani', 'Segoe UI', sans-serif;
}

/* Ambient background */
.ambient-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
    background: radial-gradient(ellipse 80% 60% at 50% -10%, rgba(0, 229, 255, 0.08) 0%, transparent 55%),
                radial-gradient(ellipse 60% 50% at 100% 50%, rgba(180, 75, 255, 0.06) 0%, transparent 50%),
                radial-gradient(ellipse 50% 40% at 0% 80%, rgba(255, 45, 149, 0.05) 0%, transparent 45%),
                var(--dark-bg);
}
.ambient-bg__grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(0, 229, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 229, 255, 0.04) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse 70% 70% at 50% 40%, black 20%, transparent 75%);
    animation: grid-drift 24s linear infinite;
}
.ambient-bg__orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.35;
    animation: orb-float 18s ease-in-out infinite;
}
.ambient-bg__orb--1 {
    width: 420px;
    height: 420px;
    top: -8%;
    left: 15%;
    background: rgba(0, 229, 255, 0.25);
}
.ambient-bg__orb--2 {
    width: 360px;
    height: 360px;
    top: 40%;
    right: -5%;
    background: rgba(180, 75, 255, 0.22);
    animation-delay: -6s;
}
.ambient-bg__orb--3 {
    width: 280px;
    height: 280px;
    bottom: 5%;
    left: 25%;
    background: rgba(255, 45, 149, 0.18);
    animation-delay: -12s;
}
.ambient-bg__scanline {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.03) 2px,
        rgba(0, 0, 0, 0.03) 4px
    );
    opacity: 0.4;
}

@keyframes grid-drift {
    0% { transform: translateY(0); }
    100% { transform: translateY(48px); }
}
@keyframes orb-float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -20px) scale(1.05); }
    66% { transform: translate(-20px, 15px) scale(0.95); }
}

/* Typography */
body {
    font-family: var(--font-body);
    font-size: 17px;
    font-weight: 500;
    background: var(--dark-bg);
    letter-spacing: 0.02em;
}
h1, h2, h3, h4, .section__title, .hero__title {
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: none;
}
h1 { font-size: clamp(1.75rem, 4vw, 2.75rem); }
h2, .section__title { font-size: clamp(1.5rem, 3vw, 2.1rem); }

a { color: var(--neon-cyan); }
a:hover { color: #7af0ff; text-shadow: 0 0 12px rgba(0, 229, 255, 0.4); }

/* Header — glass bar, neon underline (no backdrop-filter on .header) */
.header {
    background: rgba(3, 3, 8, 0.92);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    transition: box-shadow var(--transition), border-color var(--transition);
    position: sticky;
    top: 0;
    z-index: 1001;
}
.header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-primary);
    opacity: 0.6;
    animation: header-glow 4s ease-in-out infinite;
}
.header.is-scrolled {
    box-shadow: 0 8px 40px rgba(0, 229, 255, 0.08), 0 4px 24px rgba(0, 0, 0, 0.6);
    border-bottom-color: rgba(0, 229, 255, 0.25);
}
@keyframes header-glow {
    0%, 100% { opacity: 0.4; filter: blur(0); }
    50% { opacity: 0.85; filter: blur(1px); }
}

.nav__link {
    position: relative;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    overflow: hidden;
}
.nav__link::before {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width var(--transition), left var(--transition);
    border-radius: 2px;
}
.nav__link:hover::before,
.nav__link--active::before {
    width: 60%;
    left: 20%;
}
.nav__link:hover,
.nav__link--active {
    color: var(--neon-cyan);
    background: rgba(0, 229, 255, 0.08);
    text-shadow: 0 0 20px rgba(0, 229, 255, 0.35);
}

.nav__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 1.25rem;
    margin-left: 0.5rem;
    font-family: var(--font-display);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none;
    color: #030306;
    background: var(--gradient-gold);
    border-radius: var(--radius-sm);
    box-shadow: 0 0 20px rgba(255, 213, 74, 0.35);
    transition: transform var(--transition), box-shadow var(--transition);
    white-space: nowrap;
}
.nav__cta:hover {
    color: #030306;
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 0 30px rgba(255, 213, 74, 0.55);
    text-shadow: none;
}

.mobile-menu-toggle {
    background: rgba(0, 229, 255, 0.1);
    border: 1px solid rgba(0, 229, 255, 0.35);
    box-shadow: 0 0 15px rgba(0, 229, 255, 0.15);
}
.mobile-menu-toggle:hover {
    background: rgba(0, 229, 255, 0.2);
    border-color: var(--neon-cyan);
    box-shadow: 0 0 25px rgba(0, 229, 255, 0.3);
}

@media (max-width: 992px) {
    .nav.nav--open {
        background: rgba(8, 10, 18, 0.98);
        border-left: 1px solid rgba(0, 229, 255, 0.2);
        box-shadow: -12px 0 48px rgba(0, 229, 255, 0.08), -4px 0 24px rgba(0, 0, 0, 0.6);
        align-items: stretch;
    }
    .nav.nav--open .nav__list {
        flex: 1;
    }
    .nav__cta {
        display: flex;
        width: 100%;
        margin: 1rem 0 0;
        padding: 0.85rem 1rem;
        font-size: 0.8rem;
    }
}

/* Buttons */
.btn {
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.85rem;
    position: relative;
    overflow: hidden;
}
.btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
    transition: left 0.5s ease;
}
.btn:hover::after { left: 150%; }

.btn--primary,
.btn--gold {
    background: var(--gradient-gold);
    color: #0a0a0f;
    border: 1px solid rgba(255, 213, 74, 0.5);
    box-shadow: 0 0 24px rgba(255, 213, 74, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.btn--primary:hover,
.btn--gold:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 40px rgba(255, 213, 74, 0.5), 0 12px 32px rgba(0, 0, 0, 0.4);
    color: #0a0a0f;
}

.btn--secondary {
    color: var(--neon-cyan);
    border: 2px solid rgba(0, 229, 255, 0.5);
    background: rgba(0, 229, 255, 0.06);
    box-shadow: 0 0 20px rgba(0, 229, 255, 0.1);
}
.btn--secondary:hover {
    background: rgba(0, 229, 255, 0.15);
    border-color: var(--neon-cyan);
    color: #fff;
    box-shadow: var(--shadow-neon);
}

/* Hero — cinematic */
.hero {
    padding: 5rem 0 4.5rem;
    min-height: 520px;
    display: flex;
    align-items: center;
}
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 50% 80% at 20% 50%, rgba(0, 229, 255, 0.12) 0%, transparent 55%),
        radial-gradient(ellipse 40% 60% at 85% 30%, rgba(180, 75, 255, 0.1) 0%, transparent 50%);
    z-index: 0;
    pointer-events: none;
    animation: hero-pulse 8s ease-in-out infinite;
}
.hero::after {
    background: linear-gradient(135deg, rgba(3, 3, 8, 0.88) 0%, rgba(3, 3, 8, 0.55) 50%, rgba(3, 3, 8, 0.75) 100%);
}
.hero.hero--with-image .hero__bg-img {
    opacity: 0.35;
    filter: saturate(1.2) contrast(1.05);
    transition: transform 0.1s linear;
    will-change: transform;
}
@keyframes hero-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.hero__badge {
    background: rgba(0, 229, 255, 0.12);
    color: var(--neon-cyan);
    border: 1px solid rgba(0, 229, 255, 0.4);
    font-family: var(--font-display);
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    box-shadow: 0 0 20px rgba(0, 229, 255, 0.2);
    animation: badge-pulse 3s ease-in-out infinite;
}
@keyframes badge-pulse {
    0%, 100% { box-shadow: 0 0 20px rgba(0, 229, 255, 0.2); }
    50% { box-shadow: 0 0 30px rgba(0, 229, 255, 0.45); }
}

.hero__title {
    background: linear-gradient(135deg, #fff 0%, #c8f0ff 40%, #b44bff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 30px rgba(0, 229, 255, 0.2));
}

.hero__stats {
    margin-top: 2.5rem;
    padding: 1.25rem;
    background: rgba(8, 10, 18, 0.6);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(8px);
}
.hero__stat {
    position: relative;
    padding: 0.5rem;
}
.hero__stat-value {
    font-family: var(--font-display);
    font-size: 1.85rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero__stat-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* Sections */
.section {
    position: relative;
    padding: 4rem 0;
}
.section--dark {
    background: rgba(8, 10, 18, 0.5);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}
.section__title {
    position: relative;
    display: inline-block;
    width: 100%;
    margin-bottom: 2.5rem;
}
.section__title::after {
    content: '';
    display: block;
    width: 80px;
    height: 3px;
    margin: 0.75rem auto 0;
    background: var(--gradient-primary);
    border-radius: 3px;
    box-shadow: 0 0 16px rgba(0, 229, 255, 0.5);
}

.game-section__badge {
    display: block;
    width: fit-content;
    margin: 0 auto 1rem;
    color: var(--neon-purple);
    border-color: rgba(180, 75, 255, 0.5);
    background: rgba(180, 75, 255, 0.1);
    font-family: var(--font-display);
    font-size: 0.65rem;
    letter-spacing: 0.12em;
    box-shadow: 0 0 20px rgba(180, 75, 255, 0.15);
}

/* Cards — neon glass */
.game-card,
.promo-card,
.news-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    position: relative;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
                border-color var(--transition),
                box-shadow var(--transition);
}
.game-card::before,
.promo-card::before,
.news-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 229, 255, 0.08) 0%, transparent 50%, rgba(180, 75, 255, 0.06) 100%);
    opacity: 0;
    transition: opacity var(--transition);
    pointer-events: none;
    z-index: 1;
}
.game-card:hover::before,
.promo-card:hover::before,
.news-card:hover::before { opacity: 1; }

.game-card:hover,
.promo-card:hover,
.news-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: var(--border-glow);
    box-shadow: var(--shadow-neon-strong);
}

.game-card__img,
.promo-card__img,
.news-card__img {
    background: linear-gradient(135deg, #0a1628 0%, #030306 100%);
    position: relative;
}
.game-card__img::after,
.promo-card__img::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(3, 3, 8, 0.85) 100%);
    pointer-events: none;
}
.game-card__img img {
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.game-card:hover .game-card__img img {
    transform: scale(1.08);
}

.game-card__body,
.promo-card__body,
.news-card__body {
    position: relative;
    z-index: 2;
    background: rgba(8, 10, 18, 0.85);
}
.game-card__title {
    font-family: var(--font-display);
    font-size: 0.95rem;
    letter-spacing: 0.04em;
}
.game-card__badge {
    background: var(--gradient-primary);
    font-family: var(--font-display);
    font-size: 0.6rem;
    letter-spacing: 0.06em;
    box-shadow: 0 0 12px rgba(0, 229, 255, 0.3);
}
.game-card__badge--gold {
    background: var(--gradient-gold);
    color: #0a0a0f;
    box-shadow: 0 0 12px rgba(255, 213, 74, 0.4);
}

/* Feature blocks */
.feature-block {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.feature-block::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform 0.5s ease;
}
.feature-block:hover::after { transform: scaleX(1); }
.feature-block:hover {
    border-color: var(--border-glow);
    transform: translateY(-6px);
    box-shadow: var(--shadow-neon);
}
.feature-block__icon {
    background: var(--gradient-primary);
    box-shadow: 0 0 24px rgba(0, 229, 255, 0.35);
    animation: icon-glow 4s ease-in-out infinite;
}
@keyframes icon-glow {
    0%, 100% { box-shadow: 0 0 24px rgba(0, 229, 255, 0.35); }
    50% { box-shadow: 0 0 36px rgba(180, 75, 255, 0.4); }
}
.feature-block__title {
    font-family: var(--font-display);
    font-size: 1rem;
    letter-spacing: 0.06em;
}

/* Provider pills */
.provider-item {
    background: rgba(0, 229, 255, 0.05);
    border: 1px solid var(--border-color);
    font-family: var(--font-body);
    font-weight: 600;
    letter-spacing: 0.04em;
    transition: all var(--transition);
}
.provider-item:hover {
    border-color: var(--neon-cyan);
    background: rgba(0, 229, 255, 0.12);
    box-shadow: 0 0 20px rgba(0, 229, 255, 0.2);
    transform: translateY(-3px) scale(1.03);
    color: var(--neon-cyan);
}

/* Announcement banner */
.announcement-banner {
    background: linear-gradient(90deg, rgba(0, 229, 255, 0.15) 0%, rgba(180, 75, 255, 0.15) 50%, rgba(255, 45, 149, 0.12) 100%);
    border-top: 1px solid rgba(0, 229, 255, 0.2);
    border-bottom: 1px solid rgba(0, 229, 255, 0.2);
    color: var(--text-primary);
    font-weight: 600;
    letter-spacing: 0.03em;
    animation: banner-shimmer 6s ease-in-out infinite;
}
.announcement-banner a {
    color: var(--neon-gold);
    font-weight: 700;
    text-decoration: none;
    text-shadow: 0 0 12px rgba(255, 213, 74, 0.5);
}
@keyframes banner-shimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Infographic & steps */
.infographic-item {
    background: rgba(0, 229, 255, 0.06);
    border: 1px solid var(--border-color);
    transition: all var(--transition);
}
.infographic-item:hover {
    border-color: var(--border-glow);
    box-shadow: var(--shadow-neon);
    transform: translateY(-6px);
}
.infographic-item__value {
    font-family: var(--font-display);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.step__num,
.listicle-item__num {
    background: var(--gradient-primary);
    box-shadow: 0 0 20px rgba(0, 229, 255, 0.35);
    font-family: var(--font-display);
}
.step:not(:last-child)::after {
    background: linear-gradient(180deg, var(--neon-cyan) 0%, transparent 100%);
    opacity: 0.4;
    box-shadow: 0 0 8px rgba(0, 229, 255, 0.3);
}

.listicle-item {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    transition: all var(--transition);
}
.listicle-item:hover {
    border-color: var(--border-glow);
    transform: translateX(8px);
    box-shadow: var(--shadow-neon);
}

/* FAQ */
.faq-item {
    border-color: var(--border-color);
    background: rgba(8, 10, 18, 0.4);
    margin-bottom: 0.5rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}
.faq-item.active {
    border-color: rgba(0, 229, 255, 0.35);
    box-shadow: 0 0 24px rgba(0, 229, 255, 0.08);
}
.faq-item__question {
    font-family: var(--font-body);
    font-weight: 600;
}

/* Footer */
.footer {
    background: rgba(3, 3, 8, 0.95);
    border-top: 1px solid rgba(0, 229, 255, 0.15);
    position: relative;
}
.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: var(--gradient-primary);
    opacity: 0.5;
}
.trust-links__item {
    background: rgba(0, 229, 255, 0.06);
    border-color: var(--border-color);
    transition: all var(--transition);
}
.trust-links__item:hover {
    border-color: var(--neon-cyan);
    background: rgba(0, 229, 255, 0.12);
    box-shadow: 0 0 16px rgba(0, 229, 255, 0.2);
    color: var(--neon-cyan);
}

/* Breadcrumbs */
.breadcrumbs a { color: var(--neon-cyan); }

/* Payment grid */
.payment-item {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    transition: all var(--transition);
}
.payment-item:hover {
    border-color: var(--border-glow);
    box-shadow: var(--shadow-neon);
    transform: translateY(-4px);
}

/* Pagination — dark theme */
.news-pagination__link {
    background: rgba(8, 10, 18, 0.8);
    border-color: var(--border-color);
    color: var(--text-secondary);
}
.news-pagination__link:hover:not(.news-pagination__link--disabled):not(.news-pagination__link--current) {
    color: var(--neon-cyan);
    border-color: var(--border-glow);
    background: rgba(0, 229, 255, 0.08);
}
.news-pagination__link--current {
    background: var(--gradient-primary);
    border-color: transparent;
    color: #030306;
    font-family: var(--font-display);
}

/* Scroll reveal */
.reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}
.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* Stagger children in grids */
.cards-grid .reveal:nth-child(1) { transition-delay: 0.05s; }
.cards-grid .reveal:nth-child(2) { transition-delay: 0.1s; }
.cards-grid .reveal:nth-child(3) { transition-delay: 0.15s; }
.cards-grid .reveal:nth-child(4) { transition-delay: 0.2s; }
.cards-grid .reveal:nth-child(5) { transition-delay: 0.25s; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .reveal {
        opacity: 1;
        transform: none;
    }
    .ambient-bg__grid,
    .ambient-bg__orb { animation: none; }
}
