/* Reset general */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Fundal animat modern */
body {
    height: 100vh;
    margin: 0;
    padding: 20px;
    background: linear-gradient(135deg, #ffcc70, #ff9a3c, #ff6f61, #ffcc70);
    background-size: 400% 400%;
    animation: gradientMove 15s ease infinite;
    font-family: sans-serif;
    overflow: hidden;
}

@keyframes gradientMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Titlu joc */
#game-title {
    text-align: center;
    font-size: 4rem;
    font-family: 'Helvetica', sans-serif;
    color: #0077b6; /* 🔵 albastru clar, modern */
    text-shadow: 2px 2px 5px rgba(0,0,0,0.3);
    z-index: 10;
    padding-bottom: 30px;
}

/* Wrapper general joc + introducere */
#game-wrapper {
    display: flex;
    align-items: stretch;
    gap: 30px;
    padding: 20px;
    height: calc(100vh - 80px); /* ținând cont de titlu */
}

/* Cutia din stânga cu câinele și textul */
#intro-box {
    max-width: 400px;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    box-sizing: border-box;
}

#intro-box img {
    width: 100%; /* Întinde imaginea pe toată lățimea disponibilă */
    max-width: 300px; /* Lățimea maximă (poți ajusta acest număr) */
    height: auto; /* Păstrează proporțiile imaginii */
    border-radius: 20px;
    box-shadow: 0 0 25px rgba(0,0,0,0.25);
    margin-bottom: 20px;
}

/* Textul sub imagine – stil speech bubble */
.speech-bubble {
    background: #fff3cd;
    min-height: 180px;            /* ⬆️ mai mare decât 150px */
    width: 100%;
    max-width: 400px;
    border-radius: 20px;
    box-shadow: 2px 2px 12px rgba(0,0,0,0.15);
    padding: 20px;
    color: #333;
    font-size: 1.1rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.speech-bubble h2 {
    margin-top: 0;
    color: #e67e22;
    font-size: 2rem;
}

@keyframes popIn {
    0% { transform: scale(0.8); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* Canvas joc – MĂRIT */
#canvas1 {
    width: 1200px;
    height: 650px;
    border: 5px solid black;
}

/* Imagini sursă ascunse */
#player, #layer1, #layer2, #layer3, #layer4, #layer5,
#enemy_fly, #enemy_plant, #enemy_spider_big, #fire,
#collisionAnimation, #lives {
    display: none;
}
#controls-box {
    max-width: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    height: 100%;
    padding-top: 10px;
    box-sizing: border-box;
}

#controls-box {
    max-width: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px; /* spațiu între cele două chenare */
    height: 100%;
    justify-content: flex-start;
    padding-top: 10px;
    box-sizing: border-box;
}
#restart-button {
    margin-top: 10px;
    padding: 12px 25px;
    background: linear-gradient(to right, #0077b6, #00b4d8); /* culori reci, moderne */
    color: white;
    font-size: 1rem;
    font-weight: bold;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s ease, background-color 0.3s ease;
}

#restart-button:hover {
    background: linear-gradient(to right, #0096c7, #48cae4);
    transform: scale(1.05);
}