body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
    margin: 0;
    padding: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

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

h1 {
    font-size: 3rem;
    color: #2c3e50;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.game-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    align-items: flex-start;
    gap: 20px;
}

.game-board {
    flex: 1;
    min-width: 300px;
    max-width: 500px;
}

canvas {
    border: 2px solid #2c3e50;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.game-info {
    flex: 1;
    min-width: 300px;
    max-width: 500px;
}

.difficulty-control {
    margin-bottom: 20px;
}

.difficulty-control label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.difficulty-control input[type="range"] {
    width: 100%;
    margin-bottom: 5px;
}

.instructions {
    background-color: #fff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.instructions h2 {
    margin-top: 0;
    color: #2c3e50;
}

.game-stats {
    background-color: #2c3e50;
    color: #fff;
    padding: 20px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.game-stats p {
    margin: 10px 0;
}

.game-stats span {
    font-weight: bold;
}

@media (max-width: 768px) {
    .game-container {
        flex-direction: column;
        align-items: center;
    }

    .game-board, .game-info {
        width: 100%;
        max-width: none;
    }
}


/* D-pad styles */
/* Update these styles in your index.css file */

.instructions {
    min-height: 200px; /* Ensure consistent height before and after d-pad appears */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.start-button {
    display: block;
    margin: 20px auto;
    padding: 12px 24px;
    font-size: 18px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

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

.start-button:active {
    background-color: #3d8b40;
    transform: scale(0.98);
}

.d-pad {
    position: relative;
    width: 150px;
    height: 150px;
    margin: 20px auto;
}

.d-pad-btn {
    position: absolute;
    width: 40px;
    height: 40px;
    border: 2px solid #333;
    background: #fff;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: all 0.2s;
}

.d-pad-btn:hover {
    background: #eee;
}

.d-pad-btn.active {
    background: #ddd;
    transform: scale(0.95);
}

.d-pad-btn.up {
    top: 0;
    left: 50%;
    transform: translateX(-50%);
}

.d-pad-btn.right {
    top: 50%;
    right: 0;
    transform: translateY(-50%);
}

.d-pad-btn.down {
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

.d-pad-btn.left {
    top: 50%;
    left: 0;
    transform: translateY(-50%);
}

.d-pad-btn.center {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #f0f0f0;
}

/* Mobile-friendly adjustments */
@media (max-width: 768px) {
    .d-pad {
        width: 120px;
        height: 120px;
    }

    .d-pad-btn {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
}