/* Fantasy Touchdown - Luxury Social Casino Platform Styles */
/* Custom properties for consistent theming */
:root {
    --deep-sapphire: #0E1A40;
    --royal-gold: #FFD700;
    --frosted-silver: #D9D9D9;
    --neon-blue: #00D4FF;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--royal-gold), var(--neon-blue));
    --gradient-secondary: linear-gradient(135deg, var(--deep-sapphire), rgba(14, 26, 64, 0.8));
    --gradient-glass: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    
    /* Shadows and glows */
    --glow-royal: 0 0 30px rgba(255, 215, 0, 0.3);
    --glow-neon: 0 0 20px rgba(0, 212, 255, 0.4);
    --shadow-luxury: 0 8px 32px rgba(0, 0, 0, 0.3);
    --shadow-glass: 0 8px 32px rgba(31, 38, 135, 0.37);
    
    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    
    /* Border radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
}

/* Reset and base styles */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
    background: var(--deep-sapphire);
    color: var(--frosted-silver);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Typography */
.font-cinzel {
    font-family: 'Cinzel', serif;
}

.font-unbounded {
    font-family: 'Unbounded', sans-serif;
}

.font-poppins {
    font-family: 'Poppins', sans-serif;
}

.font-open-sans {
    font-family: 'Open Sans', sans-serif;
}

/* Navigation styles */
.nav-link {
    position: relative;
    font-family: 'Unbounded', sans-serif;
    font-weight: 500;
    color: var(--frosted-silver);
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
}

.nav-link:hover {
    color: var(--royal-gold);
    background: rgba(255, 215, 0, 0.1);
}

.nav-link-mobile {
    display: block;
    font-family: 'Unbounded', sans-serif;
    font-weight: 500;
    color: var(--frosted-silver);
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 1rem;
    border-radius: var(--radius-md);
    border-left: 3px solid transparent;
}

.nav-link-mobile:hover {
    color: var(--royal-gold);
    background: rgba(255, 215, 0, 0.1);
    border-left-color: var(--royal-gold);
}

/* Button styles */
.luxury-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 2rem;
    font-family: 'Unbounded', sans-serif;
    font-weight: 600;
    color: var(--deep-sapphire);
    background: linear-gradient(135deg, var(--royal-gold), #FFA500);
    border: none;
    border-radius: var(--radius-lg);
    text-decoration: none;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: var(--glow-royal);
}

.luxury-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 40px rgba(255, 215, 0, 0.5);
}

.luxury-button:active {
    transform: translateY(0);
}

.luxury-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.luxury-button:hover::before {
    left: 100%;
}

.luxury-button-outline {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 2rem;
    font-family: 'Unbounded', sans-serif;
    font-weight: 600;
    color: var(--royal-gold);
    background: transparent;
    border: 2px solid var(--royal-gold);
    border-radius: var(--radius-lg);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.luxury-button-outline:hover {
    color: var(--deep-sapphire);
    background: var(--royal-gold);
    box-shadow: var(--glow-royal);
    transform: translateY(-2px);
}

.luxury-button-small {
    padding: 0.5rem 1.5rem;
    font-size: 0.875rem;
    font-family: 'Unbounded', sans-serif;
    font-weight: 600;
    color: var(--deep-sapphire);
    background: linear-gradient(135deg, var(--royal-gold), #FFA500);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
}

.luxury-button-small:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.4);
}

.luxury-button-outline-small {
    padding: 0.5rem 1.5rem;
    font-size: 0.875rem;
    font-family: 'Unbounded', sans-serif;
    font-weight: 600;
    color: var(--royal-gold);
    background: transparent;
    border: 1px solid var(--royal-gold);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
}

.luxury-button-outline-small:hover {
    color: var(--deep-sapphire);
    background: var(--royal-gold);
    transform: translateY(-1px);
}

/* Glass morphism card */
.glass-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-glass);
    transition: all 0.3s ease;
}

.glass-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 215, 0, 0.3);
    transform: translateY(-4px);
}

/* Hero background animation */
.hero-bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, rgba(0, 212, 255, 0.1) 0%, transparent 70%),
                radial-gradient(ellipse at 80% 20%, rgba(255, 215, 0, 0.1) 0%, transparent 50%),
                radial-gradient(ellipse at 20% 80%, rgba(255, 215, 0, 0.08) 0%, transparent 50%);
    animation: heroFloat 8s ease-in-out infinite;
}

@keyframes heroFloat {
    0%, 100% { 
        transform: translateY(0px) scale(1);
        opacity: 0.8;
    }
    50% { 
        transform: translateY(-20px) scale(1.05);
        opacity: 1;
    }
}

/* Tournament tabs */
.tournament-tab {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    font-family: 'Unbounded', sans-serif;
    font-weight: 600;
    color: var(--frosted-silver);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.tournament-tab:hover {
    color: var(--royal-gold);
    background: rgba(255, 215, 0, 0.1);
    border-color: rgba(255, 215, 0, 0.3);
    transform: translateY(-2px);
}

.tournament-tab.active {
    color: var(--deep-sapphire);
    background: var(--royal-gold);
    border-color: var(--royal-gold);
    box-shadow: var(--glow-royal);
}

/* Collection filter buttons */
.collection-filter {
    padding: 0.5rem 1rem;
    font-family: 'Unbounded', sans-serif;
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--frosted-silver);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
}

.collection-filter:hover {
    color: var(--royal-gold);
    background: rgba(255, 215, 0, 0.1);
    border-color: rgba(255, 215, 0, 0.3);
}

.collection-filter.active {
    color: var(--deep-sapphire);
    background: var(--royal-gold);
    border-color: var(--royal-gold);
}

/* Game cards */
.game-card, .game-card-home {
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
    height: 100%; /* Ensure all cards take full height of their container */
}

.game-card > div, .game-card-home > div {
    height: 100%; /* Make the inner container full height */
    display: flex;
    flex-direction: column;
}

.game-card .p-6, .game-card-home .p-6 {
    flex: 1; /* Allow the content area to expand */
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Distribute space evenly */
}

.game-card-home .flex.items-center.justify-between.mb-4 {
    height: 2rem; /* Fixed height for stats section */
    margin-bottom: 1rem;
}

.game-card h3, .game-card-home h4 {
    min-height: 3.5rem; /* Reserve space for 2 lines of text */
    max-height: 3.5rem; /* Prevent exceeding this height */
    display: -webkit-box;
    align-items: flex-start;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    margin-bottom: 1rem; /* Consistent spacing after title */
}

.game-card:hover, .game-card-home:hover {
    transform: translateY(-8px) scale(1.02);
}

/* Heat meter */
.heat-meter {
    width: 60px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.heat-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--royal-gold), var(--neon-blue));
    border-radius: 2px;
    transition: width 0.5s ease;
    position: relative;
}

.heat-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    animation: heatGlow 2s ease-in-out infinite;
}

@keyframes heatGlow {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Carousel styles */
.game-carousel {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-xl);
}

.carousel-container {
    overflow: hidden;
    border-radius: var(--radius-xl);
}

.carousel-track {
    display: flex;
    gap: 1.5rem;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 380px; /* Set consistent height for all carousel items */
}

.carousel-track .game-card-home {
    min-width: 280px; /* Set consistent width for all game cards */
    max-width: 280px;
    flex-shrink: 0;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 48px;
    height: 48px;
    background: rgba(255, 215, 0, 0.9);
    color: var(--deep-sapphire);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.carousel-btn:hover {
    background: var(--royal-gold);
    transform: translateY(-50%) scale(1.1);
    box-shadow: var(--glow-royal);
}

.carousel-prev {
    left: 1rem;
}

.carousel-next {
    right: 1rem;
}

/* Social links */
.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: var(--frosted-silver);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-link:hover {
    color: var(--royal-gold);
    background: rgba(255, 215, 0, 0.1);
    border-color: rgba(255, 215, 0, 0.3);
    transform: translateY(-2px);
}

/* Footer links */
.footer-link {
    color: var(--frosted-silver);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.footer-link:hover {
    color: var(--royal-gold);
    padding-left: 0.5rem;
}

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

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

@keyframes gradient {
    0%, 100% { 
        background-position: 0% 50%;
    }
    50% { 
        background-position: 100% 50%;
    }
}

@keyframes pulse {
    0%, 100% { 
        opacity: 1;
    }
    50% { 
        opacity: 0.5;
    }
}

@keyframes holographic {
    0% { 
        transform: translateX(-100%) skewX(-15deg);
    }
    100% { 
        transform: translateX(300%) skewX(-15deg);
    }
}

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

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

.animate-gradient {
    background-size: 200% 200%;
    animation: gradient 3s ease infinite;
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.animate-fade-in {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeIn 0.8s ease forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Glow effects */
.glow-text {
    text-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
}

.luxury-glow {
    box-shadow: var(--glow-royal);
}

.neon-glow {
    box-shadow: var(--glow-neon);
}

/* Holographic border effect */
.holographic-border {
    position: relative;
    overflow: hidden;
}

.holographic-border::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(255, 215, 0, 0.3), transparent);
    transform: skewX(-15deg);
    transition: all 0.6s ease;
}

.holographic-border:hover::before {
    animation: holographic 1.5s ease-in-out;
}

/* Background gradients */
.bg-gradient-radial {
    background: radial-gradient(circle, var(--royal-gold) 0%, transparent 70%);
}

/* Responsive design */
@media (max-width: 1024px) {
    .carousel-btn {
        width: 40px;
        height: 40px;
    }
    
    .carousel-prev {
        left: 0.5rem;
    }
    
    .carousel-next {
        right: 0.5rem;
    }
}

@media (max-width: 768px) {
    .carousel-btn {
        display: none;
    }
    
    .carousel-track {
        gap: 1rem;
    }
    
    .glass-card {
        border-radius: var(--radius-lg);
    }
    
    .luxury-button,
    .luxury-button-outline {
        padding: 0.625rem 1.5rem;
        font-size: 0.875rem;
    }
}

@media (max-width: 640px) {
    .tournament-tab {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
    
    .collection-filter {
        padding: 0.375rem 0.75rem;
        font-size: 0.8rem;
    }
    
    .hero-bg {
        opacity: 0.6;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .glass-card {
        background: rgba(255, 255, 255, 0.1);
        border-color: rgba(255, 255, 255, 0.3);
    }
    
    .luxury-button {
        border: 2px solid var(--royal-gold);
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .hero-bg {
        animation: none;
    }
    
    .animate-float,
    .animate-float-delayed,
    .animate-gradient {
        animation: none;
    }
}

/* Print styles */
@media print {
    .glass-card {
        background: white;
        color: black;
        border: 1px solid #ccc;
    }
    
    .luxury-button,
    .luxury-button-outline {
        background: white;
        color: black;
        border: 1px solid black;
    }
    
    .carousel-btn,
    .social-link {
        display: none;
    }
}

/* Focus styles for accessibility */
.luxury-button:focus,
.luxury-button-outline:focus,
.tournament-tab:focus,
.collection-filter:focus,
.nav-link:focus {
    outline: 2px solid var(--neon-blue);
    outline-offset: 2px;
}

/* Loading states */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: loading 1.5s ease-in-out infinite;
}

@keyframes loading {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Error states */
.error-card {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #FCA5A5;
}

/* Success states */
.success-card {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #86EFAC;
}

/* Warning states */
.warning-card {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #FCD34D;
}

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

::-webkit-scrollbar-track {
    background: var(--deep-sapphire);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, var(--royal-gold), var(--neon-blue));
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, var(--neon-blue), var(--royal-gold));
}

/* Selection styling */
::selection {
    background: rgba(255, 215, 0, 0.3);
    color: var(--deep-sapphire);
}

::-moz-selection {
    background: rgba(255, 215, 0, 0.3);
    color: var(--deep-sapphire);
}

/* Utility classes */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.pointer-events-none {
    pointer-events: none;
}

.pointer-events-auto {
    pointer-events: auto;
}

.transform {
    transform: translateZ(0);
}

/* Image lazy loading */
img[data-src] {
    opacity: 0;
    transition: opacity 0.3s ease;
}

img[data-src].loaded {
    opacity: 1;
}

/* Age Verification Popup Styles */
#ageVerificationPopup {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

#ageVerificationPopup .bg-gradient-to-br {
    background: linear-gradient(135deg, 
        rgba(14, 26, 64, 0.95) 0%, 
        rgba(14, 26, 64, 0.90) 100%);
    border: 1px solid rgba(255, 215, 0, 0.3);
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.luxury-button-popup {
    background: linear-gradient(135deg, var(--royal-gold), var(--neon-blue));
    border: none;
    box-shadow: 
        0 4px 15px rgba(255, 215, 0, 0.3),
        0 0 20px rgba(0, 212, 255, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.luxury-button-popup::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.2), 
        transparent);
    transition: left 0.5s;
}

.luxury-button-popup:hover::before {
    left: 100%;
}

.luxury-button-popup:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 
        0 8px 25px rgba(255, 215, 0, 0.4),
        0 0 30px rgba(0, 212, 255, 0.3);
}

.luxury-button-popup:active {
    transform: translateY(0) scale(1.02);
}

/* Popup animation */
#ageVerificationPopup > div {
    animation: popupSlideIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes popupSlideIn {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(30px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Responsive adjustments for popup */
@media (max-width: 640px) {
    #ageVerificationPopup > div {
        margin: 1rem;
        padding: 1.5rem;
    }
    
    #ageVerificationPopup h2 {
        font-size: 1.75rem;
    }
    
    .luxury-button-popup,
    #ageVerificationPopup button {
        padding: 0.75rem 1.5rem;
        font-size: 0.875rem;
    }
}
