/* ========== portal.css — ОПТИМИЗИРОВАННАЯ ВЕРСИЯ ========== */
/* Объединены все стили, устранены дублирования, медиа-запросы вынесены в конец */

/* ===== ПЕРЕМЕННЫЕ ===== */
:root {
    --portal-bg: rgba(26, 17, 12, 0.35);
    --portal-gold: #d4af37;
    --portal-gold-light: #f5e6b3;
    --portal-red: #a84444;
    --portal-brown: #5a3e2b;
    --portal-light: #f0e6d2;
    --portal-shadow: 0 10px 25px rgba(0,0,0,0.7), 0 0 0 0.5px rgba(212,175,55,0.2);
    --portal-border: 1.5px solid #8b5a2b;
    --portal-inner-glow: inset 0 0 20px rgba(212,175,55,0.08);
    --portal-gradient-gold: linear-gradient(145deg, #b8860b, #8b5a2b);
    --portal-gradient-button: linear-gradient(145deg, #a0522d, #8b4513, #a0522d);
    --portal-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    --color-primary: #8b4513;
    --color-secondary: #a0522d;
    --color-accent: #d2691e;
    --color-gold: #ffd700;
    --color-light: #f5e6d3;
    --color-dark: #5d2906;
    --color-success: #27ae60;
    --color-danger: #e74c3c;
    --color-warning: #f39c12;
    --color-info: #3498db;
    --shadow-light: 0 4px 12px rgba(139, 69, 19, 0.15);
    --shadow-medium: 0 8px 25px rgba(139, 69, 19, 0.25);
    --shadow-heavy: 0 12px 40px rgba(139, 69, 19, 0.35);
    --border-radius: 8px;
    --transition: 0.3s ease;
}

/* ===== ОБЩИЕ НАСТРОЙКИ ===== */
html, body {
    overflow-x: hidden;
    max-width: 100%;
}

h4 {
    opacity: 0.7;
}

.topPanel {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background: rgba(26, 17, 12, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid #a0522d;
    box-shadow: 0 5px 20px rgba(0,0,0,0.5);
    padding: 5px 0;
}

.topPanel .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.menuBlock {
    display: flex;
    align-items: center;
    gap: 20px;
}

.menu {
    display: flex;
    list-style: none;
}

.menu li a {
    color: #ffd966;
    font-weight: 600;
    text-transform: uppercase;
    padding: 10px 15px;
    border-radius: 8px;
    transition: background 0.3s;
}

.menu li a:hover {
    background: rgba(184, 134, 11, 0.3);
}

.profile {
    padding-top: 7px;
}
.profile-items {
    width: auto;
    min-width: 60px;
    max-width: 250px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-name {
    display: block;
    color: #fff;
    font-size: 17px;
    text-transform: uppercase;
    text-shadow: 0px 3px 2px rgba(38, 26, 16, .25);
    line-height: 34px;
}

.logout-btn {
    color: #fff;
    background: #b8860b;
    padding: 5px 10px;
    border-radius: 5px;
    text-decoration: none;
    transition: background 0.3s;
}

.logout-btn:hover {
    background: #d4a017;
}

.admin-badge {
    color: #ffaa00;
    font-weight: bold;
    margin-left: 5px;
}

.unread-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: #ff4444;
    border-radius: 50%;
    margin-left: 5px;
    box-shadow: 0 0 8px #ff0000;
    vertical-align: middle;
}

.lib-progress-indicator {
    margin-left: 5px;
    font-size: 0.8em;
    color: #ffd966;
}

#blink1 {
    -webkit-animation: blink1 3s linear infinite;
    animation: blink1 3s linear infinite;
}

@-webkit-keyframes blink1 {
    0% { color: rgba(20, 255, 16, 1); }
    50% { color: rgba(20, 255, 16, 0); }
    100% { color: rgba(20, 255, 16, 1); }
}

@keyframes blink1 {
    0% { color: rgba(20, 255, 16, 1); }
    50% { color: rgba(20, 255, 16, 0); }
    100% { color: rgba(20, 255, 16, 1); }
}

/* ===== СТРАНИЦА НОВОСТЕЙ ===== */
.news-page {
    font-family: 'Palatino Linotype', 'Book Antiqua', Palatino, 'Philosopher', serif;
    background: transparent;
}

.news-page .content {
    background: var(--portal-bg);
    backdrop-filter: blur(10px);
    border-radius: 32px;
    box-shadow: var(--portal-shadow), var(--portal-inner-glow);
    border: var(--portal-border);
    margin: 20px 0;
    position: relative;
    overflow: hidden;
    transition: var(--portal-transition);
    max-width: 100%;
    overflow-x: hidden;
    padding: 30px 25px;
}

.news-page .content:hover {
    box-shadow: 0 15px 35px rgba(0,0,0,0.8), 0 0 0 1px rgba(212,175,55,0.4), inset 0 0 30px rgba(212,175,55,0.12);
}

.news-page .content::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image:
            repeating-linear-gradient(45deg, transparent 0px, transparent 2px, rgba(212,175,55,0.02) 2px, rgba(212,175,55,0.02) 4px),
            radial-gradient(circle at 20% 30%, rgba(210,180,140,0.05) 0%, transparent 20%),
            radial-gradient(circle at 80% 70%, rgba(139,69,19,0.05) 0%, transparent 30%);
    pointer-events: none;
    z-index: 0;
}

.news-page .page-title {
    background: linear-gradient(145deg, rgba(44,30,21,0.9), rgba(26,17,12,0.9)) !important;
    padding: 15px 25px !important;
    margin: 0 0 25px 0 !important;
    border: 2px solid #a0522d;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5), inset 0 0 15px rgba(255,215,0,0.1);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 2;
}

.news-page .page-title h1 {
    font-size: 42px;
    font-weight: 800;
    margin: 0;
    color: #ffd966;
    text-shadow: 2px 2px 0 #2b1e0e;
    letter-spacing: 2px;
    text-transform: uppercase;
    border: none;
}

/* Вкладки категорий */
.news-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 25px;
    padding: 10px;
    background: rgba(0,0,0,0.3);
    border-radius: 10px;
    border: 1px solid #6b4f2a;
    box-shadow: inset 0 1px 4px #000;
}

.news-tab {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    color: #fff8e7;
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: var(--portal-transition);
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 3px 0 #3f2e22, 0 5px 12px #000;
    background: linear-gradient(145deg, #a0522d, #8b4513, #a0522d);
    border: none;
    border-radius: 8px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
    min-height: 44px;
    flex: 0 1 auto;
    position: relative;
    overflow: hidden;
}

.news-tab::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;
    z-index: 0;
}

.news-tab:hover {
    background: linear-gradient(145deg, #8b4513, #5d2906, #8b4513);
    transform: translateY(-2px);
    box-shadow: 0 5px 18px rgba(139,69,19,0.35), 0 0 15px rgba(255,215,0,0.15);
    color: #ffd700 !important;
}

.news-tab:hover::before {
    left: 100%;
}

.news-tab.active {
    background: var(--portal-gradient-gold);
    border-color: #ffe68f;
    color: #1f140c !important;
    font-weight: 700;
    box-shadow: 0 5px 0 #5a3e2b, 0 0 20px #ffd700, inset 0 0 10px #fff8e7;
    pointer-events: none;
}

/* Карточка новости */
.news-card {
    background: rgba(91, 69, 50, 0.7);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 30px;
    border: 2px solid #b07d44;
    box-shadow: inset 0 0 40px rgba(0,0,0,0.7), 0 10px 25px #000, 0 0 0 1px #d4af37 inset;
    position: relative;
    transition: var(--portal-transition);
}

.news-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.8), 0 0 0 2px #d4af37 inset;
}

.news-card::before {
    content: '';
    position: absolute;
    top: 8px; left: 8px; right: 8px; bottom: 8px;
    border: 1px dashed rgba(212,175,55,0.3);
    border-radius: 11px;
    pointer-events: none;
    z-index: 0;
}

.news-card .news_info {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    position: relative;
    z-index: 1;
    flex-wrap: wrap;
}

.news-card .news_ava {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid #d4af37;
    box-shadow: 0 0 15px rgba(212,175,55,0.5);
    overflow: hidden;
    background: #2b1e0e;
    display: flex;
    align-items: center;
    justify-content: center;
}

.news-card .news_ava img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-card .news_cont_text {
    flex: 1;
    min-width: 200px;
}

.news-card .news-Title {
    margin-bottom: 10px;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 5px 10px;
}

.news-card .news-Title .news_type {
    display: none;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    background: rgba(212,175,55,0.2);
    border: 1px solid #d4af37;
    color: #ffd966;
}

.news-card .news-Title b {
    font-size: 20px;
    color: #fff8e7;
    text-shadow: 1px 1px 2px #000;
    font-weight: 700;
    text-transform: uppercase;
    word-break: break-word;
}

.news-card .news-Title .color-green {
    color: #d4af37;
    font-size: 14px;
    font-style: italic;
    margin-left: auto;
    white-space: nowrap;
}

.news-card .rank-lvl {
    color: #f5e6d3;
    font-size: 16px;
    line-height: 1.6;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #b07d44;
    word-break: break-word;
}

.news-card .rank-lvl p {
    margin-bottom: 10px;
}

.news-card .rank-lvl a {
    color: #ffd966;
    text-decoration: none;
    border-bottom: 1px dotted #d4af37;
}

.news-card .rank-lvl a:hover {
    color: #fff;
    border-bottom: 1px solid #ffd700;
    text-shadow: 0 0 8px gold;
}

/* Детальная новость */
.news-detail .news-card {
    margin-bottom: 0;
}

/* ===== СТРАНИЦА БИБЛИОТЕКИ ===== */
.lib-page, .profile-page {
    font-family: 'Palatino Linotype', 'Book Antiqua', Palatino, 'Philosopher', serif;
    background: transparent;
}

.lib-page .content, .profile-page .content {
    background: var(--portal-bg);
    backdrop-filter: blur(10px);
    border-radius: 32px;
    padding: 30px 40px;
    box-shadow: var(--portal-shadow), var(--portal-inner-glow);
    border: var(--portal-border);
    margin: 20px 0;
    position: relative;
    overflow: hidden;
    transition: var(--portal-transition);
}

.lib-page .content:hover, .profile-page .content:hover {
    box-shadow: 0 15px 35px rgba(0,0,0,0.8), 0 0 0 1px rgba(212,175,55,0.4), inset 0 0 30px rgba(212,175,55,0.12);
}

.lib-page .content::before, .profile-page .content::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image:
            repeating-linear-gradient(45deg, transparent 0px, transparent 2px, rgba(212,175,55,0.02) 2px, rgba(212,175,55,0.02) 4px),
            radial-gradient(circle at 20% 30%, rgba(210,180,140,0.05) 0%, transparent 20%),
            radial-gradient(circle at 80% 70%, rgba(139,69,19,0.05) 0%, transparent 30%);
    pointer-events: none;
    z-index: 0;
}

.lib-page .page-title, .profile-page .page-title {
    background: linear-gradient(145deg, rgba(44,30,21,0.9), rgba(26,17,12,0.9)) !important;
    padding: 15px 25px 15px 100px !important;
    margin: 0 0 25px 0 !important;
    border: 2px solid #a0522d;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5), inset 0 0 15px rgba(255,215,0,0.1);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 2;
}

.lib-page .page-title h1, .profile-page .page-title h1 {
    font-size: 34px;
    font-weight: 100;
    margin: 0;
    color: #ffd966;
    text-shadow: 2px 2px 0 #2b1e0e;
    letter-spacing: 2px;
    text-transform: uppercase;
    border: none;
}

/* Вкладки библиотеки */
.lib-tabs {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 25px;
    padding: 10px;
    background: rgba(0,0,0,0.3);
    border-radius: 10px;
    border: 1px solid #6b4f2a;
    box-shadow: inset 0 1px 4px #000;
}

.lib-tab {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 8px;
    color: #fff8e7;
    font-size: clamp(0.8rem, 1.5vw, 1rem);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
    transition: var(--portal-transition);
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 3px 0 #3f2e22, 0 5px 12px #000;
    position: relative;
    overflow: hidden;
    background: linear-gradient(145deg, #a0522d, #8b4513, #a0522d);
    border: none;
    border-radius: 8px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
    min-height: 44px;
    word-break: break-word;
    white-space: normal;
}

.lib-tab::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;
    z-index: 0;
}

.lib-tab:hover {
    background: linear-gradient(145deg, #8b4513, #5d2906, #8b4513);
    transform: translateY(-2px);
    box-shadow: 0 5px 18px rgba(139,69,19,0.35), 0 0 15px rgba(255,215,0,0.15);
    color: #ffd700 !important;
}

.lib-tab:hover::before {
    left: 100%;
}

.lib-tab.active {
    background: var(--portal-gradient-gold);
    border-color: #ffe68f;
    color: #1f140c !important;
    font-weight: 700;
    box-shadow: 0 5px 0 #5a3e2b, 0 0 20px #ffd700, inset 0 0 10px #fff8e7;
    pointer-events: none;
}

/* Подменю библиотеки */
.lib-submenu {
    list-style: none;
    padding: 12px 16px;
    margin: 20px 0 30px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    background: linear-gradient(145deg, #2f241b, #1f150e);
    border-radius: 10px;
    border: 1.5px solid #a0522d;
    box-shadow: inset 0 2px 5px #000, 0 6px 12px rgba(0,0,0,0.6);
    position: relative;
    z-index: 2;
}

.lib-submenu li {
    margin: 0;
    padding: 0;
    flex: 0 1 auto;
}

.lib-submenu a {
    display: block;
    padding: 10px 24px;
    background: linear-gradient(145deg, #3f2e22, #2b1e0e);
    border-radius: 10px;
    color: #fff8e7;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    border: 1.5px solid #8b5a2b;
    transition: all 0.2s ease;
    white-space: nowrap;
    box-shadow: 0 2px 0 #3f2e22, 0 4px 8px #000;
    position: relative;
    overflow: hidden;
}

.lib-submenu a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,215,0,0.15), transparent);
    transition: left 0.3s;
}

.lib-submenu a:hover {
    background: linear-gradient(145deg, #5a3e2b, #3f2e22);
    border-color: #ffd700;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 0 #3f2e22, 0 6px 12px #000, 0 0 12px #ffd700;
}

.lib-submenu a:hover::before {
    left: 100%;
}

.lib-submenu .lib_act_men a {
    background: linear-gradient(145deg, #b8860b, #8b5a2b);
    border-color: #ffe68f;
    color: #fff9f2;
    font-weight: 700;
    box-shadow: 0 0 15px gold, inset 0 0 8px #fff3b0;
    cursor: default;
    pointer-events: none;
    text-shadow: none;
}

/* Основная контентная область библиотеки */
.lib-content {
    background: rgba(26,17,12,0.75);
    backdrop-filter: blur(6px);
    border-radius: 15px;
    padding: 45px 45px;
    border: 2px solid #b07d44;
    box-shadow: inset 0 0 40px rgba(0,0,0,0.7), 0 10px 25px #000, 0 0 0 1px #d4af37 inset;
    position: relative;
    z-index: 1;
    color: #f5e6d3;
    font-size: clamp(16px, 4vw, 18px);
    line-height: 1.7;
    word-wrap: break-word;
    animation: libFadeIn 0.6s ease-out;
}

@keyframes libFadeIn {
    0% { opacity: 0; transform: translateY(10px); }
    100% { opacity: 1; transform: translateY(0); }
}

.lib-content::before {
    content: '';
    position: absolute;
    top: 8px; left: 8px; right: 8px; bottom: 8px;
    border: 1px dashed rgba(212,175,55,0.3);
    border-radius: 11px;
    pointer-events: none;
    z-index: 0;
}

.lib-content::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle at 20% 30%, rgba(212,175,55,0.03) 0%, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(160,82,45,0.05) 0%, transparent 50%);
    pointer-events: none;
    border-radius: 18px;
}

.lib-content h1.news-title {
    font-size: 48px;
    margin: 0 0 25px 0;
    color: #ffd966;
    text-shadow: 2px 2px 0 #2b1e0e;
    border-left: 10px solid #a84444;
    padding-left: 30px;
    line-height: 1.2;
    font-weight: 700;
    word-break: break-word;
}

.lib-content .rank-lvl {
    color: #f5e6d3;
    font-size: 18px;
    line-height: 1.7;
    font-family: 'Open Sans', 'Segoe UI', sans-serif;
    position: relative;
    z-index: 2;
    word-wrap: break-word;
}

.lib-content p {
    margin-bottom: 25px;
}

.lib-content a {
    color: #ffd966;
    text-decoration: none;
    border-bottom: 1px dotted #d4af37;
    transition: all 0.2s;
    font-weight: 500;
    word-break: break-word;
}

.lib-content a:hover {
    color: #fff;
    border-bottom: 1px solid #ffd700;
    text-shadow: 0 0 8px gold, 0 0 15px #ffaa00;
}

.lib-content strong, .lib-content b {
    color: #ffe8b5;
    font-weight: 700;
}

.lib-content em, .lib-content i {
    color: #e0cba0;
    font-style: italic;
}

/* Таблицы с артефактами */
table.artifact-table {
    display: inline-block;
    margin: 10px;
    border: 2px solid #d4af37;
    border-radius: 16px;
    overflow: visible;
    box-shadow: 0 0 20px rgba(212,175,55,0.4);
    transition: transform 0.2s, box-shadow 0.2s;
    max-width: 100%;
}

@media (hover: hover) {
    .lib-content table.artifact-table:hover {
        transform: scale(1.05) rotate(0.5deg);
        box-shadow: 0 0 30px gold;
    }
}

table.artifact-table td {
    padding: 0 !important;
    background: rgba(20,15,10,0.05);
}

table.artifact-table img {
    display: block;
    border: none;
    box-shadow: none;
    margin: 0;
    max-width: 100%;
}

.lib-content .artifact-table-container {
    overflow-x: auto;
    white-space: nowrap;
    padding: 10px 0;
    -webkit-overflow-scrolling: touch;
}

.lib-content .artifact-table-container .artifact-table {
    display: inline-block;
    margin: 0 5px;
}

.lib-content img {
    max-width: 100%;
    height: auto;
    border-radius: 20px;
    border: 3px solid #d4af37;
    box-shadow: 0 0 25px rgba(0,0,0,0.8), 0 0 15px #b8860b;
    margin: 25px 0;
    transition: transform 0.3s, box-shadow 0.3s;
}

.lib-content img:hover {
    transform: scale(1.02);
    box-shadow: 0 0 35px #ffd700, 0 0 0 2px #fff3b0;
}

.lib-content .lib_img {
    text-align: center;
}

.lib-content ul, .lib-content ol {
    padding-left: 40px;
    margin: 20px 0;
}

.lib-content li {
    margin-bottom: 12px;
    line-height: 1.6;
}

.lib-content li::marker {
    color: #d4af37;
}

.lib-content blockquote {
    border-left: 6px solid #d4af37;
    background: rgba(212,175,55,0.08);
    padding: 20px 30px;
    font-style: italic;
    border-radius: 0 30px 30px 0;
    margin: 30px 0;
    box-shadow: inset 0 0 15px rgba(0,0,0,0.5);
    color: #f0ddc0;
}

.lib-content blockquote p:last-child {
    margin-bottom: 0;
}

/* Навигация (предыдущая / следующая) */
.lib-navigation {
    display: flex;
    gap: 15px;
    margin-top: 45px;
    padding-top: 20px;
    border-top: 2px dashed #b8860b;
}

.lib-navigation a {
    flex: 1;
    text-align: center;
    padding: 14px 20px;
    background: linear-gradient(145deg, #3f2e22, #2b1e0e);
    border: 2px solid #b8860b;
    border-radius: 50px;
    color: #fff8e7 !important;
    font-weight: 700;
    font-size: 18px;
    text-decoration: none !important;
    letter-spacing: 0.5px;
    transition: all 0.25s ease;
    box-shadow: 0 5px 0 #3f2e22, 0 8px 15px #000;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lib-navigation a:first-child::before {
    content: "← ";
    font-size: 1.2em;
}

.lib-navigation a:last-child::after {
    content: " →";
    font-size: 1.2em;
}

.lib-navigation a:hover {
    background: #b8860b;
    color: #1f140c !important;
    border-color: #ffd700;
    transform: translateY(-2px);
    box-shadow: 0 7px 0 #3f2e22, 0 12px 20px #000, 0 0 20px gold;
}

/* Пустое состояние */
.no-data-message {
    font-size: 28px;
    color: #c0b09a;
    text-align: center;
    padding: 70px 20px;
    background: rgba(0,0,0,0.4);
    border-radius: 20px;
    border: 2px dashed #b8860b;
    box-shadow: inset 0 0 30px #000;
}

/* Стили качества артефактов */
a.macros_artifact_quality0,
span.macros_artifact_quality0 { color: #a5a5a5 !important; font-weight: bold; }
a.macros_artifact_quality1,
span.macros_artifact_quality1 { color: #5cff69 !important; font-weight: bold; }
a.macros_artifact_quality2,
span.macros_artifact_quality2 { color: #23b2e9 !important; font-weight: bold; }
a.macros_artifact_quality3,
span.macros_artifact_quality3 { color: #f11dff !important; font-weight: bold; }
a.macros_artifact_quality4,
span.macros_artifact_quality4 { color: #ff2e2e !important; font-weight: bold; }
a.macros_artifact_quality5,
span.macros_artifact_quality5 { color: #2effe2 !important; font-weight: bold; }
a.macros_artifact_quality6,
span.macros_artifact_quality6 { color: #e09100 !important; font-weight: bold; }

/* Выпадающее подменю на мобильных */
.lib-submenu-select {
    display: none;
    width: 100%;
    padding: 12px 16px;
    margin: 0 0 25px 0;
    background: #2b1e0e;
    color: #fff8e7;
    border: 2px solid #b8860b;
    border-radius: 40px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0,0,0,0.6);
}

/* ===== ФИЛЬТРЫ НОВОСТЕЙ ===== */
.news-filters {
    background: rgba(0,0,0,0.2);
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.filter-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.filter-input {
    flex: 1;
    background: #3f2e22;
    border: 1px solid #b8860b;
    color: #fff;
    padding: 10px;
    border-radius: 5px;
    min-width: 200px;
}

.filter-submit,
.date-apply {
    background: #b8860b;
    border: none;
    color: #1f140c;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    white-space: nowrap;
}

.clear-filters {
    color: #ffd966;
    font-size: 18px;
    text-decoration: none;
}

.date-range {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.date-range label {
    color: #fff;
    display: flex;
    align-items: center;
    gap: 5px;
}

.date-input {
    background: #3f2e22;
    border: 1px solid #b8860b;
    color: #fff;
    padding: 8px;
    border-radius: 5px;
}

/* ===== РЕАКЦИИ ===== */
.reactions-block {
    padding: 15px;
}

.reactions-list {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.reaction-btn {
    background: none;
    border: 1px solid #b8860b;
    border-radius: 30px;
    padding: 5px 10px;
    cursor: pointer;
    color: #fff;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 16px;
}

.reaction-btn.active {
    background: #b8860b !important;
    color: #1f140c !important;
    border-color: #ffd966 !important;
    box-shadow: 0 0 10px gold;
}

.reaction-btn .count {
    margin-left: 3px;
    font-weight: 600;
}

/* ===== КОММЕНТАРИИ ===== */
.comments-block {
    margin-top: 20px;
}

.comment-item {
    background: rgba(0,0,0,0.25);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    border-left: 4px solid #b8860b;
    box-shadow: 0 3px 8px rgba(0,0,0,0.3);
    transition: var(--portal-transition);
}

.comment-item:hover {
    background: rgba(0,0,0,0.35);
    border-left-color: #ffd700;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.comment-author a {
    font-weight: 600;
    text-decoration: none;
    color: #ffd966;
}

.comment-author a:hover {
    text-decoration: underline;
}

.comment-date {
    color: #aaa;
    font-size: 0.9em;
}

.comment-body {
    color: #f0e6d2;
    line-height: 1.6;
    margin-bottom: 8px;
    word-break: break-word;
}

.edited-mark {
    font-size: 0.8em;
    color: #aaa;
    margin-left: 10px;
}

.comment-actions {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.comment-actions button {
    background: none;
    border: 1px solid #b8860b;
    border-radius: 5px;
    padding: 4px 10px;
    color: #fff;
    cursor: pointer;
    font-size: 13px;
    transition: var(--portal-transition);
}

.comment-actions button:hover {
    background: #b8860b;
    color: #1f140c;
}

.comment-signature {
    color: #9d998c;
    font-style: italic;
}

/* Форма добавления комментария */
.add-comment-form textarea {
    width: 100%;
    background: #3f2e22;
    border: 1px solid #b8860b;
    color: #fff;
    padding: 10px;
    border-radius: 8px;
    resize: vertical;
    margin-bottom: 10px;
    font-family: inherit;
}

.add-comment-form textarea:focus {
    outline: none;
    border-color: #ffd700;
    box-shadow: 0 0 8px gold;
}

.add-comment-form button {
    background: var(--portal-gradient-button);
    border: none;
    color: #f5e6d3;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: var(--portal-transition);
    text-transform: uppercase;
    margin-bottom: 20px;
}

.add-comment-form button:hover {
    background: linear-gradient(145deg, #8b4513, #5d2906);
    transform: translateY(-2px);
    box-shadow: 0 5px 12px rgba(139,69,19,0.4);
    color: #ffd700;
}

/* ===== ЭМОДЗИ-ПИКЕР ===== */
.emoji-picker-container {
    position: relative;
    width: 40px;
    height: 40px;
    pointer-events: none;
    z-index: 5;
}

.emoji-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    pointer-events: auto;
    background: transparent;
    border: none;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    color: #b8860b;
    border-radius: 50%;
}

.emoji-toggle-btn:hover {
    color: #ffd700;
}

.emoji-panel {
    position: absolute;
    bottom: 100%;
    right: 0;
    margin-bottom: 5px;
    background: #2a1e15;
    border: 2px solid #b8860b;
    border-radius: 10px;
    padding: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.5);
    z-index: 1000;
    width: 300px;
    max-width: 90vw;
    display: none;
    pointer-events: auto;
}

.emoji-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 5px;
    max-height: 200px;
    overflow-y: auto;
}

.emoji-item {
    font-size: 1.2em;
    text-align: center;
    cursor: pointer;
    padding: 3px;
    border-radius: 5px;
    transition: background 0.2s;
}

.emoji-item:hover {
    background: #b8860b;
}

/* ===== СМАЙЛЫ/СТИКЕРЫ (общий блок) ===== */
.smiles-picker-container {
    position: relative;
    width: 40px;
    height: 40px;
    display: inline-block;
}

.smiles-toggle-btn {
    width: 100%;
    height: 100%;
    background: transparent;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #b8860b;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.smiles-toggle-btn:hover {
    color: #ffd700;
}

.smiles-panel {
    position: absolute;
    bottom: 100%;
    right: 0;
    margin-bottom: 5px;
    background: #2a1e15;
    border: 2px solid #b8860b;
    border-radius: 10px;
    padding: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.5);
    z-index: 1000;
    width: 350px;
    max-width: 90vw;
    display: none;
}

/* Улучшенная панель смайлов/стикеров (с вкладками и карточками) */
.smiles-tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 15px;
    border-bottom: 1px solid #b8860b;
    padding-bottom: 5px;
}

.smiles-tabs .tab-button {
    flex: 1;
    background: #3f2e22;
    border: 1px solid #b8860b;
    border-radius: 20px;
    padding: 6px 12px;
    color: #ffd966;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.smiles-tabs .tab-button.active {
    background: #b8860b;
    color: #1f140c;
    border-color: #ffd700;
}

.smiles-tab-content {
    display: none;
    max-height: 300px;
    overflow-y: auto;
    padding-right: 5px;
}

.smiles-tab-content.active {
    display: block;
}

.smiles-set-card,
.stickers-set-card {
    margin-bottom: 10px;
    background: rgba(0,0,0,0.3);
    border-radius: 8px;
    border: 1px solid #8b5a2b;
    overflow: hidden;
}

.set-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: rgba(184,134,11,0.2);
    cursor: pointer;
    transition: background 0.2s;
}

.set-header:hover {
    background: rgba(184,134,11,0.3);
}

.set-preview {
    font-size: 24px;
    min-width: 30px;
    text-align: center;
}

.set-preview-sticker {
    width: 30px;
    height: 30px;
    object-fit: contain;
    border-radius: 4px;
    border: 1px solid #b8860b;
    background: #2b1e0e;
}

.set-name {
    flex: 1;
    color: #ffd966;
    font-weight: 600;
    font-size: 14px;
}

.set-count {
    background: #3f2e22;
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 11px;
    color: #b8a58e;
}

.set-toggle {
    font-size: 16px;
    color: #ffd966;
    width: 20px;
    text-align: center;
}

.set-items-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
    padding: 12px;
    background: rgba(0,0,0,0.2);
    border-top: 1px dashed #8b5a2b;
}

.smile-item {
    font-size: 24px;
    text-align: center;
    cursor: pointer;
    padding: 5px;
    border-radius: 8px;
    transition: background 0.2s;
}

.smile-item:hover {
    background: #b8860b;
}

.sticker-item {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: contain;
    cursor: pointer;
    border-radius: 8px;
    transition: transform 0.2s, border-color 0.2s;
    border: 1px solid transparent;
    padding: 2px;
}

.sticker-item:hover {
    transform: scale(1.1);
    border-color: #ffd700;
    box-shadow: 0 0 10px gold;
}

/* Отображение стикера в сообщении */
.sticker {
    max-width: 100px;
    max-height: 100px;
    border-radius: 10px;
    margin: 5px 0;
    vertical-align: middle;
}

/* Редактор текста (тулбар) */
.editor-toolbar {
    position: absolute;
    right: 10px;
    top: 10px;
    display: flex;
    gap: 5px;
    z-index: 5;
    pointer-events: none;
}

.editor-toolbar .emoji-picker-container,
.editor-toolbar .smiles-picker-container {
    position: relative;
    width: 40px;
    height: 40px;
    pointer-events: auto;
}

.textarea-wrapper {
    position: relative;
}

.textarea-wrapper textarea {
    padding-right: 60px;
    padding-bottom: 40px;
    min-height: 70px;
}



/* ===== ЛЕНТА АКТИВНОСТИ ===== */
.activity-feed {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 370px;
    background: #2a1e15;
    border: 2px solid #b8860b;
    border-radius: 10px;
    padding: 10px;
    z-index: 9999;
    box-shadow: 0 0 15px rgba(0,0,0,0.5);
    font-size: 13px;
    backdrop-filter: blur(5px);
}

.activity-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    border-bottom: 1px solid #b8860b;
    padding-bottom: 5px;
}

.activity-header h4 {
    margin: 0;
    color: #ffd966;
}

.activity-content {
    max-height: 400px;
    overflow-y: auto;
    margin-top: 10px;
}

.activity-filters {
    display: flex;
    gap: 5px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.filter-btn {
    background: #3f2e22;
    border: 1px solid #b8860b;
    color: #fff;
    padding: 3px 8px;
    border-radius: 15px;
    cursor: pointer;
    font-size: 12px;
    transition: var(--portal-transition);
}

.filter-btn:hover {
    background: #b8860b;
    color: #1f140c;
}

.filter-btn.active {
    background: #b8860b;
    color: #1f140c;
}

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 8px;
    border-bottom: 1px solid #3f2e22;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-item a {
    color: #ffd966;
    text-decoration: none;
}

.activity-item a:hover {
    text-decoration: underline;
}

.activity-item .time {
    color: #aaa;
    font-size: 11px;
    margin-left: auto;
}

/* ===== ВСПЛЫВАЮЩИЙ БЛОК НЕПРОЧИТАННЫХ КОММЕНТАРИЕВ ===== */
.unread-popup {
    position: absolute;
    top: 100%;
    right: 0;
    width: 320px;
    max-width: 90vw;
    background: #2a1e15;
    border: 2px solid #b8860b;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.5);
    z-index: 10000;
    font-size: 14px;
}

.unread-popup .popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #b8860b;
    padding-bottom: 8px;
    margin-bottom: 10px;
    color: #ffd966;
    font-weight: bold;
}

.unread-popup .popup-header button {
    background: #b8860b;
    border: none;
    color: #1f140c;
    padding: 3px 8px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
}

.unread-popup .popup-content {
    max-height: 300px;
    overflow-y: auto;
}

.unread-item {
    border-bottom: 1px solid #3f2e22;
    padding: 8px 0;
}

.unread-item:last-child {
    border-bottom: none;
}

.unread-item a {
    color: #ffd966;
    text-decoration: none;
    font-weight: 500;
}

.unread-item a:hover {
    text-decoration: underline;
}

.unread-item .comment-meta {
    font-size: 12px;
    color: #aaa;
    margin-top: 2px;
}

.unread-item .comment-time {
    font-size: 11px;
    color: #888;
    text-align: right;
}

/* ===== ПАГИНАЦИЯ (общая) ===== */
.pagination {
    list-style: none;
    padding-left: 0;
    margin: 40px 0 0 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 5px;
    background: rgba(0,0,0,0.3);
    border-radius: 50px;
    border: 1px solid #6b4f2a;
    padding: 15px;
}

.pagination .number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(145deg, #3f2e22, #2b1e0e);
    border: 2px solid #8b5a2b;
    color: #fff8e7;
    font-weight: 600;
    transition: var(--portal-transition);
    box-shadow: 0 3px 0 #3f2e22, 0 5px 12px #000;
    text-decoration: none;
}

.pagination .number:hover:not(.active) {
    background: #b8860b;
    border-color: #ffd700;
    transform: translateY(-2px);
    box-shadow: 0 5px 0 #3f2e22, 0 8px 15px #000, 0 0 15px gold;
}

.pagination .number.active {
    background: var(--portal-gradient-gold);
    border-color: #ffe68f;
    color: #1f140c;
    box-shadow: 0 5px 0 #5a3e2b, 0 0 20px #ffd700, inset 0 0 10px #fff8e7;
    cursor: default;
}

.pagination .pag-arrow {
    background: #3f2e22;
    border: 2px solid #8b5a2b;
    color: #fff8e7;
    font-size: 18px;
    line-height: 40px;
    text-align: center;
}

.pagination .pag-arrow:hover {
    background: #b8860b;
    border-color: #ffd700;
}

/* ===== ОБЩИЕ СТИЛИ ДЛЯ НОВЫХ СТРАНИЦ ===== */
.achievements-categories,
.moderation-tabs,
.search-results-list {
    margin: 20px 0;
}

.category h2,
.moderation-tabs h2 {
    color: #ffd966;
    border-bottom: 2px solid rgba(212,175,55,0.3);
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.achievements-grid,
.moderation-reports-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.achievement-card,
.report-item {
    background: rgba(91,69,50,0.7);
    border: 2px solid #d4af37;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
}

.achievement-icon {
    font-size: 48px;
    margin-bottom: 10px;
}

.achievement-name {
    font-size: 18px;
    font-weight: bold;
    color: #ffd966;
}

.achievement-desc,
.achievement-req,
.achievement-points {
    font-size: 14px;
    color: #ddd;
    margin-top: 5px;
}

.achievement-points {
    color: gold;
    font-weight: bold;
}

/* Модерация */
.moderation-tabs .tab-button {
    padding: 8px 16px;
    background: rgba(91,69,50,0.7);
    border-radius: 5px;
    color: #fff;
    text-decoration: none;
    margin-right: 10px;
}

.moderation-tabs .tab-button.active {
    background: #b8860b;
    color: #1f140c;
}

.report-item {
    text-align: left;
    margin-bottom: 15px;
}

.report-header {
    display: flex;
    gap: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 5px;
    margin-bottom: 10px;
    color: #ffd966;
}

.resolve-form textarea {
    width: 100%;
    background: #3f2e22;
    border: 1px solid #b8860b;
    color: #fff;
    padding: 5px;
    border-radius: 5px;
    margin-bottom: 10px;
}

/* Поиск по тегу */
.search-results-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.search-result-item {
    background: rgba(91,69,50,0.7);
    border-radius: 5px;
    padding: 10px;
}

.result-link {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    text-decoration: none;
}

.result-link:hover {
    color: #ffd966;
}

.result-icon {
    font-size: 24px;
}

/* Кнопки поддержки и подписки */
.author-support,
.subscribe-form {
    border-radius: 8px;
    margin: 20px 0;
}

.support-form label {
    display: block;
    margin: 10px 0;
    color: #ffd966;
}

.support-form input,
.support-form textarea {
    width: 100%;
    background: #3f2e22;
    border: 1px solid #b8860b;
    color: #fff;
    padding: 5px;
    border-radius: 5px;
}

/* ===== СТИЛИ ПРОФИЛЯ (НОВЫЕ) ===== */
.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;
}

/* Табы профиля в стиле игровой навигации */
.profile-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    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;
    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;
}

/* Статьи */
.article-actions-bar {
    margin-bottom: 20px;
}

.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-header .category-icon {
    font-size: 26px;
    color: #ffd966;
}

.category-header .category-title {
    flex: 1;
    font-size: 20px;
    font-weight: 700;
    color: #ffd966;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.category-header .category-toggle {
    font-size: 18px;
    color: #ffd966;
    transition: transform 0.3s ease;
}

.category-card.collapsed .category-toggle {
    transform: rotate(-90deg);
}

.category-card.collapsed .category-content {
    display: none;
}

.category-content {
    padding: 25px;
    display: block;
}

.setting-item {
    margin-bottom: 20px;
    padding: 15px 20px;
    background: rgba(0,0,0,0.3);
    border-radius: 12px;
    border-left: 4px solid #8b5a2b;
    transition: all 0.2s ease;
    position: relative;
    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: #d4b28c;
    line-height: 1.4;
}

.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;
}

.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 40px 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;
    word-wrap: break-word;
    cursor: default;
}

.notification.error {
    background: linear-gradient(145deg, rgba(178,34,34,0.95), rgba(139,0,0,0.9));
    border-color: #8b0000;
    color: #ffd700;
}

.notification.warning {
    background: linear-gradient(145deg, #f39c12, #e67e22);
    border-color: #e67e22;
}

.notification-close {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    color: rgba(255,255,255,0.8);
    transition: color 0.2s;
    padding: 0 5px;
    user-select: none;
}

.notification-close:hover {
    color: #fff;
}

/* ===== ФИКСИРОВАННОЕ МЕНЮ ПОРТАЛА ===== */
.portal-hor-menu {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    background: linear-gradient(145deg, rgba(44,30,21,0.98), rgba(26,17,12,0.98));
    border: 2px solid #a0522d;
    border-radius: 12px;
    padding: 5px 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.7), inset 0 0 20px rgba(210,180,140,0.15);
    display: flex;
    align-items: center;
    transition: left 0.3s ease, right 0.3s ease, transform 0.3s ease;
    max-width: calc(100vw - 40px);
}

.portal-hor-menu.hor-menu-left {
    left: 20px;
    right: auto;
    transform: none;
}

.portal-hor-menu.hor-menu-center {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
}

.portal-hor-menu.hor-menu-right {
    right: 20px;
    left: auto;
    transform: none;
}

.portal-hor-menu .hor-menu-items {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.portal-hor-menu .menu-group {
    display: flex;
    align-items: center;
    position: relative;
    border-right: 2px solid #a0522d;
    padding-right: 15px;
    margin-right: 10px;
}

.portal-hor-menu .menu-group:last-child {
    border-right: none;
}

.portal-hor-menu .group-label {
    position: absolute;
    top: -24px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.8rem;
    color: #d4a373;
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
    background: rgba(26,17,12,0.9);
    padding: 2px 8px;
    border-radius: 12px;
    border: 1px solid #a0522d;
    box-shadow: 0 2px 4px rgba(0,0,0,0.5);
    z-index: 2;
}

.portal-hor-menu .menu-item {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s, filter 0.2s;
    border-radius: 8px;
    padding: 4px;
}

.portal-hor-menu .menu-item:hover {
    transform: translateY(-2px);
    filter: drop-shadow(0 0 8px rgba(255,215,0,0.5));
    background: rgba(160,82,45,0.3);
}

.portal-hor-menu .menu-item img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: 2px solid transparent;
    transition: border-color 0.2s;
}

.portal-hor-menu .menu-item:hover img {
    border-color: #ffd700;
}

.portal-hor-menu .stats-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    background: linear-gradient(145deg, #8b4513, #5d2906);
    color: #ffd700;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 12px;
    border: 1px solid #ffd700;
    line-height: 1;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.portal-hor-menu .menu-item span.fs-icon {
    font-size: 2rem;
    color: #ffd700;
    text-shadow: 0 0 5px rgba(255,215,0,0.5);
}

.portal-hor-menu .menu-item::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%) scale(0.9);
    background: #2b1e0e;
    color: #f0e0c0;
    font-size: 14px;
    padding: 6px 12px;
    border: 2px solid #d4a373;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.8), inset 0 0 10px rgba(255,215,0,0.3);
    white-space: pre-wrap;
    min-width: 200px;
    max-width: 280px;
    text-align: center;
    line-height: 1.5;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s, transform 0.2s;
    font-family: 'Segoe UI', 'Book Antiqua', serif;
    text-shadow: 1px 1px 2px black;
    letter-spacing: 0.5px;
}

.portal-hor-menu .menu-item:hover::after {
    opacity: 1;
    transform: translateX(-50%) scale(1);
}

.portal-hor-menu .search-popup,
.portal-hor-menu .music-popup {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(145deg, #2b1e0e, #3f2e22);
    border: 2px solid #a0522d;
    border-radius: 8px;
    padding: 10px;
    width: 200px;
    box-shadow: -4px 4px 10px rgba(0,0,0,0.7);
    z-index: 1001;
    margin-bottom: 8px;
    display: none;
}

.portal-hor-menu .search-popup input {
    width: 100%;
    background: #3f2e22;
    border: 1px solid #b8860b;
    color: #fff;
    padding: 5px;
    border-radius: 4px;
}

.portal-hor-menu .volume-slider {
    width: 100%;
}

.portal-hor-menu .volume-slider input {
    width: 100%;
}

/* Стрелки для перемещения */
.portal-menu-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 45px;
    background: linear-gradient(145deg, #3f2e22, #2b1e0e);
    border: 2px solid #a0522d;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s
    ease;
    z-index: 1001;
    box-sizing: border-box;
}
.hor-menu-small .portal-menu-arrow{
    height: 45px;
}
.portal-menu-arrow-left {
    left: -21px;
    border-radius: 12px 0 0 12px;
    border-right: none;
}

.portal-menu-arrow-right {
    right: -21px;
    border-radius: 0 12px 12px 0;
    border-left: none;
}

.hor-menu-small .portal-menu-arrow{
    height: 38px;
}
.portal-hor-menu.hor-menu-small  .menu-group{
     margin-right: 1px;
}
.portal-menu-arrow:hover:not(.disabled) {
    background: #b8860b;
    border-color: #ffd700;
}

.portal-menu-arrow:hover:not(.disabled) span {
    color: #1f140c;
}

.portal-menu-arrow span {
    font-size: 20px;
    font-weight: bold;
    color: #ffd700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.portal-menu-arrow.disabled {
    opacity: 0.4;
    filter: grayscale(0.8);
    cursor: default;
    pointer-events: none;
}

.portal-menu-arrow::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%) scale(0.9);
    background: #2b1e0e;
    color: #f0e0c0;
    font-size: 14px;
    padding: 6px 12px;
    border: 2px solid #d4a373;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.8), inset 0 0 10px rgba(255,215,0,0.3);
    white-space: nowrap;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s, transform 0.2s;
}

.portal-menu-arrow:hover::after {
    opacity: 1;
    transform: translateX(-50%) scale(1);
}

/* Выпадающий поиск в меню */
.portal-hor-menu .search-popup .search-results {
    position: static;
    margin-top: 5px;
    background: #2a1e15;
    border: 2px solid #b8860b;
    border-radius: 5px;
    max-height: 200px;
    overflow-y: auto;
    display: none;
}

.portal-hor-menu .search-popup .search-result-item {
    padding: 5px 10px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    cursor: pointer;
    color: #fff;
    font-size: 13px;
}

.portal-hor-menu .search-popup .search-result-item:hover {
    background: #b8860b;
    color: #1f140c;
}

.portal-hor-menu .search-popup .search-result-item small {
    display: block;
    font-size: 10px;
    color: #aaa;
}

/* Глобальный попап-меню */
.menu-popup-global {
    position: fixed !important;
    background: rgba(26, 17, 12, 0.95) !important;
    border: 2px solid #b8860b !important;
    border-radius: 10px !important;
    padding: 15px !important;
    color: #fff !important;
    font-family: 'Philosopher', sans-serif !important;
    box-shadow: 0 5px 25px rgba(0,0,0,0.8), 0 0 0 1px #d4af37 inset !important;
    z-index: 1000 !important;
    min-width: 250px !important;
    max-width: 350px !important;
    min-height: 300px;
    max-height: 400px !important;
    overflow-y: auto !important;
    backdrop-filter: blur(5px) !important;
    bottom: 80px;
}

/* Стили для разных размеров меню */
.portal-hor-menu.hor-menu-large .menu-item img {
    width: 50px;
    height: 50px;
}

.portal-hor-menu.hor-menu-large .menu-item .size-icon {
    font-size: 2rem;
}

.portal-hor-menu.hor-menu-large .group-label {
    display: block;
}

.portal-hor-menu.hor-menu-small .menu-item img {
    width: 30px;
    height: 30px;
}

.portal-hor-menu.hor-menu-small .menu-item .size-icon {
    font-size: 1.4rem;
}

.portal-hor-menu.hor-menu-small .stats-badge {
    font-size: 10px;
    padding: 1px 4px;
    bottom: -3px;
    right: -3px;
}

.portal-hor-menu.hor-menu-small .group-label {
    display: none;
}

/* Скрытое состояние */
.portal-hor-menu.hor-menu-hidden {
    display: none;
}

/* Вкладка для показа скрытого меню */
.hor-menu-tab {
    position: fixed;
    right: 20px;
    bottom: 20px;
    background: linear-gradient(145deg, #5a3e2b, #3f2e22);
    border: 2px solid #a0522d;
    border-radius: 12px 12px 12px 12px;
    padding: 12px 16px;
    font-size: 24px;
    cursor: pointer;
    color: #ffd700;
    z-index: 999;
    box-shadow: -4px 4px 12px rgba(0,0,0,0.6);
    transition: background 0.2s, border-color 0.2s;
}

.hor-menu-tab:hover {
    background: #7a5e4b;
    border-color: #ffd700;
}

.hor-menu-tab::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 120%;
    right: 0;
    background: #2b1e0e;
    color: #f0e0c0;
    font-size: 14px;
    padding: 6px 12px;
    border: 2px solid #d4a373;
    border-radius: 8px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}

.hor-menu-tab:hover::after {
    opacity: 1;
}

/* Элементы управления */
.control-item {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 6px;
    padding: 4px;
    background: rgba(210, 180, 140, 0.1);
    border: 1px solid #a0522d;
    margin: 0 5px 0 0;
    max-width: 42px;
}

.control-item:hover {
    background: rgba(210, 180, 140, 0.3);
    border-color: #ffd700;
    transform: scale(1.05);
}

.control-item img {
    border-radius: 4px;
}

.hor-menu-large .control-item img {
    width: 30px;
    height: 30px;
}

.hor-menu-large .control-item span {
    font-size: 2rem;
    color: #ffd700;
}

.hor-menu-small {
    width: auto;
    padding: 5px 10px;
    height: 50px;
}

.hor-menu-small .menu-item img {
    width: 25px;
    height: 25px;
}

.hor-menu-small .control-item img {
    width: 20px;
    height: 20px;
}

.hor-menu-small .stats-badge {
    font-size: 0.7rem;
    bottom: -2px;
    right: -2px;
}

.hor-menu-small .control-item span {
    font-size: 1.2rem;
    color: #ffd700;
}

/* ===== ИСТОРИЯ ПОЖЕРТВОВАНИЙ ===== */
.donations-history h2 {
    color: #ffd966;
    font-size: 22px;
    margin: 30px 0 15px;
    border-bottom: 2px solid #b8860b;
    padding-bottom: 8px;
}

.donations-table {
    width: 100%;
    background: rgba(0,0,0,0.3);
    border-radius: 12px;
    border: 2px solid #8b5a2b;
    margin-bottom: 20px;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
}

.donations-table th {
    background: rgba(139,69,19,0.6);
    color: #ffd966;
    padding: 12px 15px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 14px;
}

.donations-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #3f2e22;
    color: #f0e6d2;
}

.donations-table tr:last-child td {
    border-bottom: none;
}

.donations-table .item-icon-small {
    width: 32px;
    height: 32px;
    vertical-align: middle;
    margin-right: 8px;
    border-radius: 6px;
    border: 1px solid #b8860b;
    background: rgba(0,0,0,0.2);
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 20px;
}

/* ===== ИСТОРИЯ ОПЕРАЦИЙ ===== */
.history-filters {
    margin-bottom: 25px;
    background: rgba(0,0,0,0.2);
    padding: 15px 20px;
    border-radius: 40px;
    border: 1px solid #8b5a2b;
    display: inline-block;
}

.history-filters label {
    color: #ffd966;
    font-weight: 600;
    margin-right: 10px;
}

.history-filters select {
    background: #3f2e22;
    border: 2px solid #b8860b;
    border-radius: 30px;
    padding: 10px 35px 10px 20px;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    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;
}

.history-filters select:hover {
    border-color: #ffd700;
    box-shadow: 0 0 10px rgba(255,215,0,0.3);
}

.history-table {
    width: 100%;
    background: rgba(0,0,0,0.3);
    border-radius: 12px;
    border: 2px solid #8b5a2b;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
}

.history-table th {
    background: rgba(139,69,19,0.6);
    color: #ffd966;
    padding: 12px 15px;
    font-weight: 600;
    text-transform: uppercase;
}

.history-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #3f2e22;
    color: #f0e6d2;
}

.history-table tr:last-child td {
    border-bottom: none;
}

.history-table td.amount {
    font-weight: 700;
    font-size: 16px;
}

.history-table td.amount.incoming {
    color: #4caf50;
}

.history-table td.amount.outgoing {
    color: #ff6666;
}

.history-table .item-icon-small {
    width: 32px;
    height: 32px;
    vertical-align: middle;
    margin-right: 8px;
    border-radius: 6px;
    border: 1px solid #b8860b;
}

/* Статистика периода */
.period-stats {
    background: rgba(0,0,0,0.2);
    border-radius: 12px;
    padding: 15px 20px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
}

.stats-numbers {
    display: flex;
    gap: 20px;
}

.stat-in {
    color: #4caf50;
    font-weight: 600;
}

.stat-out {
    color: #ff6666;
    font-weight: 600;
}

.progress-bar-container {
    flex: 1;
    height: 24px;
    background: rgba(255,255,255,0.1);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    min-width: 200px;
}

.progress-bar-in {
    height: 100%;
    background: #4caf50;
    transition: width 0.3s;
}

.progress-bar-out {
    height: 100%;
    background: #ff6666;
    transition: width 0.3s;
}

.date-group {
    color: #ffd966;
    font-size: 18px;
    margin: 20px 0 10px;
    border-bottom: 1px solid #b8860b;
    padding-bottom: 5px;
}

/* ===== ОНЛАЙН-ИНДИКАТОР ===== */
.online-indicator {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-left: 8px;
    vertical-align: middle;
    box-shadow: 0 0 5px currentColor;
}

.online-indicator.online {
    background-color: #2ecc71;
    box-shadow: 0 0 8px #2ecc71;
}

.online-indicator.offline {
    background-color: #95a5a6;
    box-shadow: 0 0 4px #95a5a6;
}

/* ===== ССЫЛКИ НА ПОЛЬЗОВАТЕЛЯ ===== */
.user-info-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.user-profile-link {
    text-decoration: none;
    color: #ffd966;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.user-profile-link:hover {
    color: #ffd700;
    text-decoration: underline;
}

.user-game-link {
    text-decoration: none;
    font-size: 16px;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.user-game-link:hover {
    opacity: 1;
}

/* ===== БЛОК РЕПОСТА ===== */
.rept-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;
}

.share-btn {
    background: linear-gradient(145deg, #3f2e22, #2b1e0e);
    border: 1px solid #b8860b;
    border-radius: 5px;
    padding: 4px 10px;
    color: #fff;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}

.share-btn:hover {
    background: #b8860b;
    color: #1f140c;
}

.deleted-link {
    color: #ff6666;
    font-style: italic;
    cursor: default;
    text-decoration: line-through;
}

/* ===== БЛОК РЕПОСТА (SHARE BLOCK) ===== */
.share-block {
    display: flex;
    gap: 15px;
    background: linear-gradient(145deg, rgba(44,30,21,0.95), rgba(26,17,12,0.95));
    border: 2px solid #a0522d;
    border-radius: 12px;
    padding: 15px 20px;
    margin: 15px 0;
    box-shadow: 0 6px 15px rgba(0,0,0,0.5), inset 0 0 20px rgba(212,175,55,0.1);
    font-family: 'Philosopher', sans-serif;
}

.share-icon {
    font-size: 48px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    color: #ffd966;
    filter: drop-shadow(0 0 8px gold);
}

.share-content {
    flex: 1;
}

.share-title {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: #ffd966;
    text-decoration: none;
    margin-bottom: 5px;
    transition: color 0.2s;
}

.share-title:hover {
    color: #ffd700;
    text-decoration: underline;
}

.share-date {
    font-size: 14px;
    color: #b8a58e;
    margin-bottom: 8px;
}

.share-preview {
    color: #e6d5b8;
    font-size: 15px;
    line-height: 1.6;
    font-style: italic;
    border-left: 3px solid #b8860b;
    padding-left: 12px;
    background: rgba(0,0,0,0.2);
    border-radius: 0 8px 8px 0;
}

/* ===== ОПРОСЫ ===== */
.poll-block {
    background: linear-gradient(145deg, rgba(44,30,21,0.95), rgba(26,17,12,0.95));
    border-radius: 20px;
    border: 2px solid #a0522d;
    padding: 25px;
    margin: 30px 0;
    box-shadow: 0 8px 20px #000, inset 0 0 30px rgba(212,175,55,0.1);
}

.poll-block h3 {
    color: #ffd966;
    font-size: 24px;
    margin: 0 0 10px 0;
    border-bottom: 1px solid #b8860b;
    padding-bottom: 8px;
}

.poll-description {
    color: #e6d5b8;
    font-style: italic;
    margin-bottom: 20px;
    background: rgba(0,0,0,0.2);
    padding: 10px 15px;
    border-radius: 8px;
    border-left: 4px solid #b8860b;
}

.poll-option {
    position: relative;
    margin: 12px 0;
}

.poll-option input[type="radio"],
.poll-option input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.poll-option label {
    display: block;
    padding: 14px 20px;
    background: rgba(0,0,0,0.3);
    border: 2px solid #8b5a2b;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #f5e6d3;
    font-weight: 500;
    font-size: 16px;
    text-align: left;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.poll-option label:hover {
    background: rgba(184,134,11,0.2);
    border-color: #b8860b;
    transform: translateY(-2px);
}

.poll-option input[type="radio"]:checked + label,
.poll-option input[type="checkbox"]:checked + label {
    background: rgba(184,134,11,0.3);
    border-color: #ffd700;
    box-shadow: 0 0 20px gold, inset 0 0 10px rgba(255,215,0,0.3);
    color: #ffd966;
    font-weight: 600;
}

.poll-results {
    margin-top: 15px;
}

.poll-results h4 {
    color: #ffd966;
    margin-bottom: 15px;
    font-size: 18px;
}

.poll-result-item {
    margin-bottom: 15px;
}

.poll-result-label {
    color: #f5e6d3;
    margin-bottom: 5px;
    font-weight: 500;
}

.poll-result-bar {
    height: 24px;
    background: rgba(0,0,0,0.3);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #8b5a2b;
    margin-bottom: 3px;
}

.poll-result-fill {
    height: 100%;
    background: linear-gradient(90deg, #b8860b, #d4af37);
    transition: width 0.3s ease;
}

.poll-result-stats {
    display: flex;
    justify-content: space-between;
    color: #b8a58e;
    font-size: 13px;
}

.poll-result-votes {
    color: #ffd966;
    font-weight: 600;
}

.poll-result-percent {
    color: #aaa;
}

/* ===== ЛЕНТА СТАТЕЙ ===== */
.articles-feed {
    display: flex;
    flex-direction: column;
    gap: 25px;
    margin-top: 20px;
}

.feed-item {
    background: linear-gradient(145deg, rgba(44,30,21,0.95), rgba(26,17,12,0.95));
    border-radius: 20px;
    border: 2px solid #a0522d;
    padding: 25px;
    box-shadow: 0 8px 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);
    transform: translateY(-3px);
}

.feed-item-header h3 {
    margin: 10px 0 5px;
    font-size: 24px;
    font-weight: 700;
}

.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;
}

.author-mini {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(212,175,55,0.2);
}

.author-mini img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid #b8860b;
    object-fit: cover;
}

.author-name {
    font-weight: 600;
    color: #ffd966;
    font-size: 16px;
    text-decoration: none;
}

.author-name:hover {
    text-decoration: underline;
    color: #ffd700;
}

.feed-item-meta {
    display: flex;
    gap: 25px;
    margin: 15px 0;
    color: #b8a58e;
    font-size: 14px;
}

.feed-item-excerpt {
    color: #e6d5b8;
    line-height: 1.8;
    margin-bottom: 20px;
    font-size: 16px;
    border-left: 3px solid #b8860b;
    padding-left: 20px;
    background: rgba(0,0,0,0.2);
    border-radius: 0 8px 8px 0;
}

.feed-item-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.feed-item-actions .button.small {
    background: linear-gradient(145deg, #3f2e22, #2b1e0e);
    border: 1px solid #b8860b;
    color: #ffd966;
    padding: 10px 20px;
    font-size: 15px;
    border-radius: 30px;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.feed-item-actions .button.small:hover {
    background: #b8860b;
    color: #1f140c;
    border-color: #ffd700;
    transform: translateY(-2px);
}

.feed-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    padding: 10px;
    background: rgba(0,0,0,0.3);
    border-radius: 12px;
    border: 1px solid #6b4f2a;
}

.feed-tabs .tab-button {
    padding: 10px 20px;
    background: linear-gradient(145deg, #3f2e22, #2b1e0e);
    border: 1px solid #b8860b;
    border-radius: 30px;
    color: #fff8e7;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.feed-tabs .tab-button.active {
    background: linear-gradient(145deg, #b8860b, #8b5a2b);
    color: #1f140c;
    border-color: #ffd700;
    box-shadow: 0 0 15px gold;
}

.feed-tabs .tab-button:hover:not(.active) {
    background: #b8860b;
    color: #1f140c;
}

.page-title .search-form {
    display: flex;
    gap: 10px;
    background: rgba(0,0,0,0.3);
    border-radius: 40px;
    padding: 5px 5px 5px 15px;
    border: 1px solid #8b5a2b;
}

.page-title .search-form input {
    background: transparent;
    border: none;
    color: #fff;
    padding: 8px 0;
    font-size: 16px;
    width: 250px;
}

.page-title .search-form input:focus {
    outline: none;
    box-shadow: none;
    border: none;
}

.page-title .search-form button {
    background: linear-gradient(145deg, #b8860b, #8b5a2b);
    border: none;
    border-radius: 30px;
    padding: 8px 20px;
    color: #1f140c;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.page-title .search-form button:hover {
    background: #8b5a2b;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

/* ===== ДОПОЛНИТЕЛЬНЫЕ СТИЛИ ===== */
.rankingsButtons {
    display: flex;
    gap: 8px;
    background: rgba(0,0,0,0.3);
    padding: 10px;
    border-radius: 12px;
    border: 1px solid #6b4f2a;
}

.tableRank {
    width: 100%;
    background: rgba(26,17,12,0.7);
    border-radius: 16px;
    border: 2px solid #a0522d;
}

.tableRank th, .tableRank td {
    padding: 15px;
    border-bottom: 1px solid #3f2e22;
}

.rewards-block {
    padding: 10px;
}

.rewards-list {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: center;
}

.reward-item {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 60px;
}

.reward-item.not-obtained {
    filter: grayscale(1);
    opacity: 0.6;
}

.reward-status {
    position: absolute;
    top: -5px;
    right: -5px;
    font-size: 20px;
    font-weight: bold;
    text-shadow: 0 0 3px black;
    z-index: 2;
}

.reward-count, .bpdig {
    position: absolute;
    bottom: -3px;
    right: -11px;
    background: #b8860b;
    color: #1f140c;
    border-radius: 10px;
    padding: 0 4px;
    font-size: 12px;
    font-weight: bold;
    line-height: 16px;
    z-index: 2;
    min-width: 25px;
    text-align: center;
}

.reward-action-icons {
    position: absolute;
    top: 5px;
    left: 16px;
    transform: translateX(-50%);
    display: flex;
    gap: 3px;
    background: rgba(0,0,0,0.8);
    border-radius: 12px;
    padding: 2px 6px;
    font-size: 11px;
    line-height: 1;
    white-space: nowrap;
    z-index: 3;
    border: 1px solid #b8860b;
}

.action-icon {
    filter: drop-shadow(0 0 3px gold);
}

.reactions-rewards-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    flex-wrap: wrap;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    padding: 15px;
    margin: 20px 0;
}

.reactions-rewards-row .reactions-block,
.reactions-rewards-row .rewards-block {
    flex: 0 1 auto;
    min-width: 200px;
}

.comment-item.editing {
    opacity: 0.8;
}

.edit-comment-form {
    width: 100%;
}

.edit-textarea {
    width: 100%;
    background: #3f2e22;
    border: 1px solid #b8860b;
    color: #fff;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 8px;
    resize: vertical;
}

.edit-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-start;
}

.save-edit-btn, .cancel-edit-btn {
    background: linear-gradient(145deg, #b8860b, #8b5a2b);
    border: none;
    border-radius: 5px;
    padding: 8px 16px;
    color: #1f140c;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.cancel-edit-btn {
    background: #3f2e22;
    border: 1px solid #b8860b;
    color: #fff;
}

.save-edit-btn:hover, .cancel-edit-btn:hover {
    background: #b8860b;
    color: #1f140c;
}

/* ===== МОДАЛЬНЫЕ ОКНА (ДОПОЛНИТЕЛЬНЫЕ) ===== */
#forwardModal .form-group,
#shareModal .form-group {
    position: relative;
}

#forwardModal .search-results,
#shareModal #share_user_results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 10001;
    max-height: 200px;
    overflow-y: auto;
    background: #2a1e15;
    border: 2px solid #b8860b;
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    margin-top: 2px;
    display: none;
}

#forwardModal .search-result-item,
#shareModal .search-result-item {
    padding: 8px 12px;
    cursor: pointer;
    color: #fff;
    border-bottom: 1px solid #3f2e22;
}

#forwardModal .search-result-item:hover,
#shareModal .search-result-item:hover {
    background: #b8860b;
    color: #1f140c;
}

/* ===== ПОДВАЛ ===== */
.footer {
    margin-top: 5px;
    position: relative;
    z-index: 0;
    color: #fff;
    background: url(../images/smoke_bott.png) bottom no-repeat;
}



/* Разрешить выпадающим панелям выходить за пределы модального окна */
.modal_div {
    overflow: visible !important;
}

/* Убедимся, что контейнер текстового поля тоже не обрезает */
.modal_div .textarea-wrapper {
    overflow: visible !important;
}

/* Поднимем панели над всем содержимым */
.modal_div .emoji-panel,
.modal_div .smiles-panel {
    z-index: 2000 !important;
}

.modal_div .emoji-panel,
.modal_div .smiles-panel {
    top: 100% !important;
    bottom: auto !important;
    margin-top: 5px !important;
    margin-bottom: 0 !important;
}


/* Если используется конкретное окно редактирования, можно уточнить */
#editMessageModal {
    overflow: visible !important;
}
#editMessageModal .emoji-panel,
#editMessageModal .smiles-panel {
    z-index: 10001;
}

.message.system-message {
    justify-content: center;
    background: transparent;
    border: none;
    box-shadow: none;
    margin: 5px 0;
}
.system-message-content {
    background: rgba(184,134,11,0.2);
    border: 1px solid #b8860b;
    border-radius: 20px;
    padding: 5px 15px;
    color: #b8a58e;
    font-style: italic;
    text-align: center;
    width: auto;
    max-width: 80%;
    margin: 0 auto;
}


/* Кнопка подписки */
.subscribe-form {
    display: inline-block;
}
.subscribe-btn {
    background: linear-gradient(145deg, #3f2e22, #2b1e0e);
    border: 1px solid #b8860b;
    color: #fff;
    padding: 6px 16px;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}
.subscribe-btn:hover {
    background: #b8860b;
    color: #1f140c;
}
.subscribe-btn.subscribed {
    background: #2a5a2a;
    border-color: #4caf50;
    color: #b8ffb8;
}

/* Изображения, вставленные через [img] */
.article-image {
    display: block;
    margin: 20px auto;        /* центрирование + отступы сверху/снизу */
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    border: 2px solid #b8860b;
}
.uploaded-image-item {
    position: relative;
    display: inline-block;
    margin: 5px;
    width: 100px;
    height: 100px;
    border: 2px solid #8b5a2b;
    border-radius: 8px;
    overflow: hidden;
}

.uploaded-image-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.insert-image-btn {
    position: absolute;
    bottom: 5px;
    left: 0;
    right: 0;
    margin: 0 auto;          /* центрирование через auto-поля */
    width: fit-content;      /* ширина под содержимое */
    background: rgba(0,0,0,0.7);
    color: #ffd966;
    border: 1px solid #b8860b;
    border-radius: 4px;
    padding: 2px 8px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 2;
    box-sizing: border-box;  /* чтобы изменения border не меняли ширину */
}

.insert-image-btn:hover {
    background: #b8860b;
    color: #1f140c;
    /* transform не меняем, ширина может слегка измениться из-за нового фона, но margin: auto удержит центр */
}

.insert-image-btn:hover {
    background: #b8860b;
    color: #1f140c;
}
.upload-new-image {
    margin: 0;
}
.upload-progress {
    color: #ffd966;
    margin-top: 10px;
}
.delete-image-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(139, 0, 0, 0.8);
    color: #fff;
    border: 1px solid #ff4444;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 16px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 2;
    padding: 0;
}

.delete-image-btn:hover {
    background: #8b0000;
    transform: scale(1.1);
    box-shadow: 0 0 8px #ff0000;
}
/* Улучшение для первых двух мест в рейтинге */
.rank-first, .rank-second {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.rank-first {
    background: linear-gradient(145deg, #4a2e1a, #6b4a2e);
    border: 3px solid #ffd700;
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.5), inset 0 0 20px rgba(255, 215, 0, 0.3);
    transform: scale(1.02);
}

.rank-second {
    background: linear-gradient(145deg, #3a2a1a, #5a3e2a);
    border: 3px solid #c0c0c0;
    box-shadow: 0 0 25px rgba(192, 192, 192, 0.5), inset 0 0 15px rgba(255, 255, 255, 0.3);
}



.rank-first .rank-number img, .rank-second .rank-number img {
    width: 70px;
    height: 70px;
    object-fit: contain;
}

.rank-first .rank-info_text .rank-nickName a,
.rank-second .rank-info_text .rank-nickName a {
    font-size: 16px;
    font-weight: 800;
    color: #fff8e7;
    text-shadow: 0 0 15px currentColor;
}

.rank-first .rank-info_text .rank-nickName a {
    text-shadow: 0 0 20px gold;
}

.rank-first .rank-kills,
.rank-second .rank-kills {
    font-size: 28px;
    font-weight: 900;
    background: rgba(0,0,0,0.5);
    padding: 5px 15px;
    border-radius: 30px;
    border: 2px solid;
}

.rank-first .rank-kills {
    border-color: #ffd700;
    color: #ffd700;
}

.rank-second .rank-kills {
    border-color: #c0c0c0;
    color: #c0c0c0;
}

.sympathy-count-small {
    display: inline-block;
    background: rgba(0,0,0,0.4);
    padding: 3px 12px;
    border-radius: 30px;
    font-size: 14px;
    color: #ffd966;
    border: 1px solid #b8860b;
    margin-top: 5px;
}

.sympathy-count-small .sympathy-count-value {
    font-weight: 700;
    color: #ffd700;
    margin-left: 3px;
}
.sympathy-count-small {
    font-size: 14px;
    color: #ffd966;
    margin-top: 5px;
}
.rank-nickName {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.sympathy-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: transform 0.2s;
}
.sympathy-btn:hover {
    transform: scale(1.2);
}
.sympathy-btn.active {
    color: #ff4444;
    filter: drop-shadow(0 0 5px #ff4444);
}

.rankBlock-block {
    padding: 0 10px;
}
.rankBlock .rank{
    width: 100%;
}

.gift-icon img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    border-radius: 8px;
    border: 2px solid #b8860b;
    background: rgba(0,0,0,0.2);
    padding: 4px;
}
.shop-item .item-preview img {
    width: 64px;
    height: 64px;

}