
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    overflow: hidden;
}

.container {
    text-align: center;
    padding: 20px;
    max-width: 600px;
    width: 100%;
}

h1 {
    font-size: 3rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 2px;
}

.game-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.info-item {
    flex: 1;
    padding: 10px;
}

.info-label {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 5px;
}

.info-value {
    font-size: 1.8rem;
    font-weight: bold;
}

.game-canvas-wrapper {
    position: relative;
    display: inline-block;
    margin-bottom: 20px;
}

#gameCanvas {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: block;
}

.controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

button {
    padding: 12px 30px;
    font-size: 1rem;
    font-weight: bold;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
    color: #667eea;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    background: #fff;
}

button:active {
    transform: translateY(0);
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.difficulty-selector {
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.difficulty-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 10px;
    flex-wrap: wrap;
}

.difficulty-btn {
    padding: 10px 20px;
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.difficulty-btn.active {
    background: rgba(255, 255, 255, 0.9);
    color: #667eea;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: 15px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.overlay.active {
    opacity: 1;
    pointer-events: all;
}

.overlay h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: #fff;
}

.overlay p {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: #fff;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.mobile-controls {
    display: none;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    max-width: 200px;
    margin: 0 auto 20px;
}

.mobile-controls button {
    padding: 20px;
    font-size: 1.2rem;
}

.mobile-controls .empty {
    background: transparent;
    box-shadow: none;
}

@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    .info-value {
        font-size: 1.4rem;
    }

    .mobile-controls {
        display: grid;
    }

    #gameCanvas {
        max-width: 100%;
        height: auto;
    }
}
