body {
    margin: 0;
    padding: 20px;
    font-family: 'Inter', 'Arial', sans-serif;
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
    min-height: 100vh;
}

.game-container {
    max-width: 800px;
    margin: 0 auto;
}

.header {
    text-align: center;
    margin-bottom: 20px;
}

.back-btn {
    display: inline-block;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    margin-bottom: 10px;
    transition: all 0.3s;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

h1 {
    color: white;
    font-size: 2.5em;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.game-info {
    display: flex;
    justify-content: space-around;
    background: white;
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

.info-item {
    text-align: center;
}

.info-item .label {
    display: block;
    font-size: 0.9em;
    color: #6c757d;
    margin-bottom: 5px;
}

.info-item .value {
    display: block;
    font-size: 1.5em;
    font-weight: 700;
    color: #F59E0B;
}

.game-board {
    position: relative;
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    display: flex;
    justify-content: center;
}

#gameCanvas {
    border: 3px solid #F59E0B;
    border-radius: 8px;
    display: block;
    image-rendering: pixelated;
    max-width: 100%;
    height: auto;
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 12px;
    z-index: 10;
}

.overlay.hidden {
    display: none;
}

.overlay-content {
    background: white;
    padding: 40px;
    border-radius: 12px;
    text-align: center;
}

.overlay-content h2 {
    margin-top: 0;
    color: #F59E0B;
}

.btn {
    padding: 12px 30px;
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.btn:active {
    transform: translateY(0);
}

.start-btn {
    font-size: 1.3em;
    padding: 15px 40px;
    margin-bottom: 20px;
}

.controls {
    text-align: center;
    color: white;
    margin-top: 20px;
    font-size: 0.9em;
}

.controls p {
    margin: 5px 0;
}

.mobile-compact {
    display: none;
}

.desktop-only {
    display: block;
}

/* Mobile Controls */
.mobile-controls {
    display: none;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
}

.dpad {
    position: relative;
    width: 150px;
    height: 150px;
}

.control-btn {
    position: absolute;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid #F59E0B;
    border-radius: 8px;
    font-size: 24px;
    cursor: pointer;
    user-select: none;
    transition: all 0.1s;
    color: #F59E0B;
    font-weight: bold;
}

.control-btn:active {
    background: #F59E0B;
    color: white;
    transform: scale(0.95);
}

.control-btn.up {
    top: 0;
    left: 50px;
}

.control-btn.down {
    bottom: 0;
    left: 50px;
}

.control-btn.left {
    top: 50px;
    left: 0;
}

.control-btn.right {
    top: 50px;
    right: 0;
}

.dpad-center {
    position: absolute;
    top: 50px;
    left: 50px;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 8px;
}

.bomb-button {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
    border: 3px solid white;
    border-radius: 50%;
    font-size: 32px;
    cursor: pointer;
    user-select: none;
    transition: all 0.1s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    color: white;
    font-weight: bold;
    line-height: 1.2;
}

.bomb-button:active {
    transform: scale(0.95);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* Ad Placeholders */
.ad-placeholder {
    background: #f3f4f6;
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    color: #9ca3af;
    margin: 20px auto;
    max-width: 728px;
}

.ad-top {
    margin-bottom: 20px;
}

.ad-middle {
    margin: 30px 0;
}

.ad-bottom {
    margin-top: 20px;
}

@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    h1 {
        font-size: 1.8em;
    }
    
    .game-info {
        flex-wrap: wrap;
        gap: 10px;
        padding: 12px;
    }
    
    .info-item {
        flex: 1 1 40%;
    }
    
    .info-item .label {
        font-size: 0.8em;
    }
    
    .info-item .value {
        font-size: 1.3em;
    }
    
    #gameCanvas {
        max-width: 100%;
        height: auto;
    }
    
    .mobile-controls {
        display: flex;
    }
    
    .controls {
        font-size: 0.85em;
        margin-top: 15px;
    }
    
    .desktop-only {
        display: none;
    }
    
    .mobile-compact {
        display: block;
        font-size: 0.85em;
    }
    
    .ad-placeholder {
        font-size: 0.9em;
        padding: 15px;
    }
    
    .game-board {
        padding: 15px;
    }
}

/* Prevent text selection on controls */
.control-btn,
.bomb-button,
.btn {
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}
