body {
    font-family: 'Poppins', sans-serif;
    background-color: #1a1a1a; 
    color: #f0f0f0; 
    margin: 0;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: flex-start; 
    min-height: 100vh;
    text-align: center;
    line-height: 1.6;
}

#game-container {
    background-color: #242424; 
    padding: 30px 45px;
    border-radius: 18px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4); 
    max-width: 750px;
    width: 100%;
    border: 1px solid #3f3f46;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 35px;
    padding-bottom: 20px;
    border-bottom: 1px solid #3f3f46;
}

header h1 {
    color: #7c3aed; 
    margin-bottom: 0;
    font-size: 2.2em;
    font-weight: 700;
}

#achievementsBtn {
    background-color: #06b6d4; 
    color: #1a1a1a; 
    padding: 12px 20px;
    font-size: 0.95em;
    font-weight: 600;
    border-radius: 8px;
    transition: background-color 0.2s ease-in-out, transform 0.2s ease-in-out;
}
#achievementsBtn:hover {
    background-color: #0891b2;
    transform: translateY(-2px);
}

.screen h2 {
    color: #7c3aed; 
    margin-bottom: 25px;
    font-size: 1.8em;
    font-weight: 600;
}

.food-options {
    display: flex;
    justify-content: space-around;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.food-options button {
    background-color: #313131; 
    color: #f0f0f0; 
    border: 1px solid #4a4a4a;
    padding: 20px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1.25em;
    font-weight: 500;
    transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out, transform 0.2s ease-in-out;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    min-width: 140px;
}

.food-options button:hover {
    background-color: #3f3f3f;
    border-color: #06b6d4;
    transform: translateY(-3px);
}

.food-icon {
    width: 85px;
    height: 85px;
    object-fit: contain;
    border-radius: 8px; 
}

.food-display {
    width: 160px;
    height: 160px;
    object-fit: contain;
    margin-bottom: 25px;
    border: 2px dashed #4a4a4a; 
    padding: 12px;
    border-radius: 10px;
    background-color: #2f2f2f; 
}

.generated-food-display { 
    margin-top: 15px; 
    margin-bottom: 20px;
    width: 220px; 
    height: 220px;
    border: 4px solid #7c3aed;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.ingredient-adder {
    margin-bottom: 25px;
    padding: 20px;
    background-color: #2f2f2f; 
    border-radius: 10px;
    border: 1px solid #3f3f46;
}

.ingredient-adder label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #7c3aed; 
    font-size: 1.1em;
}

.ingredient-input-group {
    display: flex;
    gap: 12px;
    align-items: center;
}

#ingredientInput {
    flex-grow: 1;
    padding: 12px 15px;
    border: 1px solid #555; 
    border-radius: 8px;
    font-size: 1em;
    background-color: #3a3a3a; 
    color: #f0f0f0; 
    transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

#ingredientInput::placeholder {
    color: #888;
}
#ingredientInput:focus {
    outline: none;
    border-color: #7c3aed;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.3);
}

#addIngredientBtn {
    background-color: #06b6d4; 
    color: #1a1a1a; 
    padding: 12px 20px; 
    font-weight: 600;
    border-radius: 8px;
    transition: background-color 0.2s ease-in-out, transform 0.2s ease-in-out;
}
#addIngredientBtn:hover {
    background-color: #0891b2;
    transform: translateY(-2px);
}

#ingredientList {
    list-style-type: none; 
    padding-left: 0;
    margin-bottom: 25px;
    text-align: left;
    background-color: #2f2f2f;
    padding: 15px;
    border-radius: 10px;
    min-height: 60px;
    border: 1px solid #3f3f46;
}

#ingredientList li {
    margin-bottom: 10px;
    font-size: 1.1em;
    padding: 8px 12px;
    border-bottom: 1px solid #3f3f46; 
    border-radius: 6px;
    background-color: #3a3a3a;
}
#ingredientList li.ingredient-item { 
    cursor: pointer;
    transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
}
#ingredientList li.ingredient-item:hover {
    background-color: #c4334d; 
    color: #f0f0f0;
}

#ingredientList li:last-child {
    border-bottom: none;
    margin-bottom: 0;
}
#ingredientList li.no-ingredients {
    font-style: italic;
    color: #888;
    background-color: transparent;
    border-bottom: none;
    text-align: center;
}

#nikoHealthContainer {
    width: 220px; 
    height: 30px; 
    background-color: #4a4a4a; 
    border: 2px solid #5f5f5f;
    border-radius: 15px; 
    margin: 0 auto 20px; 
    overflow: hidden;
    position: relative; 
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.3);
}

#nikoHealthBar {
    height: 100%;
    width: 100%; 
    background-color: #28a745; 
    border-radius: 12px; 
    transition: width 0.5s ease-in-out, background-color 0.5s ease-in-out;
}

#nikoHealthText {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 0.95em;
    font-weight: 600;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.7); 
    pointer-events: none; 
}

.niko-display {
    width: 220px;
    height: 220px;
    object-fit: cover;
    border-radius: 50%;
    margin-bottom: 25px;
    border: 6px solid #7c3aed; 
    box-shadow: 0 5px 15px rgba(124, 58, 237, 0.3);
}

#nikoReaction {
    font-size: 1.25em;
    margin-bottom: 25px;
    font-style: italic;
    color: #cccccc; 
    min-height: 3.5em; 
    padding: 10px;
    background-color: #2f2f2f;
    border-radius: 8px;
    border: 1px solid #3f3f46;
}

#starRating {
    font-size: 2.8em;
    color: #facc15; 
    margin-bottom: 35px;
    letter-spacing: 2px;
}
#starRating .empty-star {
    color: #5f5f5f; 
}
#starRating.game-over-text { 
    font-size: 2em;
    color: #f43f5e; 
    font-weight: 700;
    text-transform: uppercase;
}

button {
    background-color: #7c3aed; 
    color: #f0f0f0; 
    border: none;
    padding: 14px 28px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: 600;
    transition: background-color 0.2s ease-in-out, transform 0.2s ease-in-out;
    margin-top: 12px;
    margin-right: 8px;
}

button:hover {
    background-color: #6d28d9; 
    transform: translateY(-2px);
}
button:active {
    transform: translateY(0px);
}

#backToSelectionBtn {
    background-color: #4a4a4a; 
    color: #f0f0f0;
}
#backToSelectionBtn:hover {
    background-color: #3f3f3f;
}

#resetGameBtn {
    background-color: #e11d48; 
    color: #f0f0f0;
}
#resetGameBtn:hover {
    background-color: #be123c;
}

.modal {
    display: none; 
    position: fixed; 
    z-index: 1000; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    overflow: auto; 
    background-color: rgba(0,0,0,0.8); 
    backdrop-filter: blur(5px); 
}

.modal-content {
    background-color: #2f2f2f; 
    color: #f0f0f0;
    margin: 8% auto; 
    padding: 30px; 
    border: 1px solid #4a4a4a;
    border-radius: 15px;
    width: 90%; 
    max-width: 550px; 
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
.modal-content h2 {
    color: #7c3aed;
    font-size: 1.8em;
    margin-top: 0;
    margin-bottom: 20px;
    border-bottom: 1px solid #3f3f46;
    padding-bottom: 15px;
}

.close-button {
    color: #aaa;
    float: right;
    font-size: 32px;
    font-weight: bold;
    line-height: 1; 
    transition: color 0.2s ease-in-out;
}

.close-button:hover,
.close-button:focus {
    color: #fff;
    text-decoration: none;
    cursor: pointer;
}

#achievementsList {
    list-style-type: none;
    padding: 0;
}

#achievementsList li {
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 8px;
    background-color: #3a3a3a;
    border: 1px solid #4f4f4f;
    display: flex;
    align-items: center;
    transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out;
}

#achievementsList li.unlocked {
    background-color: #06b6d4; 
    color: #1a1a1a;
    border-color: #0891b2;
}
#achievementsList li .icon {
    font-size: 1.8em; 
    margin-right: 15px;
    min-width: 30px; 
    text-align: center;
}
#achievementsList li .text strong {
    display: block;
    font-size: 1.15em;
    font-weight: 600;
    margin-bottom: 3px;
}
#achievementsList li .text span {
    font-size: 0.9em;
    color: #b0b0b0;
}
#achievementsList li.unlocked .text strong {
    color: #121212;
}
#achievementsList li.unlocked .text span {
    color: #222222;
}

.toast {
    visibility: hidden;
    min-width: 280px; 
    max-width: 400px;
    margin-left: -140px; 
    background-color: #06b6d4; 
    color: #1a1a1a; 
    text-align: center;
    border-radius: 8px;
    padding: 18px; 
    position: fixed;
    z-index: 1001; 
    left: 50%;
    bottom: 30px;
    font-size: 1.1em;
    font-weight: 500;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}