/* ============================================
   COOKING SYSTEM STYLES
   ============================================ */

.cooking-counter-wrapper {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.cooking-counter {
    width: 100%;
    min-height: 600px;
    height: auto;
    aspect-ratio: 16 / 9;
    background-image: url('../assets/backgrounds/cooking_counter.png');
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 12px;
    position: relative;
    overflow: visible;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.cooking-utensil {
    position: absolute;
    bottom: 12%;
    width: 480px;
    height: 480px;
    cursor: pointer;
    transition: all 0.3s;
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.4));
}

.cooking-utensil:hover {
    transform: translateY(-15px) scale(1.08);
    filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.6));
}

.cooking-utensil.selected {
    transform: translateY(-10px) scale(1.15);
    filter: drop-shadow(0 0 30px rgba(255, 215, 0, 0.9));
}

.cooking-pot-container {
    left: 15%;
}

.mixing-bowl-container {
    right: 15%;
}

.cooking-utensil-centered {
    left: 50%;
    top: 50%;
    bottom: auto;
    transform: translate(-50%, -50%);
}

.cooking-utensil-centered:hover {
    transform: translate(-50%, -50%) translateY(-15px) scale(1.08);
}

.cooking-utensil-centered.selected {
    transform: translate(-50%, -50%) scale(1.15);
}

.cooking-utensil-icon {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 180px;
    height: 180px;
    cursor: pointer;
    transition: all 0.2s;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
    z-index: 10;
}

.cooking-utensil-icon:hover {
    transform: scale(1.1);
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.6));
}

.cooking-utensil-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.cooking-utensil img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.cooking-utensil-label {
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s;
}

.cooking-utensil:hover .cooking-utensil-label,
.cooking-utensil.selected .cooking-utensil-label {
    opacity: 1;
}

.ingredient-drop-area {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 300px;
    border: 3px dashed transparent;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    pointer-events: none;
}

.ingredient-drop-area.active {
    pointer-events: all;
    border-color: rgba(255, 215, 0, 0.6);
    background: radial-gradient(circle, rgba(255, 215, 0, 0.1) 0%, transparent 70%);
}

.ingredient-drop-area.drag-over {
    border-color: var(--success);
    background: radial-gradient(circle, rgba(76, 175, 80, 0.2) 0%, transparent 70%);
    transform: translate(-50%, -50%) scale(1.1);
}

.drop-hint-text {
    color: white;
    font-size: 16px;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    text-align: center;
    padding: 10px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 8px;
}

.ingredient-slots-display {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.ingredient-slot-item {
    width: 60px;
    height: 60px;
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid var(--border);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    position: relative;
    cursor: pointer;
}

.ingredient-slot-item:hover {
    border-color: var(--danger);
    background: rgba(255, 0, 0, 0.2);
}

.ingredient-slot-item.empty {
    opacity: 0.3;
    cursor: default;
}

.cooking-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    padding: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

/* ============================================
   COOKING STATION
   ============================================ */

.cooking-station {
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    grid-column: 1 / 2;
}

.cooking-station h2 {
    margin: 0 0 20px 0;
    color: var(--text-primary);
    font-size: 1.5rem;
}

/* Method Selection */
.method-selection {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.method-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 15px;
    background: var(--background);
    border: 2px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.method-btn:hover:not(:disabled) {
    background: var(--surface);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.method-btn.selected {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--text-primary);
}

.method-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.method-icon {
    font-size: 2rem;
}

.locked {
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 1.2rem;
}

/* Ingredient Drop Zone */
.ingredient-drop-zone {
    background: var(--background);
    border: 3px dashed var(--border);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    min-height: 200px;
}

.ingredient-drop-zone.drag-over {
    border-color: var(--primary);
    background: var(--surface);
}

.drop-zone-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.drop-zone-header h3 {
    margin: 0;
    color: var(--text-primary);
}

.clear-btn {
    padding: 5px 15px;
    background: var(--danger);
    color: var(--text-primary);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: opacity 0.2s;
}

.clear-btn:hover {
    opacity: 0.8;
}

.ingredient-slots {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}

.ingredient-slot {
    aspect-ratio: 1;
    border: 2px solid var(--border);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.ingredient-slot.empty {
    background: var(--surface);
    border-style: dashed;
    cursor: default;
}

.ingredient-slot.filled {
    background: var(--primary);
    position: relative;
}

.ingredient-slot.filled:hover {
    opacity: 0.8;
}

.ingredient-icon {
    font-size: 2rem;
}

.ingredient-name {
    font-size: 0.75rem;
    text-align: center;
    color: var(--text-primary);
}

.remove-btn {
    position: absolute;
    top: 2px;
    right: 2px;
    font-size: 0.8rem;
    color: var(--danger);
    background: var(--background);
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.drop-hint {
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
    font-size: 0.9rem;
}

/* Recipe Preview */
.recipe-preview {
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.recipe-preview.discovered {
    border-color: var(--success);
}

.recipe-preview.mystery {
    border-color: var(--warning);
    background: linear-gradient(135deg, var(--surface) 0%, var(--background) 100%);
}

.recipe-preview h3 {
    margin: 0 0 10px 0;
    color: var(--text-primary);
}

.recipe-effects {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.cook-time {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* Seasoning Selection */
.seasoning-selection {
    margin-bottom: 20px;
}

.seasoning-selection h3 {
    margin: 0 0 10px 0;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.seasoning-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
}

.seasoning-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

.seasoning-btn:hover:not(:disabled) {
    background: rgba(255, 215, 0, 0.2);
    border-color: var(--primary);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.6);
}

.seasoning-btn.selected {
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.6);
    transform: scale(1.1);
}

.seasoning-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.seasoning-icon {
    font-size: 1.5rem;
}

.seasoning-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

.seasoning-effect {
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-align: center;
}

/* Cook Button */
.cook-btn {
    width: 100%;
    padding: 15px;
    background: var(--success);
    color: var(--text-primary);
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.cook-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* ============================================
   ACTIVE RECIPES
   ============================================ */

.active-recipes-section {
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    grid-column: 2 / 3;
    grid-row: 1 / 2;
}

.active-recipes-section h2 {
    margin: 0 0 20px 0;
    color: var(--text-primary);
    font-size: 1.5rem;
}

.active-recipes-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.no-recipes {
    text-align: center;
    color: var(--text-secondary);
    padding: 40px 20px;
    font-style: italic;
}

.active-recipe {
    background: var(--background);
    border: 2px solid var(--border);
    border-radius: 8px;
    padding: 15px;
    transition: all 0.3s;
}

.active-recipe.ready {
    border-color: var(--success);
    animation: pulse 2s infinite;
}

.active-recipe.perfect {
    border-color: var(--warning);
    background: linear-gradient(135deg, var(--background) 0%, var(--surface) 100%);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.recipe-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.recipe-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.perfect-indicator {
    font-size: 0.85rem;
    color: var(--warning);
    animation: sparkle 1s infinite;
}

@keyframes sparkle {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.05); }
}

.recipe-progress {
    margin-bottom: 10px;
}

.timer {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary);
    font-family: 'Courier New', monospace;
}

.collect-btn {
    width: 100%;
    padding: 12px;
    background: var(--success);
    color: var(--text-primary);
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.collect-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.recipe-ingredients {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    font-size: 1.2rem;
}

/* ============================================
   INGREDIENTS INVENTORY
   ============================================ */

.ingredients-inventory {
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    grid-column: 1 / 2;
    grid-row: 2 / 3;
}

.ingredients-inventory h2 {
    margin: 0 0 15px 0;
    color: var(--text-primary);
    font-size: 1.5rem;
}

.search-container {
    margin-bottom: 15px;
}

.search-container input {
    width: 100%;
    padding: 10px;
    background: var(--background);
    border: 2px solid var(--border);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 1rem;
}

.ingredient-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    max-height: 400px;
    overflow-y: auto;
}

.no-ingredients {
    text-align: center;
    color: var(--text-secondary);
    padding: 40px 20px;
    font-style: italic;
}

.ingredient-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: var(--background);
    border: 2px solid var(--border);
    border-radius: 8px;
    cursor: grab;
    transition: all 0.2s;
}

.ingredient-item:hover {
    background: var(--surface);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.ingredient-item:active {
    cursor: grabbing;
}

.item-icon {
    font-size: 1.5rem;
}

.item-name {
    flex: 1;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.item-qty {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* ============================================
   COOKBOOK
   ============================================ */

.cookbook-section {
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    grid-column: 2 / 3;
    grid-row: 2 / 3;
}

.cookbook-section h2 {
    margin: 0 0 20px 0;
    color: var(--text-primary);
    font-size: 1.5rem;
}

.cookbook-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-height: 400px;
    overflow-y: auto;
}

.cookbook-recipe {
    background: var(--background);
    border: 2px solid var(--border);
    border-radius: 8px;
    padding: 15px;
    transition: all 0.2s;
}

.cookbook-recipe:hover {
    border-color: var(--primary);
    transform: translateX(5px);
}

.cookbook-recipe.can-recook {
    cursor: pointer;
    position: relative;
}

.cookbook-recipe.can-recook:hover {
    border-color: var(--success);
    transform: translateX(5px) scale(1.02);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.cookbook-recipe.can-recook:active {
    transform: translateX(3px) scale(0.99);
}

.cookbook-recipe .recipe-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.recipe-icon {
    font-size: 1.5rem;
}

.cookbook-recipe .recipe-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.recook-icon {
    font-size: 1.2rem;
    margin-left: auto;
    color: var(--warning);
    animation: flicker 2s infinite;
}

@keyframes flicker {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.cookbook-recipe .recipe-ingredients {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.cookbook-recipe .recipe-ingredients .missing {
    opacity: 0.3;
    filter: grayscale(100%);
}

.cookbook-recipe .recipe-effects {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.recipe-stats {
    font-size: 0.8rem;
    color: var(--text-secondary);
    border-top: 1px solid var(--border);
    padding-top: 8px;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1200px) {
    .cooking-container {
        grid-template-columns: 1fr;
    }

    .cooking-station,
    .active-recipes-section,
    .ingredients-inventory,
    .cookbook-section {
        grid-column: 1 / 2;
    }
}

@media (max-width: 768px) {
    .ingredient-slots {
        grid-template-columns: repeat(3, 1fr);
    }

    .method-selection {
        flex-direction: column;
    }

    .seasoning-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .ingredient-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
