p {
    margin-bottom: 16px;
}

h1, h2, h3, h4, h5, h6, h7 {
	margin-bottom: 0.5em;
}

/* ===== POST ===== */
.post-header {
    padding: 25px 16px 0px 16px;
    max-width: 700px;
    margin: 0 auto;
}

.post-content {
    padding: clamp(16px, 0vw, 30px) 16px;
    max-width: 700px;
    margin: 0 auto;
}

.post-content h1 {
    font-size: clamp(24px, 5vw, 32px);
    margin-bottom: 0.75em;
    color: var(--text-primary);
}

.post-content h2 {
    font-size: clamp(20px, 4vw, 26px);
    margin-top: clamp(32px, 4vw, 48px);
    margin-bottom: clamp(8px, 1vw, 16px);
    color: var(--text-primary);
}

.post-content h3 {
    font-size: clamp(18px, 3vw, 22px);
    margin-top: clamp(24px, 3vw, 40px);
    margin-bottom: clamp(12px, 2vw, 20px);
    color: var(--text-primary);
}

.post-content p {
    margin-bottom: clamp(16px, 2vw, 16px);
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: clamp(16px, 2vw, 17px);
}

.post-content ul,
.post-content ol {
    margin-bottom: clamp(16px, 2vw, 16px);
    padding-left: clamp(20px, 3vw, 28px);
}

.post-content li {
    margin-bottom: clamp(8px, 1vw, 10px);
    color: var(--text-secondary);
    line-height: 1.6;
}

.post-content .post-date {
    color: var(--text-tertiary);
    font-size: clamp(13px, 2vw, 14px);
    margin-top: clamp(32px, 4vw, 48px);
}

figure {
    margin: 15px 0;
}

figcaption {
    font-style: italic;
    color: var(--text-secondary);
}

strong, b {
    color: var(--text-primary);
}

/* ===== GLOBAL LINK STYLES ===== */
a {
    color: var(--accent-secondary);
    text-decoration: underline;
    transition: color 0.2s;
}
a:hover {
    color: var(--accent-hover);
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Основные цвета (default = dark) */
    --bg-primary: #0f1419;
    --bg-secondary: #1a1f2e;
    --bg-tertiary: #252d3d;

    /* Текст */
    --text-primary: #e4e6eb;
    --text-secondary: #b0b3b8;
    --text-tertiary: #8a8d93;

    /* Акценты */
    --accent-primary: #3d41f8;
    --accent-secondary: #006200;
    --accent-hover: #4f46e5;
    --accent-hover-light: #d7d7d7;

    /* Статусы */
    --green: #05db94;
    --red: #ff5a5a;
    --orange: #f59e0b;
    --blue: #3b82f6;

    /* Бордеры */
    --border-color: #3a4350;
    --border-light: #2d3748;
}

/* ===== THEMES ===== */
html[data-theme="dark"] {
    --bg-primary: #0f1419;
    --bg-secondary: #1a1f2e;
    --bg-tertiary: #252d3d;
    --text-primary: #e4e6eb;
    --text-secondary: #b0b3b8;
    --text-tertiary: #8a8d93;
    --accent-primary: #474bef;
    --accent-secondary: #a0a9ff;
    --accent-hover: #4f46e5;
    --border-color: #3a4350;
    --border-light: #2d3748;
}

html[data-theme="space"] {
    --bg-primary: #0B0B1F;
    --bg-secondary: #1A1A3A;
    --bg-tertiary: #2A2A5A;
    --text-primary: #FFFFFF;
    --text-secondary: #9F9FFF;
    --text-tertiary: #6A6A8A;
    --accent-primary: #4A4AFF;
    --accent-secondary: #9F9FFF;
    --accent-hover: #3A3ADF;
    --border-color: #3A3A6A;
    --border-light: #2A2A5A;
}

html[data-theme="defi"] {
    --bg-primary: #0B0E14;
    --bg-secondary: #1A1E2A;
    --bg-tertiary: #2A2F3D;
    --text-primary: #FFFFFF;
    --text-secondary: #A0B0C0;
    --text-tertiary: #6A7A8A;
    --accent-primary: #00F5A0;
    --accent-secondary: #7B2FF7;
    --accent-hover: #00D590;
    --border-color: #2A3A4A;
    --border-light: #1A2A3A;
}

html[data-theme="purple"] {
    --bg-primary: #0F0719;
    --bg-secondary: #1E112C;
    --bg-tertiary: #2A1A3D;
    --text-primary: #FFFFFF;
    --text-secondary: #C0B7E8;
    --text-tertiary: #8A7FA8;
    --accent-primary: #C0B7E8;
    --accent-secondary: #FF6B95;
    --accent-hover: #A8A0D8;
    --border-color: #3A2A4A;
    --border-light: #2A1A3A;
}

html[data-theme="clean"] {
    --bg-primary: #FFFFFF;
    --bg-secondary: #F5F7FA;
    --bg-tertiary: #E8ECF2;
    --text-primary: #1A1A1A;
    --text-secondary: #4A5A6A;
    --text-tertiary: #8A9AA8;
    --accent-primary: #0052FF;
    --accent-secondary: #00B300;
    --accent-hover: #0045DD;
    --border-color: #E8ECF2;
    --border-light: #D0D8E0;
}

html[data-theme="clean"] body {
    background: #FFFFFF;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', sans-serif;
    background: linear-gradient(135deg, var(--bg-primary) 0%, #1a1f2e 100%);
    color: #f5f6fa;
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

.container {
    max-width: 2045px;
    margin: 0 auto;
    padding: 25px 16px 0px 16px;
}

/* ===== HEADER ===== */
header {
    margin: clamp(24px, 4vw, 32px) 0;
}

h1 {
    font-size: clamp(24px, 5vw, 32px);
    font-weight: 700;
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: flex;
    align-items: center;
    gap: 12px;
}

h1 i {
    color: var(--accent-primary);
    -webkit-text-fill-color: var(--accent-primary);
}

.description {
    color: var(--text-primary);
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 20px;
}

/* ===== NAVBAR ===== */
.navbar {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.navbar-container {
    max-width: 1645px;
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px;
}

.navbar-brand {
    display: flex;
    align-items: center;
}

.site-logo {
    display: flex;
    align-items: center;
    margin-right: 5px;
    align-self: center;
    height: 64px;
}

.site-logo svg {
    width: auto;
    height: 42px;
    display: block;
    margin: 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 18px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: opacity 0.2s;
}

.logo:hover {
    opacity: 0.8;
}


.icon {
    width: 16px;
    height: 16px;
    display: inline-block;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.icon-logo {
    width: 22px;
    height: 22px;
    color: var(--accent-primary);
}

.logo-text {
    display: inline;
}

.navbar-menu {
    display: block;
    flex: 1;
    margin-left: 40px;
}

.nav-list {
    list-style: none;
    display: flex;
    gap: clamp(16px, 3vw, 32px);
}

.nav-item {
    position: relative;
}

/* Dropdown menu styles */
.nav-item.has-dropdown {
    position: relative;
}

.nav-item.has-dropdown .dropdown-toggle {
    cursor: pointer;
}

.nav-item.has-dropdown .chevron {
    transition: transform 0.2s;
    flex-shrink: 0;
}

.nav-item.has-dropdown:hover .chevron {
    transform: rotate(180deg);
}

.nav-item.has-dropdown .dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    padding: 8px 0;
    min-width: 200px;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 1000;
}

.nav-item.has-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    margin: 0;
}

.dropdown-item {
    display: block;
    padding: 10px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.dropdown-item:hover {
    background: var(--bg-tertiary);
    color: var(--accent-primary);
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 0;
    transition: all 0.2s;
    border-bottom: 2px solid transparent;
}

.nav-link:hover {
    color: var(--accent-primary);
}

.nav-link.active,
.nav-link[aria-current="page"] {
    color: var(--accent-secondary);
    border-bottom-color: var(--accent-primary);
}

/* ===== MOBILE MENU BUTTON ===== */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: clamp(4px, 1vw, 5px);
    width: clamp(36px, 8vw, 40px);
    height: clamp(36px, 8vw, 40px);
    padding: clamp(6px, 1.5vw, 8px);
    background: transparent;
    border: 1px solid var(--border-light);
    border-radius: clamp(6px, 1.5vw, 8px);
    cursor: pointer;
    transition: all 0.2s;
    z-index: 1000;
}

.mobile-menu-btn:hover {
    background: var(--bg-tertiary);
    border-color: var(--accent-primary);
}

.burger-line {
    display: block;
    width: 100%;
    height: 2.2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-menu-btn.active .burger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.mobile-menu-btn.active .burger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active .burger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ===== MOBILE MENU ===== */
.mobile-menu {
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 0 clamp(12px, 3vw, 16px);
    z-index: 999;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.mobile-menu.show {
    max-height: clamp(300px, 70vh, 600px);
    padding: clamp(12px, 3vw, 16px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.mobile-nav-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: clamp(6px, 1.5vw, 8px);
}

.mobile-nav-item {
    border-bottom: 1px solid var(--border-light);
}

.mobile-nav-item:last-child {
    border-bottom: none;
}

/* Mobile dropdown */
.mobile-dropdown-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: clamp(10px, 2.5vw, 12px) clamp(6px, 1.5vw, 8px);
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: clamp(14px, 3.5vw, 15px);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.mobile-dropdown-toggle:hover {
    color: var(--accent-primary);
    background: var(--bg-tertiary);
    border-radius: 6px;
}

.mobile-dropdown-toggle .mobile-chevron {
    transition: transform 0.2s;
}

.mobile-dropdown-toggle.active .mobile-chevron {
    transform: rotate(180deg);
}

.mobile-dropdown-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.mobile-dropdown-menu.show {
    max-height: 500px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.mobile-dropdown-menu li {
    border-bottom: none;
}

.mobile-dropdown-menu .mobile-nav-link {
    padding-left: clamp(20px, 5vw, 28px);
}

.mobile-nav-link {
    display: block;
    padding: clamp(10px, 2.5vw, 12px) clamp(6px, 1.5vw, 8px);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: clamp(14px, 3.5vw, 15px);
    font-weight: 500;
    transition: all 0.2s;
}

.mobile-nav-link:hover {
    color: var(--accent-primary);
    background: var(--bg-tertiary);
    border-radius: 6px;
}

.mobile-nav-link.active {
    color: var(--accent-secondary);
}

/* ===== TABLET/MOBILE NAVBAR ===== */
@media (max-width: 992px) {
    .navbar-menu {
        display: none;
    }

    .theme-switcher {
        order: 2;
        margin-left: auto;
    }

    .mobile-menu-btn {
        display: flex;
        order: 3;
    }

    .navbar-container {
        height: clamp(56px, 12vw, 64px);
    }

    .site-logo svg {
        height: clamp(32px, 8vw, 42px);
    }

    .logo {
        font-size: clamp(16px, 4vw, 18px);
    }
}

/* ===== CONTROLS ===== */
.controls {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.search-box {
    flex: 1;
    min-width: 120px;
    max-width: 350px;
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 11px 16px 11px 38px;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    font-size: 13px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: all 0.2s;
}

.search-box .search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-tertiary);
    pointer-events: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.search-box .search-icon svg {
    width: 16px;
    height: 16px;
}

.search-box input::placeholder {
    color: var(--text-tertiary);
}

.search-box input:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: var(--bg-tertiary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.search-box .search-clear {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--bg-tertiary);
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    color: var(--text-tertiary);
    transition: all 0.2s;
}

.search-box .search-clear:hover {
    background: var(--accent-primary);
    color: #fff;
}

.search-box .search-clear svg {
    width: 12px;
    height: 12px;
}

/* ===== EXCHANGE FILTER ===== */
.exchange-filter-container {
    position: relative;
}

.exchange-filter-btn {
    padding: 10px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.exchange-filter-btn:hover {
    background: var(--bg-tertiary);
    border-color: var(--accent-primary);
}

.exchange-count {
    background: var(--accent-primary);
    color: white;
    border-radius: 10px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 600;
    min-width: 24px;
    text-align: center;
}

.exchange-dropdown { 
    position: absolute;
    left: -68px;
    margin-top: 8px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    padding: 16px;
    min-width: 200px;
    z-index: 1000;
    display: none;
    backdrop-filter: blur(10px);
}

.exchange-dropdown.show {
    display: block;
    animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-light);
}

.small-btn {
    padding: 5px 10px;
    font-size: 11px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-light);
    border-radius: 6px;
    cursor: pointer;
    color: var(--text-secondary);
    margin-left: 4px;
    transition: all 0.2s;
}

.small-btn:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
}

.exchange-checkboxes {
    max-height: 300px;
    overflow-y: auto;
}

.exchange-checkboxes::-webkit-scrollbar {
    width: 6px;
}

.exchange-checkboxes::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
    border-radius: 10px;
}

.exchange-checkboxes::-webkit-scrollbar-thumb {
    background: var(--accent-primary);
    border-radius: 10px;
}

.exchange-checkbox {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-light);
}

.exchange-checkbox:last-child {
    border-bottom: none;
}

.exchange-checkbox input {
    margin-right: 10px;
    cursor: pointer;
    accent-color: var(--accent-primary);
}

.exchange-checkbox label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-secondary);
    width: 100%;
}

.exchange-checkbox input:checked + label {
    color: var(--text-primary);
}

.exchange-icon-small {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: var(--text-tertiary);
    flex-shrink: 0;
}

.dropdown-footer {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-light);
    text-align: right;
}

.apply-btn {
    padding: 8px 16px;
    background: var(--accent-primary);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s;
}

.apply-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

/* ===== REFRESH BUTTON ===== */
.refresh-btn {
    padding: 10px 16px;
    background: var(--accent-primary);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: background 0.2s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    gap: 3px;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

.refresh-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transform-origin: 50% 50%;
    will-change: transform;
    backface-visibility: hidden;
}

.refresh-status {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 10px);
    transform: translateX(-50%) translateY(6px);
    font-size: 12px;
    color: var(--text-primary);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 6px 10px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
    opacity: 0;
    pointer-events: none;
    white-space: nowrap;
    z-index: 5;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.refresh-status.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.refresh-btn:hover {
    background: var(--accent-hover) !important;
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.3);
}

.refresh-btn#gainersBtn:hover {
    background: var(--green) !important;
    opacity: 1 !important;
}

.refresh-btn#losersBtn:hover {
    background: var(--red) !important;
    opacity: 1 !important;
}

.refresh-btn:active {
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

.refresh-btn#gainersBtn:active,
.refresh-btn#gainersBtn.active {
    opacity: 1 !important;
}

.refresh-btn#losersBtn:active,
.refresh-btn#losersBtn.active {
    opacity: 1 !important;
}

.refresh-btn.rotating .refresh-icon {
    animation: rotate 0.9s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ===== FILTER BUTTONS (GAINERS/LOSERS) ===== */
.filter-btn-green {
    background: var(--green) !important;
    border: none !important;
    opacity: 0.6;
}

.filter-btn-green:hover {
    background: var(--green) !important;
    opacity: 1 !important;
}

.filter-btn-red {
    background: var(--red) !important;
    border: none !important;
    opacity: 0.6;
}

.filter-btn-red:hover {
    background: var(--red) !important;
    opacity: 1 !important;
}

.btn-icon {
    font-size: 16px;
}

/* ===== TABLE HEADER SORT CONTENT ===== */
.th-sort-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

/* ===== STATS ===== */
.stats {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    font-size: 13px;
    color: var(--text-secondary);
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--border-light);
    align-items: center;
    flex-wrap: wrap;
}

.stats-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1 1 80px;
    min-width: 200px;
    flex-wrap: wrap;
}

.stats-controls .search-box {
    flex: 1 1 37px;
    min-width: 56px;
    max-width: 100%;
}

.refresh-group {
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
    position: relative;
}

.stats-metrics {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
    white-space: nowrap;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.stat-label {
    font-weight: 600;
    color: var(--text-primary);
}

/* ===== TABS ===== */
.tabs-section {
    padding: 0 clamp(16px, 3vw, 24px);
}

.tabs {
    display: flex;
    gap: 5px;
    padding-bottom: 0;
}

.tab {
    padding: 12px 20px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 8px 8px 0 0;
}

.tab:hover {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

.tab.active {
    color: var(--accent-secondary);
    outline: 1px solid var(--accent-primary);
    background: var(--bg-secondary);
}

/*==== POST TABLE ==== */

                .post-table {
                    width: 100%;
                    border-collapse: collapse;
                    margin: 24px 0;
                    table-layout: auto;
                    position: static;
                }
                .post-table th {
                    background: var(--bg-tertiary);
                    color: var(--text-primary);
                    font-weight: 600;
                    padding: 12px 16px;
                    text-align: left;
                    border: 1px solid var(--border-color);
                    white-space: normal;
                    word-wrap: break-word;
                    line-height: 1.5;
                }
                .post-table td {
                    padding: 12px 16px;
                    border: 1px solid var(--border-color);
                    color: var(--text-secondary);
                    vertical-align: top;
                    white-space: normal;
                    word-wrap: break-word;
                    line-height: 1.5;
                }
                .post-table tr:nth-child(even) td {
                    background: var(--bg-secondary);
                }
                .post-table tr:nth-child(odd) td {
                    background: var(--bg-tertiary);
                }



/* ===== TICKERS TABLE ===== */
.table-section .table-wrapper {
    width: 100%;
    overflow-x: auto;
    overflow-y: visible;
    position: relative;
    -webkit-overflow-scrolling: touch;
    background: var(--bg-secondary);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border-color);
    margin-bottom: 24px;
}

.table-section .table-wrapper::-webkit-scrollbar {
    height: 8px;
    background: var(--bg-secondary);
    border-radius: 8px;
}

.table-section .table-wrapper::-webkit-scrollbar-thumb {
    background: var(--accent-secondary);
    border-radius: 8px;
}

.table-section .table-wrapper::-webkit-scrollbar-thumb:hover {
    background: var(--accent-primary);
}

.table-section .table-wrapper {
    scrollbar-color: var(--accent-secondary) var(--bg-secondary);
    scrollbar-width: thin;
}

.table-section .table-wrapper.is-hidden {
    visibility: hidden;
}

.table-section table {
    border-collapse: collapse;
    position: relative;
    table-layout: fixed;
    width: max-content;
}

.table-section thead {
    background: linear-gradient(90deg, var(--bg-tertiary), var(--bg-secondary));
    position: static;
    border-bottom: 2px solid var(--border-color);
}

.table-section thead th {
    position: static;
    padding: 14px 12px;
    font-weight: 700;
    text-align: center;
    font-size: 14px;
    line-height: 1.4;
    color: var(--text-secondary);
    background: linear-gradient(90deg, var(--bg-tertiary), var(--bg-secondary));
    white-space: nowrap;
    cursor: pointer;
    user-select: none;
    transition: color 0.2s;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    border-right: 1px solid var(--border-light);
}

.table-section thead th:first-child {
    border-right: 2px solid var(--border-color);
}

.table-section thead th:nth-child(3),
.table-section tbody td:nth-child(3) {
    min-width: 120px !important;
    max-width: 180px;
    white-space: nowrap;
}

.table-section thead th.col-exchange,
.table-section tbody td.col-exchange {
    width: 120px;
    min-width: 120px;
}

.table-section th.col-index {
    text-align: center;
    vertical-align: middle;
}

.table-section thead th:hover {
    color: var(--accent-primary);
}

.table-section thead th.sorted {
    color: var(--accent-primary);
}

.sort-icon {
    font-size: 11px;
    opacity: 0.5;
    transition: opacity 0.2s;
}

.table-section thead th.sorted .sort-icon {
    opacity: 1;
}

/* ===== TABLE BODY ===== */
.table-section tbody tr {
    border-bottom: 1px solid var(--border-light);
    transition: background 0.15s;
}

.table-section tbody tr:hover {
    background: var(--bg-tertiary);
}

.table-section tbody td {
    padding: 12px 8px;
    text-align: center;
    font-size: 14px;
    line-height: 1.4;
    color: var(--text-primary);
    border-right: 1px solid var(--border-light);
    vertical-align: middle;
}

.table-section tbody td:first-child {
    font-weight: 500;
    font-family: 'SF Mono', 'Monaco', 'Cascadia Code', 'Roboto Mono', Courier, monospace;
    border-right: 2px solid var(--border-color);
    min-width: 44px;
    color: var(--text-tertiary);
}

.table-section thead th:nth-child(2) {
    text-align: left;
    background: linear-gradient(90deg, var(--bg-tertiary), var(--bg-secondary));
    border-right: 2px solid var(--border-color);
}

.table-section tbody td:nth-child(2) {
    text-align: left;
    font-weight: 500;
    font-family: 'SF Mono', 'Monaco', 'Cascadia Code', 'Roboto Mono', Courier, monospace;
    border-right: 2px solid var(--border-color);
    min-width: 140px;
    max-width: 180px;
    white-space: nowrap;
    color: var(--accent-secondary);
}

.table-section tbody tr.highlighted {
    background: rgba(99, 102, 241, 0.1) !important;
}

.table-section tbody tr.highlighted td:first-child {
    background: rgba(99, 102, 241, 0.1);
}

/* ===== COIN CELL ===== */
.coin-cell {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
}

.coin-name {
    font-weight: 600;
    cursor: pointer;
    transition: color 0.15s;
    user-select: none;
    font-family: 'SF Mono', 'Monaco', 'Cascadia Code', 'Roboto Mono', Courier, monospace;
    color: var(--text-secondary);
}

/* Цвет названия монеты при наведении строки (синхронизировано с переходом строки) */
.table-section tbody tr:hover .coin-name {
    color: var(--accent-primary);
}

.copy-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    opacity: 0.4;
    transition: all 0.2s;
    color: var(--text-secondary);
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    width: 22px;
    height: 22px;
}

.copy-btn:hover {
    opacity: 1;
    color: var(--accent-primary);
}

.copy-btn.copied {
    color: var(--green);
    opacity: 1;
}

.copy-btn svg {
    width: 12px;
    height: 12px;
}

.copy-btn:active {
    transform: scale(0.95);
}

/* ===== RATE CELLS ===== */
.rate-value {
    font-weight: 800;
    font-size: 14px;
    padding: 3px 8px;
    border-radius: 3px;
    white-space: nowrap;
    font-family: 'SF Mono', 'Monaco', 'Cascadia Code', 'Roboto Mono', Courier, monospace;
    letter-spacing: 0.3px;
}

.rate-value.positive {
    color: var(--green);
    background: rgba(16, 185, 129, 0.15);
}

.rate-value.negative {
    color: var(--red);
    background: rgba(239, 68, 68, 0.15);
}

.rate-value.neutral {
    color: var(--text-tertiary);
    background: var(--bg-tertiary);
}

/* ===== CHART BUTTON ===== */
.chart-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 3px 10px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    background: transparent;
    border: 1px solid rgba(176, 179, 184, 0.3);
    border-radius: 3px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
    line-height: 1;
    opacity: 1;
    letter-spacing: 0.2px;
}

.chart-btn:hover {
    background: var(--bg-tertiary);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    transform: translateY(-1px);
}

.has-tooltip {
    position: relative;
}

.has-tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 50%;
    bottom: calc(100% + 8px);
    transform: translateX(-50%) translateY(4px);
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-light);
    border-radius: 6px;
    padding: 6px 8px;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
    transition: opacity 0.15s ease, transform 0.15s ease;
    z-index: 2;
}

.has-tooltip:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.chart-btn:hover {
    background: transparent;
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
}

.chart-btn:active {
    transform: translateY(0);
    border-color: var(--accent-primary);
}

.chart-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    height: 14px;
}

.chart-icon svg {
    width: 11px;
    height: 11px;
    vertical-align: middle;
}

.chart-text {
    white-space: nowrap;
    line-height: 1;
}

/* ===== LOADING/ERROR STATES ===== */
.loading {
    padding: 80px 20px;
    text-align: center;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.error-state,
.empty-state {
    display: none;
}

.retry-margin {
    margin-top: 15px;
}

.error-state h3 {
    margin: 10px 0;
    color: var(--red);
}

/* ===== PAGINATION ===== */
.pagination-container {
    display: flex !important;
    justify-content: center !important;
    align-items: center;
    gap: 20px;
    margin-top: 24px;
    padding: 10px 5px;
    background: var(--bg-secondary);
    border-radius: 10px;
    border: 1px solid var(--border-light);
    flex-wrap: wrap;
}

.pagination-container[style*="display: none"] {
    display: none !important;
}

.pagination-info {
    font-size: 12px;
    color: var(--text-secondary);
}

.pagination-controls {
    display: flex;
    gap: 8px;
    align-items: center;
}

.pagination-btn {
    padding: 8px 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-light);
    border-radius: 6px;
    cursor: pointer;
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 600;
    transition: all 0.2s;
}

.pagination-btn:hover:not(:disabled) {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
}

.pagination-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.page-numbers {
    display: flex;
    gap: 4px;
}

.page-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    cursor: pointer;
    font-size: 11px;
    border: 1px solid var(--border-light);
    background: var(--bg-tertiary);
    transition: all 0.2s;
    font-weight: 600;
    color: var(--text-secondary);
}

.page-btn:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
}

.page-btn.active {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}

.pagination-jump {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
}

.pagination-jump input {
    width: 50px;
    padding: 6px;
    border: 1px solid var(--border-light);
    border-radius: 4px;
    font-size: 12px;
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.pagination-jump input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.1);
}

/* ===== SKIP LINK ===== */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--accent-primary);
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-link:focus {
    top: 0;
}

/* ===== FOOTER ===== */
footer {
    margin-top: clamp(40px, 6vw, 80px);
    padding: clamp(24px, 4vw, 40px) clamp(12px, 2vw, 24px) clamp(16px, 3vw, 20px);
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
}

footer ul {
    list-style: none;
}

footer h2 {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto 30px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: clamp(24px, 4vw, 40px);
}

.footer-content li
 {
    padding: 7px;
}

.footer-section {
	font-size: 13px;
    display: flex;
    flex-direction: column;
}

/* Сетка для скринеров бирж в футере (2 колонки) */
.footer-exchanges-grid {
    display: grid;
    grid-template-columns: 0.35fr 0.35fr;
    gap: 8px;
}

.footer-exchanges-grid ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin: 0;
    padding: 0;
}

.footer-exchanges-grid li {
    margin: 0;
    border-bottom: none;
}

.footer-exchanges-grid a {
    font-size: 13px;
    padding: 0;
}

.footer-section a {
    color: var(--accent-secondary);
    text-decoration: none;
    transition: color 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.footer-section a:hover {
    color: var(--accent-primary);
}

.social-links {
    display: flex !important;
    gap: 16px !important;
    flex-direction: row !important;
}

.social-links li a {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border-radius: 6px;
    border: 1px solid var(--border-light);
    transition: all 0.2s;
    font-size: 16px;
}

.social-links li a:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
    transform: translateY(-2px);
}

.footer-bottom {
    max-width: 1400px;
    margin: 0 auto;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
    text-align: center;
    font-size: 12px;
    color: var(--text-tertiary);
}

.rate-chart-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    min-height: 60px;
    justify-content: center;
}

@media (max-width: 768px) {
    /* Footer mobile styles */
    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 24px;
    }

    .footer-exchanges-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .footer-exchanges-grid a {
        font-size: 12px;
    }

    .rate-chart-container {
        gap: 10px;
        min-height: 54px;
    }
}


@media (max-width: 768px) {
    .controls {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .search-box {
        max-width: 100%;
    }

    .stats {
        flex-direction: column;
        gap: 10px;
        padding: 12px;
        align-items: stretch;
    }

    .pagination-container {
        flex-direction: column;
        gap: 12px;
    }
}

/* ===== COOKIE NOTICE ===== */
.cookie-notice {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border-top: 2px solid var(--border-color);
    padding: 15px 20px;
    z-index: 9999;
    transition: opacity 0.3s ease;
    display: none; /* Скрыт по умолчанию */
}

.cookie-notice.show {
    display: block;
}

.cookie-notice.hidden {
    display: none;
}

.cookie-notice-content {
    max-width: 1550px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.cookie-notice p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 14px;
    flex: 1;
    min-width: 200px;
}

.cookie-notice-link {
    color: var(--accent-primary);
    text-decoration: underline;
    font-size: 14px;
}

.cookie-notice-link:hover {
    color: var(--accent-hover);
}

.cookie-accept-btn {
    background: var(--accent-primary);
    color: #fff;
    border: none;
    padding: 10px 25px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.cookie-accept-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

@media (max-width: 768px) {
    .cookie-notice-content {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }

    .cookie-notice p {
        min-width: auto;
    }

    .cookie-accept-btn {
        width: 100%;
    }
}

/* ===== SCROLL TO TOP BUTTON ===== */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 48px;
    height: 48px;
    background: var(--accent-primary);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 9998;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top:hover {
    background: var(--accent-hover);
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
}

.scroll-to-top svg {
    width: 24px;
    height: 24px;
}

@media (max-width: 768px) {
    .scroll-to-top {
        bottom: 20px;
        right: 20px;
        width: 42px;
        height: 42px;
    }

    .scroll-to-top svg {
        width: 20px;
        height: 20px;
    }
}

/* ============================================
   THEME SWITCHER STYLES
   ============================================ */

/* Container */
.theme-switcher {
    position: relative;
}

/* Button */
.theme-switcher button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    margin-right: 10px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-secondary);
}

.theme-switcher button:hover {
    border-color: var(--accent-primary);
    color: var(--text-primary);
}

.theme-switcher button svg:first-child {
    flex-shrink: 0;
}

.theme-switcher #theme-name {
    font-size: 13px;
    font-weight: 500;
}

.theme-switcher .theme-arrow {
    opacity: 0.6;
    transition: transform 0.2s;
}

.theme-switcher button[aria-expanded="true"] .theme-arrow {
    transform: rotate(180deg);
}

/* Dropdown */
.theme-switcher #theme-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    padding: 8px;
    min-width: 200px;
    z-index: 1000;
    display: none;
    list-style: none;
}

.theme-switcher #theme-dropdown.show {
    display: block;
}

/* Dropdown items */
.theme-switcher #theme-dropdown li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.theme-switcher #theme-dropdown li:hover {
    background: var(--bg-tertiary);
}

.theme-switcher #theme-dropdown li span {
    font-size: 13px;
    color: var(--text-primary);
}

.theme-switcher #theme-dropdown li svg:first-child {
    flex-shrink: 0;
}

.theme-switcher #theme-dropdown li .theme-check {
    margin-left: auto;
    flex-shrink: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .theme-switcher #theme-dropdown {
        right: -10px;
        min-width: 180px;
    }
}



/* ============================================
   TICKERS SCREENER STYLES
   ============================================ */

/* Цвета для ячеек с процентами */
.positive {
    color: var(--green);
    font-weight: 600;
}

.negative {
    color: var(--red);
    font-weight: 600;
}

/* Стили для ячеек таблицы тикеров */
.positive {
    color: var(--green);
    font-weight: 600;
}

.negative {
    color: var(--red);
    font-weight: 600;
}

.chart-cell {
    text-align: center;
    white-space: nowrap;
    min-width: 100px;
}

/* Цвета для ячеек с процентами */
.price-cell,
.high-cell,
.low-cell,
.open-cell,
.bid-cell,
.ask-cell {
    font-family: 'SF Mono', 'Monaco', 'Cascadia Code', 'Roboto Mono', Courier, monospace;
    white-space: nowrap;
}

.volume-cell,
.base-volume-cell {
    font-weight: 600;
    color: var(--text-primary);
}

.change-cell {
    font-family: 'SF Mono', 'Monaco', 'Cascadia Code', 'Roboto Mono', Courier, monospace;
    white-space: nowrap;
}

/* Эллипис в пагинации */
.page-ellipsis {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
    padding: 0 4px;
}

/* Скрыть initialData JSON */
#initialData {
    display: none !important;
}

/* Адаптив для таблицы тикеров */
@media (max-width: 1200px) {
    #tickersTable {
        min-width: 1100px;
    }
}

@media (max-width: 1240px) {
    .stats-metrics {
        width: 100%;
        margin-left: 0;
        justify-content: flex-end;
    }
}

@media (max-width: 768px) {
    .pagination-container {
        flex-direction: column;
        gap: 12px;
    }

    .pagination-controls {
        flex-wrap: wrap;
        justify-content: center;
    }

    /* ===== MOBILE TABLE HEADER CONTROLS ===== */
    .stats {
        padding: 10px 12px;
        gap: 10px;
    }

    .stats-controls {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        width: 100%;
    }

    .search-box {
        flex: 1 1 100%;
        max-width: 100%;
        min-width: 0;
        order: -1;
    }

    .search-box input {
        width: 100%;
    }

    .exchange-filter-container {
        flex: 0 0 auto;
    }

    .exchange-filter-btn {
        white-space: nowrap;
        padding: 8px 10px;
        font-size: 12px;
    }

    .refresh-group {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        flex: 1 1 100%;
    }

    .refresh-btn {
        flex: 1 1 auto;
        min-width: 0;
        white-space: nowrap;
        padding: 8px 10px;
        font-size: 11px;
    }

    .refresh-btn .btn-icon {
        font-size: 12px;
    }

    /* Метрики под кнопками */
    .stats-metrics {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        width: 100%;
        margin-left: 0;
        padding-top: 4px;
        border-top: 1px solid var(--border-light);
    }

    .stat-item {
        display: flex;
        align-items: center;
        gap: 4px;
        font-size: 11px;
        white-space: nowrap;
    }

    .stat-label {
        color: var(--text-tertiary);
        font-size: 10px;
    }

    /* Тултипы отключаем на тач-устройствах */
    .has-tooltip::after {
        display: none;
    }

    /* Таблица — компактные шрифты */
    thead th {
        font-size: 11px;
        padding: 10px 6px;
        letter-spacing: 0.3px;
    }

    tbody td {
        font-size: 13px;
        padding: 10px 6px;
    }

}

/* ===== CELL UPDATE ANIMATION ===== */
td.cell-updated-animate,
#lastUpdate.cell-updated-animate {
    background: rgba(0, 255, 76, 0.120);
    transition: background 0.5s ease-out;
}

/* Плавное исчезновение при удалении класса */
td.cell-fading,
#lastUpdate.cell-fading {
    background: transparent;
    transition: background 0.5s ease-out;
}

/* ===== EXTRA SMALL SCREENS ===== */
@media (max-width: 380px) {

    .exchange-filter-btn {
        padding: 8px;
        font-size: 11px;
    }

    .refresh-btn {
        padding: 8px;
        font-size: 10px;
    }

    .refresh-btn span:not(.refresh-icon):not(.btn-icon) {
        display: none;
    }

    thead th {
        font-size: 10px;
        padding: 8px 4px;
    }

    tbody td {
        font-size: 12px;
        padding: 8px 4px;
    }
}

/* ===== BREADCRUMBS ===== */
.breadcrumbs {
    margin-bottom: 12px;
}

.breadcrumbs-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 8px;
    font-size: 0.8rem;
}

.breadcrumbs-item {
    display: flex;
    align-items: center;
    color: var(--text-secondary);
}

.breadcrumbs-item:not(:last-child)::after {
    content: '/';
    margin-left: 8px;
    color: var(--text-secondary);
}

.breadcrumbs-link {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumbs-link:hover {
    color: var(--accent-primary);
}

.breadcrumbs-item--active .breadcrumbs-link {
    color: var(--text-primary);
    font-weight: 500;
}

#main-content header .breadcrumbs {
    margin-bottom: 12px;
}

/* ===== FAQ SECTION ===== */
.faq-section {
    margin-top: clamp(40px, 6vw, 80px);
    margin-bottom: clamp(40px, 6vw, 80px);
}

/* FAQ внутри post-content для одинаковой ширины */
.post-content .faq-section {
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
}

.faq-section h2 {
    font-size: clamp(18px, 3vw, 24px);
    color: var(--text-primary);
    margin-bottom: clamp(20px, 3vw, 32px);
    text-align: center;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq-item {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-tertiary);
}

.faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: clamp(14px, 3vw, 18px) clamp(16px, 3vw, 20px);
    background: transparent;
    border: none;
    cursor: pointer;
    text-align: left;
    font-size: clamp(14px, 2.5vw, 16px);
    font-weight: 600;
    color: var(--text-primary);
    transition: all 0.2s;
}

.faq-question:hover {
    background: var(--bg-secondary);
}

.faq-question[aria-expanded="true"] {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.faq-question-text {
    flex: 1;
    padding-right: 16px;
}

.faq-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    transition: transform 0.3s;
}

.faq-question[aria-expanded="true"] .faq-icon {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.faq-answer p,
.faq-answer ul,
.faq-answer ol {
    padding: 7px 10px;
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: clamp(14px, 2.5vw, 15px);
}

.faq-answer ul,
.faq-answer ol {
    padding-left: 24px;
    margin-top: 12px;
}

.faq-answer li {
    margin-bottom: 8px;
}

.faq-answer strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* FAQ mobile styles */
@media (max-width: 768px) {
    .faq-question {
        padding: 14px 16px;
    }

    .faq-answer p,
    .faq-answer ul,
    .faq-answer ol {
        padding: 14px 16px;
    }

    .breadcrumbs-list {
        gap: 4px;
        font-size: 0.75rem;
    }

    .breadcrumbs-item:not(:last-child)::after {
        margin-left: 4px;
    }

    #main-content header .breadcrumbs-list {
        gap: 4px;
        font-size: 0.75rem;
    }
    #main-content header .breadcrumbs-item:not(:last-child)::after {
        margin-left: 4px;
    }
}