/* ========================================
   SpinVibe Social Casino - Custom Styles
   Premium Dark Gaming Theme
   ======================================== */

/* CSS Custom Properties */
:root {
    --bg-primary: #0a0e1a;
    --bg-secondary: #111827;
    --bg-surface: #1a1f2e;
    --accent: #00d4aa;
    --accent-light: #38bdf8;
    --gold: #c5a572;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border: #1e293b;
    --border-hover: #334155;
    --warning: #ef4444;
    
    --transition-fast: 150ms;
    --transition-normal: 300ms;
    --transition-slow: 500ms;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Selection Styling */
::selection {
    background: var(--accent);
    color: white;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--purple-light);
}

/* ========================================
   ANIMATIONS
   ======================================== */

/* Float Animation */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes float-delayed {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-30px);
    }
}

/* Fade In Animation */
@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fade In Up Animation */
@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Shimmer Animation (loading only) */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Gentle Pulse Animation */
@keyframes gentle-pulse {
    0%, 100% {
        opacity: 1;
        transform: translateY(0);
    }
    50% {
        opacity: 0.6;
        transform: translateY(8px);
    }
}

/* ========================================
   UTILITY CLASSES
   ======================================== */

.animate-gentle-pulse {
    animation: gentle-pulse 2s cubic-bezier(0.16, 1, 0.3, 1) infinite;
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

.animate-float-delayed {
    animation: float-delayed 8s ease-in-out infinite;
    animation-delay: 2s;
}

.animate-fade-in {
    animation: fade-in 0.8s ease-out forwards;
}

.animate-fade-in-up {
    animation: fade-in-up 0.8s ease-out forwards;
}

.delay-100 {
    animation-delay: 0.1s;
    opacity: 0;
}

.delay-200 {
    animation-delay: 0.2s;
    opacity: 0;
}

.delay-300 {
    animation-delay: 0.3s;
    opacity: 0;
}

/* Scroll Reveal */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   AGE GATE STYLES
   ======================================== */

#ageGateModal {
    opacity: 1;
    transition: opacity 0.5s ease-out;
}

#ageGateModal.hidden {
    opacity: 0;
    pointer-events: none;
}

#ageGateModal.hidden .bg-spinvibe-bg-light {
    transform: scale(0.95);
    transition: transform 0.3s ease-out;
}

/* Form Validation States */
#ageGateForm select:valid {
    border-color: var(--accent);
}

#ageGateForm select:invalid {
    border-color: rgba(30, 41, 59, 0.5);
}

/* ========================================
   GAME CARDS
   ======================================== */

.game-card {
    transition: transform 0.3s ease-out, border-color 0.3s ease-out;
}

.game-card:hover {
    transform: translateY(-2px);
    border-color: var(--border-hover);
}

.game-card .aspect-video {
    position: relative;
    overflow: hidden;
}

.game-card .aspect-video i {
    transition: transform 0.5s ease-out, opacity 0.5s ease-out;
}

.game-card:hover .aspect-video i {
    transform: scale(1.1);
    opacity: 0.6;
}

/* ========================================
   FAQ ACCORDION
   ======================================== */

.faq-item {
    transition: border-color 0.3s ease-out;
}

.faq-item:hover {
    border-color: var(--border-hover);
}

.faq-trigger {
    transition: background-color 0.3s ease-out;
}

.faq-trigger:hover {
    background-color: rgba(30, 41, 59, 0.1);
}

.faq-icon {
    transition: transform 0.3s ease-out;
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
}

.faq-content-wrapper {
    display: grid;
    grid-template-rows: minmax(0, 0fr);
    transition: grid-template-rows 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.faq-item.active .faq-content-wrapper {
    grid-template-rows: minmax(0, 1fr);
}

.faq-content {
    overflow: hidden;
    min-height: 0;
}

/* ========================================
   NAVIGATION
   ======================================== */

#navbar {
    transition: background-color 0.3s ease-out, backdrop-filter 0.3s ease-out;
}

#navbar.scrolled {
    background-color: rgba(10, 14, 26, 0.95);
    border-bottom-color: var(--border);
}

/* ========================================
   HERO SECTION
   ======================================== */

/* Hero Background */
.hero-gradient {
    background: linear-gradient(180deg, 
        var(--bg-primary) 0%, 
        var(--bg-secondary) 100%);
}

/* ========================================
   MOBILE MENU
   ======================================== */

#mobileMenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

#mobileMenu.open {
    max-height: 400px;
}

#mobileMenu > div {
    overflow: hidden;
}

/* ========================================
   RESPONSIVE ADJUSTMENTS
   ======================================== */

@media (max-width: 640px) {
    .game-card {
        margin-bottom: 1rem;
    }
    
    #ageGateModal .max-w-md {
        margin: 1rem;
        padding: 1.5rem;
    }
    
    .faq-trigger {
        padding: 1rem;
    }
}

/* ========================================
   ACCESSIBILITY
   ======================================== */

/* Focus States */
a:focus-visible,
button:focus-visible,
select:focus-visible,
input:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    :root {
        --text-secondary: #cbd5e1;
    }
    
    .border-white\/5 {
        border-color: rgba(255, 255, 255, 0.2);
    }
}

/* ========================================
   PERFORMANCE OPTIMIZATIONS
   ======================================== */

/* GPU Acceleration for Animations */
.animate-float,
.animate-float-delayed,
.game-card,
.scroll-reveal {
    will-change: transform;
    transform: translateZ(0);
}

/* Contain Paint for Sections */
section {
    contain: layout style;
}

/* ========================================
   LOADING STATES
   ======================================== */

.loading-shimmer {
    background: linear-gradient(
        90deg,
        var(--bg-secondary) 0%,
        rgba(30, 41, 59, 0.8) 50%,
        var(--bg-secondary) 100%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
}

/* ========================================
   CUSTOM UTILITIES
   ======================================== */

.text-gradient {
    color: var(--accent);
}

.bg-glass {
    background: rgba(17, 24, 39, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.border-glow {
    box-shadow: 0 0 20px rgba(0, 212, 170, 0.1);
}

.hover-lift {
    transition: transform 0.3s ease-out, border-color 0.3s ease-out;
}

.hover-lift:hover {
    transform: translateY(-4px);
    border-color: var(--border-hover);
}

/* ========================================
   PREMIUM ANIMATIONS & MICRO-INTERACTIONS
   ======================================== */

/* Game Card Hover - Lift + Glow */
.game-card {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                border-color 0.3s ease-out;
}

.game-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px -15px rgba(0, 212, 170, 0.15),
                0 0 0 1px var(--border-hover);
}

.game-card:active {
    transform: translateY(-4px) scale(0.98);
    transition-duration: 0.15s;
}

/* Button Press Effect */
.btn-press {
    position: relative;
    overflow: hidden;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.3s ease-out;
}

.btn-press:hover {
    box-shadow: 0 4px 20px -5px rgba(0, 212, 170, 0.4);
}

.btn-press:active {
    transform: scale(0.96);
    box-shadow: 0 2px 10px -3px rgba(0, 212, 170, 0.3);
}

/* Ripple Effect Base */
.btn-ripple {
    position: relative;
    overflow: hidden;
}

.btn-ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease-out, height 0.6s ease-out, opacity 0.6s ease-out;
    opacity: 0;
    pointer-events: none;
}

.btn-ripple:active::after {
    width: 300px;
    height: 300px;
    opacity: 1;
    transition: 0s;
}

/* Stagger Entrance Animations */
.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }
.stagger-5 { animation-delay: 0.5s; }
.stagger-6 { animation-delay: 0.6s; }

/* Glow Border Animation */
@keyframes border-glow {
    0%, 100% {
        border-color: var(--border);
        box-shadow: 0 0 0 0 rgba(0, 212, 170, 0);
    }
    50% {
        border-color: var(--accent);
        box-shadow: 0 0 20px -5px rgba(0, 212, 170, 0.3);
    }
}

.animate-border-glow {
    animation: border-glow 3s ease-in-out infinite;
}

/* Magnetic Hover Effect (CSS-only approximation) */
.magnetic-hover {
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* FAQ Item Hover */
.faq-item {
    transition: border-color 0.3s ease-out, transform 0.3s ease-out;
}

.faq-item:hover {
    transform: translateX(4px);
    border-color: var(--border-hover);
}

/* Link Underline Animation */
.link-underline {
    position: relative;
    text-decoration: none;
}

.link-underline::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.link-underline:hover::after {
    width: 100%;
}

/* Icon Bounce on Hover */
.icon-bounce {
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.icon-bounce:hover {
    transform: translateY(-3px) scale(1.1);
}

/* Smooth Scroll Behavior */
html {
    scroll-behavior: smooth;
}

/* Focus Ring Animation */
a:focus-visible,
button:focus-visible,
select:focus-visible,
input:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    transition: outline-offset 0.2s ease-out;
}

/* Scroll Progress Indicator */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-light));
    z-index: 9999;
    transition: width 0.1s linear;
}

/* Card Image Zoom on Hover */
.card-image-zoom {
    overflow: hidden;
}

.card-image-zoom img,
.card-image-zoom svg {
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.card-image-zoom:hover img,
.card-image-zoom:hover svg {
    transform: scale(1.1);
}

/* Text Shimmer Effect for Special Elements */
@keyframes text-shimmer {
    0% {
        background-position: -200% center;
    }
    100% {
        background-position: 200% center;
    }
}

.text-shimmer {
    background: linear-gradient(
        90deg,
        var(--text-primary) 0%,
        var(--accent) 50%,
        var(--text-primary) 100%
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: text-shimmer 3s linear infinite;
}

/* Pulse Ring for Live/Active Elements */
@keyframes pulse-ring {
    0% {
        transform: scale(0.8);
        opacity: 1;
    }
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

.pulse-ring::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: inherit;
    border: 2px solid var(--accent);
    animation: pulse-ring 2s cubic-bezier(0.16, 1, 0.3, 1) infinite;
}

/* Smooth Page Transitions */
.page-transition {
    opacity: 0;
    transform: translateY(20px);
    animation: page-fade-in 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes page-fade-in {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   PRINT STYLES
   ======================================== */

@media print {
    #ageGateModal,
    #mobileMenuBtn,
    #ageBadge {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .text-white {
        color: black !important;
    }
    
    .text-spinvibe-text-secondary {
        color: #666 !important;
    }
}