/* ========================================
   ОСНОВНЫЕ СТИЛИ И ФОН
   ======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    color: #333;
    min-height: 100vh;
    /* Фоновое изображение на весь экран, зафиксировано */
    background-image: url('../img/fon.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
}

/* ========================================
   ОБЩИЙ КОНТЕЙНЕР (для центрирования блоков)
   ======================================== */

.site-header,
.main-content,
.site-footer {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
}

/* ========================================
   ШАПКА САЙТА
   ======================================== */

.site-header {
    background: #ffffff;
    /* Скругление только верхних углов */
    border-radius: 8px 8px 0 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    /* Убрали margin-bottom */
    padding: 0 1.5rem;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.logo a {
    display: flex;
    align-items: center;
}

.logo img {
    height: 40px;
    width: auto;
    object-fit: contain;
}

/* ========================================
   НАВИГАЦИЯ
   ======================================== */

.main-nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 40px;
}

.nav-item {
    position: relative;
}

.nav-link {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 16px;
    color: #666;
    text-decoration: none;
    padding: 10px 0;
    position: relative;
    transition: color 0.3s ease;
    display: block;
}

.nav-link.active {
    color: #333;
}

/* Подчёркивание для активной вкладки */
.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #c66235;
    border-radius: 2px;
}

/* Подчёркивание при наведении (серое) */
.nav-link:not(.active)::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: #d4d4d4;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:not(.active):hover::before {
    width: 100%;
}

/* ========================================
   КНОПКА ВХОДА И АВАТАР
   ======================================== */

.user-area {
    display: flex;
    align-items: center;
}

.btn-login {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    border: 1.5px solid #333;
    border-radius: 50px;
    background: transparent;
    color: #333;
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-login:hover {
    background: #333;
    color: #ffffff;
}

.btn-login svg {
    transition: transform 0.3s ease;
}

.btn-login:hover svg {
    transform: translateX(3px);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f0d05f;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 16px;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.user-avatar:hover {
    background: #dfba53;
    transform: scale(1.05);
}

/* ========================================
   ОСНОВНОЙ КОНТЕНТ
   ======================================== */

.main-content {
    background: #ECF0F1;
    /* Убрали border-radius и margin */
    padding: 1rem 1.5rem;
    min-height: 500px;
}

/* ========================================
   ПОДВАЛ
   ======================================== */

.site-footer {
    background: #333333;
    color: #ffffff;
    padding: 3rem 1.5rem 1.5rem;
    /* Скругление только нижних углов */
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    /* Убрали margin */
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 3rem;
    gap: 40px;
    flex-wrap: wrap;
}

/* Левая часть: Лого и описание */
.footer-brand {
    flex: 0 0 300px;
}

.footer-logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.footer-logo-area img {
    height: 60px;
    width: auto;
    background-color: white;
    padding: 10px;
    border-radius: 10px;
}

.footer-logo-area .site-name {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 22px;
    color: #ffffff;
}

.footer-desc {
    font-size: 15px;
    color: #aaa;
    line-height: 1.6;
    margin: 0;
}

/* Правая часть: Ссылки */
.footer-nav {
    flex: 1;
    display: flex;
    justify-content: space-between;
    gap: 40px;
}

.footer-column h3 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 18px;
    margin-bottom: 15px;
    color: #ffffff;
}

.footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-column ul li {
    margin-bottom: 10px;
}

.footer-column ul li a {
    color: #aaa;
    text-decoration: none;
    font-size: 15px;
    font-family: 'Roboto', sans-serif;
    transition: color 0.3s ease;
}

.footer-column ul li a:hover {
    color: #f0d05f;
}

/* Нижняя полоска с копирайтом */
.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.footer-bottom p {
    font-size: 14px;
    color: #aaa;
    font-family: 'Roboto', sans-serif;
}

/* ========================================
   АДАПТИВ
   ======================================== */

@media (max-width: 768px) {
    .header-container {
        flex-wrap: wrap;
        height: auto;
        padding: 15px 0;
        gap: 15px;
    }

    .main-nav {
        order: 3;
        width: 100%;
    }

    .nav-list {
        gap: 20px;
    }

    .nav-link {
        font-size: 14px;
    }

    .footer-top {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 30px;
    }

    .footer-brand {
        flex: none;
        width: 100%;
    }

    .footer-logo-area {
        justify-content: center;
    }

    .footer-nav {
        flex-direction: column;
        gap: 30px;
        align-items: center;
        width: 100%;
    }
    
    .footer-column {
        width: 100%;
    }

    .main-content {
        padding: 0.5rem 1rem;
    }
}

@media (max-width: 450px) {
    .main-content {
        padding: 0.5rem 0.4rem;
    }
}

/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- ЛИЧНЫЙ КАБИНЕТ =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
/* ========================================
   ЛИЧНЫЙ КАБИНЕТ (lk.php) - ОБНОВЛЁННЫЙ
   ======================================== */

.lk-page { padding-bottom: 60px; }

/* Хлебные крошки */
.breadcrumbs {
    font-size: 14px;
    color: #666;
    margin-bottom: 24px;
}
.breadcrumbs a {
    color: #c66235;
    text-decoration: none;
    transition: color 0.3s;
}
.breadcrumbs a:hover { text-decoration: underline; }
.breadcrumbs .sep { margin: 0 8px; }

/* ========================================
   ЛИЧНЫЙ КАБИНЕТ (lk.php) - ОБНОВЛЁННЫЙ
   ======================================== */

.lk-page { padding-bottom: 60px; }

/* Хлебные крошки */
.breadcrumbs {
    font-size: 14px;
    color: #666;
    margin-bottom: 24px;
}
.breadcrumbs a {
    color: #c66235;
    text-decoration: none;
    transition: color 0.3s;
}
.breadcrumbs a:hover { text-decoration: underline; }
.breadcrumbs .sep { margin: 0 8px; }

/* ========================================
   ШАПКА ПРОФИЛЯ (Новая структура)
   ======================================== */
.profile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
    margin-bottom: 40px;
    padding: 20px 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

/* ЛЕВАЯ ЧАСТЬ */
.profile-left {
    display: flex;
    align-items: center;
    gap: 24px;
    flex: 1;
}

.avatar-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.avatar-circle {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 3px solid #333;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    overflow: hidden;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}
.avatar-circle:hover { transform: scale(1.05); }
.avatar-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.initial {
    font-family: 'Montserrat', sans-serif;
    font-size: 36px;
    font-weight: 700;
    color: #333;
}

/* Ховер аватара */
.avatar-hover {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.avatar-circle:hover .avatar-hover { opacity: 1; }
.avatar-hover img {
    width: 24px;
    height: 24px;
    filter: brightness(0) invert(1);
}

/* Кнопка очистки аватара */
.btn-clear-avatar {
    background: none;
    border: none;
    color: #666;
    font-size: 13px;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-family: 'Roboto', sans-serif;
}
.btn-clear-avatar:hover {
    color: #ff4e21;
    background: rgba(255, 78, 33, 0.08);
}

.user-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.profile-name {
    font-family: 'Montserrat', sans-serif;
    font-size: 28px;
    color: #333;
    margin: 0;
    line-height: 1.2;
}

/* Статистика */
.user-stats {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: center;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 12px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    min-width: 70px;
}

.stat-value {
    font-family: 'Montserrat', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #c66235;
    line-height: 1;
}

.stat-label {
    font-size: 11px;
    color: #666;
    margin-top: 4px;
    text-align: center;
}

.stat-date {
    background: transparent;
    box-shadow: none;
    padding: 0;
    min-width: auto;
}
.stat-date .stat-label {
    font-size: 13px;
    color: #999;
}

/* ПРАВАЯ ЧАСТЬ (Панель действий) */
.profile-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
    flex-shrink: 0;
}

.action-buttons {
    display: flex;
    gap: 12px;
}

.btn-quick-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
    font-family: 'Roboto', sans-serif;
}

.btn-add-recipe {
    background: #c66235;
    color: #fff;
    border-color: #c66235;
}
.btn-add-recipe:hover {
    background: #a84f2a;
    border-color: #a84f2a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(198, 98, 53, 0.3);
}

.btn-add-article {
    background: transparent;
    color: #333;
    border-color: #333;
}
.btn-add-article:hover {
    background: #333;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(51, 51, 51, 0.2);
}

.btn-logout {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: 2px solid #c66235;
    color: #c66235;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    font-family: 'Roboto', sans-serif;
}
.btn-logout:hover {
    background: #c66235;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(198, 98, 53, 0.3);
}

/* Вкладки */
.lk-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 2px solid #ddd;
    flex-wrap: wrap;
}
.lk-tab {
    padding: 12px 20px;
    color: #666;
    text-decoration: none;
    font-weight: 500;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
    margin-bottom: -2px;
}
.lk-tab.active { color: #333; border-bottom-color: #c66235; font-weight: 700; }
.lk-tab:hover:not(.active) { color: #333; border-bottom-color: #d4d4d4; }

/* Уведомления */
.alert {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    font-size: 14px;
    line-height: 1.4;
}
.alert svg { width: 18px; height: 18px; flex-shrink: 0; }
.alert.error { color: #ff4e21; }
.alert.error svg { fill: #ff4e21; }
.alert.success { color: #155624; }
.alert.success svg { fill: #155624; }

/* Сетка аккаунта */
.lk-account-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}
.lk-form-block {
    background: #f8f8f8;
    padding: 24px;
    border-radius: 10px;
}
.lk-form-block h2 {
    font-family: 'Montserrat', sans-serif;
    margin: 0 0 20px 0;
    color: #333;
    font-size: 20px;
}

/* Формы */
.form-group { margin-bottom: 16px; }
.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    color: #555;
    font-weight: 500;
}
.form-group input, .form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #ddd0af;
    border-radius: 8px;
    font-size: 14px;
    background: #fff;
    transition: border-color 0.3s, box-shadow 0.3s;
    font-family: 'Roboto', sans-serif;
}
.form-group input:focus {
    border-color: #f0cf5f;
    outline: none;
    box-shadow: 0 0 0 3px #fcf6df;
}
.form-group input::placeholder { color: #aaaaaa; }
.input-disabled { background: #f0f0f0; color: #999; cursor: not-allowed; }
.form-group small { display: block; margin-top: 4px; color: #999; font-size: 12px; }

.btn-primary {
    background: #f0d05f;
    color: #333;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
    margin-top: 10px;
    font-family: 'Roboto', sans-serif;
}
.btn-primary:hover { background: #dfba53; }
.btn-primary:disabled { background: #ddd; color: #999; cursor: not-allowed; }

/* Таймер пароля */
.pass-timer { font-size: 13px; color: #c66235; margin: 8px 0; }
.lock-pass input:disabled { background: #f5f5f5; border-color: #eee; cursor: not-allowed; }

/* Выбор цвета аватара */
.avatar-color-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 16px;
}
.color-option { margin: 0; }
.color-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: var(--color);
    padding: 0;
    outline: none;
}
.color-circle:hover {
    transform: scale(1.08);
    border-color: rgba(0, 0, 0, 0.35);
}
.color-option.selected .color-circle {
    border-color: #333;
    border-width: 3px;
    box-shadow: 0 0 0 2px rgba(0,0,0,0.08);
}

/* Сетка карточек */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-top: 20px;
}
.card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
}
.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.12);
}
.card-link { text-decoration: none; color: inherit; }
.card-image {
    height: 160px;
    background: #f0f0f0;
    overflow: hidden;
}
.card-image img { width: 100%; height: 100%; object-fit: cover; }
.card-content { padding: 14px; }
.card-content h3 { font-size: 16px; margin-bottom: 8px; line-height: 1.3; }
.card-meta { font-size: 13px; color: #666; margin-bottom: 8px; }
.card-rating { color: #f0cf5f; font-weight: 600; font-size: 14px; }

.btn-load-more {
    display: block;
    margin: 30px auto 0;
    padding: 12px 32px;
    background: transparent;
    border: 2px solid #f0d05f;
    color: #333;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    font-family: 'Roboto', sans-serif;
}
.btn-load-more:hover { background: #f0d05f; }
.btn-load-more:disabled { border-color: #ccc; color: #999; cursor: not-allowed; }

/* Пустое состояние */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border-radius: 10px;
    margin-top: 20px;
}
.empty-state p { font-size: 18px; color: #333; max-width: 500px; margin: 0 auto; }

/* Модальное окно */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    align-items: center;
    justify-content: center;
    z-index: 2000;
    backdrop-filter: blur(5px);
}
.modal-box {
    background: #fff;
    padding: 24px;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}
.modal-box h3 { margin-bottom: 12px; color: #333; font-family: 'Montserrat', sans-serif; }
.modal-actions { margin-top: 20px; display: flex; gap: 10px; justify-content: center; }
.btn-danger {
    background: #ff4e21;
    color: #fff;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.3s;
}
.btn-danger:hover { background: #e6421a; }
.btn-secondary {
    background: #f0f0f0;
    color: #333;
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.3s;
}
.btn-secondary:hover { background: #e0e0e0; }

/* Глазки для пароля */
.lk-form .input-wrapper { position: relative; }
.lk-form .input-wrapper input {
    width: 100%;
    padding: 10px 50px 10px 12px;
    border: 2px solid #ddd0af;
    border-radius: 8px;
    font-size: 14px;
    background: #fff;
    transition: border-color 0.3s, box-shadow 0.3s;
}
.lk-form .input-wrapper input:focus {
    border-color: #f0cf5f;
    outline: none;
    box-shadow: 0 0 0 3px #fcf6df;
}
.lk-form .toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}
.lk-form .toggle-password:hover { opacity: 1; }
.lk-form .toggle-password:disabled { cursor: not-allowed; opacity: 0.3; }
.lk-form .toggle-password svg { width: 20px; height: 20px; }
.lk-form .toggle-password .eye-closed { display: block; }
.lk-form .toggle-password .eye-open { display: none; }
.lk-form .toggle-password.is-open .eye-closed { display: none; }
.lk-form .toggle-password.is-open .eye-open { display: block; }
.lk-form .toggle-password path { fill: none; stroke: #666; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ========================================
   АДАПТИВ
   ======================================== */
@media (max-width: 900px) {
    .profile-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 24px;
    }
    
    .profile-left {
        flex-direction: column;
        align-items: center;
        width: 100%;
    }
    
    .user-stats { justify-content: center; }
    
    .profile-right {
        width: 100%;
        align-items: center;
    }
    
    .action-buttons {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .btn-quick-action, .btn-logout {
        width: 100%;
        justify-content: center;
        max-width: 300px;
    }

    .lk-account-grid { grid-template-columns: 1fr; }
    .cards-grid { grid-template-columns: 1fr; }
    .lk-tabs { gap: 0; justify-content: center; }
    .lk-tab { flex: 1 0 auto; text-align: center; padding: 10px 8px; }
}










.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.6); align-items: center; justify-content: center; z-index: 2000; }
.modal-box { background: #fff; padding: 24px; border-radius: 12px; width: 90%; max-width: 400px; text-align: center; box-shadow: 0 10px 30px rgba(0,0,0,0.3); }
.modal-box h3 { margin-bottom: 12px; color: #333; font-family: 'Montserrat', sans-serif; }
.modal-actions { margin-top: 20px; display: flex; gap: 10px; justify-content: center; }