/* ===== ПЕКАРНЯ ===== */

/* Вкладки пекарни */
.bakery-tabs {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--border);
    justify-content: center;
}

.bakery-tab {
    padding: 12px;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    font-weight: bold;
    color: var(--text-light);
    text-align: center;
    flex: 1;
    max-width: 150px;
}

.bakery-tab:hover {
    color: #FF9800;
    background-color: rgba(255, 152, 0, 0.1);
}

.bakery-tab.active {
    color: #FF9800;
    border-bottom: 3px solid #FF9800;
    background-color: rgba(255, 152, 0, 0.05);
}

.bakery-tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.bakery-tab-content.active {
    display: block;
}

/* Карточка рецепта */
.bakery-recipe-card {
    background: linear-gradient(135deg, #ffffff, #f8f9fa);
    border-radius: 15px;
    padding: 20px;
    border: 2px solid #FF9800;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    position: relative;
}

.bakery-recipe-card.learned {
    border-color: #4CAF50;
}

.bakery-recipe-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.bakery-recipe-icon {
    font-size: 40px;
    margin-right: 15px;
    background: linear-gradient(135deg, #FFD700, #FF9800);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: gentleSwing 3s ease-in-out infinite;
}

.bakery-recipe-title {
    font-size: 20px;
    font-weight: bold;
    color: var(--text);
    flex: 1;
}

.bakery-recipe-status {
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 12px;
}

.bakery-recipe-status.learned {
    background: linear-gradient(135deg, #4CAF50, #2E7D32);
    color: white;
}

.bakery-recipe-status.locked {
    background: linear-gradient(135deg, #9e9e9e, #757575);
    color: white;
}

.bakery-recipe-description {
    color: var(--text-light);
    margin-bottom: 10px;
    text-align: center;
    font-style: italic;
    padding: 5px;
    background: rgba(255, 152, 0, 0.1);
    border-radius: 8px;
    font-size: 11px;
}

/* Ингредиенты */
.bakery-ingredients-section {
    margin-bottom: 20px;
}

.bakery-ingredients-section h4 {
    color: var(--text);
    margin-bottom: 10px;
    text-align: center;
}

.bakery-ingredients-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 10px;
}

.bakery-ingredient-item {
    display: flex;
    align-items: center;
    padding: 10px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 10px;
    border: 2px solid #dee2e6;
    transition: all 0.3s ease;
}

.bakery-ingredient-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}

.bakery-ingredient-icon {
    font-size: 24px;
    margin-right: 10px;
}

.bakery-ingredient-info {
    flex: 1;
}

.bakery-ingredient-name {
    font-weight: bold;
    font-size: 14px;
    color: var(--text);
}

.bakery-ingredient-amount {
    font-size: 12px;
    color: var(--text-light);
}

.bakery-ingredient-amount .current {
    color: #4CAF50;
    font-weight: bold;
}

.bakery-ingredient-amount .required {
    color: #757575;
}

.bakery-ingredient-check {
    font-size: 16px;
    color: #4CAF50;
}

/* Кнопки */
.bakery-learn-btn,
.bakery-bake-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #FF9800, #F57C00);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.bakery-learn-btn:hover,
.bakery-bake-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(255, 152, 0, 0.4);
}

.bakery-learn-btn:disabled,
.bakery-bake-btn:disabled {
    background: #cccccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Сетка рецептов для вкладки "Рецепты" */
.bakery-recipes-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 20px;
}

.bakery-recipe-card-small {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 12px;
    padding: 15px 5px;
    text-align: center;
    border: 2px solid #dee2e6;
    transition: all 0.3s ease;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
}

.bakery-recipe-card-small:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.bakery-recipe-card-small.learned {
    border-color: #4CAF50;
}

.bakery-recipe-card-small.locked {
    opacity: 0.6;
    filter: grayscale(0.5);
}

.bakery-recipe-card-small.available {
    border-color: #FF9800;
    animation: pulseAvailable 2s infinite;
}

.bakery-recipe-icon-small {
    font-size: 30px;
    margin-bottom: 8px;
}

.bakery-recipe-name-small {
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 5px;
    color: var(--text);
}

.bakery-recipe-requirements {
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 8px;
}

.bakery-recipe-status-badge {
    padding: 5px 10px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: bold;
}

.bakery-recipe-status-badge.learned {
    background: linear-gradient(135deg, #4CAF50, #2E7D32);
    color: white;
}

.bakery-recipe-status-badge.locked {
    background: linear-gradient(135deg, #9e9e9e, #757575);
    color: white;
}

/* Очередь выпечки */
.bakery-queue-container {
    margin-top: 20px;
}

.bakery-queue-item {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 12px;
    padding: 10px;
    margin-bottom: 15px;
    border: 2px solid #dee2e6;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.bakery-queue-item.in-progress {
    border-color: #FF9800;
}

.bakery-queue-item.completed {
    border-color: #4CAF50;
    background: linear-gradient(135deg, #E8F5E9, #C8E6C9);
}

.bakery-queue-item.failed {
    border-color: #f44336;
    background: linear-gradient(135deg, #ffebee, #ffcdd2);
    opacity: 0.7;
}

.bakery-queue-icon {
    font-size: 32px;
    margin-right: 15px;
}

.bakery-queue-info {
    flex: 1;
}

.bakery-queue-name {
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 5px;
    color: var(--text);
}

.bakery-queue-time {
    font-size: 16px;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 5px;
}

.bakery-queue-timer {
    font-weight: bold;
    color: #FF9800;
    font-family: monospace;
    font-size: 16px;
}

.bakery-queue-chance {
    font-size: 12px;
    color: #9C27B0;
    margin-top: 5px;
}

.bakery-queue-status-badge {
    padding: 5px;
    border-radius: 15px;
    font-size: 10px;
    font-weight: bold;
    text-transform: uppercase;
        display: none;
}

.bakery-queue-status-badge.in-progress {
    background: #FF9800;
    color: white;
}

.bakery-queue-status-badge.completed {
    background: #4CAF50;
    color: white;
    display: none;
}

.bakery-queue-status-badge.failed {
    background: #f44336;
    color: white;
}

.bakery-collect-btn {
    padding: 8px;
    background: linear-gradient(135deg, #4CAF50, #2E7D32);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.bakery-collect-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(76, 175, 80, 0.4);
}

/* Прогресс-бар для таймера */
.bakery-progress-bar {
    width: 100%;
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    margin-top: 8px;
    overflow: hidden;
}

.bakery-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #FF9800, #FFC107);
    border-radius: 3px;
    transition: width 1s linear;
}

/* Пустое состояние */
.bakery-empty-state {
    text-align: center;
    padding: 5px;
    color: var(--text-light);
}

.bakery-empty-icon {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.5;
}

.bakery-empty-text {
    font-size: 16px;
    margin-bottom: 10px;
}

.bakery-empty-hint{
    margin-top: 20px;
    padding: 15px;
    background: rgba(255, 152, 0, 0.1);
    border-radius: 10px;
    font-size: 13px;
    color: var(--text-light);
}

/* Анимации */
@keyframes bakePulse {
    0%, 100% {
        box-shadow: 0 0 15px rgba(255, 152, 0, 0.3);
    }
    50% {
        box-shadow: 0 0 25px rgba(255, 152, 0, 0.6);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes gentleSwing {
    0%, 100% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(5deg);
    }
    75% {
        transform: rotate(-5deg);
    }
}

@keyframes verticalShine {
    0% {
        transform: translateY(200%);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(0);
        opacity: 0;
    }
}

@keyframes pulseAvailable {
    0%, 100% {
        box-shadow: 0 0 10px rgba(255, 152, 0, 0.3);
    }
    50% {
        box-shadow: 0 0 20px rgba(255, 152, 0, 0.6);
    }
}