/* ============================================
   public/assets/css/main.css
   ПОЛНЫЙ ФАЙЛ
   ============================================ */

/* ============================================
   1. ПЕРЕМЕННЫЕ ТЕМ
   ============================================ */

[data-theme="dark"] {
    --bg-primary: #0a0a1a;
    --bg-secondary: #12122a;
    --bg-card: #1a1a3e;
    --bg-card-hover: #22224a;
    --bg-input: rgba(255, 255, 255, 0.05);
    --bg-header: rgba(18, 18, 42, 0.95);
    --text-primary: #e8e8ff;
    --text-secondary: #a8a8d8;
    --text-muted: #6a6a9e;
    --border-color: #2a2a5a;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-hover: 0 12px 48px rgba(106, 13, 173, 0.25);
    --primary: #8b5cf6;
    --primary-light: #a78bfa;
    --primary-dark: #7c3aed;
    --gradient: linear-gradient(135deg, #7c3aed, #06b6d4);
    --success: #22d3ee;
    --danger: #f87171;
    --warning: #fbbf24;
    --radius: 14px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] {
    --bg-primary: #f0f2f8;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f8f9fe;
    --bg-input: #f0f2f8;
    --bg-header: rgba(255, 255, 255, 0.95);
    --text-primary: #1a1a3e;
    --text-secondary: #4a4a7a;
    --text-muted: #8a8aba;
    --border-color: #e2e4ee;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
    --shadow-hover: 0 12px 48px rgba(106, 13, 173, 0.10);
    --primary: #7c3aed;
    --primary-light: #a78bfa;
    --primary-dark: #6d28d9;
    --gradient: linear-gradient(135deg, #7c3aed, #06b6d4);
    --success: #0891b2;
    --danger: #dc2626;
    --warning: #d97706;
    --radius: 14px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   2. БАЗА
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background 0.3s, color 0.3s;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.container-pub {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px 50px;
}

/* ============================================
   3. ШАПКА
   ============================================ */

.site-header {
    background: var(--bg-header);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    transition: background 0.3s;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.logo-icon {
    font-size: 1.4rem;
    color: var(--primary);
}

.logo-text {
    font-size: 1.2rem;
    font-weight: 800;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 4px;
    align-items: center;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: 0.2s;
}

.nav-link:hover {
    background: var(--bg-input);
    color: var(--text-primary);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.theme-toggle,
.mobile-toggle {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 8px 10px;
    border-radius: 8px;
    transition: 0.2s;
}

.theme-toggle:hover,
.mobile-toggle:hover {
    background: var(--bg-input);
    color: var(--text-primary);
}

.mobile-toggle {
    display: none;
}

.mobile-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border-bottom: 2px solid var(--border-color);
    padding: 16px 20px;
    box-shadow: var(--shadow);
    z-index: 999;
}

.mobile-nav.active {
    display: block;
}

.mobile-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mobile-nav-link {
    display: block;
    padding: 10px 14px;
    border-radius: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    transition: 0.2s;
}

.mobile-nav-link:hover {
    background: var(--bg-input);
    color: var(--text-primary);
}

/* ============================================
   4. КНОПКИ
   ============================================ */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: 0.2s;
    text-decoration: none;
}

.btn-primary {
    background: var(--gradient);
    color: #fff;
}

.btn-primary:hover {
    opacity: 0.85;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-sm {
    padding: 6px 14px;
    font-size: 0.8rem;
}

.btn-details {
    padding: 6px 14px;
    border-radius: 6px;
    background: var(--bg-input);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.8rem;
    transition: 0.2s;
}

.btn-details:hover {
    background: var(--primary);
    color: #fff;
}

/* ============================================
   5. СТАТИСТИКА
   ============================================ */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
    margin-bottom: 25px;
}

.stat-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 14px 10px;
    text-align: center;
    transition: 0.2s;
}

.stat-item:hover {
    transform: translateY(-2px);
    border-color: var(--primary);
}

.stat-icon {
    display: block;
    font-size: 1.6rem;
    margin-bottom: 4px;
}

.stat-value {
    display: block;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-label {
    display: block;
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* ============================================
   6. ТОПЫ
   ============================================ */

.top-row {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 25px;
}

.top-block {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 12px 20px;
    min-width: 180px;
    flex: 1;
    max-width: 280px;
    transition: 0.2s;
}

.top-block:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow);
}

.top-block.highlight-gold {
    border-color: #fbbf24;
    background: rgba(251, 191, 36, 0.08);
}

.top-block.highlight-danger {
    border-color: #f87171;
    background: rgba(248, 113, 113, 0.08);
}

.top-block.highlight-primary {
    border-color: var(--primary);
    background: rgba(139, 92, 246, 0.08);
}

.top-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 6px;
}

.top-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-primary);
    padding: 4px 0;
}

.top-link:hover .top-name {
    color: var(--primary-light);
}

.top-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
}

.top-name {
    font-weight: 600;
    font-size: 0.95rem;
    flex: 1;
    transition: 0.2s;
}

.top-score {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--primary);
    background: var(--bg-input);
    padding: 2px 10px;
    border-radius: 20px;
    white-space: nowrap;
}

/* ============================================
   7. ПОИСК
   ============================================ */

.search-form {
    display: flex;
    max-width: 500px;
    margin: 0 auto 25px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    transition: 0.2s;
}

.search-form:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}

.search-form input {
    flex: 1;
    padding: 12px 18px;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 0.95rem;
    outline: none;
}

.search-form input::placeholder {
    color: var(--text-muted);
}

.search-form button {
    padding: 12px 24px;
    background: var(--gradient);
    color: #fff;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: 0.2s;
}

.search-form button:hover {
    opacity: 0.85;
}

/* ============================================
   8. НАВИГАЦИЯ
   ============================================ */

.nav-tabs {
    display: flex;
    gap: 8px;
    margin: 20px 0 25px;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
}

.nav-tabs a {
    padding: 8px 20px;
    border-radius: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: 0.2s;
}

.nav-tabs a:hover {
    background: var(--bg-input);
}

.nav-tabs a.active {
    background: var(--gradient);
    color: #fff;
}

/* ============================================
   9. СОРТИРОВКА
   ============================================ */

.sort-menu {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    align-items: center;
    background: var(--bg-card);
    padding: 12px 18px;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
}

.sort-label {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    margin-right: 5px;
}

.sort-btn {
    padding: 6px 16px;
    border-radius: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid var(--border-color);
    transition: 0.2s;
}

.sort-btn:hover {
    background: var(--bg-input);
    border-color: var(--primary);
}

.sort-btn.active {
    background: var(--gradient);
    color: #fff;
    border-color: transparent;
}

/* ============================================
   10. ТАБЛИЦА
   ============================================ */

.table-wrap {
    overflow-x: auto;
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
}

.user-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.user-table th {
    background: var(--bg-secondary);
    padding: 14px 18px;
    text-align: left;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
}

.user-table td {
    padding: 12px 18px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.user-table tr:hover td {
    background: var(--bg-card-hover);
}

.user-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.avatar-mini {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.rating-cell {
    font-weight: 700;
    font-size: 1.05rem;
}

/* ============================================
   11. ПРОГРЕСС-БАР
   ============================================ */

.rating-bar {
    width: 100%;
    height: 28px;
    background: var(--bg-input);
    border-radius: 14px;
    overflow: hidden;
    position: relative;
}

.rating-progress {
    height: 100%;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
    transition: width 0.6s ease;
    min-width: 40px;
    padding: 0 10px;
    white-space: nowrap;
}

.next-rank-cell {
    text-align: center;
    min-width: 100px;
}

.next-rank {
    display: block;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
}

.next-rank-label {
    display: block;
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* ============================================
   12. БОЛЬШАЯ КАРУСЕЛЬ АЧИВОК
   ============================================ */

.achievements-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 10px;
}

.achievements-header .section-title {
    margin: 0;
}

.achievements-nav {
    display: flex;
    gap: 8px;
}

.scroll-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-secondary);
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.scroll-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.achievements-carousel {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding: 8px 4px 16px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
}

.achievements-carousel::-webkit-scrollbar {
    height: 6px;
}

.achievements-carousel::-webkit-scrollbar-track {
    background: var(--bg-input);
    border-radius: 10px;
}

.achievements-carousel::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}

.achievement-slide-big {
    flex: 0 0 200px;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    padding: 20px 16px 16px;
    text-align: center;
    scroll-snap-align: start;
    transition: var(--transition);
    position: relative;
    cursor: pointer;
    min-height: 240px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

.achievement-slide-big:hover {
    transform: translateY(-6px) scale(1.02);
    border-color: var(--primary);
    box-shadow: var(--shadow-hover);
    z-index: 10;
}

.achievement-slide-big img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 14px;
    margin-bottom: 12px;
    border: 3px solid var(--border-color);
    transition: var(--transition);
}

.achievement-slide-big:hover img {
    border-color: var(--primary);
    transform: scale(1.05);
}

.achievement-slide-big .ach-title {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text-primary);
    margin-bottom: 4px;
    line-height: 1.3;
}

.achievement-slide-big .ach-date {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: auto;
    padding-top: 6px;
}

.achievement-slide-big .ach-tooltip {
    position: absolute;
    bottom: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%) scale(0.8);
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 400;
    line-height: 1.4;
    min-width: 180px;
    max-width: 240px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    pointer-events: none;
    z-index: 100;
    white-space: normal;
    word-wrap: break-word;
}

.achievement-slide-big .ach-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 8px solid transparent;
    border-top-color: var(--border-color);
}

.achievement-slide-big:hover .ach-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) scale(1);
}

/* ============================================
   13. СТРАНИЦА ДОСТИЖЕНИЙ (сетка)
   ============================================ */

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin: 15px 0 30px;
}

.achievement-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    transition: 0.2s;
    box-shadow: var(--shadow);
}

.achievement-card:hover {
    transform: translateY(-6px);
    border-color: var(--primary);
    box-shadow: var(--shadow-hover);
}

.achievement-card img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 12px;
    border: 2px solid var(--border-color);
}

.achievement-card .ach-title {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.achievement-card .ach-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 6px;
    line-height: 1.4;
}

.achievement-card .ach-condition {
    font-size: 0.75rem;
    color: var(--text-muted);
    background: var(--bg-input);
    padding: 4px 12px;
    border-radius: 20px;
    display: inline-block;
    margin-top: 6px;
}

/* ============================================
   14. ПРОФИЛЬ
   ============================================ */

.profile-card {
    display: flex;
    gap: 30px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 30px;
    margin-bottom: 25px;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--primary);
    flex-shrink: 0;
}

.profile-info {
    flex: 1;
}

.profile-name-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.profile-name {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
}

.profile-gender {
    font-size: 1.4rem;
}

.profile-status {
    font-size: 0.75rem;
    padding: 2px 12px;
    border-radius: 20px;
    font-weight: 600;
}

.status-active {
    background: #065f46;
    color: #34d399;
}

.status-banned {
    background: #7f1d1d;
    color: #f87171;
}

.profile-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 20px;
}

.profile-field {
    padding: 4px 0;
}

.field-label {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.field-value {
    color: var(--text-primary);
    font-weight: 500;
}

.profile-rating {
    font-size: 1.2rem;
    font-weight: 700;
}

.twitch-link {
    color: #9146FF;
    text-decoration: none;
}

.twitch-link:hover {
    text-decoration: underline;
}

/* ============================================
   15. СЕКЦИИ ПРОФИЛЯ
   ============================================ */

.profile-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 20px;
}

.profile-section .section-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 16px 0;
    color: var(--text-primary);
}

.profile-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.profile-section.half {
    margin-bottom: 0;
}

.chart-wrap {
    height: 220px;
    position: relative;
}

/* ============================================
   16. УВЕДОМЛЕНИЯ (встроенные в контент)
   ============================================ */

.notifications-block {
    margin-top: 30px;
}

.notif-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-secondary);
}

.notification {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 12px 18px;
    margin-bottom: 10px;
    transition: 0.2s;
}

.notification:hover {
    border-color: var(--primary);
}

.notification img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.notif-content {
    flex: 1;
}

.notif-author {
    font-weight: 600;
    font-size: 0.9rem;
}

.notif-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.notif-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    transition: 0.2s;
}

.notif-close:hover {
    color: var(--danger);
}

/* ============================================
   17. ВСПЛЫВАЮЩИЕ УВЕДОМЛЕНИЯ (как в соцсетях)
   ============================================ */

.notification-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 360px;
    width: 100%;
    pointer-events: none;
}

.notification-toast {
    pointer-events: auto;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 14px 18px 14px 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
    display: flex;
    align-items: flex-start;
    gap: 12px;
    animation: slideInRight 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    transition: all 0.3s ease;
    position: relative;
    border-left: 4px solid var(--primary);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    min-width: 260px;
}

.notification-toast.technical {
    border-left-color: #ef4444;
}

.notification-toast.news {
    border-left-color: #22c55e;
}

.notification-toast.info {
    border-left-color: #3b82f6;
}

.notification-toast .avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid var(--border-color);
    margin-top: 2px;
}

.notification-toast .content {
    flex: 1;
    min-width: 0;
}

.notification-toast .content .header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 2px;
}

.notification-toast .content .author {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.notification-toast .content .type-badge {
    font-size: 0.6rem;
    background: var(--bg-input);
    color: var(--text-muted);
    padding: 0 8px;
    border-radius: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.notification-toast .content .message {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
    margin: 0;
    word-wrap: break-word;
}

.notification-toast .content .message strong {
    color: var(--text-primary);
}

.notification-toast .content .message em {
    color: var(--primary-light);
    font-style: italic;
}

.notification-toast .content .footer {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
}

.notification-toast .content .time {
    font-size: 0.6rem;
    color: var(--text-muted);
    letter-spacing: 0.2px;
}

.notification-toast .content .time .date {
    margin-right: 4px;
}

.notification-toast .close-toast {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 2px 4px;
    flex-shrink: 0;
    transition: 0.2s;
    margin-top: -2px;
    border-radius: 6px;
    line-height: 1;
    opacity: 0.5;
}

.notification-toast .close-toast:hover {
    opacity: 1;
    color: var(--danger);
    background: var(--bg-input);
}

/* Анимация */
@keyframes slideInRight {
    0% {
        opacity: 0;
        transform: translateX(60px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

.notification-toast.removing {
    animation: slideOutRight 0.3s ease forwards;
}

@keyframes slideOutRight {
    0% {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateX(60px) scale(0.95);
    }
}

/* ============================================
   18. ПУСТЫЕ СОСТОЯНИЯ
   ============================================ */

.empty-state {
    text-align: center;
    padding: 50px 20px;
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    margin: 10px 0 20px;
}

.empty-icon {
    font-size: 3.5rem;
    margin-bottom: 10px;
    display: block;
}

.empty-state p {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin: 0;
}

.empty-text {
    color: var(--text-muted);
    margin: 10px 0;
}

.page-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 15px 0 25px;
}

.section-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 30px 0 15px;
    color: var(--text-secondary);
}

/* ============================================
   19. ФУТЕР
   ============================================ */

.site-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 25px 0;
    margin-top: 30px;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.footer-info {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.footer-nav {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    transition: 0.2s;
}

.footer-link:hover {
    color: var(--text-secondary);
}

/* ============================================
   20. АДАПТИВНОСТЬ
   ============================================ */

@media (max-width: 992px) {
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .top-row {
        flex-direction: column;
        align-items: center;
    }
    .top-block {
        max-width: 100%;
        width: 100%;
    }
    .profile-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .profile-name-row {
        justify-content: center;
    }
    .profile-fields {
        grid-template-columns: 1fr;
    }
    .profile-split {
        grid-template-columns: 1fr;
    }
    .profile-section.half {
        margin-bottom: 20px;
    }
}

@media (max-width: 768px) {
    .nav-list {
        display: none;
        flex-direction: column;
        gap: 4px;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-secondary);
        padding: 16px 24px;
        border-bottom: 1px solid var(--border-color);
        box-shadow: var(--shadow);
    }
    .nav-list.active {
        display: flex;
    }
    .mobile-toggle {
        display: block;
    }
    .header-inner {
        flex-wrap: wrap;
    }
    .nav-tabs {
        justify-content: center;
    }
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .user-table {
        font-size: 0.85rem;
    }
    .user-table th,
    .user-table td {
        padding: 10px 12px;
    }
    .next-rank-cell {
        min-width: 70px;
    }
    .next-rank {
        font-size: 0.9rem;
    }
    .achievement-slide-big {
        flex: 0 0 170px;
        padding: 16px 12px 12px;
        min-height: 200px;
    }
    .achievement-slide-big img {
        width: 80px;
        height: 80px;
    }
    .achievement-slide-big .ach-title {
        font-size: 0.9rem;
    }
    .achievement-slide-big .ach-tooltip {
        min-width: 140px;
        max-width: 180px;
        font-size: 0.75rem;
        padding: 8px 12px;
    }
    .scroll-btn {
        width: 30px;
        height: 30px;
        font-size: 0.75rem;
    }
    .achievements-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 15px;
    }
    .achievement-card img {
        width: 60px;
        height: 60px;
    }
    .page-title {
        font-size: 1.5rem;
    }
    .footer-inner {
        flex-direction: column;
        text-align: center;
    }
    .notification-container {
        bottom: 16px;
        right: 16px;
        left: 16px;
        max-width: none;
        width: auto;
    }
    .notification-toast {
        padding: 12px 14px;
        border-radius: 12px;
        min-width: 0;
    }
    .notification-toast .avatar {
        width: 34px;
        height: 34px;
    }
    .notification-toast .content .author {
        font-size: 0.8rem;
    }
    .notification-toast .content .message {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .container-pub {
        padding: 15px 10px;
    }
    .search-form {
        flex-direction: column;
        border-radius: 10px;
    }
    .search-form button {
        border-radius: 0 0 10px 10px;
    }
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    .stat-item {
        padding: 10px 6px;
    }
    .stat-value {
        font-size: 1.1rem;
    }
    .stat-icon {
        font-size: 1.2rem;
    }
    .profile-avatar {
        width: 96px;
        height: 96px;
    }
    .profile-name {
        font-size: 1.4rem;
    }
    .profile-rating {
        font-size: 1.4rem;
    }
    .chart-wrap {
        height: 160px;
    }
    .achievement-slide-big {
        flex: 0 0 150px;
        padding: 12px 10px 10px;
        min-height: 170px;
    }
    .achievement-slide-big img {
        width: 64px;
        height: 64px;
    }
    .achievement-slide-big .ach-title {
        font-size: 0.8rem;
    }
    .achievement-slide-big .ach-date {
        font-size: 0.65rem;
    }
    .achievement-slide-big .ach-tooltip {
        min-width: 120px;
        max-width: 150px;
        font-size: 0.7rem;
        padding: 6px 10px;
    }
    .achievements-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    .achievement-card {
        padding: 14px;
    }
    .achievement-card img {
        width: 50px;
        height: 50px;
    }
    .achievement-card .ach-title {
        font-size: 0.85rem;
    }
    .achievement-card .ach-desc {
        font-size: 0.75rem;
    }
    .notification-toast {
        padding: 14px 16px;
        border-radius: 12px;
        min-width: 0;
    }
    .notification-toast .avatar {
        width: 36px;
        height: 36px;
    }
    .notification-toast .content .author {
        font-size: 0.85rem;
    }
    .notification-toast .content .message {
        font-size: 0.8rem;
    }
}

/* ============================================
   МОБИЛЬНАЯ АДАПТАЦИЯ
   ============================================ */

/* Скрытие на мобильных */
@media (max-width: 768px) {
    .hide-mobile {
        display: none !important;
    }
    .mobile-home {
        display: inline-flex !important;
    }
}

/* Кнопка "На главную" в профиле */
.mobile-back {
    display: none;
    margin-bottom: 16px;
}

@media (max-width: 768px) {
    .mobile-back {
        display: block;
    }
}

/* Навигация по странице профиля */
.profile-nav {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    margin: 20px 0 10px;
    position: sticky;
    bottom: 10px;
    z-index: 50;
    background: var(--bg-primary);
    padding: 10px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.profile-nav-btn {
    padding: 6px 14px;
    border-radius: 8px;
    background: var(--bg-card);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid var(--border-color);
    transition: 0.2s;
    white-space: nowrap;
}

.profile-nav-btn:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* Адаптация таблиц на мобильных */
@media (max-width: 768px) {
    .table-wrap {
        border-radius: 8px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .user-table {
        font-size: 0.8rem;
        min-width: 400px;
    }
    
    .user-table th,
    .user-table td {
        padding: 8px 10px;
        white-space: nowrap;
    }
    
    .user-table th:first-child,
    .user-table td:first-child {
        padding-left: 12px;
    }
    
    .user-table th:last-child,
    .user-table td:last-child {
        padding-right: 12px;
    }
    
    /* Карточка профиля на мобильных */
    .profile-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 20px;
    }
    
    .profile-name-row {
        justify-content: center;
    }
    
    .profile-fields {
        grid-template-columns: 1fr;
        gap: 2px;
    }
    
    .profile-avatar {
        width: 96px;
        height: 96px;
    }
    
    .profile-name {
        font-size: 1.4rem;
    }
    
    .profile-rating {
        font-size: 1.2rem;
    }
    
    /* Ачивки на мобильных */
    .achievement-slide-big {
        flex: 0 0 150px;
        padding: 12px 10px;
        min-height: 170px;
    }
    
    .achievement-slide-big img {
        width: 64px;
        height: 64px;
    }
    
    .achievement-slide-big .ach-title {
        font-size: 0.8rem;
    }
    
    .achievement-slide-big .ach-tooltip {
        min-width: 120px;
        max-width: 150px;
        font-size: 0.7rem;
        padding: 6px 10px;
    }
    
    /* Штрафы/поощрения на мобильных */
    .profile-split {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .profile-section.half {
        margin-bottom: 0;
    }
    
    /* Навигационные кнопки */
    .nav-tabs {
        justify-content: center;
        gap: 4px;
    }
    
    .nav-tabs a {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
    
    .profile-nav {
        gap: 4px;
        padding: 8px;
        flex-wrap: wrap;
    }
    
    .profile-nav-btn {
        font-size: 0.7rem;
        padding: 4px 10px;
    }
}

@media (max-width: 480px) {
    .container-pub {
        padding: 12px 8px;
    }
    
    .profile-card {
        padding: 16px;
    }
    
    .profile-avatar {
        width: 80px;
        height: 80px;
    }
    
    .profile-name {
        font-size: 1.2rem;
    }
    
    .achievement-slide-big {
        flex: 0 0 130px;
        padding: 10px 8px;
        min-height: 150px;
    }
    
    .achievement-slide-big img {
        width: 56px;
        height: 56px;
    }
    
    .achievement-slide-big .ach-title {
        font-size: 0.75rem;
    }
    
    .user-table {
        font-size: 0.7rem;
        min-width: 300px;
    }
    
    .user-table th,
    .user-table td {
        padding: 6px 8px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 6px;
    }
    
    .stat-item {
        padding: 8px 4px;
    }
    
    .stat-value {
        font-size: 1rem;
    }
    
    .stat-icon {
        font-size: 1.2rem;
    }
    
    .profile-nav-btn {
        font-size: 0.65rem;
        padding: 3px 8px;
    }
}