/* water sort puzzle style */

/* Global Styles */
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            word-wrap: break-word;
            overflow-wrap: break-word;
        }
        :root {
            /* Primary Brand Colors */
            --primary-orange: #ff6a00;
            --primary-pink: #ee0979;
            --primary-purple: #6a11cb;
            --primary-blue: #2575fc;
            --primary-green: #00b09b;
            --primary-cyan: #00c4cc;
            /* 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 20px;
            background: var(--white);
            box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
            position: sticky;
            top: 0;
            z-index: 1000;
        }
        header img {
            height: 50px;
            max-width: 100%;
        }
        nav ul {
            list-style: none;
            display: flex;
            gap: 15px;
        }
        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 8px;
            font-size: 0.9rem;
        }
        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: 22px;
            background: none;
            border: none;
            color: #444;
            cursor: pointer;
            z-index: 1001;
            transition: color 0.3s ease, transform 0.3s ease;
            padding: 5px;
        }
        .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;
                z-index: 999;
            }
            nav.active {
                display: block;
                transform: translateX(0);
                opacity: 1;
            }
            nav ul {
                flex-direction: column;
                padding: 15px;
                gap: 10px;
            }
            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);
            }
            nav ul li a {
                display: block;
                padding: 12px;
                font-size: 1rem;
                text-align: center;
            }
        }
        /* Main content wrapper to push footer to bottom */
        .main-content {
            flex: 1 0 auto;
            width: 100%;
            max-width: 100%;
            overflow-x: hidden;
        }
        /* Hero Section */
        .hero {
            background: linear-gradient(135deg, var(--primary-orange), var(--primary-pink));
            color: var(--white);
            text-align: center;
            padding: 50px 15px;
            width: 100%;
        }
        .hero h1 {
            font-size: 2.2rem;
            margin-bottom: 15px;
            animation: fadeInDown 1s ease;
            text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
            position: relative;
            display: inline-block;
            line-height: 1.3;
            padding: 0 10px;
        }
        .hero h1::after {
            content: '';
            position: absolute;
            width: 80px;
            height: 4px;
            bottom: -10px;
            left: 50%;
            transform: translateX(-50%);
            border-radius: 2px;
        }
        .hero p {
            font-size: 1.1rem;
            animation: fadeInUp 1.2s ease;
            max-width: 800px;
            margin: 0 auto;
            line-height: 1.6;
            padding: 0 15px;
        }
        @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: 25px auto;
            animation: fadeInDown 1s ease;
            width: 100%;
            max-width: 1000px;
            padding: 0 15px;
        }
        .tools-heading h2 {
            font-size: 2rem;
            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;
            line-height: 1.3;
            padding: 10px 10px;
        }
        .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;
            padding: 0 10px;
        }
        /* 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;
            box-sizing: border-box;
        }
        .tool-container {
            padding: 25px;
            display: flex;
            flex-direction: column;
            gap: 25px;
            box-sizing: border-box;
        }
        /* Water Sort Puzzle Card */
        .water-sort-card {
            background: linear-gradient(135deg, #ffffff, #f8f9fa);
            border-radius: 20px;
            padding: 25px;
            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);
            box-sizing: border-box;
        }
        .water-sort-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 15px 35px rgba(255, 106, 0, 0.1);
        }
        .water-sort-card h2 {
            font-size: 1.8rem;
            color: var(--primary-orange);
            margin-bottom: 15px;
            display: flex;
            align-items: center;
            gap: 10px;
            justify-content: center;
            text-align: center;
            line-height: 1.3;
        }
        .water-sort-card h2 i {
            font-size: 1.8rem;
        }
        .game-subtitle {
            color: var(--gray);
            margin-bottom: 25px;
            font-size: 1rem;
            text-align: center;
            line-height: 1.5;
            padding: 0 10px;
        }
        /* 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;
                gap: 20px;
            }
        }
        /* Game Board */
        .game-board-container {
            display: flex;
            flex-direction: column;
            align-items: center;
            width: 100%;
        }
        .game-board {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            grid-template-rows: repeat(3, 1fr);
            gap: 15px;
            width: 100%;
            max-width: 500px;
            padding: 20px;
            border-radius: 15px;
            background: linear-gradient(135deg, #fef5e7, #fff0d9);
            box-shadow: inset 0 4px 15px rgba(0, 0, 0, 0.1),
                        0 8px 20px rgba(0, 0, 0, 0.1);
            margin-bottom: 20px;
            border: 2px solid rgba(255, 106, 0, 0.15);
            box-sizing: border-box;
        }
        @media (max-width: 600px) {
            .game-board {
                grid-template-columns: repeat(3, 1fr);
                gap: 12px;
                padding: 15px;
            }
        }
        /* Tube Styles */
        .tube {
            width: 70px;
            height: 200px;
            background: #ffffff;
            border-radius: 8px 8px 15px 15px;
            display: flex;
            flex-direction: column-reverse;
            align-items: center;
            justify-content: flex-start;
            cursor: pointer;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            position: relative;
            overflow: hidden;
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
            border: 2px solid transparent;
            margin: 0 auto;
        }
        .tube::before {
            content: '';
            position: absolute;
            bottom: -2px;
            left: 50%;
            transform: translateX(-50%);
            width: 30px;
            height: 8px;
            background: #e0e0e0;
            border-radius: 50%;
            z-index: 1;
        }
        .tube:hover {
            transform: translateY(-5px);
            box-shadow: 0 8px 20px rgba(255, 106, 0, 0.3);
            border-color: var(--primary-orange);
        }
        .tube.selected {
            transform: translateY(-10px);
            box-shadow: 0 12px 25px rgba(255, 106, 0, 0.4);
            border-color: var(--primary-orange);
            animation: pulse 1s infinite;
        }
        .tube.empty {
            opacity: 0.7;
        }
        @keyframes pulse {
            0% { transform: translateY(-10px) scale(1); }
            50% { transform: translateY(-10px) scale(1.05); }
            100% { transform: translateY(-10px) scale(1); }
        }
        /* Liquid Levels */
        .liquid {
            width: 100%;
            transition: height 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
            position: relative;
            overflow: hidden;
            border-bottom: 1px solid rgba(255, 255, 255, 0.3);
        }
        .liquid::after {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 10px;
            background: linear-gradient(to bottom, rgba(255, 255, 255, 0.4), transparent);
            border-radius: 50% 50% 0 0;
        }
        /* Liquid Colors */
        .liquid.red { background: linear-gradient(to bottom, #ff6b6b, #ee5a52); }
        .liquid.blue { background: linear-gradient(to bottom, #4d96ff, #2575fc); }
        .liquid.green { background: linear-gradient(to bottom, #6bcf7f, #00b09b); }
        .liquid.yellow { background: linear-gradient(to bottom, #ffd93d, #ff9a00); }
        .liquid.purple { background: linear-gradient(to bottom, #9d65c9, #6a11cb); }
        .liquid.pink { background: linear-gradient(to bottom, #ff9cda, #ee0979); }
        .liquid.orange { background: linear-gradient(to bottom, #ff9a3d, #ff6a00); }
        .liquid.cyan { background: linear-gradient(to bottom, #5dcede, #00c4cc); }
        .liquid.lime { background: linear-gradient(to bottom, #a8e063, #56ab2f); }
        .liquid.brown { background: linear-gradient(to bottom, #d1913c, #b06a00); }
        /* Game Controls Panel */
        .game-controls-panel {
            background: linear-gradient(135deg, #f8f9fa, #fff8f0);
            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);
            box-sizing: border-box;
        }
        .game-mode, .difficulty-level, .game-info, .score-board {
            margin-bottom: 20px;
        }
        .game-controls-panel h3 {
            color: var(--primary-orange);
            margin-bottom: 12px;
            font-size: 1.2rem;
            display: flex;
            align-items: center;
            gap: 8px;
            justify-content: center;
            text-align: center;
        }
        .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, .action-btn {
            padding: 10px 12px;
            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;
            text-align: center;
        }
        .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);
        }
        /* 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-orange), var(--primary-pink));
            color: var(--white);
            border-color: var(--primary-orange);
            box-shadow: 0 3px 8px rgba(255, 106, 0, 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);
        }
        /* 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);
        }
        .score-item.active {
            background: linear-gradient(135deg, rgba(255, 106, 0, 0.08), rgba(255, 106, 0, 0.03));
            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(238, 9, 121, 0.08));
            border-radius: 12px;
            border-left: 4px solid var(--primary-orange);
            width: 100%;
            max-width: 500px;
            box-sizing: border-box;
        }
        .status-text {
            font-size: 1.1rem;
            font-weight: 600;
            color: var(--dark);
            margin-bottom: 8px;
            line-height: 1.4;
        }
        .moves-counter {
            font-size: 1rem;
            color: var(--primary-orange);
            font-weight: 600;
        }
        .moves-counter span {
            padding: 4px 12px;
            border-radius: 20px;
            background: rgba(255, 106, 0, 0.1);
        }
        /* Game Info */
        .game-info-display {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 10px;
            text-align: center;
        }
        .info-item {
            background: var(--white);
            padding: 12px;
            border-radius: 10px;
            border: 1px solid rgba(255, 106, 0, 0.2);
        }
        .info-label {
            font-size: 0.8rem;
            color: var(--gray);
            margin-bottom: 5px;
        }
        .info-value {
            font-size: 1.3rem;
            font-weight: 700;
            color: var(--primary-orange);
        }
        /* Game Instructions */
        .game-instructions {
            background: linear-gradient(135deg, #f8f9fa, #fff8f0);
            border-radius: 15px;
            padding: 20px;
            margin-top: 25px;
            border: 1px solid rgba(255, 106, 0, 0.1);
            box-sizing: border-box;
        }
        .game-instructions h3 {
            color: var(--primary-orange);
            margin-bottom: 15px;
            font-size: 1.3rem;
            display: flex;
            align-items: center;
            gap: 8px;
            justify-content: center;
            text-align: center;
        }
        .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;
            text-align: center;
            line-height: 1.4;
        }
        .instruction-item i {
            color: var(--primary-orange);
            margin-right: 8px;
            font-size: 1rem;
        }
        /* Winning Animation */
        @keyframes celebrate {
            0% { transform: scale(1); }
            25% { transform: scale(1.05); }
            50% { transform: scale(1); }
            75% { transform: scale(1.05); }
            100% { transform: scale(1); }
        }
        .winning {
            animation: celebrate 2s infinite;
        }
        /* Tool Info */
        .tool-info {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-top: 20px;
            padding: 15px;
            background: #fff3e6;
            border-radius: 10px;
            text-align: center;
            flex-wrap: wrap;
        }
        .tool-info h3 {
            color: var(--primary-orange);
            margin-bottom: 10px;
            font-size: 1.2rem;
            text-align: center;
            width: 100%;
        }
        .tool-info p {
            color: var(--gray);
            font-size: 0.9rem;
            text-align: center;
            width: 100%;
            margin-bottom: 15px;
        }
        .tool-stats {
            display: flex;
            gap: 20px;
            justify-content: center;
            width: 100%;
            flex-wrap: wrap;
        }
        .stat {
            display: flex;
            flex-direction: column;
            align-items: center;
            min-width: 80px;
        }
        .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 */
        .how-to-use {
            width: 100%;
            max-width: 1000px;
            margin: 30px auto;
            padding: 0 15px;
            box-sizing: border-box;
        }
        .how-to-use-card {
            background: var(--white);
            border-radius: 20px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
            padding: 25px;
            margin-bottom: 30px;
            transition: transform 0.3s ease;
            box-sizing: border-box;
        }
        .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;
            gap: 10px;
            justify-content: center;
            text-align: center;
            line-height: 1.3;
        }
        .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);
            box-sizing: border-box;
        }
        .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);
            line-height: 1.3;
        }
        .step p {
            color: var(--gray);
            line-height: 1.5;
            font-size: 0.9rem;
        }
        /* ========================= */
        /* 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;
            padding: 0 10px;
        }
        .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;
            max-width: 100%;
        }
        .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;
            padding: 0 10px;
        }
        .footer-heading {
            font-size: 1.2rem;
            font-weight: 700;
            margin-bottom: 15px;
            position: relative;
            padding-bottom: 8px;
            display: inline-block;
            text-align: center;
            width: 100%;
        }
        .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;
            width: 100%;
        }
        .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;
            font-size: 0.9rem;
            text-align: center;
            display: block;
            padding: 5px;
        }
        .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;
            flex-wrap: wrap;
        }
        .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;
            width: 100%;
        }
        .footer-contact p {
            display: flex;
            align-items: center;
            justify-content: center;
            margin-bottom: 10px;
            opacity: 0.9;
            font-size: 0.9rem;
            text-align: center;
            flex-wrap: wrap;
        }
        .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%;
            text-align: center;
            padding: 0 10px;
        }
        .footer-legal {
            display: flex;
            gap: 15px;
            justify-content: center;
            flex-wrap: wrap;
            width: 100%;
            padding: 0 10px;
        }
        .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;
            padding: 5px;
        }
        .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;
            width: 100%;
        }
        .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);
        }
        
        /* ================================== */
        /* MOBILE RESPONSIVE FIXES - ADDED */
        /* ================================== */
        @media (max-width: 768px) {
            /* Fix header for mobile */
            header {
                padding: 12px 15px;
            }
            
            header img {
                height: 45px;
            }
            
            /* Hero section mobile fixes */
            .hero {
                padding: 40px 10px;
            }
            
            .hero h1 {
                font-size: 1.8rem;
                padding: 0 5px;
                margin-bottom: 12px;
            }
            
            .hero p {
                font-size: 1rem;
                padding: 0 10px;
                line-height: 1.5;
            }
            
            /* Tools heading mobile fixes */
            .tools-heading {
                margin: 20px auto;
                padding: 0 10px;
            }
            
            .tools-heading h2 {
                font-size: 1.5rem;
                padding: 0 5px;
                line-height: 1.2;
            }
            
            .tools-heading p {
                font-size: 0.9rem;
                padding: 0 5px;
                line-height: 1.5;
            }
            
            /* Container mobile fixes */
            .container {
                margin: 15px;
                width: calc(100% - 30px);
                border-radius: 15px;
            }
            
            .tool-container {
                padding: 15px;
                gap: 20px;
            }
            
            /* Water sort card mobile fixes */
            .water-sort-card {
                padding: 20px 15px;
            }
            
            .water-sort-card h2 {
                font-size: 1.4rem;
                flex-direction: column;
                gap: 8px;
                text-align: center;
            }
            
            .game-subtitle {
                font-size: 0.9rem;
                margin-bottom: 20px;
                padding: 0 5px;
            }
            
            /* Game board mobile fixes */
            .game-board {
                padding: 15px;
                gap: 12px;
                margin-bottom: 15px;
            }
            
            .tube {
                width: 60px;
                height: 180px;
            }
            
            /* Game status mobile fixes */
            .game-status {
                padding: 12px;
                margin: 15px auto;
                width: calc(100% - 30px);
            }
            
            .status-text {
                font-size: 1rem;
                padding: 0 5px;
            }
            
            .moves-counter {
                font-size: 0.9rem;
            }
            
            /* Game controls panel mobile fixes */
            .game-controls-panel {
                padding: 15px;
            }
            
            .game-controls-panel h3 {
                font-size: 1.1rem;
                flex-direction: column;
                gap: 5px;
            }
            
            /* Mode and difficulty buttons mobile fixes */
            .mode-buttons {
                grid-template-columns: 1fr;
                gap: 8px;
            }
            
            .difficulty-buttons {
                grid-template-columns: 1fr;
                gap: 8px;
            }
            
            .mode-btn, .difficulty-btn {
                padding: 10px;
                font-size: 0.85rem;
                justify-content: center;
                text-align: center;
            }
            
            /* Action buttons mobile fixes */
            .action-buttons {
                gap: 8px;
            }
            
            .action-btn {
                padding: 12px;
                font-size: 0.9rem;
                justify-content: center;
            }
            
            /* Score display mobile fixes */
            .score-display {
                grid-template-columns: 1fr;
                gap: 10px;
            }
            
            .score-item {
                padding: 10px;
            }
            
            .score-label {
                font-size: 0.8rem;
            }
            
            .score-value {
                font-size: 1.3rem;
            }
            
            /* Game info mobile fixes */
            .game-info-display {
                grid-template-columns: 1fr;
                gap: 10px;
            }
            
            .info-item {
                padding: 10px;
            }
            
            .info-label {
                font-size: 0.8rem;
            }
            
            .info-value {
                font-size: 1.2rem;
            }
            
            /* Game instructions mobile fixes */
            .game-instructions {
                padding: 15px;
                margin-top: 20px;
            }
            
            .game-instructions h3 {
                font-size: 1.2rem;
                flex-direction: column;
                gap: 5px;
            }
            
            .instructions-list {
                grid-template-columns: 1fr;
                gap: 10px;
            }
            
            .instruction-item {
                padding: 10px;
                font-size: 0.85rem;
                text-align: center;
            }
            
            /* Tool info mobile fixes */
            .tool-info {
                padding: 15px;
                flex-direction: column;
                gap: 15px;
                text-align: center;
            }
            
            .tool-info h3 {
                font-size: 1.2rem;
                margin-bottom: 10px;
            }
            
            .tool-info p {
                font-size: 0.85rem;
                margin-bottom: 15px;
            }
            
            .tool-stats {
                gap: 15px;
            }
            
            .stat {
                min-width: 70px;
            }
            
            .stat-value {
                font-size: 1.3rem;
            }
            
            .stat-label {
                font-size: 0.85rem;
            }
            
            /* How to use section mobile fixes */
            .how-to-use {
                padding: 0 10px;
                margin: 20px auto;
            }
            
            .how-to-use-card {
                padding: 20px 15px;
                margin-bottom: 20px;
            }
            
            .how-to-use-card h2 {
                font-size: 1.4rem;
                flex-direction: column;
                gap: 8px;
                text-align: center;
            }
            
            .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;
            }
            
            /* Footer mobile fixes */
            .footer-section {
                padding: 0 5px;
            }
            
            .footer-description {
                padding: 0 5px;
                font-size: 0.85rem;
            }
            
            .footer-heading {
                font-size: 1.1rem;
            }
            
            .footer-tools ul,
            .footer-quick-links ul {
                grid-template-columns: 1fr;
                gap: 8px;
            }
            
            .footer-tools ul li a,
            .footer-quick-links ul li a {
                font-size: 0.85rem;
                padding: 8px;
            }
            
            .footer-bottom p {
                font-size: 0.8rem;
                padding: 0 5px;
            }
            
            .footer-legal {
                gap: 10px;
                padding: 0 5px;
            }
            
            .footer-legal a {
                font-size: 0.8rem;
                padding: 3px;
            }
            
            .newsletter-input,
            .newsletter-btn {
                max-width: 200px;
                padding: 8px 12px;
                font-size: 13px;
            }
        }
        
        /* Extra small devices (phones, 480px and down) */
        @media (max-width: 480px) {
            .hero h1 {
                font-size: 1.6rem;
            }
            
            .tools-heading h2 {
                font-size: 1.3rem;
            }
            
            .water-sort-card h2 {
                font-size: 1.2rem;
            }
            
            .tube {
                width: 50px;
                height: 160px;
            }
            
            .game-board {
                grid-template-columns: repeat(2, 1fr);
                gap: 10px;
            }
            
            .how-to-use-card h2 {
                font-size: 1.2rem;
            }
            
            .step h3 {
                font-size: 1rem;
            }
            
            .step p {
                font-size: 0.8rem;
            }
            
            .footer-logo img {
                height: 40px;
            }
            
            .footer-social a {
                width: 32px;
                height: 32px;
                font-size: 14px;
            }
        }
        
        /* Center align all text containers on mobile */
        @media (max-width: 768px) {
            h1, h2, h3, h4, h5, h6 {
                text-align: center !important;
            }
            
            p, span, div, li {
                text-align: center !important;
            }
            
            .container, .tool-container, .water-sort-card,
            .game-controls-panel, .game-instructions, .tool-info,
            .how-to-use-card, .step {
                text-align: center !important;
            }
        }
        
        /* Ensure smooth transitions */
        .water-sort-card,
        .game-controls-panel,
        .game-instructions,
        .tool-info,
        .how-to-use-card,
        .step {
            transition: all 0.3s ease;
        }
        
        /* Prevent horizontal scrolling */
        html, body {
            max-width: 100%;
            overflow-x: hidden;
        }