  /* Chess script */
  
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        :root {
            /* Primary Brand Colors */
            --primary-orange: #ff6a00;
            --primary-pink: #ee0979;
            --primary-purple: #6a11cb;
            --primary-blue: #2575fc;
            /* Chess board colors - Updated to pure black and white */
            --chess-dark: #000000;
            --chess-light: #ffffff;

            /* 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;
        }

        /* 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%;
        }

        /* Hero Section */
        .hero {
            background: linear-gradient(135deg, var(--primary-orange), var(--primary-pink));
            color: var(--white);
            text-align: center;
            padding: 70px 20px;
        }

        .hero h1 {
            font-size: 2.8rem;
            margin-bottom: 12px;
            animation: fadeInDown 1s ease;
            text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
            position: relative;
            display: inline-block;
        }

        .hero h1::after {
            content: '';
            position: absolute;
            width: 100px;
            height: 4px;
            bottom: -10px;
            left: 50%;
            transform: translateX(-50%);
            border-radius: 2px;
        }

        .hero p {
            font-size: 1.2rem;
            animation: fadeInUp 1.2s ease;
            max-width: 800px;
            margin: 0 auto;
            line-height: 1.6;
        }

        @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: 1000px;
            background: white;
            border-radius: 20px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
            overflow: hidden;
            margin: 20px auto;
        }

        .tool-container {
            padding: 25px;
            display: flex;
            flex-direction: column;
            gap: 25px;
        }

        /* Chess Game Card */
        .chess-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);
        }

        .chess-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 15px 35px rgba(255, 106, 0, 0.1);
        }

        .chess-card h2 {
            font-size: 1.8rem;
            color: var(--primary-orange);
            margin-bottom: 10px;
            display: flex;
            align-items: center;
            gap: 10px;
            justify-content: center;
        }

        .chess-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 350px;
            gap: 30px;
            margin-top: 20px;
        }

        @media (max-width: 900px) {
            .game-container {
                grid-template-columns: 1fr;
            }
        }

        /* Chess Board */
        .game-board-container {
            display: flex;
            flex-direction: column;
            align-items: center;
        }

        .chess-board {
            display: grid;
            grid-template-columns: repeat(8, 1fr);
            grid-template-rows: repeat(8, 1fr);
            width: 480px;
            height: 480px;
            background: #fff;
            border-radius: 10px;
            overflow: hidden;
            box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
            border: 3px solid #5d4a2a;
            margin-bottom: 25px;
        }

        @media (max-width: 550px) {
            .chess-board {
                width: 350px;
                height: 350px;
            }
        }

        .chess-square {
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.2s ease;
            position: relative;
        }

        /* Chess board squares - Pure black and white */
        .chess-square.light {
            background-color: var(--chess-light);
            border: 1px solid rgba(0, 0, 0, 0.1);
        }

        .chess-square.dark {
            background-color: var(--chess-dark);
        }

        /* Selected piece highlight - Skyblue */
        .chess-square.selected {
            background-color: rgba(135, 206, 235, 0.7) !important;
            box-shadow: inset 0 0 10px rgba(135, 206, 235, 0.9);
        }

        /* Legal moves */
        .chess-square.legal-move {
            position: relative;
        }

        /* Normal legal moves - Skyblue */
        .chess-square.legal-move:not(.capture)::after {
            content: '';
            position: absolute;
            width: 20px;
            height: 20px;
            background-color: rgba(135, 206, 235, 0.5);
            border-radius: 50%;
        }

        /* Capture moves - Red */
        .chess-square.legal-move.capture::after {
            content: '';
            position: absolute;
            width: 40px;
            height: 40px;
            background-color: rgba(255, 0, 0, 0.3);
            border-radius: 50%;
            border: 2px solid rgba(255, 0, 0, 0.7);
        }

        /* Chess Pieces - Pure black and white */
        .chess-piece {
            font-size: 2.5rem;
            cursor: pointer;
            transition: transform 0.2s ease;
            z-index: 10;
            user-select: none;
            filter: drop-shadow(2px 2px 3px rgba(0, 0, 0, 0.3));
            font-weight: bold;
        }

        @media (max-width: 550px) {
            .chess-piece {
                font-size: 1.8rem;
            }
        }

        .chess-piece.white {
            color: #ffffff;
            text-shadow: 1px 1px 2px #000, -1px -1px 2px #000, 1px -1px 2px #000, -1px 1px 2px #000;
        }

        .chess-piece.black {
            color: #000000;
            text-shadow: 1px 1px 2px #fff, -1px -1px 2px #fff, 1px -1px 2px #fff, -1px 1px 2px #fff;
        }

        .chess-piece.dragging {
            transform: scale(1.1);
            z-index: 100;
        }

        /* 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-mode, .difficulty-level, .player-selection, .game-info, .moves-history {
            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;
        }

        /* Mode Buttons */
        .mode-buttons {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 8px;
        }

        .mode-btn, .difficulty-btn, .color-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;
        }

        .mode-btn {
            background: var(--light);
            color: var(--dark);
            border: 1px solid #dee2e6;
        }

        .mode-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);
        }

        /* Player Selection */
        .color-buttons {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 8px;
        }

        .color-btn {
            background: var(--light);
            color: var(--dark);
            border: 1px solid #dee2e6;
        }

        .color-btn.active[data-color="white"] {
            background: linear-gradient(135deg, #f8f9fa, #e9ecef);
            color: #495057;
            border-color: #adb5bd;
            box-shadow: 0 3px 8px rgba(108, 117, 125, 0.25);
        }

        .color-btn.active[data-color="black"] {
            background: linear-gradient(135deg, #343a40, #212529);
            color: var(--white);
            border-color: #212529;
            box-shadow: 0 3px 8px rgba(33, 37, 41, 0.25);
        }

        /* Difficulty Buttons */
        .difficulty-buttons {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 8px;
        }

        .difficulty-btn {
            background: var(--light);
            color: var(--dark);
            border: 1px solid #dee2e6;
        }

        .difficulty-btn.active {
            background: linear-gradient(135deg, var(--primary-blue), var(--primary-purple));
            color: var(--white);
            border-color: var(--primary-blue);
            box-shadow: 0 3px 8px rgba(37, 117, 252, 0.25);
        }

        /* 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);
        }

        /* Game Info */
        .game-info {
            background: var(--white);
            border-radius: 12px;
            padding: 15px;
            box-shadow: 0 3px 8px rgba(0, 0, 0, 0.06);
        }

        .info-display {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 15px;
        }

        .info-item {
            text-align: center;
            padding: 10px;
            border-radius: 8px;
            background: var(--light);
        }

        .info-label {
            font-size: 0.85rem;
            color: var(--gray);
            margin-bottom: 5px;
        }

        .info-value {
            font-size: 1.2rem;
            font-weight: 700;
            color: var(--primary-orange);
        }

        /* Moves History */
        .moves-history {
            max-height: 200px;
            overflow-y: auto;
            background: var(--white);
            border-radius: 12px;
            padding: 15px;
            box-shadow: 0 3px 8px rgba(0, 0, 0, 0.06);
        }

        .moves-list {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        .move-item {
            display: flex;
            justify-content: space-between;
            padding: 8px 12px;
            background: var(--light);
            border-radius: 6px;
            font-size: 0.9rem;
        }

        .move-number {
            font-weight: bold;
            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;
        }

        .current-player span {
            padding: 4px 12px;
            border-radius: 20px;
            background: rgba(255, 106, 0, 0.1);
        }

        /* 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;
        }

        /* Check Animation */
        .king-in-check {
            animation: pulse-check 1.5s infinite;
            position: relative;
        }

        .king-in-check::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(220, 53, 69, 0.2);
            border-radius: 50%;
            z-index: 1;
        }

        @keyframes pulse-check {
            0% { transform: scale(1); }
            50% { transform: scale(1.05); }
            100% { transform: scale(1); }
        }

        /* 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 - UPDATED */
        /* ============================== */
        .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 the heading */
            gap: 10px;
            text-align: center;
            line-height: 1.4;
            word-break: break-word;
            hyphens: auto;
            width: 100%;
            padding: 0 10px;
        }

        .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;
        }

        /* ========================= */
        /* WIN POPUP STYLES */
        /* ========================= */
        .win-popup-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.8);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 2000;
            opacity: 0;
            visibility: hidden;
            transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
        }

        .win-popup-overlay.active {
            opacity: 1;
            visibility: visible;
        }

        .win-popup {
            background: linear-gradient(135deg, #ffffff, #f8f9fa);
            border-radius: 25px;
            padding: 40px;
            max-width: 500px;
            width: 90%;
            text-align: center;
            box-shadow: 0 20px 50px rgba(255, 106, 0, 0.3);
            transform: scale(0.7) translateY(50px);
            opacity: 0;
            transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
            border: 3px solid var(--primary-orange);
            position: relative;
            overflow: hidden;
        }

        .win-popup-overlay.active .win-popup {
            transform: scale(1) translateY(0);
            opacity: 1;
        }

        .win-popup::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 5px;
            background: linear-gradient(90deg, var(--primary-orange), var(--primary-pink), var(--primary-purple));
            z-index: 2;
        }

        .popup-icon {
            font-size: 4rem;
            margin-bottom: 20px;
            animation: bounce 2s infinite;
            background: linear-gradient(135deg, var(--primary-orange), var(--primary-pink));
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            display: inline-block;
        }

        @keyframes bounce {
            0%, 100% { transform: translateY(0); }
            50% { transform: translateY(-15px); }
        }

        .popup-title {
            font-size: 2.2rem;
            color: var(--primary-orange);
            margin-bottom: 15px;
            font-weight: 700;
            text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
        }

        .popup-message {
            font-size: 1.1rem;
            color: var(--dark);
            margin-bottom: 25px;
            line-height: 1.6;
        }

        .winner-name {
            color: var(--primary-pink);
            font-weight: 700;
            font-size: 1.3rem;
            text-transform: uppercase;
            letter-spacing: 1px;
        }

        .popup-stats {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 15px;
            margin: 25px 0;
            background: rgba(255, 106, 0, 0.05);
            padding: 20px;
            border-radius: 15px;
            border: 1px solid rgba(255, 106, 0, 0.1);
        }

        .popup-stat {
            display: flex;
            flex-direction: column;
            align-items: center;
        }

        .popup-stat-value {
            font-size: 1.8rem;
            font-weight: 700;
            color: var(--primary-orange);
            margin-bottom: 5px;
        }

        .popup-stat-label {
            font-size: 0.9rem;
            color: var(--gray);
        }

        .popup-buttons {
            display: flex;
            gap: 15px;
            justify-content: center;
            margin-top: 20px;
        }

        .popup-btn {
            padding: 12px 25px;
            border: none;
            border-radius: 12px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            font-size: 1rem;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            min-width: 140px;
        }

        .popup-btn.play-again {
            background: linear-gradient(135deg, var(--primary-orange), var(--primary-pink));
            color: white;
        }

        .popup-btn.new-game {
            background: linear-gradient(135deg, var(--primary-blue), var(--primary-purple));
            color: white;
        }

        .popup-btn.close {
            background: linear-gradient(135deg, #6c757d, #495057);
            color: white;
        }

        .popup-btn:hover {
            transform: translateY(-3px);
            box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
        }

        .popup-btn:active {
            transform: translateY(-1px);
        }

        .confetti {
            position: absolute;
            width: 15px;
            height: 15px;
            opacity: 0;
        }

        .confetti:nth-child(1) {
            background: var(--primary-orange);
            top: 10%;
            left: 10%;
            animation: confetti-fall 3s infinite 0.5s;
        }

        .confetti:nth-child(2) {
            background: var(--primary-pink);
            top: 15%;
            left: 20%;
            animation: confetti-fall 3s infinite 1s;
        }

        .confetti:nth-child(3) {
            background: var(--primary-purple);
            top: 5%;
            left: 30%;
            animation: confetti-fall 3s infinite 1.5s;
        }

        .confetti:nth-child(4) {
            background: var(--primary-blue);
            top: 20%;
            left: 40%;
            animation: confetti-fall 3s infinite 2s;
        }

        .confetti:nth-child(5) {
            background: var(--primary-orange);
            top: 10%;
            right: 10%;
            animation: confetti-fall 3s infinite 0.5s;
        }

        .confetti:nth-child(6) {
            background: var(--primary-pink);
            top: 15%;
            right: 20%;
            animation: confetti-fall 3s infinite 1s;
        }

        .confetti:nth-child(7) {
            background: var(--primary-purple);
            top: 5%;
            right: 30%;
            animation: confetti-fall 3s infinite 1.5s;
        }

        .confetti:nth-child(8) {
            background: var(--primary-blue);
            top: 20%;
            right: 40%;
            animation: confetti-fall 3s infinite 2s;
        }

        @keyframes confetti-fall {
            0% {
                opacity: 0;
                transform: translateY(-100px) rotate(0deg);
            }
            10% {
                opacity: 1;
            }
            100% {
                opacity: 0;
                transform: translateY(800px) rotate(360deg);
            }
        }

        /* ========================= */
        /* ENHANCED FOOTER STYLES */
        /* ========================= */
        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 ENHANCEMENTS */
        /* ============================ */

        /* Mobile में Hero Heading Alignment Fix */
        @media (max-width: 768px) {
            .hero {
                padding: 50px 15px;
            }
            
            .hero h1 {
                font-size: 2.2rem;
                line-height: 1.3;
                text-align: center;
                padding: 0 10px;
                word-break: break-word;
                hyphens: auto;
                width: 100%;
                display: block;
                margin: 0 auto 15px;
            }
            
            .hero h1::after {
                width: 80px;
                height: 3px;
                bottom: -8px;
            }
            
            .hero p {
                font-size: 1rem;
                padding: 0 10px;
                line-height: 1.5;
            }
            
            /* Tools Heading for Mobile */
            .tools-heading {
                margin: 20px auto;
                padding: 0 15px;
            }
            
            .tools-heading h2 {
                font-size: 1.8rem;
                text-align: center;
                line-height: 1.4;
                display: block;
                padding: 0 10px 15px;
                word-break: break-word;
                hyphens: auto;
                width: 100%;
                margin: 0 auto 15px;
            }
            
            .tools-heading h2::after {
                width: 60px;
                height: 3px;
                left: 50%;
                transform: translateX(-50%);
            }
            
            .tools-heading p {
                font-size: 0.95rem;
                padding: 0 10px;
                text-align: center;
                line-height: 1.5;
            }
            
            /* How to Use Section Mobile Fix */
            .how-to-use {
                padding: 0 15px;
                margin: 20px auto;
            }
            
            .how-to-use-card {
                padding: 20px;
                border-radius: 15px;
            }
            
            .how-to-use-card h2 {
                font-size: 1.5rem;
                padding: 0 10px;
                display: block;
                text-align: center;
                margin: 0 auto 15px;
                width: 100%;
                justify-content: center;
            }
            
            .how-to-use-card h2 i {
                display: inline-block;
                margin-right: 8px;
                vertical-align: middle;
            }
            
            .how-to-use-steps {
                grid-template-columns: 1fr;
                gap: 15px;
            }
            
            .step {
                padding: 15px;
            }
            
            .step h3 {
                font-size: 1.1rem;
            }
            
            .step p {
                font-size: 0.85rem;
            }
            
            .game-container {
                grid-template-columns: 1fr;
            }
            
            .chess-board {
                width: 350px;
                height: 350px;
            }
            
            .chess-piece {
                font-size: 1.8rem;
            }
            
            .difficulty-buttons {
                grid-template-columns: 1fr;
            }
            
            .tool-info {
                flex-direction: column;
                gap: 15px;
                text-align: center;
            }
            
            .tool-stats {
                justify-content: center;
            }
            
            /* Win Popup Mobile Styles */
            .win-popup {
                padding: 25px 20px;
                margin: 15px;
            }
            
            .popup-icon {
                font-size: 3rem;
            }
            
            .popup-title {
                font-size: 1.8rem;
            }
            
            .popup-message {
                font-size: 1rem;
            }
            
            .popup-stats {
                grid-template-columns: repeat(2, 1fr);
            }
            
            .popup-buttons {
                flex-direction: column;
                gap: 10px;
            }
            
            .popup-btn {
                min-width: 100%;
            }
            
            .footer-container {
                grid-template-columns: 1fr;
            }
            
            .footer-bottom {
                grid-column: 1;
            }
        }

        /* बहुत छोटे screens के लिए (Mobile Portrait) */
        @media (max-width: 480px) {
            .hero h1 {
                font-size: 1.8rem;
                padding: 0 5px;
                margin-bottom: 10px;
            }
            
            .hero p {
                font-size: 0.95rem;
                padding: 0 5px;
            }
            
            .tools-heading h2 {
                font-size: 1.5rem;
                padding: 0 5px 12px;
                margin-bottom: 12px;
            }
            
            .tools-heading p {
                font-size: 0.9rem;
                padding: 0 5px;
            }
            
            /* How to Use Section for Very Small Screens */
            .how-to-use-card h2 {
                font-size: 1.3rem;
                padding: 0 5px;
                margin-bottom: 12px;
                line-height: 1.3;
            }
            
            .step-number {
                width: 35px;
                height: 35px;
                font-size: 0.9rem;
            }
            
            .how-to-use-card {
                padding: 15px;
            }
            
            .chess-board {
                width: 300px;
                height: 300px;
            }
            
            .chess-piece {
                font-size: 1.5rem;
            }
            
            .container {
                margin: 10px auto;
                border-radius: 15px;
            }
            
            .tool-container {
                padding: 15px;
            }
            
            .chess-card {
                padding: 20px;
            }
            
            .chess-card h2 {
                font-size: 1.5rem;
            }
            
            .game-subtitle {
                font-size: 0.9rem;
            }
            
            /* Win Popup for Very Small Screens */
            .win-popup {
                padding: 20px 15px;
            }
            
            .popup-icon {
                font-size: 2.5rem;
            }
            
            .popup-title {
                font-size: 1.5rem;
            }
            
            .popup-stats {
                grid-template-columns: 1fr;
                padding: 15px;
            }
            
            .footer-tools ul,
            .footer-quick-links ul {
                grid-template-columns: 1fr;
            }
        }

        /* बहुत बड़े screens के लिए */
        @media (min-width: 1200px) {
            .hero h1 {
                font-size: 3.2rem;
            }
            
            .tools-heading h2 {
                font-size: 2.8rem;
            }
            
            /* How to Use Section for Large Screens */
            .how-to-use-card h2 {
                font-size: 2rem;
            }
            
            /* Win Popup for Large Screens */
            .win-popup {
                max-width: 600px;
            }
        }

        /* Tablet और Medium Devices */
        @media (min-width: 769px) and (max-width: 1024px) {
            .hero h1 {
                font-size: 2.5rem;
            }
            
            .tools-heading h2 {
                font-size: 2.2rem;
            }
            
            /* How to Use Section for Tablet */
            .how-to-use-card h2 {
                font-size: 1.6rem;
            }
            
            /* Win Popup for Tablet */
            .win-popup {
                max-width: 550px;
            }
            
            .footer-container {
                grid-template-columns: repeat(2, 1fr);
            }
            
            .footer-bottom {
                grid-column: 1 / span 2;
            }
        }

        /* Desktop के लिए */
        @media (min-width: 1025px) {
            .footer-container {
                grid-template-columns: repeat(4, 1fr);
            }
            
            .footer-bottom {
                grid-column: 1 / span 4;
            }
        }

        /* Additional fix for very long text in mobile */
        .hero h1, .tools-heading h2, .how-to-use-card h2 {
            overflow-wrap: break-word;
            word-wrap: break-word;
            text-align: center;
            margin-left: auto;
            margin-right: auto;
        }

        /* Center align headings on all devices */
        .hero, .tools-heading {
            text-align: center;
        }

        /* Brand Highlight adjustment for mobile */
        @media (max-width: 768px) {
            .brand-highlight {
                display: inline-block;
                margin: 0 2px;
            }
        }

        /* Ensure proper spacing for all screen sizes */
        .main-content {
            overflow-x: hidden;
        }

        /* Prevent horizontal scrolling */
        html, body {
            overflow-x: hidden;
            max-width: 100%;
        }