/* Advanced Animations and Visual Effects for Goalmatch.uz */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* Custom Properties */
:root {
    --primary-blue: #3b82f6;
    --primary-blue-dark: #1d4ed8;
    --secondary-blue: #06b6d4;
    --accent-yellow: #fbbf24;
    --accent-green: #10b981;
    --accent-red: #ef4444;
    --bg-dark: #1f2937;
    --bg-light: #f9fafb;
    --text-dark: #111827;
    --text-light: #6b7280;
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
}

/* Base Styles */
* {
    font-family: 'Inter', sans-serif;
}

/* Glassmorphism Effects */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
}

.glass-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

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

/* Gradient Text Effects */
.text-gradient {
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shift 3s ease-in-out infinite;
}

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

/* Advanced Button Styles */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-blue-dark));
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary::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:hover::before {
    left: 100%;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-blue-dark), #1e40af);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.3);
}

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

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

/* Pulse Animation */
.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Glow Effects */
.glow {
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
}

.glow:hover {
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.5);
}

/* Text Effects */
.typewriter {
    overflow: hidden;
    border-right: 2px solid var(--primary-blue);
    white-space: nowrap;
    animation: typing 3.5s steps(40, end), blink-caret 0.75s step-end infinite;
}

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: var(--primary-blue); }
}

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

.card-hover::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(59, 130, 246, 0.1), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s;
}

.card-hover:hover::before {
    transform: translateX(100%);
}

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

/* Loading Animations */
.loading-spinner {
    border: 3px solid rgba(59, 130, 246, 0.3);
    border-top: 3px solid var(--primary-blue);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

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

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

/* Stadium Card Specific Styles */
.stadium-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stadium-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(59, 130, 246, 0.05), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s;
}

.stadium-card:hover::before {
    transform: translateX(100%);
}

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

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-blue);
    transition: width 0.3s ease;
}

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

/* Hero Section Effects */
.hero-bg {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 50%, #06b6d4 100%);
    position: relative;
    overflow: hidden;
}

.hero-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="2" fill="rgba(255,255,255,0.1)"/></svg>') repeat;
    background-size: 50px 50px;
    animation: float 20s ease-in-out infinite;
}

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

/* Form Enhancements */
.form-input {
    transition: all 0.3s ease;
    border-radius: 12px;
}

.form-input:focus {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.1);
    border-color: var(--primary-blue);
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.status-pending { 
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #92400e; 
}

.status-confirmed { 
    background: linear-gradient(135deg, #dcfce7, #bbf7d0);
    color: #166534; 
}

.status-cancelled { 
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    color: #991b1b; 
}

.status-completed { 
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    color: #1e40af; 
}

/* Rating Stars */
.rating-stars {
    display: flex;
    gap: 4px;
}

.star {
    font-size: 24px;
    color: #d1d5db;
    cursor: pointer;
    transition: all 0.2s ease;
}

.star:hover,
.star.active {
    color: #fbbf24;
    transform: scale(1.1);
}

/* Chat Styles */
.message-bubble {
    max-width: 70%;
    word-wrap: break-word;
    border-radius: 18px;
    padding: 12px 16px;
    margin: 4px 0;
}

.message-sent {
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-blue-dark));
    color: white;
    margin-left: auto;
}

.message-received {
    background: #f3f4f6;
    color: #374151;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-bg {
        padding: 2rem 1rem;
    }
    
    .stadium-card {
        margin: 0 1rem;
    }
    
    .booking-card {
        margin: 0 1rem;
    }
}

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

/* High contrast mode */
@media (prefers-contrast: high) {
    .text-gradient {
        background: none;
        color: var(--primary-blue);
        font-weight: bold;
    }
    
    .btn-primary {
        border: 2px solid var(--primary-blue);
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-light: #1f2937;
        --text-dark: #f9fafb;
        --text-light: #d1d5db;
    }
    
    body {
        background-color: var(--bg-light);
        color: var(--text-dark);
    }
}

/* Print styles */
@media print {
    .nav-link,
    .btn-primary,
    .card-hover {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
}