 /* Apply Inter font universally and set a smooth dark background */
        body {
            font-family: 'Inter', sans-serif;
           background-color: #1a202c;
            color: #e5e7eb; /* Light text */
        }

         #mobile-menu {
            transition: transform 0.3s ease-in-out;
        }
        #mobile-menu.hidden-menu {
            transform: translateX(100%);
        }

                ::-webkit-scrollbar { width: 8px; }
        ::-webkit-scrollbar-track { background: #0b0f1a; }
        ::-webkit-scrollbar-thumb { background: #87CEEB; border-radius: 10px; }

        /* Filter Button Active State */
        .active-filter {
            background-color: #FFD700 !important; /* Gold */
            color: #111827 !important; /* Dark text on gold */
            font-weight: 700;
            box-shadow: 0 2px 5px rgba(0, 0, 0, 0.4);
        }

        /* Format Tab Active State */
        .active-format {
            border-bottom: 4px solid #FFD700;
            color: #FFD700;
            background-color: rgba(255, 255, 255, 0.05);
        }

        /* Card Base Styling and Hover Effects */
        .player-card {
            transition: transform 0.3s ease, box-shadow 0.3s ease;
            overflow: hidden;
            position: relative;
            cursor: default;
        }
        .player-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
        }

        /* Container for image/details that slides on hover */
        .card-content {
            transition: transform 0.3s ease;
            transform: translateX(0);
        }

        /* State when the entire card is hovered */
        .player-card:hover .card-content {
            /* Pushes the content to the right to reveal the number */
            transform: translateX(2rem); 
        }

        /* The jersey number which is initially hidden off-screen */
        .jersey-number-overlay {
            position: absolute;
            left: 0;
            top: 25%; /* Positioned in the top quarter of the card */
            transform: translateY(-50%);
            opacity: 0;
            transition: opacity 0.3s ease;
            color: #FFD700;
            font-size: 4rem; /* Large number */
            font-weight: 900;
            line-height: 1;
            z-index: 10;
        }

        /* Reveal the number on card hover */
        .player-card:hover .jersey-number-overlay {
            opacity: 1;
        }

        /* Image Container: Enforces square aspect ratio */
        .player-image-container {
            width: 100%;
            padding-top: 50%; /* Creates a square container (aspect-square utility in newer Tailwind) */
            position: relative;
            overflow: hidden;
            background-color: #374151; /* Background color for image area */
        }
        
        /* Image itself */
        .player-image {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            /* Fix for neat fitting: use cover to fill the square, cropping minimally if needed */
            object-fit: cover;
            transition: transform 0.3s ease;
        }

        
        .team-card {
            transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
            position: relative;
            overflow: hidden;
            background-color: #1f2937;
        }

        .team-card:hover {
            transform: scale(1.05);
            box-shadow: 0 10px 25px rgba(255, 215, 0, 0.2); /* Subtle gold glow on hover */
            background-color: #374151;
        }

          .logo-text {
            color: #f6ad55;
        }
        /* Ensure the logo image is correctly sized */
        .logo-image {
            height: 4rem; /* 32px */
            width: auto;
            margin-right: 0.5rem;
        }


        /* Custom styling for jersey cards */
        .jersey-card {
            transition: transform 0.3s ease, box-shadow 0.3s ease;
            cursor: pointer;
            perspective: 1000px; /* For 3D transform */
        }

        .jersey-content {
            transition: transform 0.4s ease-out;
            transform-style: preserve-3d;
        }

        /* Lift and subtle rotation on hover */
        .jersey-card:hover .jersey-content {
            transform: translateY(-10px) rotateX(1deg) rotateY(1deg);
            box-shadow: 0 25px 50px rgba(255, 215, 0, 0.2); /* Gold glow shadow */
        }

        /* Styling for the large format badge on the card */
        .format-badge {
            position: absolute;
            top: 0;
            right: 0;
            padding: 0.5rem 1.5rem;
            background-color: #059669; /* Primary color */
            color: white;
            font-weight: bold;
            text-transform: uppercase;
            clip-path: polygon(10% 0, 100% 0, 100% 100%, 0 100%);
            transform: translateY(-0.1rem);
            box-shadow: -5px 5px 10px rgba(0, 0, 0, 0.4);
        }

        
        /* Tab Styles */
        .rank-tab {
            transition: all 0.3s ease;
            border-bottom: 3px solid transparent;
            opacity: 0.6;
        }
        .rank-tab:hover {
            opacity: 1;
            color: #FFD700;
        }
        .rank-tab.active {
            border-bottom-color: #FFD700;
            color: #FFD700;
            opacity: 1;
            font-weight: 700;
        }

        /* Card Hover Effects */
        .rank-card {
            transition: transform 0.3s ease, box-shadow 0.3s ease;
        }
        .rank-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 25px rgba(5, 150, 105, 0.2);
        }

        /* General styles for the attractive rank badge */
        .rank-badge-pill {
            transition: transform 0.3s ease, box-shadow 0.3s ease;
        }
        .rank-badge-pill:hover {
            transform: scale(1.05);
        }
        
        /* Fade in animation for tab switching */
        .fade-in {
            animation: fadeIn 0.5s ease-in-out;
        }
        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(10px); }
            to { opacity: 1; transform: translateY(0); }
        }


                /* Tab Styles (Matching rankings.html) */
        .stat-tab {
            transition: all 0.3s ease;
            border-bottom: 3px solid transparent;
            opacity: 0.6;
        }
        .stat-tab:hover {
            opacity: 1;
            color: #FFD700;
        }
        .stat-tab.active {
            border-bottom-color: #FFD700;
            color: #FFD700;
            opacity: 1;
            font-weight: 700;
        }

        /* Card Hover Effects (Matching rankings.html) */
        .stat-card {
            transition: transform 0.3s ease, box-shadow 0.3s ease;
        }
        .stat-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 25px rgba(5, 150, 105, 0.2);
        }
        
        /* Fade in animation for tab switching */
        .fade-in {
            animation: fadeIn 0.5s ease-in-out;
        }
        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(10px); }
            to { opacity: 1; transform: translateY(0); }
        }


                /* Card Hover Effect */
        .achievement-card {
            transition: transform 0.3s ease, box-shadow 0.3s ease;
            position: relative;
        }
        .achievement-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 15px 30px rgba(5, 150, 105, 0.3);
        }

        /* Image Placeholder Style */
        .trophy-placeholder {
            min-height: 200px;
            background-color: #374151; /* Dark gray for the image area */
            background-image: linear-gradient(135deg, #1f2937 0%, #374151 100%);
            display: flex;
            align-items: center;
            justify-content: center;
            color: #9ca3af;
            font-size: 1.5rem;
            font-weight: 700;
            border-top-left-radius: 0.75rem;
            border-top-right-radius: 0.75rem;
        }

        /* Navigation Style */
        .nav-link.active {
            color: yellow;
            background-color: #059669; /* cricket-primary */
        }


                /* Card Hover Effect */
        .match-card {
            transition: transform 0.3s ease, box-shadow 0.3s ease;
            position: relative;
        }
        .match-card:hover {
            transform: translateY(-4px);
            box-shadow: 0 10px 20px rgba(5, 150, 105, 0.2);
        }

        /* Team Flag Container Styling */
        .team-logo {
            position: relative;
            width: 2 px;
            height: 4 px;
            border-radius: 50%;
            overflow: hidden; /* Ensures the image is clipped into the circle */
            flex-shrink: 0;
            border: 2px solid #FFD700; /* Yellow ring for visibility */
        }
        .team-logo img {
             /* Ensures the placeholder text/image fills the circle */
            object-fit: cover;
        }

                /* Custom Status Badges */
        .badge-win { background-color: #10b981; color: white; } /* Green */
        .badge-loss { background-color: #ef4444; color: white; }
        .badge-draw { background-color: #10b981; color: white; } /* Red */
        .badge-upcoming { background-color: #3b82f6; color: #1e3a8a; } /* Blue */
        .badge-nr {   background: #6B7280; color: white;}


        /* Tab Styling */
        .tab-button {
            color: #e5e7eb;
            background-color: transparent;
            border: 1px solid transparent;
            cursor: pointer;
        }

        .active-tab {
            background-color: #059669; /* cricket-primary */
            color: #ffffff;
            box-shadow: 0 4px 10px rgba(5, 150, 105, 0.4);
            border-color: #059669;
        }
        
        .inactive-tab:hover {
            background-color: #1f2937; /* card-bg */
            color: #ffffff;
        }

        
        /* Card Hover Effect */
        .player-card-players {
            transition: transform 0.3s ease, box-shadow 0.3s ease;
            position: relative;
        }
        .player-card-players:hover {
            transform: translateY(-4px);
            box-shadow: 0 10px 20px rgba(5, 150, 105, 0.2);
        }

        /* Player Image Placeholder Styling */
        .player-image-players {
            width: 96px; /* w-24 */
            height: 96px; /* h-24 */
            border-radius: 50%;
            overflow: hidden;
            border: 4px solid; 
            margin: 0 auto 1rem;
            flex-shrink: 0;
            background-color: #374151;
        }
        .player-image-players img {
            object-fit: cover;
        }


        /* Base Role Image style */
        .role-image {
            width: 1.25rem; /* w-5 */
            height: 1.25rem; /* h-5 */
            margin-right: 0.5rem; /* mr-2 */
            /* Added to ensure the placeholder looks nice */
            border-radius: 4px; 
            object-fit: contain;
        }

        .border-cricket-fixtues{
            background-color: #3b82f6;
        }


        
              
        .header-section {
            background-image: linear-gradient(to top right, #1E293B, #0F172A);
        }

        /* Styling for the main content cards */
        .dashboard-card {
            background-color: #1E293B; /* card-bg */
            border-radius: 1rem; /* large rounded corners */
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
            transition: all 0.3s ease;
            border: 1px solid rgba(5, 150, 105, 0.1);
        }


        /* --- CAROUSEL STYLING (Used for Top Stories) --- */
        .carousel-track {
            display: flex;
            overflow-x: scroll; 
            scroll-snap-type: x mandatory; 
            -webkit-overflow-scrolling: touch;
        }
        
        .carousel-track::-webkit-scrollbar {
            height: 4px; /* Thin scrollbar for subtle hint */
            background: #0F172A;
        }
        .carousel-track::-webkit-scrollbar-thumb {
            background: #059669;
            border-radius: 4px;
        }

        .news-card {
            flex: 0 0 auto; 
            width: 85%; /* Slightly smaller on mobile */
            scroll-snap-align: start; 
            margin-right: 1rem; 
            border-radius: 0.75rem;
            overflow: hidden;
            background-color: #1E293B;
            transition: transform 0.2s;
            cursor: pointer;
        }
        .news-card:hover {
            transform: translateY(-4px);
        }

        @media (min-width: 640px) { /* sm breakpoint */
            .news-card {
                width: calc(50% - 0.5rem); 
            }
        }
        
        @media (min-width: 1024px) { /* lg breakpoint */
            .news-card {
                width: calc(33.333% - 0.66rem); 
            }
        }

        .arrow {
            /* Now visible on all screens as requested previously */
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            background-color: rgba(30, 41, 59, 0.9); /* card-bg with transparency */
            color: white;
            padding: 0.5rem;
            border-radius: 9999px; 
            cursor: pointer;
            z-index: 10;
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
            transition: background-color 0.2s, opacity 0.2s;
        }
        .arrow:hover {
            background-color: #059669; /* cricket-primary */
        }
        .arrow-left {
            left: 0.5rem;
        }
        .arrow-right {
            right: 0.5rem;
        }



        :root {
            --chat-primary: #15803d; /* Cricket Green */
            --chat-bg: #ffffff;
            --chat-text: #1f2937;
            --chat-bubble-user: #15803d;
            --chat-bubble-bot: #f3f4f6;
        }

        /* --- NEW ANIMATED BUTTON STYLES --- */
        .chat-widget-button {
            position: fixed;
            bottom: 20px;
            right: 20px;
            height: 50px;
            padding: 0 24px; /* Pill shape padding */
            background-color: var(--chat-primary);
            border-radius: 30px;
            box-shadow: 0 4px 12px rgba(21, 128, 61, 0.4);
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            z-index: 9999;
            
            /* Font Styling */
            color: white;
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
            font-weight: bold;
            font-size: 16px;
            letter-spacing: 0.5px;
            
            /* Floating Animation */
            animation: float 3s ease-in-out infinite;
        }

        .chat-widget-button:hover {
            transform: scale(1.05); /* Slight grow on hover */
            animation-play-state: paused; /* Pause float on hover */
        }

        /* The Pulse Ring Animation */
        .chat-widget-button::before {
            content: '';
            position: absolute;
            top: 0; left: 0; right: 0; bottom: 0;
            border-radius: 30px;
            border: 2px solid var(--chat-primary);
            z-index: -1;
            animation: pulse-ring 2s infinite;
        }

        @keyframes float {
            0% { transform: translateY(0px); }
            50% { transform: translateY(-6px); }
            100% { transform: translateY(0px); }
        }

        @keyframes pulse-ring {
            0% { transform: scale(1); opacity: 0.7; }
            100% { transform: scale(1.4); opacity: 0; }
        }
        /* ---------------------------------- */


        /* Chat Window (Same as before) */
        .chat-window {
            position: fixed;
            bottom: 90px;
            right: 20px;
            width: 350px;
            height: 500px;
            background-color: var(--chat-bg);
            border-radius: 12px;
            box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
            display: none;
            flex-direction: column;
            overflow: hidden;
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
            z-index: 9999;
            transition: opacity 0.3s ease;
            color: black;
        }

        .chat-window.open {
            display: flex;
        }

        /* Header */
        .chat-header {
            background-color: var(--chat-primary);
            color: white;
            padding: 15px;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .chat-header h3 {
            margin: 0;
            font-size: 16px;
        }

        .close-btn {
            background: none;
            border: none;
            color: white;
            font-size: 24px;
            cursor: pointer;
            line-height: 1;
        }

        /* Messages Area */
        .chat-messages {
            flex: 1;
            padding: 15px;
            overflow-y: auto;
            display: flex;
            flex-direction: column;
            gap: 10px;
            color: black;
        }

        .message {
            max-width: 80%;
            padding: 10px 14px;
            border-radius: 10px;
            font-size: 14px;
            line-height: 1.4;
            word-wrap: break-word;
        }

        .message.user {
            align-self: flex-end;
            background-color: var(--chat-bubble-user);
            color: black;
            border-bottom-right-radius: 2px;
        }

        .message.bot {
            align-self: flex-start;
            background-color: var(--chat-bubble-bot);
            color: var(--chat-text);
            border-bottom-left-radius: 2px;
            color: black;
        }
        
        /* Rendered list fix */
        .message.bot ul { padding-left: 20px; margin: 5px 0; }

        /* Input Area */
        .chat-input-area {
            padding: 15px;
            border-top: 1px solid #eee;
            display: flex;
            gap: 10px;
            background: white;
        }

        .chat-input-area input {
            flex: 1;
            padding: 10px;
            border: 1px solid #ddd;
            border-radius: 20px;
            outline: none;
            font-size: 14px;
        }

        .chat-input-area button {
            background-color: var(--chat-primary);
            color: white;
            border: none;
            padding: 8px 15px;
            border-radius: 20px;
            cursor: pointer;
            font-weight: bold;
        }

        .chat-input-area button:disabled {
            background-color: #ccc;
            cursor: not-allowed;
        }

        @media (max-width: 480px) {
            .chat-window {
                width: 90%;
                height: 70%;
                bottom: 90px;
                right: 5%;
            }
        }


        .store-btn {
  background: #0a78ff;
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: bold;
}

.store-btn:hover {
  background: #0066e2;
}


/* 🎉 Confetti */
.confetti {
    position: fixed;
    top: -10px;
    width: 10px;
    height: 14px;
    opacity: 0.9;
    z-index: 50;
    animation: confettiFall linear forwards;
}


@keyframes confettiFall {
    to {
        transform: translateY(110vh) rotate(360deg);
    }
}

        @keyframes popup {
            0% { transform: scale(0.8); opacity: 0; }
            100% { transform: scale(1); opacity: 1; }
        }

        .animate-popup {
            animation: popup 0.5s ease-out;
        }
        /* 🎆 Realistic Fireworks Canvas Overlay */
        #fireworks-canvas {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            pointer-events: none;
            z-index: 40;
        }
