/* ============================================================
   PlayFi Global Casino - Premium Dark Casino Theme V2
   Colors: Cyan #00d4ff | Purple #a855f7 | Gold #d4af37
   Background: Deep Navy #070b16 with purple undertones
   ============================================================ */

/* ─── BASE ──────────────────────────────────────────── */
* { scrollbar-width: thin; scrollbar-color: rgba(139,92,246,0.15) transparent; box-sizing: border-box; }
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(139,92,246,0.15); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(139,92,246,0.3); }
body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
::selection { background: rgba(139, 92, 246, 0.3); color: #fff; }

/* ─── ANIMATED ORB BACKGROUNDS ──────────────────────── */
.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.12;
    animation: orbFloat 20s ease-in-out infinite;
    pointer-events: none;
}
.orb-1 {
    width: 600px; height: 600px;
    background: radial-gradient(circle, #8b5cf6, transparent 70%);
    top: -200px; left: -200px;
    animation-duration: 25s;
}
.orb-2 {
    width: 500px; height: 500px;
    background: radial-gradient(circle, #d4af37, transparent 70%);
    bottom: -150px; right: -150px;
    opacity: 0.06;
    animation-duration: 30s;
    animation-delay: -5s;
}
.orb-3 {
    width: 450px; height: 450px;
    background: radial-gradient(circle, #00d4ff, transparent 70%);
    top: 50%; left: 60%;
    opacity: 0.06;
    animation-duration: 35s;
    animation-delay: -10s;
}
.orb-4 {
    width: 350px; height: 350px;
    background: radial-gradient(circle, #a855f7, transparent 70%);
    top: 20%; right: 10%;
    opacity: 0.08;
    animation-duration: 28s;
    animation-delay: -15s;
}
@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -40px) scale(1.05); }
    50% { transform: translate(-20px, 30px) scale(0.95); }
    75% { transform: translate(40px, 20px) scale(1.03); }
}

/* ─── PARTICLES (effervescence) ─────────────────────── */
.particles-container {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}
.particle {
    position: absolute;
    width: 2px; height: 2px;
    background: rgba(139, 92, 246, 0.4);
    border-radius: 50%;
    animation: particleRise linear infinite;
}
.particle:nth-child(odd) { background: rgba(212, 175, 55, 0.3); }
.particle:nth-child(3n) { width: 3px; height: 3px; background: rgba(0, 212, 255, 0.25); }
@keyframes particleRise {
    0% { opacity: 0; transform: translateY(0) translateX(0); }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { opacity: 0; transform: translateY(-100vh) translateX(var(--drift, 20px)); }
}

/* ─── GOLD COIN PARTICLES (system-wide) ────────────── */
.coins-system {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}
@keyframes coinFloat {
    0% { opacity: 0; transform: translateY(0) rotate(0deg) translateX(0); }
    5% { opacity: var(--co, 0.1); }
    50% { transform: translateY(-50vh) rotate(180deg) translateX(var(--cdrift, 10px)); }
    90% { opacity: var(--co, 0.08); }
    100% { opacity: 0; transform: translateY(-110vh) rotate(360deg) translateX(calc(var(--cdrift, 10px) * -1)); }
}

/* ─── GLASS CARDS ───────────────────────────────────── */
.glass-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(139, 92, 246, 0.08);
    transition: all 0.3s ease;
}
.glass-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(139, 92, 246, 0.18);
}
.glass-card-subtle {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}
.glass-card-subtle:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(139, 92, 246, 0.12);
}

/* ─── GLOW BORDERS ──────────────────────────────────── */
.glow-border {
    border: 1px solid rgba(139, 92, 246, 0.15);
    box-shadow: 0 0 30px -10px rgba(139, 92, 246, 0.1), inset 0 0 30px -10px rgba(139, 92, 246, 0.02);
}
.glow-border-gold {
    border: 1px solid rgba(212, 175, 55, 0.18);
    box-shadow: 0 0 25px -5px rgba(212, 175, 55, 0.08), inset 0 0 20px -5px rgba(212, 175, 55, 0.02);
}
.glow-border-cyan {
    border: 1px solid rgba(0, 212, 255, 0.18);
    box-shadow: 0 0 25px -5px rgba(0, 212, 255, 0.1), inset 0 0 20px -5px rgba(0, 212, 255, 0.03);
}
.glow-border-purple {
    border: 1px solid rgba(139, 92, 246, 0.2);
    box-shadow: 0 0 25px -5px rgba(139, 92, 246, 0.12), inset 0 0 20px -5px rgba(139, 92, 246, 0.03);
}

/* ─── WALLET CARD ANIMATED BORDER-TOP ──────────────── */
.wallet-card {
    position: relative;
    overflow: hidden;
}
.wallet-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--wc-color, #8b5cf6), transparent);
    animation: borderSweep 3s ease-in-out infinite;
    animation-delay: var(--wc-delay, 0s);
}
.wallet-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--wc-color, #8b5cf6);
    opacity: 0.3;
}
@keyframes borderSweep {
    0% { left: -100%; opacity: 0; }
    20% { opacity: 1; }
    80% { opacity: 1; }
    100% { left: 100%; opacity: 0; }
}

/* ─── GLASS SIDEBAR ─────────────────────────────────── */
.glass-sidebar {
    background: linear-gradient(180deg, rgba(7,11,22,0.98), rgba(15,10,35,0.97));
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-right: 1px solid rgba(139, 92, 246, 0.08);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Sidebar collapsed state */
.sidebar-collapsed {
    width: 72px !important;
}
.sidebar-collapsed .sidebar-text {
    display: none;
}
.sidebar-collapsed .sidebar-logo-text {
    display: none;
}
.sidebar-collapsed .sidebar-section-label {
    display: none;
}
.sidebar-collapsed .nav-link {
    justify-content: center;
    padding: 0.6rem;
    border-radius: 0.75rem;
    border-left: none !important;
}
.sidebar-collapsed .nav-link i {
    font-size: 1.15rem;
}
.sidebar-collapsed .nav-link.active {
    background: rgba(139, 92, 246, 0.12);
    border-left: none !important;
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.1);
}
.sidebar-collapsed .sidebar-footer-content {
    display: none;
}
.sidebar-collapsed .sidebar-footer-icon {
    display: flex;
}
.sidebar-collapsed .sidebar-nav-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}
.sidebar-collapsed .collapse-btn-text { display: none; }
.sidebar-collapsed .collapse-btn i { transform: rotate(180deg); }

.sidebar-footer-icon { display: none; }

/* ─── GLASS HEADER ──────────────────────────────────── */
.glass-header {
    background: linear-gradient(180deg, rgba(7,11,22,0.92), rgba(10,8,25,0.88));
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 2px solid transparent;
    border-image: linear-gradient(90deg,
        transparent 0%,
        rgba(139,92,246,0.06) 15%,
        rgba(0,212,255,0.5) 35%,
        rgba(139,92,246,0.7) 50%,
        rgba(0,212,255,0.5) 65%,
        rgba(139,92,246,0.06) 85%,
        transparent 100%
    ) 1;
    transition: all 0.4s ease;
}
.glass-header.header-scrolled {
    border-image: linear-gradient(90deg,
        transparent 0%,
        rgba(139,92,246,0.08) 15%,
        rgba(0,212,255,0.6) 35%,
        rgba(139,92,246,0.8) 50%,
        rgba(0,212,255,0.6) 65%,
        rgba(139,92,246,0.08) 85%,
        transparent 100%
    ) 1;
    box-shadow: 0 4px 30px rgba(139,92,246,0.06);
}
.glass-header.header-hidden {
    transform: translateY(-100%);
}

/* ─── GLASS MOBILE NAV ──────────────────────────────── */
.glass-mobile-nav {
    background: linear-gradient(0deg, rgba(7,11,22,0.98), rgba(10,8,25,0.96));
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-top: 2px solid transparent;
    border-image: linear-gradient(90deg,
        transparent 0%,
        rgba(139,92,246,0.05) 20%,
        rgba(0,212,255,0.35) 40%,
        rgba(139,92,246,0.5) 50%,
        rgba(0,212,255,0.35) 60%,
        rgba(139,92,246,0.05) 80%,
        transparent 100%
    ) 1;
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

/* ─── NAV LINKS ─────────────────────────────────────── */
.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.75rem;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.45);
    transition: all 0.2s ease;
    font-weight: 500;
    white-space: nowrap;
}
.nav-link:hover {
    background: rgba(139, 92, 246, 0.06);
    color: rgba(255, 255, 255, 0.85);
}
.nav-link.active {
    background: linear-gradient(135deg, rgba(139,92,246,0.08), rgba(0,212,255,0.06));
    color: #c4b5fd;
    border-left: 2px solid #8b5cf6;
}

/* ─── MOBILE NAV ITEMS ──────────────────────────────── */
.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.125rem;
    font-size: 0.625rem;
    color: rgba(255, 255, 255, 0.35);
    transition: color 0.2s ease;
    padding: 0.25rem 0.75rem;
    font-weight: 500;
}
.mobile-nav-item.active { color: #c4b5fd; }
.mobile-nav-item:hover { color: rgba(255, 255, 255, 0.7); }
.casino-btn {
    width: 48px; height: 48px;
    background: linear-gradient(135deg, #8b5cf6, #6d28d9);
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: -1.5rem;
    box-shadow: 0 4px 25px rgba(139, 92, 246, 0.4);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    color: white;
}
.casino-center:hover .casino-btn {
    transform: scale(1.08);
    box-shadow: 0 6px 30px rgba(139, 92, 246, 0.55);
}
.casino-center span { margin-top: 0.25rem; }

/* ─── FORM INPUTS ───────────────────────────────────── */
.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(139, 92, 246, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0.75rem;
    color: #fff;
    font-size: 0.875rem;
    outline: none;
    transition: all 0.2s ease;
    font-family: 'Plus Jakarta Sans', sans-serif;
}
.form-input:focus {
    border-color: rgba(139, 92, 246, 0.4);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
    background: rgba(139, 92, 246, 0.05);
}
.form-input::placeholder { color: rgba(255, 255, 255, 0.4); }
select.form-input { appearance: none; cursor: pointer; }
select.form-input option { background: #0d1225; color: #fff; }

/* ─── BUTTONS ───────────────────────────────────────── */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #8b5cf6, #6d28d9);
    color: #fff;
    font-weight: 600;
    font-size: 0.875rem;
    border-radius: 0.75rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Plus Jakarta Sans', sans-serif;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}
.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 30px rgba(139, 92, 246, 0.35);
}
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }

.btn-gold {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #d4af37, #b8941f);
    color: #fff;
    font-weight: 700;
    font-size: 0.875rem;
    border-radius: 0.75rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Plus Jakarta Sans', sans-serif;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}
.btn-gold:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 35px rgba(212, 175, 55, 0.35);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.7);
    font-weight: 600;
    font-size: 0.875rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Plus Jakarta Sans', sans-serif;
}
.btn-secondary:hover {
    background: rgba(139, 92, 246, 0.08);
    border-color: rgba(139, 92, 246, 0.25);
    color: #fff;
}

.btn-cyan {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #00d4ff, #0099cc);
    color: #fff;
    font-weight: 600;
    font-size: 0.875rem;
    border-radius: 0.75rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Plus Jakarta Sans', sans-serif;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}
.btn-cyan:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 30px rgba(0, 212, 255, 0.3);
}

/* ─── SOCIAL SHARE BUTTONS ─────────────────────────── */
.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px; height: 40px;
    border-radius: 0.75rem;
    border: 1px solid rgba(255,255,255,0.06);
    background: rgba(255,255,255,0.03);
    color: rgba(255,255,255,0.5);
    transition: all 0.3s ease;
    font-size: 1.1rem;
}
.share-btn:hover { transform: translateY(-2px); color: #fff; }
.share-btn.fb:hover { background: rgba(24,119,242,0.2); border-color: rgba(24,119,242,0.3); color: #1877f2; }
.share-btn.tw:hover { background: rgba(29,155,240,0.2); border-color: rgba(29,155,240,0.3); color: #1d9bf0; }
.share-btn.wa:hover { background: rgba(37,211,102,0.2); border-color: rgba(37,211,102,0.3); color: #25d366; }
.share-btn.tg:hover { background: rgba(0,136,204,0.2); border-color: rgba(0,136,204,0.3); color: #0088cc; }

/* ─── GAME CARDS ────────────────────────────────────── */
.game-card {
    display: block;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.game-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Video game cards */
.game-card-video {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
}
.game-card-video video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.game-card-video .game-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.7) 100%);
    z-index: 1;
}
.game-card-video .game-content {
    position: relative;
    z-index: 2;
}

/* ─── HERO BANNER VIDEO ────────────────────────────── */
.banner-video-container {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
}
.banner-video-container video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.banner-video-container .banner-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(7,11,22,0.88) 0%, rgba(15,10,35,0.65) 50%, rgba(7,11,22,0.4) 100%);
    z-index: 1;
}
.banner-video-container .banner-content {
    position: relative;
    z-index: 2;
}

/* ─── WELCOME VIDEO MODAL ──────────────────────────── */
.welcome-video-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}
.welcome-video-overlay video {
    max-width: 90vw;
    max-height: 80vh;
    border-radius: 1rem;
    box-shadow: 0 0 80px rgba(139,92,246,0.2);
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ─── TREE VISUALIZATION ────────────────────────────── */
.tree-container { padding: 1rem; }
.tree-node { position: relative; padding-left: 1.5rem; margin-bottom: 0.5rem; }
.tree-node::before {
    content: ''; position: absolute; left: 0; top: 0; bottom: 0;
    width: 1px; background: rgba(139, 92, 246, 0.1);
}
.tree-node::after {
    content: ''; position: absolute; left: 0; top: 1.25rem;
    width: 1rem; height: 1px; background: rgba(139, 92, 246, 0.1);
}
.tree-node:last-child::before { bottom: calc(100% - 1.25rem); }
.tree-children { padding-left: 1rem; margin-top: 0.25rem; }
.tree-node-content { cursor: default; }
.tree-node-content:hover { background: rgba(139, 92, 246, 0.05); }

/* ─── ANIMATION UTILITIES ───────────────────────────── */
.spin-slow { animation: spin 3s linear infinite; }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

.animate-pulse { animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

.animate-slide-in { animation: slideIn 0.4s ease-out; }
@keyframes slideIn {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

.animate-fade-up { animation: fadeUp 0.6s ease-out forwards; opacity: 0; }
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }

/* Shimmer effect */
.shimmer {
    background: linear-gradient(110deg, transparent 25%, rgba(139,92,246,0.05) 37%, transparent 63%);
    background-size: 200% 100%;
    animation: shimmer 2.5s ease-in-out infinite;
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* Glow pulse */
.glow-pulse {
    animation: glowPulse 3s ease-in-out infinite;
}
@keyframes glowPulse {
    0%, 100% { box-shadow: 0 0 20px rgba(139,92,246,0.12); }
    50% { box-shadow: 0 0 40px rgba(139,92,246,0.25); }
}

/* ─── LANDING-SPECIFIC ──────────────────────────────── */
.hero-glow {
    position: absolute;
    width: 600px; height: 600px;
    border-radius: 50%;
    filter: blur(150px);
    opacity: 0.15;
    pointer-events: none;
}
.landing-card {
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(139, 92, 246, 0.08);
    border-radius: 1rem;
    transition: all 0.4s ease;
}
.landing-card:hover {
    transform: translateY(-4px);
    border-color: rgba(139, 92, 246, 0.2);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2), 0 0 30px rgba(139, 92, 246, 0.06);
}

/* Landing mobile menu */
.mobile-menu-overlay {
    position: fixed; inset: 0; z-index: 100;
    background: rgba(7, 11, 22, 0.98);
    backdrop-filter: blur(30px);
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.mobile-menu-overlay.open {
    transform: translateX(0);
}

/* ─── LINE CLAMP ────────────────────────────────────── */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ─── CUSTOM SCROLLBAR ──────────────────────────────── */
.custom-scrollbar::-webkit-scrollbar { width: 4px; }
.custom-scrollbar::-webkit-scrollbar-track { background: transparent; }
.custom-scrollbar::-webkit-scrollbar-thumb { background: rgba(139,92,246,0.08); border-radius: 2px; }

/* ─── RESPONSIVE ────────────────────────────────────── */
@media (max-width: 1023px) {
    .glass-sidebar { width: 280px; }
}

html { scroll-behavior: smooth; }
button, a, .nav-link, .mobile-nav-item { user-select: none; -webkit-user-select: none; }
