/**
 * BadmintonLovers.org - Custom Styles
 * Modern, Professional Design System
 */

/* ========================================
   CSS VARIABLES - Design Tokens
   ======================================== */
:root {
    /* Primary Colors - Deep Forest Green Palette */
    --primary-900: #0f3d2a;
    --primary-800: #164d35;
    --primary-700: #1a5f3f;
    --primary-600: #1e704a;
    --primary-500: #22805a;
    --primary-400: #3d9e73;
    --primary-300: #4ade80;
    --primary-200: #86efac;
    --primary-100: #f0fdf4;
    --primary-50: #f7fef9;

    /* Accent Colors */
    --accent: #4ade80;
    --accent-hover: #22c55e;
    --accent-light: #86efac;

    /* Gray Scale */
    --gray-900: #111827;
    --gray-800: #1f2937;
    --gray-700: #374151;
    --gray-600: #4b5563;
    --gray-500: #6b7280;
    --gray-400: #9ca3af;
    --gray-300: #d1d5db;
    --gray-200: #e5e7eb;
    --gray-100: #f3f4f6;
    --gray-50: #f9fafb;

    /* Semantic Colors */
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --info: #3b82f6;

    /* Typography */
    --font-display: 'Outfit', -apple-system, sans-serif;
    --font-body: 'Inter', -apple-system, sans-serif;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 4rem;

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow-glow: 0 0 20px rgba(74, 222, 128, 0.3);

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================
   GLOBAL STYLES
   ======================================== */
* {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--gray-800);
    line-height: 1.6;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

/* ========================================
   ANIMATIONS
   ======================================== */

/* Fade In Up */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fade In */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Slide In Right */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Scale In */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Pulse */
@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

/* Float */
@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* Gradient Animation */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Shimmer */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }

    100% {
        background-position: 1000px 0;
    }
}

/* ========================================
   UTILITY CLASSES
   ======================================== */

/* Animated Gradient Background */
.gradient-bg {
    background: linear-gradient(-45deg, var(--primary-700), var(--primary-500), var(--primary-600), var(--primary-800));
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

/* Glassmorphism */
.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.glass-dark {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, var(--accent), var(--primary-500));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Hover Lift Effect */
.hover-lift {
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

/* Hover Glow Effect */
.hover-glow {
    transition: box-shadow var(--transition-base);
}

.hover-glow:hover {
    box-shadow: var(--shadow-glow);
}

/* Animated Underline */
.animated-underline {
    position: relative;
    display: inline-block;
}

.animated-underline::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width var(--transition-base);
}

.animated-underline:hover::after {
    width: 100%;
}

/* Fade In Animations */
.fade-in {
    animation: fadeIn var(--transition-slow) ease-out;
}

.fade-in-up {
    animation: fadeInUp var(--transition-slow) ease-out;
}

.slide-in-right {
    animation: slideInRight var(--transition-slow) ease-out;
}

.scale-in {
    animation: scaleIn var(--transition-slow) ease-out;
}

/* Scroll Reveal (will be triggered by JS) */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   COMPONENTS
   ======================================== */

/* Enhanced Button */
.btn-primary-enhanced {
    position: relative;
    background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
    color: white;
    font-weight: 600;
    padding: 0.875rem 2rem;
    border-radius: var(--radius-lg);
    border: none;
    cursor: pointer;
    overflow: hidden;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.btn-primary-enhanced::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;
}

.btn-primary-enhanced:hover::before {
    left: 100%;
}

.btn-primary-enhanced:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(26, 95, 63, 0.3);
}

.btn-primary-enhanced:active {
    transform: translateY(0);
}

/* Enhanced Card */
.card-enhanced {
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
    border: 1px solid var(--gray-100);
    overflow: hidden;
}

.card-enhanced:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-2xl);
    border-color: var(--primary-300);
}

/* Gradient Border */
.gradient-border {
    position: relative;
    background: white;
    border-radius: var(--radius-lg);
}

.gradient-border::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--accent), var(--primary-500));
    z-index: -1;
    opacity: 0;
    transition: opacity var(--transition-base);
}

.gradient-border:hover::before {
    opacity: 1;
}

/* Badge */
.badge-glow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(74, 222, 128, 0.1);
    border: 1px solid var(--accent-light);
    border-radius: var(--radius-full);
    color: var(--primary-700);
    font-size: 0.875rem;
    font-weight: 600;
    box-shadow: 0 0 20px rgba(74, 222, 128, 0.2);
}

/* Stats Counter */
.stat-number {
    font-size: 3rem;
    font-weight: 800;
    font-family: var(--font-display);
    background: linear-gradient(135deg, var(--primary-600), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Decorative Blob */
.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.3;
    animation: float 6s ease-in-out infinite;
}

/* ========================================
   RESPONSIVE UTILITIES
   ======================================== */
@media (max-width: 768px) {
    .stat-number {
        font-size: 2rem;
    }

    :root {
        --spacing-xl: 2rem;
        --spacing-2xl: 3rem;
    }
}

/* ========================================
   PERFORMANCE OPTIMIZATIONS
   ======================================== */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Custom Gradients requested by User */
.via-gray-900\/95 {
    --tw-gradient-to: rgb(17 24 39 / 0) var(--tw-gradient-to-position) !important;
    --tw-gradient-stops: var(--tw-gradient-from), rgb(25 96 65 / 49%) var(--tw-gradient-via-position), var(--tw-gradient-to) !important;
}

.from-gray-900 {
    --tw-gradient-from: #08311ff5 var(--tw-gradient-from-position) !important;
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to) !important;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 20px, 0);
    }

    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

.animate-fadeInUp {
    animation-name: fadeInUp;
    animation-duration: 0.5s;
    animation-fill-mode: both;
}