/* =========================================
   Sports Page Advanced Styling
   Theme: Energetic, Dynamic, Glassmorphism
   ========================================= */

:root {
    --sport-primary: #ff6b6b;
    /* Dynamic Red */
    --sport-secondary: #4ecdc4;
    /* Energetic Teal */
    --sport-accent: #ffe66d;
    /* Bright Yellow */
    --sport-dark: #292f36;
    /* Dark Slate */
    --glass-bg: rgba(255, 255, 255, 0.9);
    --glass-border: 1px solid rgba(255, 255, 255, 0.5);
    --card-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
}

body {
    background-color: #f7f9fc;
    background-image:
        radial-gradient(circle at 10% 20%, rgba(255, 107, 107, 0.05) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(78, 205, 196, 0.05) 0%, transparent 20%);
}

/* --- Hero Section --- */
.sports-hero {
    position: relative;
    height: 400px;
    background: linear-gradient(135deg, var(--sport-dark), #1a1a1a);
    border-radius: 0 0 30px 30px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    margin-bottom: 40px;
}

.sports-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('https://images.unsplash.com/photo-1461896836934-ffe607ba8211?w=1200&q=80');
    background-size: cover;
    background-position: center;
    opacity: 0.4;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 2px 2px 0 var(--sport-primary);
    margin-bottom: 10px;
}

.floating-icon {
    position: absolute;
    font-size: 3rem;
    opacity: 0.2;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(10deg);
    }
}

/* --- Glass Cards --- */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: var(--glass-border);
    box-shadow: var(--card-shadow);
    border-radius: 20px;
    padding: 25px;
    transition: transform 0.3s ease;
}

.glass-panel:hover {
    transform: translateY(-5px);
}

/* --- Tournament Bracket (Simplified Grid) --- */
.bracket-container {
    overflow-x: auto;
    padding: 20px 0;
}

.bracket {
    display: flex;
    flex-direction: row;
    gap: 40px;
    min-width: 800px;
}

.round {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    flex: 1;
}

.match {
    background: white;
    border-radius: 10px;
    padding: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
    border-left: 4px solid var(--sport-secondary);
}

.match::after {
    content: '';
    position: absolute;
    right: -20px;
    top: 50%;
    width: 20px;
    height: 2px;
    background: #ccc;
    z-index: -1;
}

.match:last-child::after {
    display: none;
}

.team {
    display: flex;
    justify-content: space-between;
    padding: 5px;
    font-size: 0.9rem;
}

.team.winner {
    font-weight: bold;
    color: var(--sport-dark);
}

.team-score {
    background: #eee;
    padding: 2px 6px;
    border-radius: 4px;
}

/* --- Player Trading Cards --- */
.player-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.player-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.4s ease;
}

.player-card:hover {
    transform: rotateY(10deg) scale(1.05);
    z-index: 10;
}

.player-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: #ddd;
}

.player-info {
    padding: 15px;
    text-align: center;
}

.player-rank {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--sport-accent);
    color: var(--sport-dark);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* --- Facility Booking FAB --- */
.fab-booking {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--sport-primary);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 10px 20px rgba(255, 107, 107, 0.4);
    cursor: pointer;
    transition: transform 0.3s ease;
    z-index: 100;
    border: none;
}

.fab-booking:hover {
    transform: scale(1.1) rotate(90deg);
}

.tooltip {
    position: absolute;
    right: 70px;
    background: #333;
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.fab-booking:hover .tooltip {
    opacity: 1;
}

/* --- Modals --- */
.sport-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
}

/* --- Utilities --- */
.text-gradient {
    background: linear-gradient(45deg, var(--sport-primary), var(--sport-secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.badge {
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: bold;
}

.badge-cricket {
    background: #e3f2fd;
    color: #1565c0;
}

.badge-kabaddi {
    background: #ffe0b2;
    color: #e65100;
}

@media (max-width: 768px) {
    .sports-hero {
        height: 300px;
        border-radius: 0 0 20px 20px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .bracket {
        min-width: 100%;
        flex-direction: column;
        gap: 20px;
    }

    .round {
        flex-direction: column;
        gap: 10px;
    }

    .match::after {
        display: none;
    }
}