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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #2d5016 0%, #4a7c2a 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 40px;
    max-width: 700px;
    width: 100%;
    text-align: center;
}

header h1 {
    font-size: 3em;
    color: #4a7c2a;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.subtitle {
    color: #666;
    font-size: 1.1em;
    margin-bottom: 20px;
}

.game-info {
    margin-bottom: 20px;
}

.score-board {
    display: flex;
    justify-content: space-around;
    background: #f5f5f5;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.score-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.score-item .label {
    font-size: 0.9em;
    color: #666;
    font-weight: 600;
}

.score-item span:last-child {
    font-size: 1.8em;
    color: #4a7c2a;
    font-weight: bold;
}

.game-wrapper {
    position: relative;
    display: inline-block;
    margin-bottom: 20px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

#gameCanvas {
    display: block;
    background: #1a3d0f;
    border: 3px solid #4a7c2a;
}

.game-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    cursor: pointer;
}

.game-overlay.hidden {
    display: none;
}

.overlay-content {
    color: white;
    text-align: center;
    padding: 30px;
}

.overlay-content h2 {
    font-size: 2.5em;
    margin-bottom: 20px;
    color: #4a7c2a;
}

.overlay-content p {
    font-size: 1.2em;
    margin-bottom: 15px;
}

.instructions {
    font-size: 1em !important;
    color: #ccc;
    line-height: 1.6;
    margin-top: 20px;
}

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

.btn {
    padding: 12px 30px;
    font-size: 1.1em;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary {
    background: linear-gradient(135deg, #4a7c2a 0%, #2d5016 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(74, 124, 42, 0.4);
}

.btn-secondary {
    background: #f5f5f5;
    color: #4a7c2a;
    border: 2px solid #4a7c2a;
}

.btn-secondary:hover {
    background: #4a7c2a;
    color: white;
}

.mobile-controls {
    display: none;
    margin-top: 20px;
    gap: 10px;
}

.control-row {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.control-btn {
    width: 60px;
    height: 60px;
    font-size: 1.5em;
    border: 2px solid #4a7c2a;
    background: white;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: bold;
    color: #4a7c2a;
}

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

@media (max-width: 768px) {
    .container {
        padding: 20px;
    }

    header h1 {
        font-size: 2em;
    }

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

    .score-board {
        flex-direction: column;
        gap: 10px;
    }

    .mobile-controls {
        display: flex;
        flex-direction: column;
    }

    .controls {
        flex-direction: column;
    }
}