/* avoid the chappal style */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Primary Brand Colors */
    --primary-orange: #ff6a00;
    --primary-pink: #ee0979;
    --primary-purple: #6a11cb;
    --primary-blue: #2575fc;
    --primary-green: #28a745;
    --primary-yellow: #ffc107;
    /* Neutrals */
    --light: #f8f9fa;
    --dark: #212529;
    --gray: #6c757d;
    --white: #ffffff;
}

body {
    font-family: "Segoe UI", Arial, sans-serif;
    background: #f4f7fb;
    color: #333;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Header */
header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 30px;
    background: var(--white);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.logo img {
    height: 55px;
}

.logo-icon {
    font-size: 2rem;
    color: var(--primary-orange);
}

.logo-text {
    font-size: 1.5rem;
    font-weight: bold;
    background: linear-gradient(135deg, var(--primary-orange), var(--primary-pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

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 */
.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;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.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;
    position: relative;
}

@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: 1200px;
    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: 1200px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    margin: 20px auto;
}

.tool-container {
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Game Card */
.game-card {
    background: linear-gradient(135deg, #ffffff, #f8f9fa);
    border-radius: 20px;
    padding: 35px;
    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);
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(255, 106, 0, 0.1);
}

.game-card h2 {
    font-size: 2.2rem;
    color: var(--primary-orange);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
}

.game-card h2 i {
    font-size: 2rem;
}

.game-subtitle {
    color: var(--gray);
    margin-bottom: 25px;
    font-size: 1.1rem;
    text-align: center;
}

/* Game Container */
.game-container {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 40px;
    margin-top: 20px;
}

@media (max-width: 1100px) {
    .game-container {
        grid-template-columns: 1fr;
    }
}

/* Game Area */
.game-area-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* 3D Game Area */
.game-area-3d {
    width: 100%;
    height: 520px;
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    perspective: 1000px;
    margin-bottom: 30px;
}

/* Ground effect - 20% height */
.game-area-3d::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 104px; /* 20% of 520px */
    background: linear-gradient(to top, rgba(139, 69, 19, 0.8), rgba(160, 82, 45, 0.6));
    z-index: 1;
    border-top: 3px solid #8B4513;
}

/* Game Elements */
#player {
    position: absolute;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-orange), var(--primary-pink));
    border-radius: 50%;
    bottom: 104px; /* 20% from bottom */
    left: 50%;
    transform: translateX(-50%);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    will-change: transform;
    transform: translate3d(0, 0, 0);
    transition: left 0.08s linear;
}

/* Chappal Design */
.chappal {
    position: absolute;
    width: 50px;
    height: 25px;
    border-radius: 10px 10px 5px 5px;
    transform-origin: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    z-index: 15;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
    overflow: hidden;
    will-change: transform, top;
    transform: translate3d(0, 0, 0);
}

/* Different chappal colors */
.chappal.brown {
    background: linear-gradient(135deg, #8B4513, #A0522D);
}

.chappal.blue {
    background: linear-gradient(135deg, #1e3c72, #2a5298);
}

.chappal.red {
    background: linear-gradient(135deg, #dc3545, #c82333);
}

.chappal.green {
    background: linear-gradient(135deg, #28a745, #20c997);
}

.chappal::before {
    content: '';
    position: absolute;
    width: 40px;
    height: 5px;
    background: rgba(255, 255, 255, 0.2);
    top: 4px;
    border-radius: 2px;
}

.chappal::after {
    content: '';
    position: absolute;
    width: 15px;
    height: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    top: 7px;
    left: 18px;
}

.chappal i {
    position: relative;
    z-index: 2;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.power-up {
    position: absolute;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
    z-index: 15;
    animation: pulse 1.5s infinite;
    will-change: transform, top;
    transform: translate3d(0, 0, 0);
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.shield {
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-purple));
}

.slow-motion {
    background: linear-gradient(135deg, var(--primary-green), #20c997);
}

.extra-life {
    background: linear-gradient(135deg, var(--primary-pink), #ff0080);
}

.score-display {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 12px 18px;
    border-radius: 10px;
    font-size: 1.4rem;
    font-weight: bold;
    z-index: 25;
}

.lives-display {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 12px 18px;
    border-radius: 10px;
    font-size: 1.4rem;
    font-weight: bold;
    z-index: 25;
    display: flex;
    align-items: center;
    gap: 8px;
}

.heart {
    color: var(--primary-pink);
    font-size: 1.6rem;
}

/* Game Status */
.game-status {
    width: 100%;
    text-align: center;
    padding: 15px;
    background: linear-gradient(135deg, #f8f9fa, #f0f5ff);
    border-radius: 10px;
    margin-top: 15px;
    border: 1px solid rgba(255, 106, 0, 0.1);
}

.status-text {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--dark);
    margin-bottom: 8px;
}

.current-player {
    font-size: 1rem;
    color: var(--gray);
}

/* MOBILE CONTROLS - FIXED */
.mobile-controls {
    display: none;
    justify-content: center;
    gap: 40px;
    margin-top: 20px;
    width: 100%;
    padding: 15px 0;
    z-index: 100;
}

.mobile-control-btn {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, var(--primary-orange), var(--primary-pink));
    color: white;
    font-size: 2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 15px rgba(255, 106, 0, 0.4);
    transition: all 0.2s ease;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    position: relative;
    user-select: none;
    -webkit-user-select: none;
}

.mobile-control-btn:active {
    transform: scale(0.95);
    box-shadow: 0 3px 10px rgba(255, 106, 0, 0.2);
}

.mobile-control-btn.left-btn {
    background: linear-gradient(135deg, #ff6a00, #ee0979);
}

.mobile-control-btn.right-btn {
    background: linear-gradient(135deg, #2575fc, #6a11cb);
}

/* Show mobile controls only on mobile */
@media (max-width: 768px) {
    .mobile-controls {
        display: flex;
    }
    
    /* Game area height adjust for mobile */
    .game-area-3d {
        height: 450px;
    }
    
    .game-area-3d::after {
        height: 90px; /* 20% of 450px */
    }
    
    #player {
        bottom: 90px; /* Adjusted for mobile */
    }
    
    /* Larger buttons for easier touch */
    .mobile-control-btn {
        width: 90px;
        height: 90px;
        font-size: 2.2rem;
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    .mobile-controls {
        gap: 30px;
    }
    
    .mobile-control-btn {
        width: 80px;
        height: 80px;
        font-size: 2rem;
    }
    
    .game-area-3d {
        height: 400px;
    }
    
    .game-area-3d::after {
        height: 80px; /* 20% of 400px */
    }
}

/* Mobile control info in controls list */
.mobile-control-info .control-key {
    display: flex;
    gap: 5px;
    justify-content: center;
}

/* Game Over Popup with Animation */
.game-over {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    background: rgba(0, 0, 0, 0.95);
    color: white;
    padding: 50px;
    border-radius: 20px;
    text-align: center;
    z-index: 100;
    display: none;
    box-shadow: 0 0 50px rgba(255, 106, 0, 0.7);
    border: 3px solid var(--primary-orange);
    min-width: 400px;
    opacity: 0;
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.5s ease;
}

.game-over.show {
    display: block;
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    animation: gameOverPopup 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes gameOverPopup {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0;
    }
    70% {
        transform: translate(-50%, -50%) scale(1.1);
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

.game-over h3 {
    font-size: 3rem;
    margin-bottom: 20px;
    color: var(--primary-orange);
    text-shadow: 0 2px 10px rgba(255, 106, 0, 0.5);
    animation: textGlow 2s infinite alternate;
}

@keyframes textGlow {
    from {
        text-shadow: 0 0 10px rgba(255, 106, 0, 0.5);
    }
    to {
        text-shadow: 0 0 20px rgba(255, 106, 0, 0.8), 0 0 30px rgba(255, 106, 0, 0.6);
    }
}

.game-over p {
    font-size: 1.5rem;
    margin-bottom: 15px;
    line-height: 1.5;
}

.game-over .score-display-final {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-orange);
    margin: 15px 0;
}

/* Game Over Buttons Container */
.game-over-buttons {
    display: flex;
    gap: 20px;
    margin-top: 25px;
    flex-wrap: wrap;
    justify-content: center;
}

.game-over-buttons .action-btn {
    flex: 1;
    min-width: 150px;
    padding: 15px 25px;
    font-size: 1.1rem;
    animation: buttonPulse 2s infinite;
}

.game-over-buttons .home-btn {
    background: linear-gradient(135deg, #28a745, #20c997);
    border: none;
    color: white;
}

.game-over-buttons .home-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.3);
    background: linear-gradient(135deg, #218838, #1e7e34);
}

@keyframes buttonPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Game Controls Panel */
.game-controls-panel {
    background: linear-gradient(135deg, #f8f9fa, #f0f5ff);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(255, 106, 0, 0.1);
}

.game-mode, .difficulty-level, .game-stats, .controls-info {
    margin-bottom: 30px;
}

.game-controls-panel h3 {
    color: var(--primary-orange);
    margin-bottom: 15px;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.game-controls-panel h3 i {
    font-size: 1.3rem;
}

/* Mode Buttons */
.mode-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.mode-btn, .difficulty-btn, .action-btn {
    padding: 12px 18px;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.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: 10px;
}

.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: 12px;
    margin-top: 25px;
}

.action-btn {
    background: linear-gradient(135deg, var(--primary-orange), var(--primary-pink));
    color: var(--white);
    font-size: 1.1rem;
    padding: 15px;
}

.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 Stats */
.stats-display {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.stat-item {
    background: var(--white);
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.06);
}

.stat-label {
    font-size: 0.95rem;
    color: var(--gray);
    margin-bottom: 8px;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-orange);
}

/* Controls Info */
.controls-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.control-item {
    background: var(--white);
    padding: 12px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.control-key {
    background: var(--dark);
    color: var(--white);
    padding: 6px 12px;
    border-radius: 5px;
    font-weight: bold;
    min-width: 50px;
    text-align: center;
    font-size: 1.1rem;
}

.control-description {
    font-size: 1rem;
    color: var(--gray);
}

/* Game Instructions */
.game-instructions {
    background: linear-gradient(135deg, #f8f9fa, #f0f5ff);
    border-radius: 15px;
    padding: 25px;
    margin-top: 30px;
    border: 1px solid rgba(255, 106, 0, 0.1);
}

.game-instructions h3 {
    color: var(--primary-orange);
    margin-bottom: 15px;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.instructions-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.instruction-item {
    background: var(--white);
    padding: 15px;
    border-radius: 10px;
    border-left: 3px solid var(--primary-orange);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    font-size: 1rem;
}

.instruction-item i {
    color: var(--primary-orange);
    margin-right: 10px;
    font-size: 1.2rem;
}

/* Tool Info */
.tool-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 25px;
    padding: 20px;
    background: #f0f8ff;
    border-radius: 10px;
}

.tool-info h3 {
    color: var(--primary-orange);
    margin-bottom: 8px;
    font-size: 1.5rem;
}

.tool-info p {
    color: var(--gray);
    font-size: 1rem;
}

.tool-stats {
    display: flex;
    gap: 25px;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-orange);
}

.stat-label {
    font-size: 1rem;
    color: var(--gray);
}

/* How to Use Section - FIXED FOR MOBILE */
.how-to-use {
    width: 100%;
    max-width: 1200px;
    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: 35px;
    margin-bottom: 30px;
    transition: transform 0.3s ease;
}

.how-to-use-card:hover {
    transform: translateY(-5px);
}

/* How to Play Heading - Mobile Fix */
.how-to-use-card h2 {
    font-size: 2rem;
    color: var(--primary-orange);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center; /* Center align on all screens */
    gap: 10px;
    text-align: center;
    line-height: 1.3;
}

/* Mobile-specific fixes for the heading */
@media (max-width: 768px) {
    .how-to-use-card {
        padding: 25px 20px;
        margin: 20px auto;
    }
    
    .how-to-use-card h2 {
        font-size: 1.6rem !important; /* Use !important to override any conflicting styles */
        text-align: center;
        flex-direction: column; /* Stack icon and text vertically if needed */
        gap: 8px;
        padding: 0 10px;
        margin-left: auto;
        margin-right: auto;
        width: 100%;
        justify-content: center;
        align-items: center;
        display: flex; /* Ensure flex is applied */
        white-space: normal; /* Allow text to wrap */
        word-break: break-word; /* Break long words if needed */
        overflow-wrap: break-word;
    }
    
    /* Make sure the icon doesn't cause alignment issues */
    .how-to-use-card h2 i {
        margin-bottom: 5px;
        display: block; /* Make icon block element for better control */
    }
}

@media (max-width: 480px) {
    .how-to-use-card h2 {
        font-size: 1.4rem !important;
        padding: 0 5px;
        line-height: 1.4;
    }
    
    .how-to-use-card {
        padding: 20px 15px;
    }
}

/* How to Use Steps */
.how-to-use-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.step {
    background: var(--light);
    border-radius: 15px;
    padding: 25px;
    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: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-orange), var(--primary-pink));
    color: var(--white);
    border-radius: 50%;
    font-weight: bold;
    margin: 0 auto 15px;
    font-size: 1.3rem;
}

.step h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--dark);
}

.step p {
    color: var(--gray);
    line-height: 1.5;
    font-size: 1rem;
}

/* Mobile steps adjustment */
@media (max-width: 768px) {
    .how-to-use-steps {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .step {
        padding: 20px;
    }
}

/* Footer */
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);
    }
}

/* Newsletter */
.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);
}

@media (min-width: 769px) {
    .footer-container {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .footer-bottom {
        grid-column: 1 / span 4;
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.2rem;
    }
    
    .tools-heading h2 {
        font-size: 1.8rem;
    }
    
    .game-container {
        grid-template-columns: 1fr;
    }
    
    .game-area-3d {
        height: 400px;
    }
    
    .game-area-3d::after {
        height: 80px; /* 20% of 400px */
    }
    
    #player {
        bottom: 80px; /* Adjusted for mobile */
    }
    
    .difficulty-buttons {
        grid-template-columns: 1fr;
    }
    
    .how-to-use-steps {
        grid-template-columns: 1fr;
    }
    
    .tool-info {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .tool-stats {
        justify-content: center;
    }
    
    /* Mobile-friendly adjustments for Game Over popup */
    .game-over {
        min-width: 280px;
        padding: 20px;
        text-align: center;
        font-size: 16px; /* Ensure readable text size */
    }
    
    .game-over h3 {
        font-size: 24px; /* Larger heading for mobile */
        margin-bottom: 10px;
    }
    
    .game-over p {
        font-size: 16px;
        margin: 5px 0;
    }
    
    .game-over .score-display-final {
        font-size: 28px; /* Larger score display */
        font-weight: bold;
        color: #ff6b6b;
        margin: 10px 0;
    }
    
    .game-over-buttons {
        flex-direction: column; /* Stack buttons vertically on mobile */
        gap: 10px;
        margin-top: 20px;
    }
    
    .game-over-buttons .action-btn {
        width: 100%; /* Full width for easier tapping */
        min-height: 50px; /* Touch-friendly height (min 44px) */
        font-size: 16px; /* Readable button text */
        padding: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
    }
    
    .game-over-buttons .action-btn i {
        font-size: 18px; /* Slightly larger icons */
    }
}

@media (max-width: 480px) {
    .footer-logo img {
        height: 40px;
    }
    
    .footer-heading {
        font-size: 1.1rem;
    }
    
    .footer-tools ul,
    .footer-quick-links ul {
        grid-template-columns: 1fr;
    }
    
    .footer-social a {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    
    .footer-contact p {
        font-size: 0.8rem;
    }
    
    .footer-contact i {
        font-size: 14px;
    }
    
    .footer-legal a {
        font-size: 0.8rem;
    }
    
    .newsletter-input,
    .newsletter-btn {
        padding: 8px 12px;
        font-size: 12px;
        max-width: 200px;
    }
    
    /* Ensure game area is responsive on very small screens */
    .game-area-3d {
        min-height: 400px; /* Adjust height for mobile viewport */
    }
}