body {
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    font-family: Arial, sans-serif;
    overflow: hidden;
}

.game-container {
    background: #fff;
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

canvas {
    display: block;
    background: url('Mask-It Road.png') center center / cover no-repeat;
    width: 100%;
    height: auto;
    flex: 1;
}

.ui {
    padding: 15px;
    text-align: center;
    background: #f8f9fa;
    flex-shrink: 0;
}

.welcome-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

.welcome-content {
    text-align: center;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.game-title {
    font-size: 36px;
    font-weight: bold;
    color: #ffffff;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.welcome-instructions {
    font-size: 18px;
    color: #ffffff;
    margin-bottom: 30px;
    line-height: 1.5;
    max-width: 400px;
}

.start-btn-large {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.start-btn-large:hover {
    background: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

.game-controls-overlay {
    position: absolute;
    top: 20px;
    left: 20px;
    display: none;
    z-index: 5;
}

.control-btn {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(240, 240, 240, 0.9));
    border: 2px solid rgba(255, 255, 255, 0.3);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin-right: 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15), 
                inset 0 1px 3px rgba(255, 255, 255, 0.5);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.control-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.5) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.control-btn:hover::before {
    transform: translateX(100%);
}

.control-btn:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 1), rgba(250, 250, 250, 0.95));
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2), 
                inset 0 2px 5px rgba(255, 255, 255, 0.7);
}

.control-btn:active {
    transform: translateY(-1px) scale(1.02);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.pause-btn-icon {
    color: #FF9800;
    text-shadow: 0 2px 4px rgba(255, 152, 0, 0.3);
    filter: drop-shadow(0 0 8px rgba(255, 152, 0, 0.4));
}

.pause-btn-icon:hover {
    color: #F57C00;
    filter: drop-shadow(0 0 12px rgba(255, 152, 0, 0.6));
}

.stop-btn-icon {
    color: #F44336;
    text-shadow: 0 2px 4px rgba(244, 67, 54, 0.3);
    filter: drop-shadow(0 0 8px rgba(244, 67, 54, 0.4));
}

.stop-btn-icon:hover {
    color: #D32F2F;
    filter: drop-shadow(0 0 12px rgba(244, 67, 54, 0.6));
}

.score-overlay {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.9);
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 18px;
    font-weight: bold;
    color: #333;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    display: none;
    z-index: 5;
}

.score {
    font-size: 20px;
    font-weight: bold;
    color: #333;
    margin-bottom: 8px;
}

.instructions {
    color: #666;
    margin-bottom: 10px;
    font-size: 14px;
}

.game-btn {
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    margin: 0 3px;
}

.start-btn {
    background: #4CAF50;
}

.start-btn:hover {
    background: #45a049;
}

.pause-btn {
    background: #FF9800;
}

.pause-btn:hover {
    background: #F57C00;
}

.resume-btn {
    background: #2196F3;
}

.resume-btn:hover {
    background: #1976D2;
}

.stop-btn {
    background: #F44336;
}

.stop-btn:hover {
    background: #D32F2F;
}

.restart-btn {
    background: #9C27B0;
}

.restart-btn:hover {
    background: #7B1FA2;
}

.game-controls {
    margin-top: 8px;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .game-container {
        border-radius: 0;
        width: 100vw;
        height: 100vh;
    }
    
    .ui {
        padding: 10px;
    }
    
    .score {
        font-size: 18px;
        margin-bottom: 5px;
    }
    
    .instructions {
        font-size: 12px;
        margin-bottom: 8px;
    }
    
    .game-btn {
        padding: 6px 12px;
        font-size: 12px;
        margin: 0 2px;
    }
    
    .game-controls {
        margin-top: 5px;
    }
    
    .welcome-content {
        padding: 30px 20px;
        margin: 0 20px;
    }
    
    .game-title {
        font-size: 28px;
        margin-bottom: 15px;
    }
    
    .welcome-instructions {
        font-size: 16px;
        margin-bottom: 25px;
    }
    
    .start-btn-large {
        padding: 12px 24px;
        font-size: 16px;
    }
    
    .control-btn {
        width: 55px;
        height: 55px;
        font-size: 22px;
        margin-right: 10px;
    }
    
    .score-overlay {
        font-size: 16px;
        padding: 8px 16px;
        top: 15px;
        right: 15px;
    }
    
    .game-controls-overlay {
        top: 15px;
        left: 15px;
    }
}

/* Desktop full-screen adjustments */
@media (min-width: 769px) {
    body {
        overflow: hidden;
    }
    
    .game-container {
        border-radius: 0;
        box-shadow: none;
        width: 100vw;
        height: 100vh;
    }
}
