/* Global Styles */
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        
        body {
            font-family: 'Arial', sans-serif;
            background-color: #121212;
            color: white;
            text-align: center;
            margin: 0;
            padding: 0;
            min-height: 100vh;
            overflow: hidden;
        }
        
        /* Loading Screen Styles */
        .loading-screen {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: #1a1a2e;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            z-index: 1000;
            transition: opacity 1s ease-out;
        }
        
        .loading-logo {
            font-size: 3.5em;
            font-weight: bold;
            margin-bottom: 20px;
            text-shadow: 0 0 15px rgba(255, 255, 255, 0.7);
            animation: pulse 2s infinite;
        }
        
        .loading-bar {
            width: 200px;
            height: 5px;
            background-color: #333;
            border-radius: 5px;
            margin-top: 20px;
            overflow: hidden;
        }
        
        .loading-progress {
            height: 100%;
            width: 0%;
            background-color: #4CAF50;
            transition: width 0.3s ease;
        }
        
        /* Ad Screen Styles */
        .ad-screen {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: #000;
            display: none;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            z-index: 999;
        }
        
        .ad-content {
            width: 90%;
            max-width: 500px;
            height: 300px;
            background-color: #333;
            border-radius: 10px;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            padding: 20px;
            position: relative;
        }
        
        .ad-close-timer {
            position: absolute;
            top: 10px;
            right: 10px;
            background-color: rgba(0,0,0,0.7);
            color: white;
            border-radius: 50%;
            width: 40px;
            height: 40px;
            display: flex;
            justify-content: center;
            align-items: center;
            font-weight: bold;
        }
        
        .ad-text {
            font-size: 1.5em;
            margin-bottom: 20px;
        }
        
        .ad-mockup {
            width: 80%;
            height: 180px;
            background-color: #555;
            border-radius: 5px;
            display: flex;
            justify-content: center;
            align-items: center;
            font-size: 1.2em;
            margin-bottom: 20px;
        }
        
        .skip-ad-btn {
            padding: 8px 20px;
            background-color: #f44336;
            color: white;
            border: none;
            border-radius: 5px;
            cursor: pointer;
            font-weight: bold;
        }
        
        /* Main Menu Styles */
        .main-menu {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: #121212;
            display: none;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            z-index: 998;
        }
        
        .game-logo {
            font-size: 4em;
            font-weight: bold;
            margin-bottom: 20px;
            text-shadow: 0 0 15px rgba(255, 255, 255, 0.7);
            animation: pulse 3s infinite;
        }
        
        .game-instruction {
            max-width: 500px;
            margin: 0 auto 30px;
            padding: 0 20px;
            line-height: 1.6;
        }
        
        .level-selector {
            margin: 20px 0;
            display: flex;
            flex-direction: column;
            gap: 15px;
            align-items: center;
        }
        
        .level-btn {
            padding: 12px 25px;
            font-size: 1.2em;
            border: none;
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.3s;
            font-weight: bold;
            width: 200px;
        }
        
        .level-btn:hover {
            transform: scale(1.05);
            box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
        }
        
        .easy {
            background-color: #4CAF50;
            color: white;
        }
        
        .normal {
            background-color: #2196F3;
            color: white;
        }
        
        .hard {
            background-color: #f44336;
            color: white;
        }
        
        /* Game Screen Styles */
        .game-screen {
            display: none;
            flex-direction: column;
            align-items: center;
            padding: 20px;
            width: 100%;
        }
        
        .game-header {
            width: 100%;
            display: flex;
            justify-content: space-between;
            margin-bottom: 20px;
            flex-wrap: wrap;
        }
        
        .game-info {
            display: flex;
            gap: 20px;
            margin-bottom: 10px;
        }
        
        .info-box {
            background-color: #333;
            padding: 8px 15px;
            border-radius: 5px;
            font-size: 1.1em;
        }
        
        .grid {
            display: grid;
            gap: 5px;
            margin: 100px auto;
            padding: 10px;
            background-color: #333;
            border-radius: 10px;
            box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
        }
        
        .cell {
            width: 40px;
            height: 40px;
            border-radius: 5px;
            cursor: pointer;
            transition: all 0.2s;
            display: flex;
            justify-content: center;
            align-items: center;
            font-weight: bold;
        }
        
        .cell:hover {
            opacity: 0.8;
            transform: scale(1.05);
        }
        
        .dark {
            background-color: #222;
            box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.8);
        }
        
        /* Win Screen Styles */
        .win-screen {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.9);
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            z-index: 100;
            display: none;
        }
        
        .win-message {
            font-size: 3em;
            margin-bottom: 30px;
            text-shadow: 0 0 15px rgba(255, 255, 255, 0.7);
            animation: pulse 1.5s infinite;
        }
        
        .win-stats {
            font-size: 1.5em;
            margin-bottom: 20px;
            text-align: center;
        }
        
        .win-stats div {
            margin: 10px 0;
        }
        
        .menu-btn {
            padding: 12px 25px;
            font-size: 1.2em;
            background-color: #FF9800;
            color: white;
            border: none;
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.3s;
            margin: 10px;
        }
        
        .menu-btn:hover {
            background-color: #FF5722;
            transform: scale(1.1);
        }
        
        /* Animations */
        @keyframes pulse {
            0% { transform: scale(1); }
            50% { transform: scale(1.1); }
            100% { transform: scale(1); }
        }
        
        /* Responsive Styles */
        @media (max-width: 600px) {
            .cell {
                width: 30px;
                height: 30px;
            }
            
            .game-logo {
                font-size: 2.5em;
            }
            
            .level-btn {
                padding: 10px 15px;
                font-size: 1em;
                width: 180px;
            }
            
            .game-info {
                flex-direction: column;
                gap: 10px;
            }
            
            .ad-content {
                height: 250px;
            }
            
            .ad-mockup {
                height: 150px;
            }
        }

        /* Help Button Styles */
.help-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #2196F3;
    color: white;
    border: none;
    font-size: 1.5em;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
    display: none;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
    transition: all 0.3s;
}

.help-btn:hover {
    background-color: #0b7dda;
    transform: scale(1.1);
}

/* Help Modal Styles */
.help-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    z-index: 1002;
    justify-content: center;
    align-items: center;
}

.help-content {
    background-color: #1a1a2e;
    padding: 30px;
    border-radius: 10px;
    max-width: 500px;
    width: 90%;
    position: relative;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

.close-help {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 2em;
    color: #aaa;
    cursor: pointer;
    transition: color 0.3s;
}

.close-help:hover {
    color: white;
}

.help-content h2 {
    margin-bottom: 20px;
    color: #4CAF50;
}

.help-content p {
    margin-bottom: 15px;
    line-height: 1.6;
}