* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Nunito', sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    min-height: 100vh;
    overflow: hidden;
    color: #fff;
}

/* Loading Screen */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader {
    text-align: center;
}

.burger-icon {
    font-size: 80px;
    animation: bounce 1s ease infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.loader p {
    margin-top: 20px;
    font-size: 1.5rem;
    color: #f8b500;
    font-family: 'Fredoka One', cursive;
}

/* Header */
header {
    text-align: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

header h1 {
    font-family: 'Fredoka One', cursive;
    font-size: 2.5rem;
    color: #f8b500;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.5);
}

.subtitle {
    font-size: 1.1rem;
    color: #ccc;
    margin-top: 5px;
}

/* Game Container */
#game-container {
    display: flex;
    height: calc(100vh - 100px);
    position: relative;
}

/* Canvas Container */
#canvas-container {
    flex: 1;
    position: relative;
}

#canvas-container canvas {
    display: block;
}

/* Ingredients Panel */
#ingredients-panel {
    width: 200px;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    padding: 20px;
    overflow-y: auto;
    border-left: 2px solid rgba(248, 181, 0, 0.3);
}

#ingredients-panel h2 {
    font-family: 'Fredoka One', cursive;
    font-size: 1.3rem;
    color: #f8b500;
    margin-bottom: 15px;
    text-align: center;
}

#ingredients-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ingredient-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(145deg, rgba(255,255,255,0.1), rgba(255,255,255,0.05));
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Nunito', sans-serif;
    font-weight: 600;
}

.ingredient-btn:hover {
    transform: translateX(-5px) scale(1.02);
    background: linear-gradient(145deg, rgba(248, 181, 0, 0.3), rgba(248, 181, 0, 0.1));
    box-shadow: 0 5px 20px rgba(248, 181, 0, 0.3);
}

.ingredient-btn:active {
    transform: scale(0.95);
}

.ingredient-btn .emoji {
    font-size: 1.5rem;
}

.ingredient-btn .name {
    font-size: 0.9rem;
}

/* Controls Panel */
#controls-panel {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 15px;
    z-index: 100;
}

.action-btn {
    padding: 15px 30px;
    border: none;
    border-radius: 50px;
    font-family: 'Fredoka One', cursive;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(145deg, #f8b500, #e5a400);
    color: #1a1a2e;
    box-shadow: 0 5px 20px rgba(248, 181, 0, 0.4);
}

.action-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(248, 181, 0, 0.6);
}

.action-btn:active {
    transform: translateY(0);
}

.action-btn.secondary {
    background: linear-gradient(145deg, #444, #333);
    color: #fff;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.action-btn.secondary:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

.action-btn.music {
    background: linear-gradient(145deg, #9b59b6, #8e44ad);
    color: #fff;
    box-shadow: 0 5px 20px rgba(155, 89, 182, 0.4);
}

.action-btn.music:hover {
    box-shadow: 0 8px 30px rgba(155, 89, 182, 0.6);
}

.action-btn.music.playing {
    background: linear-gradient(145deg, #27ae60, #229954);
    box-shadow: 0 5px 20px rgba(39, 174, 96, 0.4);
}

/* Completion Overlay */
#completion-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 500;
    opacity: 1;
    transition: opacity 0.5s ease;
}

#completion-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.completion-content {
    text-align: center;
    padding: 50px;
    background: linear-gradient(145deg, rgba(30, 30, 50, 0.95), rgba(20, 20, 40, 0.95));
    border-radius: 30px;
    border: 3px solid #f8b500;
    box-shadow: 0 20px 60px rgba(248, 181, 0, 0.3);
    animation: popIn 0.5s ease;
}

@keyframes popIn {
    0% { transform: scale(0.5); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.completion-content h2 {
    font-family: 'Fredoka One', cursive;
    font-size: 2.5rem;
    color: #f8b500;
    margin-bottom: 15px;
}

.completion-content p {
    font-size: 1.2rem;
    color: #ccc;
    margin-bottom: 30px;
}

/* Instructions Tooltip */
.tooltip {
    position: absolute;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(248, 181, 0, 0.9);
    color: #1a1a2e;
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 600;
    animation: fadeInUp 0.5s ease;
    z-index: 50;
}

@keyframes fadeInUp {
    0% { opacity: 0; transform: translateX(-50%) translateY(20px); }
    100% { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* Responsive Design */
@media (max-width: 768px) {
    #game-container {
        flex-direction: column;
    }
    
    #ingredients-panel {
        width: 100%;
        height: auto;
        max-height: 150px;
        border-left: none;
        border-top: 2px solid rgba(248, 181, 0, 0.3);
    }
    
    #ingredients-list {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .ingredient-btn {
        flex-direction: column;
        padding: 8px;
        gap: 5px;
    }
    
    .ingredient-btn .name {
        font-size: 0.7rem;
    }
    
    #controls-panel {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .action-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    header h1 {
        font-size: 1.8rem;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

::-webkit-scrollbar-thumb {
    background: #f8b500;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #e5a400;
}

/* Drop indicator */
.drop-zone-active {
    box-shadow: 0 0 50px rgba(248, 181, 0, 0.5) inset;
}
