/* ==========================================================================
   1. ГЛОБАЛЬНЫЕ НАСТРОЙКИ (СВЕТЛАЯ БЕЛО-ЖЕЛТАЯ ТЕМА)
   ========================================================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: #f4f5f6; /* Мягкий светлый фон сайта */
    color: #0f172a;           /* Глубокий темный цвет для текста */
    font-family: system-ui, -apple-system, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column; /* Заставляет блоки идти строго друг за другом сверху вниз */
}

/* ==========================================================================
   2. ШАПКА САЙТА (HEADER)
   ========================================================================== */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    background-color: #ffffff; /* Идеально белый фон шапки */
    border-bottom: 1px solid #e2e8f0; /* Тонкая светлая полоса */
}

header .nav-actions {
    display: flex;
    align-items: center;
    gap: 16px; /* Отступ между кнопкой загрузки и аватаркой */
}

/* Стили для текстового логотипа */
.logo {
    font-size: 24px;
    font-weight: bold;
    letter-spacing: 1px;
    color: #0f172a;
}

.logo span {
    color: #0f172a;
    background-color: #fde047; /* Желтый фон для выделения букв UN */
    padding: 2px 6px;
    border-radius: 6px;
    margin-left: 2px;
}

/* Стили для квадратного логотипа-картинки (если решишь переключить) */
.logo-link {
    display: block;
}

.logo-img {
    width: 50px;
    height: 50px;
    object-fit: contain;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

/* ==========================================================================
   3. КНОПКИ (BUTTONS)
   ========================================================================== */
.btn {
    background-color: #fde047; /* Пастельно-желтый цвет */
    color: #0f172a;           /* Темный текст на кнопке */
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.btn:hover {
    background-color: #facc15; /* Чуть более насыщенный желтый при наведении */
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

.btn-secondary {
    background-color: #e2e8f0; /* Светло-серый для второстепенных кнопок */
    color: #475569;
}

.btn-secondary:hover {
    background-color: #cbd5e1;
    color: #0f172a;
}

.btn:disabled {
    background-color: #cbd5e1;
    color: #94a3b8;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ==========================================================================
   4. ЛЕНТА ОБЛОЖЕК (INDEX FEED)
   ========================================================================== */
.feed-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    padding: 40px;
}

.cover-card {
    background-color: #ffffff; /* Белые карточки на сером фоне */
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    padding: 12px; /* Внутренний отступ для эстетики */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.cover-card:hover {
    transform: translateY(-4px);
    border-color: #facc15;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.image-wrapper {
    position: relative;
    aspect-ratio: 1 / 1;
    background-color: #f1f5f9;
    border-radius: 8px;
    overflow: hidden;
}

.image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-info {
    padding: 12px 4px 4px 4px;
}

.card-info h3 {
    margin: 0 0 6px 0;
    font-size: 17px;
    color: #0f172a;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-info p {
    margin: 0 0 10px 0;
    color: #64748b; /* Приглушенный текст */
    font-size: 14px;
}

/* ==========================================================================
   5. ФОРМА ЗАГРУЗКИ И АВТОРИЗАЦИИ (UPLOAD & AUTH FORMS)
   ========================================================================== */
.page-center {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
}

.upload-container {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    padding: 40px;
    border-radius: 20px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.05);
}

.upload-container h2 {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.5px;
    text-align: center;
    margin-bottom: 30px;
    color: #0f172a;
}

.upload-container h2 span {
    color: #0f172a;
    background-color: #fde047;
    padding: 0 6px;
    border-radius: 6px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 13px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 8px;
    font-weight: 700;
}

/* Чистые светлые инпуты */
input[type="text"], 
input[type="email"], 
input[type="password"],
input[type="number"], 
textarea {
    width: 100%;
    padding: 12px 16px;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    color: #0f172a;
    font-size: 15px;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

/* Эффект фокуса с мягким желтым свечением */
input:focus, textarea:focus {
    outline: none;
    border-color: #facc15;
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(250, 204, 21, 0.25);
}

/* Зона Drag-and-Drop */
.file-drop-zone {
    border: 2px dashed #cbd5e1;
    padding: 40px 20px;
    text-align: center;
    border-radius: 10px;
    cursor: pointer;
    background-color: #f8fafc;
    transition: all 0.2s ease;
}

.file-drop-zone:hover {
    border-color: #facc15;
    background-color: #ffffff;
}

.file-drop-zone i {
    font-size: 36px;
    color: #64748b;
    margin-bottom: 12px;
}

#file-input {
    display: none;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
    color: #64748b;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}

.back-link:hover {
    color: #0f172a;
}

/* Кнопка подтверждения на форме авторизации */
#auth-submit-btn {
    width: 100%;
    padding: 14px;
    background: #fde047;
    border: none;
    border-radius: 10px;
    color: #0f172a;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(250, 204, 21, 0.2);
    transition: all 0.2s ease;
    margin-top: 15px;
}

#auth-submit-btn:hover {
    background: #facc15;
    transform: translateY(-1px);
    box-shadow: 0 6px 15px rgba(250, 204, 21, 0.3);
}

/* ==========================================================================
   6. КРУГЛАЯ ПЛАВАЮЩАЯ КНОПКА АДМИНА
   ========================================================================== */
.admin-fab {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 56px;
    height: 56px;
    background: #ef4444; /* Плоский красный, чтобы выделялся на светлом */
    border-radius: 50%;
    border: none;
    color: white;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.25);
    z-index: 9999;
    transition: all 0.2s ease;
}

.admin-fab:hover {
    transform: scale(1.05);
    background: #dc2626;
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.35);
}

/* ==========================================================================
   7. ВЫПАДАЮЩЕЕ МЕНЮ ПРОФИЛЯ С АВАТАРКОЙ
   ========================================================================== */
.profile-dropdown-container {
    position: relative;
    display: inline-block;
}

.avatar-btn {
    background: none;
    border: 2px solid #e2e8f0;
    padding: 0;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    cursor: pointer;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.avatar-btn:hover {
    border-color: #facc15;
}

.avatar-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dropdown-menu {
    position: absolute;
    top: 52px;
    right: 0;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    width: 180px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    display: none;
    flex-direction: column;
    padding: 6px 0;
    z-index: 1000;
}

.dropdown-menu.show {
    display: flex;
}

.dropdown-menu a, .dropdown-menu button {
    background: none;
    border: none;
    color: #475569;
    padding: 10px 16px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: inherit;
    transition: all 0.2s ease;
    width: 100%;
    box-sizing: border-box;
}

.dropdown-menu a:hover, .dropdown-menu button:hover {
    background-color: #f1f5f9;
    color: #0f172a;
}

.dropdown-menu hr {
    border: none;
    border-top: 1px solid #e2e8f0;
    margin: 6px 0;
}

.dropdown-menu .logout-item {
    color: #ef4444;
}

.dropdown-menu .logout-item:hover {
    background-color: #fef2f2;
    color: #dc2626;
}

/* ==========================================================================
   8. ТОСТ-УВЕДОМЛЕНИЯ (СВЕТЛЫЙ ВАРИАНТ)
   ========================================================================== */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 100000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.toast {
    pointer-events: auto;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: #0f172a;
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    display: flex;
    align-items: center;
    gap: 14px;
    font-weight: 600;
    font-size: 15px;
    min-width: 280px;
    max-width: 400px;
    transform: translateX(120%);
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.toast.show {
    transform: translateX(0);
}

.toast-success { border-left: 4px solid #10b981; }
.toast-success i { color: #10b981; }

.toast-error { border-left: 4px solid #ef4444; }
.toast-error i { color: #ef4444; }

.toast-info { border-left: 4px solid #facc15; }
.toast-info i { color: #facc15; }

/* ==========================================================================
   9. АВАТАРКА НА СТРАНИЦЕ ПРОФИЛЯ
   ========================================================================== */
.profile-page-avatar-container {
    position: relative;
    width: 110px;
    height: 110px;
    margin: 0 auto 15px;
    cursor: pointer;
}

.profile-page-avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.change-avatar-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
    color: white;
    font-size: 11px;
    font-weight: 700;
}

.profile-page-avatar-container:hover .change-avatar-overlay {
    opacity: 1;
}

.change-avatar-overlay i {
    font-size: 22px;
    margin-bottom: 5px;
}

#avatar-input {
    display: none;
}

/* ==========================================================================
   СТИЛИ ДЛЯ СТРАНИЦЫ ДЕТАЛЬНОГО ПРОСМОТРА ОБЛОЖКИ (COVER.HTML)
   ========================================================================== */
.cover-detail-container {
    width: 100%;
    max-width: 950px;
    margin: 0 auto;
}

.cover-detail-block {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Ровно пополам */
    gap: 40px;
    background: #ffffff;
    padding: 30px;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.03);
}

/* Адаптация под мобилки */
@media (max-width: 768px) {
    .cover-detail-block {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 20px;
    }
}

.detail-image-wrapper {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 12px;
    overflow: hidden;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
}

.detail-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-info-block {
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Контент сверху, кнопка скачивания строго снизу */
    padding: 10px 0;
}

.detail-title {
    font-size: 28px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 8px;
    line-height: 1.2;
}

.detail-author {
    font-size: 15px;
    color: #64748b;
    font-weight: 600;
}

.detail-author a {
    color: #facc15;
    text-decoration: none;
    font-weight: 700;
}

.detail-author a:hover {
    text-decoration: underline;
}

.detail-desc-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #94a3b8;
    font-weight: 700;
    margin-bottom: 6px;
}

.detail-description {
    font-size: 15px;
    color: #334155;
    line-height: 1.5;
}

.detail-action-zone {
    margin-top: 30px;
}

.detail-limit-status {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
}

/* ==========================================================================
   ЗАЩИТА ОТ КОПИРОВАНИЯ И ПЕРЕТАСКИВАНИЯ КАРТИНОК
   ========================================================================== */
img {
    -webkit-user-drag: none; /* Запрет перетаскивания картинок мышью */
    user-select: none;       /* Запрет выделения картинок */
    -webkit-user-select: none;
}

.cover-card, .cover-detail-block {
    user-select: none;       /* Запрет выделения текста внутри карточек */
    -webkit-user-select: none;
}

/* ==========================================================================
   СИСТЕМА ГАЛОЧЕК И КОММЕНТАРИЕВ (БЕЛО-ЖЕЛТАЯ ТЕМА)
   ========================================================================== */

/* 1. Стиль галочки верификации */
.verification-badge {
    color: #facc15; /* Наш фирменный янтарно-желтый цвет */
    font-size: 14px;
    margin-left: 5px;
    vertical-align: middle;
    cursor: help;
}

/* 2. Блок комментариев под обложкой */
.comments-container {
    margin-top: 30px;
    background: #ffffff;
    padding: 30px;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.03);
}

.comments-container h2 {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 20px;
    color: #0f172a;
}

/* Список комментов */
.comments-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 25px;
    max-height: 400px;
    overflow-y: auto; /* Если комментов много — появится аккуратный скролл */
    padding-right: 5px;
}

/* Карточка одного комментария */
.comment-card {
    display: flex;
    gap: 12px;
    background-color: #f8fafc;
    padding: 14px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.comment-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    background: #fde047;
    border: 1px solid #e2e8f0;
}

.comment-content {
    flex: 1;
}

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

.comment-author {
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
}

.comment-date {
    font-size: 11px;
    color: #94a3b8;
}

.comment-text {
    font-size: 14px;
    color: #334155;
    line-height: 1.4;
    word-break: break-word;
}

/* Форма отправки комментария */
.comment-form {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    border-top: 1px solid #e2e8f0;
    padding-top: 20px;
}

.comment-form textarea {
    flex: 1;
    resize: none;
    height: 44px;
    padding: 10px 14px;
    font-size: 14px;
    border-radius: 8px;
}

.comment-submit-btn {
    padding: 12px;
    height: 44px;
    width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background-color: #fde047;
    color: #0f172a;
    border: none;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.2s;
}

.comment-submit-btn:hover {
    background-color: #facc15;
}

/* ==========================================================================
   СТИЛИ ДЛЯ ХЕДЕРА / ПРИВЕТСТВЕННОГО БЛОКА НА ГЛАВНОЙ (WELCOME HERO)
   ========================================================================== */
.welcome-container {
    padding: 40px 40px 10px 40px;
    display: flex;
    justify-content: center;
}

.welcome-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    padding: 35px 40px;
    border-radius: 20px;
    width: 100%;
    max-width: 900px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.02);
}

.welcome-card h1 {
    font-size: 24px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.welcome-card h1 span {
    background-color: #fde047;
    padding: 2px 8px;
    border-radius: 6px;
}

.welcome-card .highlight-text {
    font-size: 16px;
    color: #334155;
    font-weight: 600;
    margin-bottom: 10px;
}

/* Выделение слова АБСОЛЮТНО БЕСПЛАТНО */
.welcome-card .badge-yellow {
    background-color: rgba(250, 204, 21, 0.2);
    color: #a16207;
    padding: 2px 6px;
    border-radius: 6px;
    font-weight: 700;
}

.welcome-card .rules-text {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 20px;
}

.welcome-card .rules-text a {
    color: #0f172a;
    text-decoration: underline;
    font-weight: 700;
    transition: color 0.2s;
}

.welcome-card .rules-text a:hover {
    color: #facc15;
}

.welcome-card .welcome-footer {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    display: inline-block;
    border-top: 2px dashed #e2e8f0;
    padding-top: 12px;
    min-width: 200px;
}

/* ==========================================================================
   СТИЛИ ДЛЯ ТЕКСТОВОГО БЛОКА ПРИВЕТСТВИЯ (WELCOME HERO)
   ========================================================================== */
.welcome-container {
    width: 100%;
    padding: 30px 40px 10px 40px; /* Мягкие отступы сверху и с боков */
    box-sizing: border-box;
    display: flex;
    justify-content: center;
}

.welcome-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    padding: 30px 40px;
    border-radius: 16px;
    width: 100%;
    max-width: 1200px; /* Растягивается в ширину по сетке контента */
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
}

.welcome-card h1 {
    font-size: 24px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.welcome-card h1 span {
    background-color: #fde047; /* Фирменный желтый маркер */
    padding: 2px 8px;
    border-radius: 6px;
}

.welcome-card .highlight-text {
    font-size: 16px;
    color: #334155;
    font-weight: 600;
    margin-bottom: 8px;
}

.welcome-card .badge-yellow {
    background-color: rgba(250, 204, 21, 0.18);
    color: #854d0e;
    padding: 2px 6px;
    border-radius: 6px;
    font-weight: 700;
}

.welcome-card .rules-text {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 18px;
}

.welcome-card .rules-text a {
    color: #0f172a;
    text-decoration: underline;
    font-weight: 700;
}

.welcome-card .rules-text a:hover {
    color: #facc15;
}

.welcome-card .welcome-footer {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    display: inline-block;
    border-top: 2px dashed #e2e8f0;
    padding-top: 10px;
    min-width: 180px;
}

/* ==========================================================================
   СТИЛИ ДЛЯ СТРАНИЦЫ ПРАВИЛ (RULES.HTML)
   ========================================================================== */
.rules-page-container {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    padding: 40px;
    border-radius: 20px;
    width: 100%;
    max-width: 800px; /* Оптимальная ширина для чтения текста */
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.03);
}

.rules-page-container h2 {
    font-size: 28px;
    font-weight: 800;
    color: #0f172a;
    text-align: center;
    margin-bottom: 6px;
}

.rules-page-container h2 span {
    background-color: #fde047;
    padding: 0 8px;
    border-radius: 6px;
}

.rules-updated {
    font-size: 13px;
    color: #94a3b8;
    text-align: center;
    margin-bottom: 35px;
    font-weight: 600;
}

.rules-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.rules-section h3 {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.rules-section p {
    font-size: 15px;
    color: #334155;
    line-height: 1.6;
    margin-bottom: 8px;
}

/* Выделение самых важных пунктов (про интернет и коммерцию) */
.rules-section.critical-rule {
    background-color: #fffdf5;
    border-left: 4px solid #facc15;
    padding: 15px 20px;
    border-radius: 0 12px 12px 0;
}

.rules-section.critical-rule h3 {
    color: #854d0e;
}
/* Исправленная строка автора в карточке главного меню */
.card-description {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 8px;
    line-height: 1.35;
    min-height: 18px;
}

.card-author {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 10px;
}

.card-author-link {
    color: #0f172a;
    font-weight: 700;
    text-decoration: none;
}

.card-author-link:hover {
    text-decoration: underline;
}

/* ========================================================================== 
   ТУМБЛЕР ТЕМЫ + ТЁМНАЯ ТЕМА
   ========================================================================== */
.theme-toggle-btn {
    background: #f8fafc;
    color: #0f172a;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    min-height: 40px;
    padding: 8px 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.theme-toggle-btn:hover {
    background: #ffffff;
    border-color: #facc15;
    transform: translateY(-1px);
}

.theme-toggle-floating {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 10000;
}

html[data-theme="dark"] body,
html[data-theme="dark"] body.admin-page {
    background: #0b1120;
    color: #e5e7eb;
}

html[data-theme="dark"] header {
    background: #111827;
    border-bottom-color: #263244;
}

html[data-theme="dark"] .logo,
html[data-theme="dark"] .card-info h3,
html[data-theme="dark"] .upload-container h2,
html[data-theme="dark"] .detail-title,
html[data-theme="dark"] .comments-container h2,
html[data-theme="dark"] .comment-author,
html[data-theme="dark"] .welcome-card h1,
html[data-theme="dark"] .welcome-card .welcome-footer,
html[data-theme="dark"] .welcome-card .rules-text a,
html[data-theme="dark"] .rules-page-container h2,
html[data-theme="dark"] .rules-section h3,
html[data-theme="dark"] .card-author-link,
html[data-theme="dark"] .admin-strong,
html[data-theme="dark"] .admin-link,
html[data-theme="dark"] .admin-verified-pill {
    color: #f8fafc;
}

html[data-theme="dark"] .logo span,
html[data-theme="dark"] .upload-container h2 span,
html[data-theme="dark"] .welcome-card h1 span,
html[data-theme="dark"] .rules-page-container h2 span {
    color: #0f172a;
    background: #fde047;
}

html[data-theme="dark"] .cover-card,
html[data-theme="dark"] .upload-container,
html[data-theme="dark"] .dropdown-menu,
html[data-theme="dark"] .cover-detail-block,
html[data-theme="dark"] .comments-container,
html[data-theme="dark"] .comment-card,
html[data-theme="dark"] .welcome-card,
html[data-theme="dark"] .rules-page-container,
html[data-theme="dark"] .stat-card,
html[data-theme="dark"] .admin-table-container,
html[data-theme="dark"] .toast {
    background: #111827;
    border-color: #263244;
    color: #e5e7eb;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.24);
}

html[data-theme="dark"] .image-wrapper,
html[data-theme="dark"] .detail-image-wrapper,
html[data-theme="dark"] .file-drop-zone,
html[data-theme="dark"] input[type="text"],
html[data-theme="dark"] input[type="email"],
html[data-theme="dark"] input[type="password"],
html[data-theme="dark"] input[type="number"],
html[data-theme="dark"] textarea,
html[data-theme="dark"] th,
html[data-theme="dark"] .theme-toggle-btn {
    background: #0f172a;
    border-color: #263244;
    color: #f8fafc;
}

html[data-theme="dark"] input:focus,
html[data-theme="dark"] textarea:focus,
html[data-theme="dark"] .file-drop-zone:hover,
html[data-theme="dark"] .theme-toggle-btn:hover {
    background: #111827;
    border-color: #facc15;
}

html[data-theme="dark"] .card-info p,
html[data-theme="dark"] .card-description,
html[data-theme="dark"] .card-author,
html[data-theme="dark"] .detail-author,
html[data-theme="dark"] .detail-desc-label,
html[data-theme="dark"] .detail-description,
html[data-theme="dark"] .comment-text,
html[data-theme="dark"] .comment-date,
html[data-theme="dark"] .welcome-card .highlight-text,
html[data-theme="dark"] .welcome-card .rules-text,
html[data-theme="dark"] .rules-updated,
html[data-theme="dark"] .rules-section p,
html[data-theme="dark"] .form-group label,
html[data-theme="dark"] .back-link,
html[data-theme="dark"] td,
html[data-theme="dark"] .admin-muted,
html[data-theme="dark"] .admin-section-title,
html[data-theme="dark"] .stat-card h4,
html[data-theme="dark"] #profile-bio,
html[data-theme="dark"] #profile-stats {
    color: #cbd5e1 !important;
}

html[data-theme="dark"] .dropdown-menu a,
html[data-theme="dark"] .dropdown-menu button {
    color: #e5e7eb;
}

html[data-theme="dark"] .dropdown-menu a:hover,
html[data-theme="dark"] .dropdown-menu button:hover {
    background: #1e293b;
    color: #ffffff;
}

html[data-theme="dark"] .dropdown-menu hr,
html[data-theme="dark"] th,
html[data-theme="dark"] td,
html[data-theme="dark"] .comment-form {
    border-color: #263244;
}

html[data-theme="dark"] .btn-secondary {
    background: #1e293b;
    color: #e5e7eb;
}

html[data-theme="dark"] .btn-secondary:hover {
    background: #334155;
    color: #ffffff;
}

html[data-theme="dark"] .rules-section.critical-rule {
    background: rgba(250, 204, 21, 0.08);
    border-left-color: #facc15;
}

html[data-theme="dark"] .welcome-card .badge-yellow {
    background: rgba(250, 204, 21, 0.18);
    color: #fde047;
}

@media (max-width: 640px) {
    .theme-toggle-btn span {
        display: none;
    }

    .theme-toggle-btn {
        width: 40px;
        padding: 8px;
    }
}

/* ========================================================================== 
   НАСТРОЙКИ АККАУНТА / ПРОФИЛЯ
   ========================================================================== */
.profile-real-name {
    color: #64748b;
    font-size: 15px;
    font-weight: 700;
    margin: 0 auto 12px;
}

.settings-title {
    margin-bottom: 20px;
    font-size: 20px;
    font-weight: 800;
    color: #0f172a;
}

.settings-section {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 18px;
}

.settings-section h4 {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #0f172a;
    font-size: 16px;
    margin-bottom: 14px;
}

.field-note {
    color: #64748b;
    font-size: 12px;
    line-height: 1.45;
    margin-top: 7px;
}

.field-note.warning {
    color: #b45309;
    font-weight: 700;
}

.field-note.success {
    color: #047857;
    font-weight: 700;
}

.settings-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 18px;
}

.settings-theme-toggle {
    width: auto;
}

.danger-zone {
    background: #fff7ed;
    border-color: #fed7aa;
}

html[data-theme="dark"] .settings-title,
html[data-theme="dark"] .settings-section h4,
html[data-theme="dark"] .profile-real-name {
    color: #f8fafc;
}

html[data-theme="dark"] .settings-section {
    background: #0f172a;
    border-color: #263244;
}

html[data-theme="dark"] .field-note {
    color: #cbd5e1;
}

html[data-theme="dark"] .field-note.warning {
    color: #fbbf24;
}

html[data-theme="dark"] .field-note.success {
    color: #34d399;
}

html[data-theme="dark"] .danger-zone {
    background: rgba(239, 68, 68, 0.09);
    border-color: rgba(239, 68, 68, 0.35);
}

/* ========================================================================== 
   ОТДЕЛЬНАЯ СТРАНИЦА НАСТРОЕК
   ========================================================================== */
.settings-page-main {
    padding: 40px 20px;
    max-width: 980px;
    margin: 0 auto;
}

.settings-page-card {
    max-width: 920px;
    width: 100%;
}

.settings-page-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
}

.settings-user-mini {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    padding: 8px 14px 8px 8px;
    min-width: 220px;
}

.settings-user-mini img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    background: #e2e8f0;
}

.settings-user-mini strong,
.settings-user-mini span {
    display: block;
    line-height: 1.25;
}

.settings-user-mini strong {
    color: #0f172a;
    font-size: 14px;
}

.settings-user-mini span {
    color: #64748b;
    font-size: 12px;
    max-width: 180px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

html[data-theme="dark"] .settings-user-mini {
    background: #0f172a;
    border-color: #263244;
}

html[data-theme="dark"] .settings-user-mini strong {
    color: #f8fafc;
}

html[data-theme="dark"] .settings-user-mini span {
    color: #cbd5e1;
}

@media (max-width: 720px) {
    .settings-page-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .settings-user-mini {
        width: 100%;
        border-radius: 18px;
    }
}


.feed-container,.cover-card{content-visibility:auto;contain-intrinsic-size:300px;}
