       /* csr avoider style */
       
       * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        :root {
            /* Primary Brand Colors */
            --primary-orange: #ff6a00;
            --primary-pink: #ee0979;
            --primary-purple: #6a11cb;
            --primary-blue: #2575fc;
  
            /* Game-specific colors adapted for light theme */
            --road-color: #666666; /* Lighter road */
            --grass-color: #90EE90; /* Lighter grass */
            --player-car: #ff6a00;
  
            /* Colorful enemy car colors */
            --enemy-car-blue: #2575fc;
            --enemy-car-red: #ff3b30;
            --enemy-car-green: #34c759;
            --enemy-car-purple: #af52de;
            --enemy-car-yellow: #ffcc00;
            --enemy-car-teal: #5ac8fa;
  
            --coin-color: #ffd700;
            /* Neutrals */
            --light: #f8f9fa;
            --dark: #212529;
            --gray: #6c757d;
            --white: #ffffff;
        }
        body {
            font-family: "Segoe UI", Arial, sans-serif;
            background: #f4f7fb;
            color: #333;
            min-height: 100vh;
            display: flex;
            flex-direction: column;
            overflow-x: hidden;
        }
        /* Header */
        header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 15px 30px;
            background: var(--white);
            box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
            position: sticky;
            top: 0;
            z-index: 1000;
        }
        header img {
            height: 55px;
        }
        nav ul {
            list-style: none;
            display: flex;
            gap: 20px;
        }
        nav ul li a {
            text-decoration: none;
            font-weight: bold;
            color: #444;
            position: relative;
            transition: color 0.3s ease, transform 0.3s ease;
            padding: 5px 10px;
        }
        nav ul li a:hover {
            color: var(--primary-orange);
            transform: translateY(-2px);
        }
        nav ul li a::after {
            content: '';
            position: absolute;
            width: 0;
            height: 2px;
            background: var(--primary-orange);
            bottom: 0;
            left: 50%;
            transform: translateX(-50%);
            transition: width 0.3s ease;
        }
        nav ul li a:hover::after {
            width: 100%;
        }
        /* Mobile Menu Toggle */
        .menu-toggle {
            display: none;
            font-size: 24px;
            background: none;
            border: none;
            color: #444;
            cursor: pointer;
            z-index: 1001;
            transition: color 0.3s ease, transform 0.3s ease;
        }
        .menu-toggle:hover {
            color: var(--primary-orange);
            transform: rotate(90deg);
        }
        @media (max-width: 768px) {
            .menu-toggle {
                display: block;
            }
            nav {
                display: none;
                position: absolute;
                top: 100%;
                left: 0;
                width: 100%;
                background: var(--white);
                box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
                transform: translateX(-100%);
                transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
                opacity: 0;
            }
            nav.active {
                display: block;
                transform: translateX(0);
                opacity: 1;
            }
            nav ul {
                flex-direction: column;
                padding: 20px;
                gap: 15px;
            }
            nav ul li {
                text-align: center;
                opacity: 0;
                transform: translateY(20px);
                transition: opacity 0.3s ease, transform 0.3s ease;
            }
            nav.active ul li {
                opacity: 1;
                transform: translateY(0);
            }
        }
        /* Main content wrapper to push footer to bottom */
        .main-content {
            flex: 1 0 auto;
            width: 100%;
            padding: 20px 0;
        }
        /* Hero Section */
        .hero {
            background: linear-gradient(135deg, var(--primary-orange), var(--primary-pink));
            color: var(--white);
            text-align: center;
            padding: 70px 20px;
            position: relative;
            overflow: hidden;
        }
        .hero::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background:
                radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
            pointer-events: none;
        }
        .hero h1 {
            font-size: 2.8rem;
            margin-bottom: 12px;
            animation: fadeInDown 1s ease;
            text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
            position: relative;
            display: inline-block;
        }
        .hero h1::after {
            content: '';
            position: absolute;
            width: 100px;
            height: 4px;
            bottom: -10px;
            left: 50%;
            transform: translateX(-50%);
            background: linear-gradient(90deg, var(--primary-orange), var(--primary-pink));
            border-radius: 2px;
        }
        .hero p {
            font-size: 1.2rem;
            animation: fadeInUp 1.2s ease;
            max-width: 800px;
            margin: 0 auto;
            line-height: 1.6;
            opacity: 0.9;
        }
        @keyframes fadeInDown {
            from {
                opacity: 0;
                transform: translateY(-20px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }
        @keyframes fadeInUp {
            from {
                opacity: 0;
                transform: translateY(20px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }
        /* Tools Heading */
        .tools-heading {
            text-align: center;
            margin: 30px auto;
            animation: fadeInDown 1s ease;
            width: 100%;
            max-width: 1000px;
            padding: 0 20px;
        }
        .tools-heading h2 {
            font-size: 2.4rem;
            background: linear-gradient(135deg, var(--primary-orange), var(--primary-pink));
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            display: inline-block;
            position: relative;
            padding-bottom: 15px;
            margin-bottom: 15px;
        }
        .tools-heading h2::after {
            content: "";
            width: 80px;
            height: 4px;
            background: linear-gradient(90deg, var(--primary-orange), var(--primary-pink));
            position: absolute;
            left: 50%;
            transform: translateX(-50%);
            bottom: 0;
            border-radius: 2px;
            transition: width 0.4s ease;
        }
        .tools-heading h2:hover::after {
            width: 140px;
        }
        .tools-heading p {
            font-size: 1rem;
            color: var(--gray);
            max-width: 650px;
            margin: 15px auto 0;
            line-height: 1.6;
        }
        /* Brand Highlight */
        .brand-highlight {
            color: var(--primary-orange);
            font-weight: 700;
        }
        /* Container */
        .container {
            width: 100%;
            max-width: 1400px; /* Increased for larger game */
            background: var(--white);
            border-radius: 20px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
            overflow: hidden;
            margin: 20px auto;
            box-sizing: border-box;
            padding: 0 15px;
        }
        .tool-container {
            padding: 25px;
            display: flex;
            flex-direction: column;
            gap: 25px;
        }
        /* Car Avoider Game Card */
        .car-avoider-card {
            background: linear-gradient(135deg, #ffffff, #f8f9fa);
            border-radius: 20px;
            padding: 30px;
            transition: transform 0.3s ease;
            border: 2px solid rgba(255, 106, 0, 0.1);
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
        }
        .car-avoider-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 15px 35px rgba(255, 106, 0, 0.1);
        }
        .car-avoider-card h2 {
            font-size: 1.8rem;
            color: var(--primary-orange);
            margin-bottom: 10px;
            display: flex;
            align-items: center;
            gap: 10px;
            justify-content: center;
        }
        .car-avoider-card h2 i {
            font-size: 1.8rem;
        }
        .game-subtitle {
            color: var(--gray);
            margin-bottom: 25px;
            font-size: 1rem;
            text-align: center;
        }
        /* Game Container */
        .game-container {
            display: grid;
            grid-template-columns: 1fr 400px;
            gap: 30px;
            margin-top: 20px;
            width: 100%;
            box-sizing: border-box;
        }
        @media (max-width: 1100px) {
            .game-container {
                grid-template-columns: 1fr;
                padding: 10px;
            }
  
            .container {
                margin: 10px;
                padding: 15px;
                width: calc(100% - 20px);
            }
        }
        /* Game Board */
        .game-board-container {
            display: flex;
            flex-direction: column;
            align-items: center;
            width: 100%;
            overflow: auto; /* Allow scrolling on mobile */
            position: relative;
        }
        #gameCanvas {
            background: linear-gradient(var(--grass-color), var(--grass-color)),
                        linear-gradient(var(--road-color), var(--road-color)),
                        linear-gradient(var(--grass-color), var(--grass-color));
            background-size: 20% 100%, 60% 100%, 20% 100%;
            background-position: 0% 0%, 20% 0%, 80% 0%;
            background-repeat: no-repeat;
            border-radius: 15px;
            box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
            border: 3px solid rgba(255, 106, 0, 0.15);
            display: block;
            margin-bottom: 25px;
  
            /* Screen size increased by 30% */
            width: 1040px; /* Original 800px + 30% */
            height: 780px; /* Original 600px + 30% */
            max-width: 100%;
            height: auto;
        }
        @media (max-width: 500px) {
            #gameCanvas {
                width: 100% !important;
                height: auto !important;
            }
  
            .tool-container {
                padding: 15px;
            }
        }
        /* Game Controls Panel */
        .game-controls-panel {
            background: linear-gradient(135deg, #f8f9fa, #f0f5ff);
            border-radius: 15px;
            padding: 20px;
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.06);
            border: 1px solid rgba(255, 106, 0, 0.1);
        }
        .game-stats, .difficulty-level, .controls-info, .score-board {
            margin-bottom: 25px;
        }
        .game-controls-panel h3 {
            color: var(--primary-orange);
            margin-bottom: 12px;
            font-size: 1.2rem;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .game-controls-panel h3 i {
            font-size: 1.1rem;
        }
        /* Stats Display */
        .stats-display {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 10px;
        }
        .stat-item {
            background: var(--light);
            border-radius: 10px;
            padding: 12px;
            text-align: center;
            border: 1px solid #dee2e6;
            transition: all 0.3s ease;
        }
        .stat-item:hover {
            background: rgba(255, 106, 0, 0.08);
            border-color: var(--primary-orange);
        }
        .stat-label {
            font-size: 0.85rem;
            color: var(--gray);
            margin-bottom: 5px;
        }
        .stat-value {
            font-size: 1.5rem;
            font-weight: 700;
            color: var(--primary-orange);
        }
        /* Difficulty Buttons */
        .difficulty-buttons {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 8px;
        }
        .difficulty-btn, .action-btn {
            padding: 10px 15px;
            border: none;
            border-radius: 10px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            font-size: 0.9rem;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
        }
        .difficulty-btn {
            background: var(--light);
            color: var(--dark);
            border: 1px solid #dee2e6;
        }
        .difficulty-btn.active {
            background: linear-gradient(135deg, var(--primary-orange), var(--primary-pink));
            color: var(--white);
            border-color: var(--primary-orange);
            box-shadow: 0 3px 8px rgba(255, 106, 0, 0.25);
        }
        .difficulty-btn:hover:not(.active) {
            background: #e9ecef;
        }
        /* Action Buttons */
        .action-buttons {
            display: flex;
            flex-direction: column;
            gap: 10px;
            margin-top: 20px;
        }
        .action-btn {
            background: linear-gradient(135deg, var(--primary-orange), var(--primary-pink));
            color: var(--white);
            font-size: 0.95rem;
            padding: 12px;
        }
        .action-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 5px 12px rgba(255, 106, 0, 0.3);
        }
        .action-btn.reset {
            background: linear-gradient(135deg, #6c757d, #495057);
        }
        .action-btn.reset:hover {
            box-shadow: 0 5px 12px rgba(108, 117, 125, 0.3);
        }
  
        /* Responsive controls */
        @media (max-width: 768px) {
            #gameCanvas {
                margin-bottom: 0px;
                max-height: 140vh !important;
            }
   
            .game-status {
                margin-bottom: 0px;
            }
   
            .action-buttons {
                display: grid !important;
                grid-template-columns: repeat(2, 1fr) !important;
                gap: 10px !important;
            }
  
            .action-btn {
                padding: 12px 8px !important;
                font-size: 0.85rem !important;
            }
  
            .difficulty-buttons {
                grid-template-columns: repeat(3, 1fr) !important;
            }
  
            .difficulty-btn {
                padding: 10px 5px !important;
                font-size: 0.8rem !important;
            }
  
            .stat-value {
                font-size: 1.2rem !important;
            }
  
            .game-status {
                padding: 10px !important;
                margin-top: 10px !important;
            }
  
            .status-text {
                font-size: 1rem !important;
            }
  
            .current-player {
                font-size: 0.9rem !important;
            }
  
            #gameCanvas {
                width: 100% !important;
                max-height: 140vh !important;
                min-height: 300px;
                margin: 10px auto !important;
                border: 2px solid rgba(255, 106, 0, 0.15);
            }
  
            .hero {
                padding: 40px 15px !important;
            }
  
            .tools-heading h2 {
                font-size: 1.5rem !important;
            }
  
            .stats-display {
                grid-template-columns: repeat(2, 1fr) !important;
                gap: 8px !important;
            }
  
            .stat-item {
                padding: 8px !important;
            }
  
            .controls-info-item {
                padding: 6px !important;
                font-size: 0.85rem !important;
            }
        }
        /* Responsive controls for smaller screens */
        @media (max-width: 480px) {
            .action-buttons {
                grid-template-columns: 1fr !important;
            }
  
            .difficulty-buttons {
                grid-template-columns: repeat(3, 1fr) !important;
                gap: 5px !important;
            }
  
            .stats-display {
                grid-template-columns: repeat(2, 1fr) !important;
                gap: 8px !important;
            }
  
            .stat-item {
                padding: 8px !important;
            }
  
            .stat-value {
                font-size: 1.1rem !important;
            }
  
            .controls-info-item {
                padding: 6px !important;
                font-size: 0.85rem !important;
            }
  
            .footer-logo img {
                height: 40px;
            }
            .footer-heading {
                font-size: 1.1rem;
            }
            .footer-tools ul,
            .footer-quick-links ul {
                grid-template-columns: 1fr;
            }
            .footer-social a {
                width: 32px;
                height: 32px;
                font-size: 14px;
            }
            .footer-contact p {
                font-size: 0.8rem;
            }
            .footer-contact i {
                font-size: 14px;
            }
            .footer-legal a {
                font-size: 0.8rem;
            }
            .newsletter-input,
            .newsletter-btn {
                padding: 8px 12px;
                font-size: 12px;
                max-width: 200px;
            }
        }
        @media (max-width: 350px) {
            #gameCanvas {
                max-height: 135vh !important;
            }
        }
        /* Touch controls for mobile */
        @media (hover: none) and (pointer: coarse) {
            .difficulty-btn, .action-btn {
                min-height: 44px;
            }
        }
        /* Score Board */
        .score-board {
            background: var(--white);
            border-radius: 12px;
            padding: 15px;
            box-shadow: 0 3px 8px rgba(0, 0, 0, 0.06);
        }
        .score-display {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 10px;
            text-align: center;
        }
        .score-item {
            padding: 12px;
            border-radius: 10px;
            background: var(--light);
            border: 1px solid #dee2e6;
        }
        .score-item.active {
            background: rgba(255, 106, 0, 0.08);
            border: 1px solid var(--primary-orange);
        }
        .score-label {
            font-size: 0.85rem;
            color: var(--gray);
            margin-bottom: 5px;
        }
        .score-value {
            font-size: 1.5rem;
            font-weight: 700;
            color: var(--primary-orange);
        }
        /* Game Status */
        .game-status {
            text-align: center;
            margin-top: 20px;
            padding: 15px;
            background: linear-gradient(135deg, rgba(255, 106, 0, 0.08), rgba(37, 117, 252, 0.08));
            border-radius: 12px;
            border-left: 4px solid var(--primary-orange);
        }
        .status-text {
            font-size: 1.1rem;
            font-weight: 600;
            color: var(--dark);
            margin-bottom: 8px;
        }
        .current-player {
            font-size: 1rem;
            color: var(--primary-orange);
            font-weight: 600;
        }
        .controls-info-item {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-bottom: 8px;
            padding: 8px;
            background: var(--light);
            border-radius: 8px;
            border: 1px solid #dee2e6;
        }
        .controls-info-item i {
            color: var(--primary-orange);
            width: 20px;
        }
        /* Game Instructions */
        .game-instructions {
            background: linear-gradient(135deg, #f8f9fa, #f0f5ff);
            border-radius: 15px;
            padding: 20px;
            margin-top: 25px;
            border: 1px solid rgba(255, 106, 0, 0.1);
        }
        .game-instructions h3 {
            color: var(--primary-orange);
            margin-bottom: 12px;
            font-size: 1.3rem;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .instructions-list {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
            gap: 12px;
        }
        .instruction-item {
            background: var(--white);
            padding: 12px;
            border-radius: 10px;
            border-left: 3px solid var(--primary-orange);
            box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
            font-size: 0.9rem;
        }
        .instruction-item i {
            color: var(--primary-orange);
            margin-right: 8px;
            font-size: 1rem;
        }
        /* Tool Info */
        .tool-info {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-top: 20px;
            padding: 15px;
            background: #f0f8ff;
            border-radius: 10px;
        }
        .tool-info h3 {
            color: var(--primary-orange);
            margin-bottom: 5px;
        }
        .tool-info p {
            color: var(--gray);
            font-size: 0.9rem;
        }
        .tool-stats {
            display: flex;
            gap: 20px;
        }
        .stat {
            display: flex;
            flex-direction: column;
            align-items: center;
        }
        .stat-value {
            font-size: 1.5rem;
            font-weight: 700;
            color: var(--primary-orange);
        }
        .stat-label {
            font-size: 0.9rem;
            color: var(--gray);
        }
        /* How to Use Section - Mobile Responsive */
        .how-to-use {
            width: 100%;
            max-width: 1000px;
            margin: 30px auto;
            padding: 0 20px;
        }
        .how-to-use-card {
            background: var(--white);
            border-radius: 20px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
            padding: 30px;
            margin-bottom: 30px;
            transition: transform 0.3s ease;
        }
        .how-to-use-card:hover {
            transform: translateY(-5px);
        }
        .how-to-use-card h2 {
            font-size: 1.8rem;
            color: var(--primary-orange);
            margin-bottom: 20px;
            display: flex;
            align-items: center;
            justify-content: center; /* Center align on mobile */
            gap: 10px;
            text-align: center; /* Ensure text is centered */
            flex-wrap: wrap; /* Allow wrapping on small screens */
        }
        .how-to-use-card h2 i {
            font-size: 1.8rem;
        }
        .how-to-use-steps {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 20px;
        }
        .step {
            background: var(--light);
            border-radius: 15px;
            padding: 20px;
            text-align: center;
            transition: all 0.3s ease;
            border-left: 4px solid var(--primary-orange);
        }
        .step:hover {
            transform: translateY(-3px);
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
        }
        .step-number {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 40px;
            height: 40px;
            background: linear-gradient(135deg, var(--primary-orange), var(--primary-pink));
            color: var(--white);
            border-radius: 50%;
            font-weight: bold;
            margin: 0 auto 15px;
        }
        .step h3 {
            font-size: 1.2rem;
            margin-bottom: 10px;
            color: var(--dark);
        }
        .step p {
            color: var(--gray);
            line-height: 1.5;
            font-size: 0.9rem;
        }
        /* Mobile responsive styles for How to Use section */
        @media (max-width: 768px) {
            .how-to-use {
                padding: 0 15px;
                margin: 20px auto;
            }
        
            .how-to-use-card {
                padding: 20px;
                margin-bottom: 20px;
                border-radius: 15px;
            }
        
            .how-to-use-card h2 {
                font-size: 1.5rem; /* Smaller font for mobile */
                flex-direction: column; /* Stack icon and text vertically */
                gap: 8px;
                text-align: center;
            }
        
            .how-to-use-card h2 i {
                font-size: 1.5rem;
                margin-bottom: 5px;
            }
        
            .how-to-use-steps {
                grid-template-columns: 1fr; /* Single column on mobile */
                gap: 15px;
            }
        
            .step {
                padding: 15px;
            }
        
            .step h3 {
                font-size: 1.1rem;
            }
        }
    
        @media (max-width: 480px) {
            .how-to-use-card h2 {
                font-size: 1.3rem; /* Even smaller for very small screens */
            }
        
            .how-to-use-card h2 i {
                font-size: 1.3rem;
            }
        }
        /* Game Over Popup Styles - Enhanced for Mobile */
        .popup-overlay {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.85);
            backdrop-filter: blur(5px);
            z-index: 9999;
            align-items: center;
            justify-content: center;
            animation: fadeIn 0.3s ease;
            overflow-y: auto; /* Allow scrolling if content overflows on very small screens */
        }
        .popup-content {
            background: linear-gradient(135deg, #ffffff, #f8f9fa);
            width: 90%;
            max-width: 500px;
            max-height: 90vh; /* Prevent overflow on small screens */
            border-radius: 20px;
            overflow-y: auto; /* Scrollable content if needed */
            overflow-x: hidden;
            box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
            border: 2px solid var(--primary-orange);
            animation: slideUp 0.4s ease;
            display: flex;
            flex-direction: column;
        }
        .popup-header {
            background: linear-gradient(135deg, var(--primary-orange), var(--primary-pink));
            padding: 25px 20px;
            text-align: center;
            color: white;
            flex-shrink: 0; /* Prevent header from shrinking */
        }
        .popup-header i {
            font-size: 3rem;
            margin-bottom: 15px;
            color: #ffcc00;
            animation: bounce 1s infinite alternate;
        }
        .popup-header h2 {
            font-size: 2rem;
            margin: 0;
            text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
        }
        .popup-body {
            padding: 30px 20px;
            flex: 1; /* Allow body to grow */
            overflow-y: auto; /* Scroll if scores overflow */
        }
        .popup-score {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 15px;
            margin-bottom: 25px;
        }
        .popup-score .score-item {
            background: var(--light);
            border-radius: 12px;
            padding: 15px;
            text-align: center;
            border: 1px solid rgba(255, 106, 0, 0.1);
            transition: all 0.3s ease;
        }
        .popup-score .score-item:hover {
            transform: translateY(-3px);
            border-color: var(--primary-orange);
            box-shadow: 0 5px 15px rgba(255, 106, 0, 0.1);
        }
        .popup-score .score-label {
            font-size: 0.9rem;
            color: var(--gray);
            margin-bottom: 8px;
        }
        .popup-score .score-value {
            font-size: 1.8rem;
            font-weight: 700;
            color: var(--primary-orange);
        }
        .popup-message {
            background: rgba(255, 106, 0, 0.08);
            border-radius: 12px;
            padding: 15px;
            text-align: center;
            border-left: 4px solid var(--primary-orange);
            font-size: 1rem;
            color: var(--dark);
            margin-top: 15px;
        }
        .popup-footer {
            display: flex;
            gap: 15px;
            padding: 20px 30px;
            background: var(--light);
            border-top: 1px solid #dee2e6;
            flex-shrink: 0; /* Prevent footer from shrinking */
        }
        .popup-footer .action-btn {
            flex: 1;
            padding: 15px;
            font-size: 1rem;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            min-height: 48px; /* Minimum touch target size */
            border-radius: 10px;
        }
        .popup-footer .action-btn.restart {
            background: linear-gradient(135deg, var(--primary-orange), var(--primary-pink));
        }
        .popup-footer .action-btn.menu {
            background: linear-gradient(135deg, #6c757d, #495057);
        }
        @keyframes fadeIn {
            from { opacity: 0; }
            to { opacity: 1; }
        }
        @keyframes bounce {
            from { transform: translateY(0); }
            to { transform: translateY(-10px); }
        }
        /* Responsive popup - Enhanced for Mobile */
        @media (max-width: 600px) {
            .popup-content {
                width: 95%;
                max-width: none;
                max-height: 95vh;
                margin: 10px;
                border-radius: 15px; /* Slightly smaller radius for mobile */
            }
  
            .popup-header {
                padding: 20px 15px;
            }
  
            .popup-header i {
                font-size: 2.5rem; /* Slightly smaller icon on mobile */
            }
  
            .popup-header h2 {
                font-size: 1.8rem; /* Adjusted from 1.5rem for better readability */
            }
  
            .popup-body {
                padding: 20px 15px; /* Reduced padding for more space */
            }
  
            .popup-score {
                grid-template-columns: 1fr; /* Single column on mobile */
                gap: 12px; /* Slightly reduced gap */
            }
  
            .popup-score .score-item {
                padding: 12px; /* Reduced padding */
            }
  
            .popup-score .score-label {
                font-size: 0.85rem;
            }
  
            .popup-score .score-value {
                font-size: 1.5rem; /* Slightly smaller on mobile */
            }
  
            .popup-message {
                font-size: 0.95rem;
                padding: 12px;
            }
  
            .popup-footer {
                flex-direction: column; /* Stack buttons vertically */
                gap: 12px;
                padding: 20px 15px;
            }
  
            .popup-footer .action-btn {
                padding: 16px; /* Larger padding for touch */
                font-size: 1rem;
                min-height: 50px; /* Ensure touch-friendly height */
            }
        }
        @media (max-width: 480px) {
            .popup-header h2 {
                font-size: 1.6rem;
            }
  
            .popup-header i {
                font-size: 2.2rem;
            }
  
            .popup-body {
                padding: 15px 10px;
            }
  
            .popup-score .score-item {
                padding: 10px;
            }
  
            .popup-score .score-value {
                font-size: 1.3rem;
            }
  
            .popup-footer .action-btn {
                font-size: 0.95rem;
                min-height: 52px; /* Even larger for very small screens */
            }
        }
        /* ========================= */
        /* ENHANCED FOOTER STYLES (Matched to Tic Tac Toe) */
        /* ========================= */
        footer {
            background: linear-gradient(135deg, #1a2a6c, #b21f1f, #fdbb2d);
            color: var(--white);
            padding: 20px 15px;
            position: relative;
            overflow: hidden;
            flex-shrink: 0;
            width: 100%;
            margin-top: auto;
        }
        footer::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 4px;
            background: linear-gradient(90deg, var(--primary-orange), var(--primary-pink), #00c4cc);
            z-index: 1;
        }
        .footer-container {
            display: grid;
            grid-template-columns: 1fr;
            gap: 25px;
            max-width: 1200px;
            margin: 0 auto;
            position: relative;
            z-index: 2;
        }
        .footer-section {
            display: flex;
            flex-direction: column;
            align-items: center;
            text-align: center;
        }
        .footer-logo {
            margin-bottom: 15px;
            transition: transform 0.5s ease;
        }
        .footer-logo:hover {
            transform: translateY(-5px);
        }
        .footer-logo img {
            height: 50px;
            transition: transform 0.3s ease;
            border-radius: 8px;
            background: var(--white);
            padding: 5px;
        }
        .footer-logo img:hover {
            transform: scale(1.05);
        }
        .footer-description {
            font-size: 0.9rem;
            line-height: 1.6;
            margin-bottom: 15px;
            max-width: 100%;
            opacity: 0.9;
        }
        .footer-heading {
            font-size: 1.2rem;
            font-weight: 700;
            margin-bottom: 15px;
            position: relative;
            padding-bottom: 8px;
            display: inline-block;
        }
        .footer-heading::after {
            content: '';
            position: absolute;
            width: 30px;
            height: 2px;
            background: linear-gradient(90deg, var(--primary-orange), var(--primary-pink));
            bottom: 0;
            left: 50%;
            transform: translateX(-50%);
            border-radius: 2px;
            transition: width 0.4s ease;
        }
        .footer-heading:hover::after {
            width: 50px;
        }
        .footer-tools ul,
        .footer-quick-links ul {
            list-style: none;
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 10px;
            padding: 0;
            margin: 0;
        }
        .footer-tools ul li a,
        .footer-quick-links ul li a {
            color: var(--white);
            text-decoration: none;
            opacity: 0.9;
            transition: opacity 0.3s ease, color 0.3s ease;
        }
        .footer-tools ul li a:hover,
        .footer-quick-links ul li a:hover {
            opacity: 1;
            color: #ffcc00;
        }
        .footer-social {
            display: flex;
            gap: 12px;
            margin-top: 15px;
            justify-content: center;
            align-items: center;
        }
        .footer-social a {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 36px;
            height: 36px;
            background: rgba(255, 255, 255, 0.1);
            border-radius: 50%;
            color: var(--white);
            font-size: 16px;
            text-decoration: none;
            transition: all 0.3s ease;
            position: relative;
            overflow: hidden;
        }
        .footer-social a::after {
            content: '';
            position: absolute;
            width: 100%;
            height: 100%;
            background: linear-gradient(135deg, var(--primary-orange), var(--primary-pink));
            border-radius: 50%;
            transform: scale(0);
            transition: transform 0.3s ease;
            z-index: -1;
        }
        .footer-social a:hover {
            transform: translateY(-3px);
            color: var(--white);
        }
        .footer-social a:hover::after {
            transform: scale(1);
        }
        .footer-social a i {
            transition: transform 0.3s ease;
        }
        .footer-social a:hover i {
            transform: scale(1.2);
        }
        .footer-contact {
            margin-top: 15px;
        }
        .footer-contact p {
            display: flex;
            align-items: center;
            justify-content: center;
            margin-bottom: 10px;
            opacity: 0.9;
            font-size: 0.9rem;
        }
        .footer-contact i {
            margin-right: 8px;
            color: #ffcc00;
            font-size: 16px;
        }
        .footer-bottom {
            text-align: center;
            margin-top: 20px;
            font-size: 0.85rem;
            border-top: 1px solid rgba(255, 255, 255, 0.15);
            padding-top: 15px;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            width: 100%;
            grid-column: 1 / -1;
        }
        .footer-bottom p {
            margin-bottom: 12px;
            opacity: 0.9;
            width: 100%;
        }
        .footer-legal {
            display: flex;
            gap: 15px;
            justify-content: center;
            flex-wrap: wrap;
            width: 100%;
        }
        .footer-legal a {
            color: var(--white);
            text-decoration: none;
            opacity: 0.8;
            transition: opacity 0.3s ease, color 0.3s ease;
            font-size: 0.85rem;
            position: relative;
            white-space: nowrap;
        }
        .footer-legal a::after {
            content: '';
            position: absolute;
            width: 0;
            height: 1px;
            background: #ffcc00;
            bottom: -2px;
            left: 0;
            transition: width 0.3s ease;
        }
        .footer-legal a:hover {
            opacity: 1;
            color: #ffcc00;
        }
        .footer-legal a:hover::after {
            width: 100%;
        }
        .footer-bubble {
            position: absolute;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.05);
            animation: float 8s infinite ease-in-out;
        }
        .footer-bubble:nth-child(1) {
            width: 60px;
            height: 60px;
            top: 20%;
            left: 5%;
            animation-delay: 0s;
        }
        .footer-bubble:nth-child(2) {
            width: 40px;
            height: 40px;
            top: 60%;
            left: 8%;
            animation-delay: 1s;
        }
        .footer-bubble:nth-child(3) {
            width: 50px;
            height: 50px;
            top: 30%;
            right: 5%;
            animation-delay: 2s;
        }
        .footer-bubble:nth-child(4) {
            width: 30px;
            height: 30px;
            top: 70%;
            right: 10%;
            animation-delay: 3s;
        }
        @keyframes float {
            0%, 100% {
                transform: translateY(0) rotate(0deg);
            }
            50% {
                transform: translateY(-15px) rotate(10deg);
            }
        }
        .footer-newsletter {
            margin-top: 15px;
            width: 100%;
        }
        .newsletter-form {
            display: flex;
            flex-direction: column;
            gap: 10px;
            align-items: center;
        }
        .newsletter-input {
            padding: 10px 15px;
            border: none;
            border-radius: 6px;
            background: rgba(255, 255, 255, 0.12);
            color: var(--white);
            font-size: 14px;
            transition: background 0.3s ease, box-shadow 0.3s ease;
            width: 100%;
            max-width: 250px;
        }
        .newsletter-input:focus {
            outline: none;
            background: rgba(255, 255, 255, 0.18);
            box-shadow: 0 0 0 2px rgba(255, 204, 0, 0.5);
        }
        .newsletter-input::placeholder {
            color: rgba(255, 255, 255, 0.7);
        }
        .newsletter-btn {
            padding: 10px 15px;
            border: none;
            border-radius: 6px;
            background: linear-gradient(135deg, var(--primary-orange), var(--primary-pink));
            color: var(--white);
            font-weight: 600;
            cursor: pointer;
            transition: transform 0.3s ease, box-shadow 0.3s ease;
            width: 100%;
            max-width: 250px;
        }
        .newsletter-btn:hover {
            transform: translateY(-3px);
            box-shadow: 0 5px 15px rgba(255, 106, 0, 0.4);
        }
        /* Responsive Design */
        @media (min-width: 769px) {
            .footer-container {
                grid-template-columns: repeat(4, 1fr);
            }
            .footer-bottom {
                grid-column: 1 / span 4;
            }
        }