/* ===== ПРОФИЛЬ ПОЛЬЗОВАТЕЛЯ (ТЁМНАЯ ТЕМА) ===== */

/* Заголовок страницы — как в игре */
.profile-page .page-title {
    background: linear-gradient(145deg, rgba(44,30,21,0.95), rgba(26,17,12,0.95));
    border: 2px solid #a0522d;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.7), inset 0 0 20px rgba(212,175,55,0.15);
    padding: 20px 30px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
    overflow: visible;
}

.profile-page .page-title::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, #d4af37, #8b4513, #d4af37, transparent);
}

.profile-page .page-title h1 {
    font-size: 28px;
    font-weight: 100;
    color: #ffd966;
    text-shadow: 2px 2px 0 #2b1e0e, 0 0 15px rgba(255,215,0,0.3);
    margin: 0;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Табы профиля — стиль игровой навигации */
.profile-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 30px;
    padding: 10px;
    background: linear-gradient(145deg, rgba(26,17,12,0.9), rgba(44,30,21,0.9));
    border-radius: 14px;
    border: 2px solid #8b4513;
    box-shadow: inset 0 2px 8px #000, 0 6px 15px rgba(0,0,0,0.6);
}

.tab-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    background: linear-gradient(145deg, #3f2e22, #2b1e0e);
    border: 2px solid #8b5a2b;
    border-radius: 10px;
    color: #fff8e7;
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
    box-shadow: 0 3px 0 #3f2e22, 0 5px 12px #000;
    cursor: pointer;
    flex: 1;
    min-width: 120px;
    position: relative;
    overflow: hidden;
}

.tab-button .tab-icon {
    margin-right: 8px;
    font-size: 1.2em;
}

.tab-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,215,0,0.2), transparent);
    transition: left 0.4s;
}

.tab-button:hover {
    background: linear-gradient(145deg, #5a3e2b, #3f2e22);
    border-color: #ffd700;
    transform: translateY(-2px);
    box-shadow: 0 5px 0 #3f2e22, 0 8px 18px #000, 0 0 15px rgba(255,215,0,0.3);
    color: #ffd700;
}

.tab-button:hover::before {
    left: 100%;
}

.tab-button.active {
    background: linear-gradient(145deg, #b8860b, #8b5a2b);
    border-color: #ffd700;
    color: #1f140c;
    box-shadow: 0 5px 0 #5a3e2b, 0 0 20px #ffd700, inset 0 0 10px #fff8e7;
    pointer-events: none;
}

/* Карточка профиля (тёмная) */
.profile-card {
    background: linear-gradient(145deg, rgba(44,30,21,0.98), rgba(26,17,12,0.98));
    border-radius: 20px;
    border: 2px solid #a0522d;
    box-shadow: 0 10px 30px rgba(0,0,0,0.8), inset 0 0 30px rgba(212,175,55,0.1);
    padding: 30px;
    margin-bottom: 30px;
    display: block;
    gap: 40px;
    position: relative;
    overflow: hidden;
}

.profile-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #8b4513, #d4af37, #8b4513);
}
.profile-top-card {
    background: linear-gradient(145deg, rgba(44,30,21,0.98), rgba(26,17,12,0.98));
    border-radius: 20px;
    border: 2px solid #a0522d;
    box-shadow: 0 10px 30px rgba(0,0,0,0.8), inset 0 0 30px rgba(212,175,55,0.1);
    padding: 30px;
    margin-bottom: 30px;
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
    position: relative;
    overflow: hidden;
}
.profile-avatar {
    flex-shrink: 0;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    border: 4px solid #d4af37;
    box-shadow: 0 0 30px rgba(212,175,55,0.4);
    overflow: hidden;
    background: #2b1e0e;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.profile-avatar:hover img {
    transform: scale(1.05);
}

.profile-details {
    flex: 1;
    min-width: 280px;
    color: #f0e6d2;
}

.profile-field {
    margin-bottom: 15px;
    font-size: 18px;
    line-height: 1.6;
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
    border-bottom: 1px dashed rgba(212,175,55,0.2);
    padding-bottom: 8px;
}

.field-label {
    min-width: 120px;
    color: #d4af37;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 16px;
}

.bio-field {
    background: rgba(0,0,0,0.3);
    padding: 15px;
    border-radius: 12px;
    border-left: 4px solid #d4af37;
    margin-top: 10px;
    color: #e6d5b8;
    font-style: italic;
}

/* Кнопка действия */
.profile-actions .button {
    background: linear-gradient(145deg, #a0522d, #8b4513);
    border: 2px solid #b8860b;
    border-radius: 12px;
    padding: 12px 30px;
    color: #ffd966;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    box-shadow: 0 5px 0 #3f2e22, 0 8px 20px #000;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.profile-actions .button:hover {
    background: linear-gradient(145deg, #8b4513, #5d2906);
    transform: translateY(-2px);
    box-shadow: 0 7px 0 #3f2e22, 0 12px 25px #000, 0 0 20px gold;
    color: #fff;
}

/* Блок статистики (тёмный) */
.profile-stats {
    background: linear-gradient(145deg, rgba(34,24,18,0.95), rgba(22,14,10,0.95));
    border-radius: 20px;
    padding: 25px;
    border: 2px solid #a0522d;
    box-shadow: 0 8px 25px rgba(0,0,0,0.7), inset 0 0 30px rgba(212,175,55,0.1);
    margin-bottom: 30px;
}

.profile-stats h3 {
    color: #ffd966;
    font-size: 24px;
    margin-bottom: 20px;
    border-bottom: 2px solid #b8860b;
    padding-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 20px;
}

.stat-item {
    background: rgba(0,0,0,0.4);
    border-radius: 16px;
    padding: 20px 15px;
    text-align: center;
    border: 1px solid #8b5a2b;
    box-shadow: inset 0 0 15px rgba(0,0,0,0.5);
    transition: transform 0.2s;
}

.stat-item:hover {
    transform: translateY(-4px);
    border-color: #ffd700;
    box-shadow: 0 0 20px rgba(255,215,0,0.2);
}

.stat-value {
    display: block;
    font-size: 32px;
    font-weight: 800;
    color: #ffd966;
    text-shadow: 0 0 10px rgba(255,215,0,0.5);
    line-height: 1.2;
    margin-bottom: 5px;
}

.stat-label {
    color: #c4b5a0;
    font-size: 14px;
    text-transform: uppercase;
}

/* Статьи */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.article-card {
    background: linear-gradient(145deg, rgba(44,30,21,0.95), rgba(26,17,12,0.95));
    border-radius: 16px;
    border: 2px solid #a0522d;
    padding: 20px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.6), inset 0 0 20px rgba(212,175,55,0.05);
    transition: all 0.3s ease;
}

.article-card:hover {
    transform: translateY(-5px);
    border-color: #ffd700;
    box-shadow: 0 12px 30px rgba(0,0,0,0.8), 0 0 25px rgba(255,215,0,0.2);
}

.article-card h3 a {
    color: #ffd966;
    font-size: 20px;
    font-weight: 700;
    text-decoration: none;
    border-bottom: 1px dashed transparent;
    transition: border-color 0.2s;
}

.article-card h3 a:hover {
    border-bottom: 1px dashed #ffd700;
}

.article-meta {
    display: flex;
    gap: 15px;
    margin: 15px 0;
    color: #b8a58e;
    font-size: 13px;
}

.meta-status {
    padding: 3px 10px;
    border-radius: 20px;
    font-weight: 600;
}

.meta-status.published {
    background: rgba(39,174,96,0.2);
    color: #27ae60;
    border: 1px solid #27ae60;
}

.meta-status.draft {
    background: rgba(231,76,60,0.2);
    color: #e74c3c;
    border: 1px solid #e74c3c;
}

.article-actions .button.small {
    padding: 8px 16px;
    font-size: 13px;
    background: linear-gradient(145deg, #3f2e22, #2b1e0e);
    border: 1px solid #b8860b;
    color: #ffd966;
}

/* Достижения */
.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.achievement-card {
    background: linear-gradient(145deg, rgba(44,30,21,0.95), rgba(26,17,12,0.95));
    border: 2px solid #a0522d;
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 6px 15px #000;
    transition: all 0.3s;
}

.achievement-card:hover {
    border-color: #ffd700;
    box-shadow: 0 0 25px rgba(255,215,0,0.2);
}

.achievement-icon {
    font-size: 48px;
    margin-bottom: 10px;
    color: #ffd966;
    filter: drop-shadow(0 0 8px gold);
}

.achievement-name {
    font-size: 18px;
    font-weight: 700;
    color: #ffd966;
    margin-bottom: 8px;
}

.achievement-desc {
    color: #c4b5a0;
    font-size: 13px;
    margin-bottom: 10px;
}

.achievement-date {
    color: #b8860b;
    font-size: 12px;
    font-weight: 600;
}

/* Задания */
.quests-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 20px 0;
}

.quest-card {
    background: linear-gradient(145deg, rgba(44,30,21,0.95), rgba(26,17,12,0.95));
    border-radius: 16px;
    padding: 20px;
    border-left: 6px solid #a0522d;
    box-shadow: 0 5px 15px #000;
}

.quest-card.weekly {
    border-left-color: #9b59b6;
}

.quest-card.completed {
    border-left-color: #27ae60;
    background: rgba(39,174,96,0.1);
}

.quest-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.quest-name {
    font-size: 18px;
    font-weight: 700;
    color: #ffd966;
}

.quest-badge {
    background: #27ae60;
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.quest-desc {
    color: #c4b5a0;
    margin-bottom: 15px;
    line-height: 1.5;
}

.quest-progress {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}

.progress-bar {
    flex: 1;
    height: 12px;
    background: rgba(0,0,0,0.4);
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #8b5a2b;
}

.progress-bar div {
    height: 100%;
    background: linear-gradient(90deg, #d4af37, #b8860b);
    transition: width 0.3s;
}

.progress-text {
    min-width: 60px;
    text-align: right;
    color: #ffd966;
    font-weight: 600;
}

.quest-reward {
    color: #f39c12;
    font-size: 14px;
    font-weight: 500;
    margin-top: 10px;
}

/* ===== НАСТРОЙКИ (ТЁМНАЯ ВЕРСИЯ) ===== */
.settings-category {
    background: linear-gradient(145deg, rgba(44,30,21,0.98), rgba(26,17,12,0.98));
    border-radius: 18px;
    border: 2px solid #a0522d;
    margin-bottom: 25px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.7), inset 0 0 30px rgba(212,175,55,0.08);
    overflow: hidden;
}

.category-header {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 18px 25px;
    background: linear-gradient(145deg, rgba(91,69,50,0.9), rgba(70,50,35,0.95));
    cursor: pointer;
    border-bottom: 2px solid #b8860b;
    position: relative;
}

.category-icon {
    font-size: 26px;
    color: #ffd966;
}

.category-title {
    flex: 1;
    font-size: 20px;
    font-weight: 700;
    color: #ffd966;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.category-toggle {
    font-size: 18px;
    color: #ffd966;
    transition: transform 0.3s;
}

.category-card.collapsed .category-toggle {
    transform: rotate(-90deg);
}

.category-card.collapsed .category-content {
    display: none;
}

.category-content {
    padding: 25px;
    background: rgba(0,0,0,0.2);
}

.setting-item {
    margin-bottom: 20px;
    padding: 18px 20px;
    background: rgba(0,0,0,0.3);
    border-radius: 12px;
    border-left: 4px solid #8b5a2b;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
}

.setting-item:hover {
    border-left-color: #ffd700;
    background: rgba(0,0,0,0.4);
}

.setting-info {
    flex: 1;
    min-width: 250px;
}

.setting-name {
    font-size: 18px;
    font-weight: 600;
    color: #ffd966;
    margin-bottom: 5px;
}

.setting-description {
    font-size: 14px;
    color: #b8a58e;
    line-height: 1.5;
}

.setting-control {
    display: contents;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.setting-status {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    background: rgba(0,0,0,0.4);
    border: 1px solid;
}

.setting-status.status-on {
    color: #27ae60;
    border-color: #27ae60;
}

.setting-status.status-off {
    color: #e74c3c;
    border-color: #e74c3c;
}

/* Современный переключатель (уже есть в portal.css, но убедимся, что он тёмный) */
.modern-toggle {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 30px;
}

.modern-toggle .original-checkbox {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(145deg, #3f2e22, #2b1e0e);
    border: 2px solid #8b5a2b;
    border-radius: 30px;
    transition: 0.3s;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 2px;
    bottom: 2px;
    background: linear-gradient(145deg, #ffd966, #b8860b);
    border-radius: 50%;
    transition: 0.3s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.original-checkbox:checked + .toggle-slider {
    background: linear-gradient(145deg, #b8860b, #8b5a2b);
    border-color: #ffd700;
}

.original-checkbox:checked + .toggle-slider:before {
    transform: translateX(30px);
    background: #fff8e7;
    box-shadow: 0 0 10px gold;
}

.setting-hint {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #3f2e22;
    color: #ffd966;
    font-weight: bold;
    cursor: help;
    position: relative;
    border: 1px solid #b8860b;
    transition: all 0.2s;
}

.setting-hint:hover {
    background: #b8860b;
    color: #1f140c;
}

.setting-hint .hint-tooltip {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    bottom: 150%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(44,30,21,0.98);
    color: #f0e6d2;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 13px;
    white-space: nowrap;
    border: 2px solid #b8860b;
    box-shadow: 0 5px 20px rgba(0,0,0,0.8);
    z-index: 100;
    transition: opacity 0.2s, visibility 0.2s;
    pointer-events: none;
    min-width: 200px;
    text-align: center;
    line-height: 1.4;
}

.setting-hint .hint-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #b8860b transparent transparent transparent;
}

.setting-hint:hover .hint-tooltip {
    visibility: visible;
    opacity: 1;
}

/* Стилизованный селект */
.styled-select {
    background: linear-gradient(145deg, #3f2e22, #2b1e0e);
    border: 2px solid #8b5a2b;
    color: #ffd966;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='%23ffd966'><path d='M7 10l5 5 5-5z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 15px center;
    padding-right: 40px;
    min-width: 200px;
}

.styled-select:hover {
    border-color: #ffd700;
    box-shadow: 0 0 10px rgba(255,215,0,0.3);
}

.styled-select option {
    background: #2b1e0e;
    color: #ffd966;
}

/* Цветной инпут */
input[type="color"] {
    width: 60px;
    height: 40px;
    background: transparent;
    border: 2px solid #b8860b;
    border-radius: 5px;
    cursor: pointer;
}

/* Кнопка сохранения */
#save-settings-btn {
    background: linear-gradient(145deg, #a0522d, #8b4513);
    border: 2px solid #b8860b;
    border-radius: 12px;
    padding: 14px 40px;
    font-size: 18px;
    font-weight: 700;
    color: #ffd966;
    text-transform: uppercase;
    box-shadow: 0 5px 0 #3f2e22, 0 8px 20px #000;
    transition: all 0.3s;
    cursor: pointer;
}

#save-settings-btn:hover {
    background: linear-gradient(145deg, #8b4513, #5d2906);
    transform: translateY(-2px);
    box-shadow: 0 7px 0 #3f2e22, 0 12px 25px #000, 0 0 20px gold;
    color: #fff;
}

/* Уведомления */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    background: linear-gradient(145deg, rgba(39,174,96,0.95), rgba(46,204,113,0.9));
    color: white;
    border-radius: 10px;
    border: 2px solid #27ae60;
    box-shadow: 0 5px 25px rgba(0,0,0,0.3);
    z-index: 9999;
    font-weight: 600;
    transform: translateX(150%);
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    font-family: 'Palatino Linotype', serif;
    font-size: 14px;
    max-width: 350px;
}

.notification.error {
    background: linear-gradient(145deg, rgba(178,34,34,0.95), rgba(139,0,0,0.9));
    border-color: #8b0000;
    color: #ffd700;
}
/* ===== ЛЕНТА СТАТЕЙ ===== */
.profile-feed {
    margin-top: 30px;
    padding: 0 10px;
}

.feed-actions-bar {
    margin-bottom: 20px;
    text-align: right;
}

.feed-item {
    background: linear-gradient(145deg, rgba(44,30,21,0.95), rgba(26,17,12,0.95));
    border-radius: 16px;
    border: 2px solid #a0522d;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.6), inset 0 0 20px rgba(212,175,55,0.05);
    transition: all 0.3s ease;
}

.feed-item:hover {
    border-color: #ffd700;
    box-shadow: 0 12px 30px rgba(0,0,0,0.8), 0 0 25px rgba(255,215,0,0.2);
}

.feed-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 10px;
}

.feed-item-header h3 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: #ffd966;
}

.feed-item-header h3 a {
    color: #ffd966;
    text-decoration: none;
    border-bottom: 1px dashed transparent;
    transition: border-color 0.2s;
}

.feed-item-header h3 a:hover {
    border-bottom: 1px dashed #ffd700;
}

.draft-badge {
    background: rgba(231,76,60,0.2);
    color: #e74c3c;
    border: 1px solid #e74c3c;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.feed-item-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    color: #b8a58e;
    font-size: 14px;
}

.feed-item-excerpt {
    color: #e6d5b8;
    line-height: 1.7;
    margin-bottom: 20px;
    font-size: 16px;
    border-left: 3px solid #b8860b;
    padding-left: 15px;
}

.feed-item-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

.feed-item-actions .button.small {
    background: linear-gradient(145deg, #3f2e22, #2b1e0e);
    border: 1px solid #b8860b;
    color: #ffd966;
    padding: 8px 16px;
    font-size: 14px;
    border-radius: 8px;
    transition: all 0.2s;
    text-decoration: none;
}

.feed-item-actions .button.small:hover {
    background: #b8860b;
    color: #1f140c;
    border-color: #ffd700;
    transform: translateY(-2px);
}

.no-data {
    text-align: center;
    color: #b8a58e;
    padding: 40px;
    font-size: 18px;
    background: rgba(0,0,0,0.2);
    border-radius: 12px;
    border: 1px dashed #b8860b;
}
/* Поиск пользователей в шапке */
.header-search {
    position: relative;
    margin-left: 20px;
}
.header-search input {
    width: 100%;
    background: #3f2e22;
    border: 2px solid #b8860b;
    border-radius: 30px;
    padding: 8px 15px;
    color: #fff;
    font-size: 14px;
}
.header-search input:focus {
    outline: none;
    border-color: #ffd700;
    box-shadow: 0 0 10px gold;
}
.header-search .search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #2a1e15;
    border: 2px solid #b8860b;
    border-radius: 10px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}
.header-search .search-result-item {
    padding: 10px 15px;
    cursor: pointer;
    color: #fff;
    border-bottom: 1px solid #3f2e22;
}
.header-search .search-result-item:hover {
    background: #b8860b;
    color: #1f140c;
}


/* Страница подписок */
.subscribers-page {
    padding: 20px 0;
}
.sub-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #8b5a2b;
    padding-bottom: 10px;
}
.sub-tab {
    padding: 8px 20px;
    background: rgba(0,0,0,0.3);
    border-radius: 30px;
    color: #fff8e7;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
}
.sub-tab.active {
    background: linear-gradient(145deg, #b8860b, #8b5a2b);
    color: #1f140c;
}
.sub-tab .count {
    margin-left: 5px;
    font-size: 12px;
    background: rgba(255,255,255,0.2);
    padding: 2px 8px;
    border-radius: 20px;
}
/* ===== УЛУЧШЕННЫЕ КАРТОЧКИ ПОЛЬЗОВАТЕЛЕЙ ===== */
.users-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.user-card {
    background: linear-gradient(145deg, rgba(44,30,21,0.95), rgba(26,17,12,0.95));
    border-radius: 16px;
    padding: 18px;
    display: flex;
    align-items: center;
    gap: 15px;
    border: 2px solid #8b5a2b;
    box-shadow: 0 6px 15px rgba(0,0,0,0.6);
    transition: all 0.3s ease;
    position: relative;
    backdrop-filter: blur(4px);
}

.user-card:hover {
    border-color: #ffd700;
    box-shadow: 0 10px 25px rgba(0,0,0,0.8), 0 0 20px rgba(255,215,0,0.2);
    transform: translateY(-3px);
}

.user-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #b8860b;
    box-shadow: 0 0 15px rgba(0,0,0,0.5);
    flex-shrink: 0;
    transition: transform 0.2s;
}

.user-avatar:hover {
    transform: scale(1.05);
    border-color: #ffd700;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-info {
    flex: 1;
    min-width: 0; /* чтобы текст не вылезал */
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.user-nick {
    display: block;
    color: #ffd966;
    font-weight: 700;
    font-size: 18px;
    text-decoration: none;
    line-height: 1.3;
    word-break: break-word;
    text-shadow: 1px 1px 2px #000, 0 0 8px rgba(255,215,0,0.3);
    transition: color 0.2s;
}

.user-nick:hover {
    color: #ffd700;
    text-decoration: underline;
}

.user-level {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    color: #b8a58e;
    background: rgba(0,0,0,0.3);
    padding: 3px 10px;
    border-radius: 20px;
    width: fit-content;
    border: 1px solid #8b5a2b;
}

.user-level::before {
    content: "⭐";
    font-size: 12px;
    filter: drop-shadow(0 0 3px gold);
}

.subscribed-date {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: #8b5a2b;
    background: rgba(0,0,0,0.2);
    padding: 2px 8px;
    border-radius: 20px;
    width: fit-content;
}

.subscribed-date::before {
    content: "📅";
    font-size: 11px;
}

/* Кнопка подписки в карточке */
.subscribe-small {
    background: rgba(0,0,0,0.3);
    border: 2px solid #b8860b;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 20px;
    font-weight: bold;
    color: #ffd966;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.5);
    padding: 0;
}

.subscribe-small:hover {
    background: #b8860b;
    color: #1f140c;
    border-color: #ffd700;
    transform: scale(1.1);
}

/* Адаптация для мобильных */
@media (max-width: 600px) {
    .user-card {
        flex-wrap: wrap;
        justify-content: center;
        text-align: center;
    }
    .user-info {
        align-items: center;
    }
    .user-level, .subscribed-date {
        width: 100%;
        justify-content: center;
    }
}
.search-users-form {
    position: relative;
    margin: 20px 0;
}
.search-users-form input {
    width: 100%;
    padding: 10px 15px;
    background: #3f2e22;
    border: 2px solid #b8860b;
    border-radius: 30px;
    color: #fff;
    font-size: 16px;
}
.search-users-form .search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #2a1e15;
    border: 2px solid #b8860b;
    border-radius: 10px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}
.search-users-form .search-result-item {
    padding: 10px 15px;
    cursor: pointer;
    color: #fff;
    border-bottom: 1px solid #3f2e22;
}
.search-users-form .search-result-item:hover {
    background: #b8860b;
    color: #1f140c;
}

/* ===== УЛУЧШЕННЫЙ БЛОК ПОДПИСОК В ПРОФИЛЕ ===== */
.profile-follow-stats {
    display: flex;
    gap: 30px;
    margin: 25px 0 15px;
    padding: 20px 25px;
    background: linear-gradient(145deg, rgba(44,30,21,0.9), rgba(26,17,12,0.9));
    border-radius: 16px;
    border: 2px solid #a0522d;
    box-shadow: 0 8px 20px rgba(0,0,0,0.5), inset 0 0 20px rgba(212,175,55,0.1);
    position: relative;
    backdrop-filter: blur(4px);
}

.follow-block {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 16px;
    padding: 20px 15px;
    padding-left: 30px;
    text-align: center;
    border: 1px solid #8b5a2b;
    box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.5);
    transition: transform 0.2s;
}


.follow-label {
    color: #d4b28c;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-left: 5px;
}

.follow-count {
    display: inline-block;
    font-size: 28px;
    font-weight: 800;
    color: #ffd966;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    line-height: 1.2;
    margin-left: 5px;
    text-shadow: 0 0 10px rgba(255,215,0,0.3);
}

.follow-count:hover {
    color: #ffd700;
    border-bottom-color: #ffd700;
    transform: scale(1.05);
}

.follow-avatars {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 5px;
}

.follow-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #b8860b;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
    transition: all 0.2s;
}

.follow-avatar:hover {
    transform: translateY(-3px) scale(1.1);
    border-color: #ffd700;
    box-shadow: 0 5px 15px rgba(255,215,0,0.3);
}

.follow-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


/* Каналы в профиле */
.profile-channels {
    margin-top: 20px;
}
.profile-channels h2 {
    color: #ffd966;
    font-size: 24px;
    margin-bottom: 20px;
    border-bottom: 2px solid #b8860b;
    padding-bottom: 10px;
}
.profile-channels .channels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}
.profile-channels .channel-card {
    background: linear-gradient(145deg, rgba(44,30,21,0.95), rgba(26,17,12,0.95));
    border: 2px solid #8b5a2b;
    border-radius: 16px;
    padding: 15px;
    display: flex;
    gap: 15px;
    transition: all 0.3s;
}
.profile-channels .channel-card:hover {
    border-color: #ffd700;
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.7);
}
.profile-channels .channel-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #b8860b;
    flex-shrink: 0;
}
.profile-channels .channel-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.profile-channels .channel-info {
    flex: 1;
}
.profile-channels .channel-info h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
}
.profile-channels .channel-info h3 a {
    color: #ffd966;
    text-decoration: none;
}
.profile-channels .channel-info h3 a:hover {
    text-decoration: underline;
}
.profile-channels .channel-description {
    color: #e6d5b8;
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 10px;
    max-height: 60px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.profile-channels .channel-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 13px;
}
.profile-channels .members-count,
.profile-channels .channel-role,
.profile-channels .channel-joined {
    background: rgba(0,0,0,0.3);
    padding: 4px 8px;
    border-radius: 20px;
    border: 1px solid #8b5a2b;
    color: #ffd966;
}