/* Tennis Zero Official Website - Custom Styles */

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #161615;
    background-color: #FDFDFD;
    background-image: url('../assets/images/tennis zero.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(253, 253, 253, 0.85);
    backdrop-filter: blur(2px);
    z-index: -1;
    pointer-events: none;
}

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

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #5751D5;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #4a44c4;
}

/* Typography with optimized font loading */
.font-poppins {
    font-family: 'Poppins', sans-serif;
    font-display: swap;
}

.font-inter {
    font-family: 'Inter', sans-serif;
    font-display: swap;
}

/* Fallback fonts for better loading */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, #5751D5, #8B5CF6, #EC4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Gradient Backgrounds */
.gradient-bg-primary {
    background: linear-gradient(135deg, #5751D5, #8B5CF6);
}

.gradient-bg-secondary {
    background: linear-gradient(135deg, #EC4899, #F59E0B);
}

.gradient-bg-accent {
    background: linear-gradient(135deg, #10B981, #3B82F6);
}

/* Glass Effect */
.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Bento Grid Styles */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    padding: 2rem 0;
}

.bento-card {
    background: white;
    border-radius: 24px;
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid rgba(87, 81, 213, 0.1);
}

.bento-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border-color: rgba(87, 81, 213, 0.3);
}

.bento-card-large {
    grid-column: span 2;
}

.bento-card-tall {
    grid-row: span 2;
}

/* Button Styles */
.btn-primary {
    background: linear-gradient(135deg, #5751D5, #8B5CF6);
    color: white;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(87, 81, 213, 0.3);
}

.btn-secondary {
    background: white;
    color: #5751D5;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    border: 2px solid #5751D5;
    cursor: pointer;
}

.btn-secondary:hover {
    background: #5751D5;
    color: white;
    transform: translateY(-2px);
}

/* Navigation Styles */
.nav-link {
    position: relative;
    transition: all 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #5751D5;
    transition: width 0.3s ease;
}

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

/* Card Hover Effects */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.hover-lift {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Game Showcase Images */
.game-showcase {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
}

.game-showcase img {
    transition: all 0.3s ease;
    border-radius: 12px;
}

.game-showcase:hover img {
    transform: scale(1.05);
    filter: brightness(1.1);
}

.overlay-content {
    position: relative;
    z-index: 2;
}

.feature-card .game-showcase img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.feature-card:hover .game-showcase img {
    transform: scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(87, 81, 213, 0.3);
    border-radius: 50%;
    border-top-color: #5751D5;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

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

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

/* Fade In Animation */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Slide In Animations */
.slide-in-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.6s ease;
}

.slide-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.slide-in-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.6s ease;
}

.slide-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Scale In Animation */
.scale-in {
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.6s ease;
}

.scale-in.visible {
    opacity: 1;
    transform: scale(1);
}

/* Floating Animation */
.floating {
    animation: floating 3s ease-in-out infinite;
}

@keyframes floating {
    0% {
        transform: translate(0, 0px);
    }
    50% {
        transform: translate(0, -10px);
    }
    100% {
        transform: translate(0, 0px);
    }
}

/* Glow Effect */
.glow {
    box-shadow: 0 0 20px rgba(87, 81, 213, 0.3);
    transition: box-shadow 0.3s ease;
}

.glow:hover {
    box-shadow: 0 0 30px rgba(87, 81, 213, 0.5);
}

/* Text Glow */
.text-glow {
    text-shadow: 0 0 10px rgba(87, 81, 213, 0.5);
}

/* Responsive Grid */
.responsive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

/* Custom Utilities */
.text-shadow {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.border-gradient {
    border: 2px solid;
    border-image: linear-gradient(135deg, #5751D5, #8B5CF6) 1;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .bento-card-large {
        grid-column: span 1;
    }
    
    .bento-card-tall {
        grid-row: span 1;
    }
    
    .responsive-grid {
        grid-template-columns: 1fr;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .dark-mode {
        background-color: #1a1a1a;
        color: #ffffff;
    }
    
    .dark-mode .bento-card {
        background: #2a2a2a;
        border-color: rgba(87, 81, 213, 0.3);
    }
}

/* Print Styles */
@media print {
    .no-print {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .bento-card {
        border: 2px solid #000;
    }
    
    .btn-primary {
        background: #000;
        border: 2px solid #000;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .floating {
        animation: none;
    }
}

/* Focus Styles for Accessibility */
.focus\:ring-accent:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(87, 81, 213, 0.5);
}

/* Custom Scrollbar for Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: #5751D5 #f1f1f1;
}

/* Selection Styles */
::selection {
    background: rgba(87, 81, 213, 0.3);
    color: #161615;
}

::-moz-selection {
    background: rgba(87, 81, 213, 0.3);
    color: #161615;
}