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

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #87CEEB 0%, #98FB98 50%, #FFE4B5 100%);
    color: #2F4F4F;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

#game-container {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

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

.header h1 {
    font-size: 2.5em;
    color: #FF6347;
    text-shadow: 0 0 20px rgba(255, 99, 71, 0.5);
    margin-bottom: 15px;
}

.game-info {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.game-info div {
    background: rgba(255, 182, 193, 0.8);
    padding: 10px 20px;
    border-radius: 15px;
    font-weight: bold;
    font-size: 1.1em;
    border: 2px solid #FFB6C1;
    color: #8B4513;
}

.game-area {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

#game-canvas {
    border: 3px solid #FF6347;
    border-radius: 15px;
    background: linear-gradient(to bottom, #87CEEB 0%, #98FB98 100%);
    box-shadow: 0 0 30px rgba(255, 99, 71, 0.3);
}

.game-controls {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 200px;
}

.next-fruit {
    background: rgba(255, 182, 193, 0.3);
    border: 2px solid #FFB6C1;
    border-radius: 15px;
    padding: 15px;
    text-align: center;
}

.next-fruit h3 {
    color: #FF6347;
    margin-bottom: 10px;
    font-size: 1.2em;
}

#next-fruit-display {
    font-size: 3em;
    margin: 10px 0;
}

.fruit-types {
    background: rgba(255, 182, 193, 0.3);
    border: 2px solid #FFB6C1;
    border-radius: 15px;
    padding: 15px;
}

.fruit-types h3 {
    color: #FF6347;
    margin-bottom: 10px;
    font-size: 1.2em;
}

.fruit-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.fruit-item {
    background: rgba(255, 255, 255, 0.7);
    padding: 8px;
    border-radius: 8px;
    font-size: 0.9em;
    text-align: center;
    border: 1px solid #FFB6C1;
}

.instructions h4 {
    color: #FF6347;
    margin: 15px 0 10px 0;
    font-size: 1em;
    text-align: center;
}

.controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.controls button {
    padding: 12px 20px;
    background: linear-gradient(135deg, #FF6347, #FF4500);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1em;
}

.controls button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 99, 71, 0.4);
}

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

.controls button:disabled {
    background: #999;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.game-over {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.95);
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    border: 3px solid #FF6347;
    box-shadow: 0 0 50px rgba(255, 99, 71, 0.5);
    color: #2F4F4F;
}

.game-over h2 {
    color: #FF6347;
    font-size: 2.5em;
    margin-bottom: 20px;
    text-shadow: 0 0 20px rgba(255, 99, 71, 0.3);
}

.game-over p {
    font-size: 1.5em;
    margin-bottom: 30px;
    color: #8B4513;
}

.game-over button {
    margin: 10px;
    padding: 15px 30px;
    background: linear-gradient(135deg, #FF6347, #FF4500);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1em;
}

.game-over button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 99, 71, 0.4);
}

@media (max-width: 1024px) {
    .game-area {
        flex-direction: column;
        align-items: center;
    }
    
    #game-canvas {
        width: 100%;
        max-width: 500px;
        height: auto;
    }
    
    .game-controls {
        width: 100%;
        max-width: 500px;
        flex-direction: row;
        justify-content: space-between;
    }
    
    .next-fruit, .fruit-types, .controls {
        flex: 1;
        margin: 0 5px;
    }
    
    .fruit-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .header h1 {
        font-size: 2em;
    }
    
    .game-info {
        flex-direction: column;
        gap: 10px;
        align-items: center;
    }
    
    .game-controls {
        flex-direction: column;
    }
    
    .next-fruit, .fruit-types, .controls {
        margin: 0;
    }
    
    .controls {
        flex-direction: row;
        justify-content: center;
    }
    
    .controls button {
        flex: 1;
        margin: 0 5px;
    }
}
