/* ==========================================
   🍳 СТРАНИЦА РЕЦЕПТА — Базовые стили (Карамельная тема)
   ========================================== */

/* === БАЗОВЫЕ ЭЛЕМЕНТЫ === */
.container { max-width: 1100px; margin: 0 auto; padding: 20px 15px; }

.section {
    background: var(--bg-cream) !important;
    border: 2px solid var(--border-warm) !important;
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 8px 25px var(--shadow-warm);
}

.section-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-dark) !important;
    margin: 0 0 20px 0;
    padding-bottom: 15px;
    border-bottom: 3px solid var(--border-warm);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* === УВЕДОМЛЕНИЯ === */
.alert {
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    border-left: 4px solid;
    font-weight: 600;
}
.alert-success {
    background: linear-gradient(135deg, #dcfce7, #bbf7d0);
    color: #166534;
    border-color: #22c55e;
}
.alert-error {
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
    color: #dc2626;
    border-color: #ef4444;
}

/* === КНОПКИ === */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    border: none;
    transition: all 0.3s;
    text-decoration: none;
}
.btn-primary {
    background: linear-gradient(135deg, var(--accent-caramel), var(--bg-deep)) !important;
    color: white !important;
}
.btn-success {
    background: linear-gradient(135deg, #22c55e, #16a34a) !important;
    color: white !important;
}
.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(0,0,0,0.2);
}
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* === ИНГРЕДИЕНТЫ === */
.ingredients-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.ingredient-card {
    background: var(--bg-warm);
    border-radius: 14px;
    padding: 16px;
    text-align: center;
    border: 2px solid var(--border-warm);
    transition: all 0.3s;
}
.ingredient-card:hover {
    border-color: var(--accent-caramel);
    transform: translateY(-3px);
}

.ing-emoji { font-size: 36px; margin-bottom: 10px; }
.ing-qty { font-weight: 700; color: var(--accent-caramel); font-size: 15px; margin-bottom: 4px; }
.ing-name { color: var(--text-medium); font-size: 14px; }

/* === ШАГИ ПРИГОТОВЛЕНИЯ === */
.steps-list {
    list-style: none;
    counter-reset: step;
    padding: 0;
    margin: 0;
}

.step-item {
    padding: 20px 20px 20px 70px;
    position: relative;
    border-bottom: 1px solid var(--border-warm);
    line-height: 1.7;
    color: var(--text-medium);
}
.step-item:last-child { border-bottom: none; }

.step-item::before {
    content: counter(step);
    counter-increment: step;
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--accent-caramel), var(--bg-deep));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 16px;
    box-shadow: 0 6px 20px rgba(160, 114, 45, 0.4);
}

.step-title { font-weight: 700; color: var(--text-dark); margin-bottom: 8px; font-size: 16px; }
.step-desc { color: var(--text-medium); margin: 0; }

/* === КАЛЬКУЛЯТОР ПОРЦИЙ === */
.portions-control {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding: 12px 18px;
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    border-radius: 12px;
    border: 2px solid #22c55e;
}

.portions-btn {
    width: 32px;
    height: 32px;
    border: 2px solid #22c55e;
    border-radius: 8px;
    background: white;
    font-weight: 700;
    font-size: 18px;
    cursor: pointer;
    color: #166534;
    transition: 0.2s;
}
.portions-btn:hover { background: #22c55e; color: white; }
.portions-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.portions-value {
    font-weight: 800;
    font-size: 18px;
    color: #166534;
    min-width: 30px;
    text-align: center;
}

.portions-spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid #22c55e;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-left: 10px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* === УВЕДОМЛЕНИЕ О ЗЕФИРАХ === */
.zeffyr-notification {
    position: fixed;
    top: 90px;
    right: 20px;
    z-index: 9999;
    animation: slideInRight 0.5s ease;
}

.zeffyr-notification-content {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    padding: 16px 20px;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(251,191,36,0.4);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
}

.zeffyr-notification-icon { font-size: 32px; animation: bounce 1s infinite; }
.zeffyr-notification-title { font-size: 16px; font-weight: 700; color: #78350f; margin-bottom: 4px; }
.zeffyr-notification-desc { font-size: 13px; color: #92400e; }

.zeffyr-notification-close {
    background: rgba(255,255,255,0.3);
    border: none;
    color: #78350f;
    font-size: 18px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
}
.zeffyr-notification-close:hover { background: rgba(255,255,255,0.5); }

@keyframes slideInRight { from { transform: translateX(400px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* === КОММЕНТАРИИ === */
.comments-section { margin-top: 10px; }

.comment-form {
    background: var(--bg-warm);
    padding: 20px;
    border-radius: 16px;
    margin-bottom: 25px;
    border: 2px solid var(--border-warm);
}

.comment-textarea {
    width: 100%;
    min-height: 100px;
    padding: 12px;
    border: 2px solid var(--border-warm);
    border-radius: 10px;
    font-family: inherit;
    font-size: 15px;
    resize: vertical;
    margin-bottom: 12px;
    transition: 0.3s;
    background: #FFFDF8;
    color: var(--text-dark);
}
.comment-textarea:focus {
    outline: none;
    border-color: var(--accent-caramel);
    box-shadow: 0 0 0 3px rgba(160, 114, 45, 0.15);
}

.comment-card {
    background: var(--bg-cream);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 15px;
    border: 2px solid var(--border-warm);
    transition: 0.3s;
}
.comment-card:hover { box-shadow: 0 8px 25px rgba(0,0,0,0.08); }

.comment-header { display: flex; align-items: center; gap: 15px; margin-bottom: 12px; }

.comment-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-caramel), var(--bg-deep));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 18px;
    flex-shrink: 0;
}

.comment-author {
    font-weight: 700;
    color: var(--accent-brown);
    text-decoration: none;
    font-size: 16px;
}
.comment-author:hover { color: var(--accent-caramel); }

.comment-meta {
    font-size: 12px;
    color: var(--text-light);
    display: flex;
    gap: 10px;
    margin-top: 4px;
    align-items: center;
}

.comment-content {
    color: var(--text-medium);
    line-height: 1.7;
    font-size: 15px;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* === ЦВЕТНЫЕ ШРИФТЫ ДЛЯ КОММЕНТАРИЕВ === */
.comment-card.font-active-raduzhnyy .comment-content,
.comment-card.font-active-raduzhnyy .comment-author {
    background: linear-gradient(90deg, #ff0000, #ff7f00, #ffff00, #00ff00, #0000ff, #4b0082, #9400d3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 900;
    animation: rainbow 3s linear infinite;
}

.comment-card.font-active-korolevskiy .comment-content,
.comment-card.font-active-korolevskiy .comment-author {
    color: #9333ea !important;
    font-family: 'Georgia', serif;
    font-weight: 800;
    text-shadow: 0 0 8px rgba(147, 51, 234, 0.6);
}

.comment-card.font-active-ognennyy .comment-content,
.comment-card.font-active-ognennyy .comment-author {
    color: #ff4500 !important;
    font-weight: 800;
    text-shadow: 0 0 8px rgba(255, 69, 0, 0.6);
}

.comment-card.font-active-ledyanoy .comment-content,
.comment-card.font-active-ledyanoy .comment-author {
    color: #00bfff !important;
    font-weight: 800;
    text-shadow: 0 0 8px rgba(0, 191, 255, 0.6);
}

.comment-card.font-active-izumrudnyy .comment-content,
.comment-card.font-active-izumrudnyy .comment-author {
    color: #10b981 !important;
    font-weight: 800;
    text-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
}

@keyframes rainbow {
    0% { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}

/* === МОБИЛЬНАЯ АДАПТАЦИЯ === */
@media (max-width: 768px) {
    .container { padding: 15px 10px; }
    .section { padding: 20px; }
    .ingredients-grid { grid-template-columns: repeat(2, 1fr); }
    
    .zeffyr-notification { top: 80px; right: 10px; left: 10px; }
    .zeffyr-notification-content { min-width: auto; }
}

@media (max-width: 480px) {
    .ingredients-grid { grid-template-columns: 1fr; }
    .section-title { font-size: 18px; }
}