/* ========== RESET & BASE STYLES ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    zoom: 1.1;
}

/* iOS: zoom breaks iframe compositing in WebKit */
@supports (-webkit-touch-callout: none) {
    html {
        zoom: normal;
    }
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: #fafafa;
}

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

.site-title {
    display: flex;
    flex-direction: column;
}

.site-title a {
    font-size: 36px;
    font-weight: 300;
    color: #262626;
    text-decoration: none;
}

.site-description {
    font-size: 14px;
    color: #8e8e8e;
    margin-top: 1px;
}

/* ========== HEADER ========== */
.header {
    background-color: white;
    border-bottom: 1px solid #dbdbdb;
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-section h1 {
    font-size: 24px;
    font-weight: 300;
    color: #262626;
    margin: 0;
}

.logo-section h1 a {
    color: #262626;
    text-decoration: none;
}

.logo-section h1 a:hover {
    color: #0095f6;
}

/* ========== SOCIAL LINKS ========== */
.social-links {
    display: flex;
    gap: 15px;
    align-items: center;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 25px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    background: #f5f5f5;
    color: #262626;
}

.social-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.social-link img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.social-link.telegram:hover {
    background: #0088cc;
    color: white;
}

.social-link.max:hover {
    background: #9147ff;
    color: white;
}

.social-link.vk:hover {
    background: #4a76a8;
    color: white;
}

/* ========== SIDEBAR SORT BUTTONS (Кол-во · Имя · Дата) ========== */
.sidebar-sort {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: #888;
}

.sort-btn {
    cursor: pointer;
    user-select: none;
    padding: 2px 4px;
    border-radius: 4px;
    color: inherit;
    transition: color 0.15s ease, background 0.15s ease;
}

.sort-btn:hover {
    color: #555;
}

/* Active sort button — makes the selected sort visually obvious so the
   highlighted button always matches the actual list order. */
.sort-btn.active {
    color: #1a1a1a;
    font-weight: 700;
    background: rgba(0, 0, 0, 0.06);
}

.sort-sep {
    color: #ccc;
    user-select: none;
}

/* Dark theme support */
body.dark .sidebar-sort {
    color: #888;
}
body.dark .sort-btn:hover {
    color: #bbb;
}
body.dark .sort-btn.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
}