* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ===== АГЕНТЫ ===== */
#agents-canvas {
    position: fixed;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* ===== КОСМОС ===== */
#stars-canvas {
    position: fixed;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    background: #000;
}

/* ===== ВСТУПИТЕЛЬНЫЙ ЭКРАН ===== */
.intro {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: opacity 0.5s ease 0.3s, visibility 0.5s ease 0.3s;
}

.intro.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.intro-inner {
    text-align: center;
    user-select: none;
}

.intro-letters {
    display: flex;
    justify-content: center;
    align-items: center;
    line-height: 1;
}

.letter {
    font-family: 'Bodoni Moda', serif;
    font-style: normal;
    font-size: clamp(160px, 24vw, 340px);
    font-weight: 700;
    color: #fff;
    display: inline-block;
    transition: transform 0.8s cubic-bezier(0.76, 0, 0.24, 1), opacity 0.5s ease;
    letter-spacing: 0.08em;
    line-height: 0.9;
    text-shadow: 0 0 30px rgba(255,255,255,0.18), 0 0 8px rgba(255,255,255,0.3);
}

.intro-letters:not(.split) .letter {
    animation: breathe 3s ease-in-out infinite;
}

.intro-letters:not(.split) #letter-l {
    animation-delay: 0.3s;
}

@keyframes breathe {
    0%, 100% { text-shadow: 0 0 15px rgba(255,255,255,0.15); opacity: 0.9; }
    50%       { text-shadow: 0 0 25px rgba(255,255,255,0.3); opacity: 1; }
}

.intro-letters.split #letter-s {
    transform: translateX(-60vw);
    animation: none;
}

.intro-letters.split #letter-l {
    transform: translateX(60vw);
    animation: none;
}

.intro-sub {
    font-size: 18px;
    color: #555;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    margin-top: 28px;
    font-weight: 400;
    transition: opacity 0.15s ease;
}

.intro-letters.split ~ .intro-sub {
    opacity: 0;
}

/* ===== СЧЁТЧИК ===== */
.counter-screen {
    position: fixed;
    inset: 0;
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.counter-screen.visible {
    opacity: 1;
}

.counter-box {
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 20px 32px;
    width: 140px;
    height: 70px;
    transform: scale(0.4);
    opacity: 0;
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1),
                opacity 0.4s ease,
                width 0.6s cubic-bezier(0.22, 1, 0.36, 1),
                height 0.6s cubic-bezier(0.22, 1, 0.36, 1),
                padding 0.6s ease;
    box-shadow: 0 0 30px rgba(255,255,255,0.06);
    overflow: hidden;
    white-space: nowrap;
}

.counter-box.grow {
    transform: scale(1);
    opacity: 1;
    width: 340px;
    height: 160px;
    padding: 32px 48px;
}

.counter-number {
    font-size: 52px;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.02em;
    line-height: 1;
}

.counter-label {
    font-size: 13px;
    color: #555;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

/* ===== ОСНОВНОЙ КОНТЕНТ ===== */
.main-content {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s ease;
}
.main-content.visible {
    opacity: 1;
    pointer-events: all;
}

body {
    font-family: 'Space Grotesk', sans-serif;
    background: #000;
    color: #e0e0e0;
    min-height: 100vh;
}

.main-content {
    position: relative;
    z-index: 10;
}

/* Шапка */
header {
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    padding: 16px 32px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-sl {
    font-family: 'Bodoni Moda', serif;
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.05em;
}

.logo-dot {
    color: rgba(255,255,255,0.25);
    font-size: 18px;
}

.logo-name {
    font-size: 13px;
    font-weight: 500;
    color: rgba(255,255,255,0.45);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.header-count {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: rgba(255,255,255,0.18);
    font-weight: 400;
    margin-left: 4px;
}

.surprise-btn {
    padding: 6px 10px;
    background: transparent;
    border: 1px solid #222;
    border-radius: 8px;
    color: #444;
    font-size: 16px;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
    line-height: 1;
}

.surprise-btn:hover { color: #aaa; border-color: #444; }

.skill-badge-new {
    font-family: 'JetBrains Mono', monospace;
    font-size: 8px;
    font-weight: 500;
    letter-spacing: 0.12em;
    color: #3EA898;
    border: 1px solid #3EA898;
    border-radius: 4px;
    padding: 1px 5px;
    opacity: 0.8;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.stats {
    font-size: 13px;
    color: #444;
}

.lang-switcher {
    display: flex;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 100px;
    padding: 3px;
    gap: 2px;
}

.lang-btn {
    padding: 5px 15px;
    border-radius: 100px;
    border: none;
    background: transparent;
    color: rgba(255,255,255,0.35);
    font-size: 11px;
    font-weight: 700;
    font-family: 'Space Grotesk', sans-serif;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lang-btn:hover { color: rgba(255,255,255,0.7); }

.lang-btn.active {
    background: #fff;
    color: #000;
}

.layout-outer {
    max-width: 1440px;
    margin: 0 auto;
    padding: 200px 24px 0;
    position: relative;
}

.panel-sl {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 5;
    gap: 12px;
}

.panel-sl-letters {
    pointer-events: none;
    cursor: default;
}

.panel-sl-letters {
    display: flex;
    align-items: center;
    gap: 0.06em;
    line-height: 1;
}

.panel-sl-s,
.panel-sl-l {
    font-family: 'Bodoni Moda', serif;
    font-weight: 700;
    font-size: clamp(70px, 10vw, 140px);
    color: #fff;
    text-shadow:
        0 0 60px rgba(255,255,255,0.12),
        0 0 20px rgba(255,255,255,0.08);
    display: inline-block;
    animation: panelBreath 4s ease-in-out infinite;
}

.panel-sl-l {
    animation-delay: 0.4s;
}

@keyframes panelBreath {
    0%, 100% { text-shadow: 0 0 40px rgba(255,255,255,0.08); opacity: 0.88; }
    50%       { text-shadow: 0 0 80px rgba(255,255,255,0.22), 0 0 30px rgba(255,255,255,0.1); opacity: 1; }
}

.panel-sl-sub {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.5em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.2);
}

/* Двухколоночный layout */
.layout {
    display: flex;
    align-items: stretch;
    gap: 0;
    padding: 24px;
    max-width: 100%;
    margin: 0;
    background: rgba(10,10,10,0.75);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    animation: glowPulse 3s ease-in-out infinite;
    position: relative;
    z-index: 10;
    height: calc(100vh + 20px);
    min-height: 620px;
    overflow: hidden;
}

/* Градиентный fade внизу рамки */
.layout::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(to bottom, transparent, rgba(6,6,6,0.92));
    pointer-events: none;
    z-index: 50;
    border-radius: 0 0 20px 20px;
}

@keyframes glowPulse {
    0%   { box-shadow: 0 0 8px rgba(255,255,255,0.08), 0 0 20px rgba(255,255,255,0.04); }
    50%  { box-shadow: 0 0 20px rgba(255,255,255,0.25), 0 0 50px rgba(255,255,255,0.1), 0 0 80px rgba(255,255,255,0.05); }
    100% { box-shadow: 0 0 8px rgba(255,255,255,0.08), 0 0 20px rgba(255,255,255,0.04); }
}

/* Боковая панель */
.sidebar {
    width: 220px;
    flex-shrink: 0;
    padding-right: 24px;
    border-right: 1px solid rgba(255,255,255,0.04);
    overflow-y: auto;
    height: 100%;
    scrollbar-width: none;
}
.sidebar::-webkit-scrollbar { display: none; }

.sidebar-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    color: #484848;
    letter-spacing: 0.05em;
    margin-bottom: 24px;
    font-weight: 400;
}

.filter-box { padding: 0; }

.categories {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* ── Terminal-style фильтры ── */
.cat-btn {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 8px 0;
    border: none;
    border-radius: 0;
    background: transparent;
    color: #4a4a4a;
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
    transition: color 0.15s;
    text-align: left;
    width: 100%;
    position: relative;
}

.cat-btn:hover {
    color: #888;
    background: transparent;
}

.cat-btn.active {
    color: var(--cat-color, #fff);
    font-weight: 500;
    background: transparent;
    border: none;
    box-shadow: none;
}

/* > курсор */
.cat-prefix {
    font-size: 12px;
    width: 12px;
    flex-shrink: 0;
    color: transparent;
    transition: color 0.15s;
    font-weight: 700;
}

.cat-btn.active .cat-prefix {
    color: var(--cat-color, #fff);
}

.cat-btn:hover .cat-prefix {
    color: #444;
}

/* мигание курсора у активного */
@keyframes termBlink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0; }
}

.cat-btn.active .cat-prefix {
    animation: termBlink 1.2s step-end infinite;
}

.cat-name {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0.01em;
}

.cat-icon { display: none; }

.cat-count {
    font-size: 12px;
    color: #404040;
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
    font-family: 'JetBrains Mono', monospace;
    transition: color 0.15s;
}

.cat-btn:hover .cat-count { color: #666; }

.cat-btn.active .cat-count {
    color: var(--cat-color, #666);
    opacity: 0.6;
}

/* Правая часть */
.content {
    flex: 1;
    min-width: 0;
    padding-left: 24px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
}

.content-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: #2a2a2a;
    letter-spacing: 0.05em;
    margin-bottom: 14px;
    font-weight: 400;
}

/* Поиск */
.search-bar {
    margin-bottom: 20px;
}

.search-bar input {
    width: 100%;
    padding: 12px 18px;
    background: transparent;
    border: none;
    border-bottom: 1px solid #1a1a1a;
    border-radius: 0;
    color: #ccc;
    font-size: 14px;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 300;
    outline: none;
    transition: border-color 0.2s;
}

.search-bar input:focus { border-color: #333; }
.search-bar input::placeholder { color: #484848; }

/* Список скиллов — grid 2 колонки */
@keyframes cardIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes gridFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
#skills-grid.grid-fadein {
    animation: gridFadeIn 0.4s ease both;
}

/* Скролл-контейнер для скиллов */
.skills-scroll {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    padding-right: 4px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.08) transparent;
}
.skills-scroll::-webkit-scrollbar { width: 3px; }
.skills-scroll::-webkit-scrollbar-track { background: transparent; }
.skills-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 100px; }

#skills-view {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

#authors-view {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.08) transparent;
}

.skills-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

/* Карточка */
.skill-card {
    background: #0e0e0e;
    border: 1px solid rgba(255,255,255,0.06);
    border-left: 3px solid var(--cat-color, rgba(255,255,255,0.15));
    border-radius: 14px;
    padding: 18px 20px;
    cursor: pointer;
    position: relative;
    overflow: visible;
    clip-path: inset(0 round 14px);
    transition: transform 0.18s ease, border-color 0.18s ease;
    will-change: transform;
    display: flex;
    flex-direction: column;
}

.skill-glow {
    position: absolute;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--cat-glow, rgba(255,255,255,0.06)) 0%, transparent 70%);
    top: 0;
    left: 0;
    transform: translate(-9999px, -9999px);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
    will-change: transform;
    margin: -130px 0 0 -130px;
}

.skill-card:hover {
    transform: translateY(-3px);
    border-color: var(--cat-color, rgba(255,255,255,0.18));
}

.skill-card.hovered .skill-glow { opacity: 1; }

/* Верхняя строка: тир + рейтинг */
.skill-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.skill-tier {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.skill-name {
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    line-height: 1.35;
    margin-bottom: 4px;
}

.skill-rating {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    font-weight: 400;
    color: #8a7040;
    white-space: nowrap;
    flex-shrink: 0;
}

.skill-author {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: #484848;
    margin-bottom: 10px;
}

.skill-description {
    font-size: 13px;
    color: #555;
    line-height: 1.6;
    max-height: 130px;
    overflow-y: auto;
    flex: 1;
    margin-bottom: 14px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.1) transparent;
}
.skill-description::-webkit-scrollbar {
    width: 3px;
}
.skill-description::-webkit-scrollbar-track {
    background: transparent;
}
.skill-description::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.1);
    border-radius: 100px;
}
.skill-description::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.2);
}

.skill-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.skill-cat-tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    padding: 3px 10px;
    border-radius: 100px;
    color: var(--cat-color, #555);
    border: 1px solid var(--cat-color, #222);
    opacity: 0.6;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 130px;
}

.skill-footer-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.skill-rating-bar {
    width: 48px;
    height: 3px;
    background: rgba(255,255,255,0.07);
    border-radius: 100px;
    overflow: hidden;
}

.skill-rating-fill {
    height: 100%;
    background: var(--cat-color, rgba(255,255,255,0.4));
    border-radius: 100px;
    opacity: 0.6;
}

.skill-downloads {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: #484848;
    white-space: nowrap;
}

/* Фоновая иконка бренда/инструмента */
.skill-bg-icon {
    position: absolute;
    right: -8px;
    bottom: -8px;
    width: 88px;
    height: 88px;
    opacity: 0.045;
    pointer-events: none;
    user-select: none;
    filter: blur(0.3px);
    transition: opacity 0.3s ease;
}

.skill-card:hover .skill-bg-icon {
    opacity: 0.075;
}

/* skeleton (2-col) */
.skeleton-card {
    background: #0e0e0e;
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: 14px;
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* убираем старые классы */
.skill-header { display: none; }
.skill-badge-top {
    display: none;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: #fff;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 4px;
    padding: 2px 6px;
    flex-shrink: 0;
}

/* Заголовок контента с сортировкой */
.content-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 16px;
    margin-bottom: 20px;
    border-bottom: 1px solid #1e1e1e;
}

.content-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.content-title {
    margin-bottom: 0 !important;
    font-size: 13px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
}

.sort-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.sort-select {
    background: transparent;
    border: 1px solid #222;
    border-radius: 8px;
    color: #666;
    font-size: 13px;
    font-family: 'Space Grotesk', sans-serif;
    padding: 6px 12px;
    cursor: pointer;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    color-scheme: dark;
    transition: border-color 0.15s, color 0.15s;
}

.sort-select:hover { border-color: #3a3a3a; color: #ccc; }

.sort-dir {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid #222;
    border-radius: 8px;
    color: #555;
    font-size: 13px;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
    flex-shrink: 0;
    line-height: 1;
}

.sort-dir:hover {
    border-color: #3a3a3a;
    color: #ccc;
}

.sort-select option {
    background: #1a1a1a;
    color: #ccc;
}

/* Модальное окно */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.modal-overlay.open {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: rgba(12,12,12,0.95);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 20px;
    padding: 36px;
    max-width: 560px;
    width: 90%;
    position: relative;
    box-shadow: 0 0 0 1px rgba(255,255,255,0.05),
                0 0 30px rgba(255,255,255,0.08),
                0 0 60px rgba(255,255,255,0.04);
    animation: modalGlow 3s ease-in-out infinite;
    transform: translateY(20px);
    transition: transform 0.25s ease;
}

@keyframes modalGlow {
    0%, 100% { box-shadow: 0 0 0 1px rgba(255,255,255,0.05), 0 0 20px rgba(255,255,255,0.06); }
    50%       { box-shadow: 0 0 0 1px rgba(255,255,255,0.08), 0 0 40px rgba(255,255,255,0.12), 0 0 70px rgba(255,255,255,0.04); }
}

.modal-overlay.open .modal {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    color: #444;
    font-size: 16px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: color 0.15s;
}

.modal-close:hover { color: #fff; }

.modal-category {
    font-size: 12px;
    color: #444;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.modal-name {
    font-size: 26px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 10px;
    line-height: 1.25;
}

.modal-author {
    font-size: 14px;
    color: #555;
    margin-bottom: 18px;
}

.modal-description {
    font-size: 15px;
    color: #777;
    line-height: 1.7;
    margin-bottom: 22px;
    max-height: 180px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.1) transparent;
}
.modal-description::-webkit-scrollbar { width: 3px; }
.modal-description::-webkit-scrollbar-track { background: transparent; }
.modal-description::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 100px; }

.modal-related {
    margin-bottom: 20px;
}

.modal-related-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: #2a2a2a;
    letter-spacing: 0.08em;
    margin-bottom: 10px;
}

.modal-related-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    cursor: pointer;
    transition: opacity 0.15s;
}

.modal-related-item:hover { opacity: 0.7; }

.modal-related-name {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: #666;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 80%;
}

.modal-related-rating {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    flex-shrink: 0;
}

.modal-meta {
    font-size: 14px;
    color: #444;
    display: flex;
    gap: 18px;
    align-items: center;
    margin-bottom: 24px;
    padding-top: 18px;
    border-top: 1px solid #1e1e1e;
}

.modal-version {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 5px;
    padding: 2px 8px;
    font-size: 12px;
    color: #555;
    font-family: monospace;
}

/* Кнопки действий модалки */
.modal-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Кнопка ClawHub */
.modal-clawhub {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 16px 22px;
    background: #fff;
    border-radius: 12px;
    text-decoration: none;
    color: #000;
    box-shadow: 0 0 30px rgba(255,255,255,0.12);
    transition: box-shadow 0.2s, transform 0.2s;
    position: relative;
    overflow: hidden;
}

.modal-clawhub::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(0,0,0,0.04) 100%);
    opacity: 0;
    transition: opacity 0.2s;
}

.modal-clawhub:hover {
    box-shadow: 0 0 50px rgba(255,255,255,0.22);
    transform: translateY(-1px);
}

.modal-clawhub:hover::before { opacity: 1; }

.modal-clawhub-icon {
    font-size: 20px;
    font-weight: 300;
    opacity: 0.3;
}

.modal-clawhub-text {
    flex: 1;
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.02em;
}

.modal-clawhub-arrow {
    font-size: 16px;
    opacity: 0.4;
}

/* Slug copy */
.modal-slug {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.15s;
}

.modal-slug:hover { border-color: rgba(255,255,255,0.14); }

.modal-slug-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.modal-slug-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: #666;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.modal-slug-copy {
    font-size: 14px;
    color: #333;
    transition: color 0.15s;
}

.modal-slug:hover .modal-slug-copy { color: #aaa; }

/* Пустое состояние */
.no-results {
    text-align: center;
    color: #444;
    font-size: 15px;
    padding: 60px 0;
}

/* Скелетон */
.skeleton {
    background: linear-gradient(90deg, #141414 25%, #1a1a1a 50%, #141414 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 6px;
}

@keyframes shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-card {
    background: #141414;
    border: 1px solid #1e1e1e;
    border-radius: 16px;
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
/* ===== AUTHORS PAGE ===== */
.sidebar-divider {
    height: 1px;
    background: rgba(255,255,255,0.04);
    margin: 20px 0 16px;
}

.authors-nav-btn {
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    font-weight: 400;
    color: #4a4a4a;
    background: transparent;
    border: none;
    cursor: pointer;
    letter-spacing: 0.01em;
    transition: color 0.15s;
    padding: 8px 0;
    text-align: left;
    width: 100%;
    display: block;
}
.authors-nav-btn:hover { color: #888; }
.authors-nav-btn.active { color: #aaa; }

.authors-header {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #1e1e1e;
}

.authors-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: #2a2a2a;
    letter-spacing: 0.05em;
}

/* ===== AUTHORS GRID ===== */
.authors-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.author-card {
    position: relative;
    background: #0e0e0e;
    border: 1px solid rgba(255,255,255,0.06);
    border-top: 2px solid var(--medal, rgba(255,255,255,0.07));
    border-radius: 14px;
    padding: 20px 20px 16px;
    cursor: pointer;
    overflow: hidden;
    animation: cardIn 0.4s ease both;
    transition: background 0.15s, transform 0.15s;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.author-card:hover {
    background: #111;
    transform: translateY(-2px);
}

/* Ранг-водяной знак */
.author-rank-bg {
    position: absolute;
    right: 12px;
    bottom: -8px;
    font-family: 'Bodoni Moda', serif;
    font-size: 80px;
    font-weight: 700;
    color: rgba(255,255,255,0.03);
    line-height: 1;
    pointer-events: none;
    user-select: none;
    letter-spacing: -0.04em;
}

/* Верхняя часть карточки: ранг + имя */
.author-card-top {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.author-rank-num {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.12em;
    opacity: 0.7;
}

.author-name {
    font-family: 'JetBrains Mono', monospace;
    font-size: 15px;
    font-weight: 500;
    color: #ccc;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: -0.01em;
    line-height: 1.2;
}

/* Статы: три цифры в ряд */
.author-stats {
    display: flex;
    gap: 0;
    border-top: 1px solid rgba(255,255,255,0.05);
    padding-top: 12px;
}

.author-stat {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
}
.author-stat + .author-stat {
    border-left: 1px solid rgba(255,255,255,0.04);
    padding-left: 12px;
}

.author-stat-val {
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    font-weight: 500;
    color: #555;
}

.author-stat-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    color: #2a2a2a;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* Бар загрузок внизу карточки */
.author-bar-track {
    height: 2px;
    background: rgba(255,255,255,0.04);
    border-radius: 100px;
    overflow: hidden;
    margin-top: auto;
}
.author-bar-fill {
    height: 100%;
    border-radius: 100px;
    opacity: 0.45;
}

/* ===== AUTHOR MODAL ===== */
.author-modal {
    max-width: 520px;
}

.author-modal-name {
    font-family: 'JetBrains Mono', monospace;
    font-size: 26px;
    font-weight: 500;
    color: #fff;
    margin-bottom: 16px;
    line-height: 1.2;
}

.author-modal-stats {
    display: flex;
    gap: 24px;
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid #1e1e1e;
}

.author-modal-stat {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.author-modal-stat-val {
    font-family: 'JetBrains Mono', monospace;
    font-size: 18px;
    font-weight: 500;
    color: #ccc;
}

.author-modal-stat-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: #2a2a2a;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.author-modal-skills-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: #2a2a2a;
    letter-spacing: 0.08em;
    margin-bottom: 12px;
}

.author-modal-skill-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    cursor: pointer;
    transition: opacity 0.15s;
}
.author-modal-skill-item:hover { opacity: 0.7; }
.author-modal-skill-item:last-child { border-bottom: none; }

.author-modal-skill-name {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    color: #888;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 70%;
}

.author-modal-skill-meta {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: #333;
    flex-shrink: 0;
    display: flex;
    gap: 12px;
}

.author-row { cursor: pointer; }

/* ===== TIER FILTERS ===== */
.tier-filters {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: 8px;
}

.tier-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 0;
    border: none;
    background: transparent;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    color: #2a2a2a;
    cursor: pointer;
    transition: color 0.15s;
    text-align: left;
    width: 100%;
    letter-spacing: 0.01em;
}
.tier-btn:hover { color: #666; }
.tier-btn.active { font-weight: 500; }
.tier-btn[data-tier="legendary"].active { color: #C9A84C; }
.tier-btn[data-tier="gold"].active      { color: #9A7E3A; }
.tier-btn[data-tier="silver"].active    { color: #8a9aaa; }
.tier-btn[data-tier="bronze"].active    { color: #8a6a50; }

/* ===== RECENTLY VIEWED ===== */
.recent-toggle {
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    font-weight: 400;
    color: #4a4a4a;
    background: transparent;
    border: none;
    cursor: pointer;
    letter-spacing: 0.01em;
    transition: color 0.15s;
    padding: 8px 0;
    text-align: left;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.recent-toggle:hover { color: #888; }
.recent-toggle-arrow {
    transition: transform 0.2s ease;
    font-size: 16px;
    opacity: 0.5;
}
.recent-toggle.open { color: #666; }
.recent-toggle.open .recent-toggle-arrow { transform: rotate(90deg); }

.recent-list {
    display: none;
    flex-direction: column;
    gap: 0;
    margin-top: 4px;
}
.recent-list.open { display: flex; }

.recent-item {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: #444;
    padding: 6px 0;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.15s;
    border: none;
    background: transparent;
    text-align: left;
    width: 100%;
}
.recent-item:hover { color: #aaa; }

/* ===== SKILL OF THE DAY ===== */
.sotd-card {
    margin-bottom: 20px;
    padding: 18px 22px;
    background: #0e0e0e;
    border: 1px solid rgba(255,255,255,0.08);
    border-left: 3px solid #C9A84C;
    border-radius: 14px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: background 0.15s;
}
.sotd-card:hover { background: #111; }

.sotd-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    letter-spacing: 0.14em;
    color: #C9A84C;
    text-transform: uppercase;
    margin-bottom: 8px;
    opacity: 0.7;
}

.sotd-name {
    font-family: 'JetBrains Mono', monospace;
    font-size: 15px;
    font-weight: 500;
    color: #ddd;
    margin-bottom: 4px;
}

.sotd-meta {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: #333;
    display: flex;
    gap: 14px;
}

.skill-author-link { cursor: pointer; }
.skill-author-link:hover { color: #666 !important; }
.modal-author-link { cursor: pointer; text-decoration: underline; text-decoration-color: #333; text-underline-offset: 2px; transition: color 0.15s; }
.modal-author-link:hover { color: #aaa; }

/* ===== TIER PILLS (under search) ===== */
.tier-pills {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.tier-pill {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    font-weight: 400;
    letter-spacing: 0.06em;
    padding: 4px 10px;
    border-radius: 100px;
    border: 1px solid #333;
    background: transparent;
    color: #484848;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
}
.tier-pill:hover { color: #888; border-color: #555; }
.tier-pill[data-tier="legendary"].active { color: #C9A84C; border-color: #C9A84C; }
.tier-pill[data-tier="gold"].active      { color: #9A7E3A; border-color: #9A7E3A; }
.tier-pill[data-tier="silver"].active    { color: #8a9aaa; border-color: #8a9aaa; }
.tier-pill[data-tier="bronze"].active    { color: #8a6a50; border-color: #8a6a50; }

/* ===== SLOT MACHINE ===== */
.slot-overlay {
    position: fixed;
    inset: 0;
    z-index: 20000;
    background: rgba(0,0,0,0.93);
    backdrop-filter: blur(18px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.22s ease, visibility 0.22s ease;
}
.slot-overlay.open {
    opacity: 1;
    visibility: visible;
}
.slot-machine {
    display: flex;
    flex-direction: column;
    align-items: center;
    user-select: none;
}
.slot-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.13);
    margin-bottom: 24px;
}

/* Drum — clips the scrolling track, shows 3 rows */
.slot-drum {
    width: 600px;
    max-width: 90vw;
    height: 300px;
    position: relative;
    overflow: hidden;
    border-radius: 14px;
    background: #060606;
    border: 1px solid rgba(255,255,255,0.08);
}
/* top & bottom gradient fades */
.slot-drum::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to bottom,
            #060606 0%,
            rgba(6,6,6,0.85) 20%,
            transparent 38%,
            transparent 62%,
            rgba(6,6,6,0.85) 80%,
            #060606 100%);
    z-index: 2;
    pointer-events: none;
    border-radius: 14px;
}
/* subtle horizontal dividers at 1/3 and 2/3 */
.slot-drum::after {
    content: '';
    position: absolute;
    left: 28px; right: 28px;
    top: 100px;
    height: 100px;
    border-top: 1px solid rgba(255,255,255,0.055);
    border-bottom: 1px solid rgba(255,255,255,0.055);
    z-index: 1;
    pointer-events: none;
}

/* Frame rect over the active (middle) slot */
.slot-frame {
    position: absolute;
    left: 0; right: 0;
    top: 100px; height: 100px;
    border-top: 1px solid rgba(255,255,255,0.13);
    border-bottom: 1px solid rgba(255,255,255,0.13);
    background: rgba(255,255,255,0.018);
    pointer-events: none;
    z-index: 3;
}
/* left accent on frame */
.slot-frame::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 2px;
    background: rgba(255,255,255,0.18);
}
/* corner tick marks */
.slot-frame::after {
    content: '';
    position: absolute;
    right: 0; top: 0; bottom: 0;
    width: 2px;
    background: rgba(255,255,255,0.05);
}

.slot-track {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: absolute;
    left: 0; right: 0;
    top: 0;
}
.slot-item {
    height: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 100%;
    padding: 0 36px;
    box-sizing: border-box;
}
.slot-item-name {
    font-family: 'JetBrains Mono', monospace;
    font-size: 20px;
    font-weight: 500;
    color: #d8d8d8;
    text-align: center;
    letter-spacing: -0.01em;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}
.slot-item-meta {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: #2c2c2c;
    margin-top: 7px;
    letter-spacing: 0.04em;
}
.slot-hint {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.12em;
    color: rgba(255,255,255,0.08);
    margin-top: 22px;
    cursor: pointer;
    transition: color 0.15s;
}
.slot-hint:hover { color: rgba(255,255,255,0.28); }

/* ===== COSMOS SECTION ===== */
.cosmos-section {
    height: 80vh;
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 64px;
}

.cosmos-stats {
    display: flex;
    align-items: center;
    gap: 40px;
}

.cosmos-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.cosmos-stat-num {
    font-family: 'Bodoni Moda', serif;
    font-size: clamp(36px, 5vw, 64px);
    font-weight: 700;
    color: rgba(255,255,255,0.55);
    letter-spacing: -0.02em;
    line-height: 1;
    animation: cosmosGlow 4s ease-in-out infinite;
}

.cosmos-stat:nth-child(3) .cosmos-stat-num { animation-delay: 0.8s; }
.cosmos-stat:nth-child(5) .cosmos-stat-num { animation-delay: 1.6s; }

@keyframes cosmosGlow {
    0%, 100% {
        text-shadow: 0 0 20px rgba(255,255,255,0.08), 0 0 40px rgba(255,255,255,0.04);
        opacity: 0.45;
    }
    50% {
        text-shadow: 0 0 30px rgba(255,255,255,0.35), 0 0 60px rgba(255,255,255,0.15), 0 0 100px rgba(255,255,255,0.06);
        opacity: 0.7;
    }
}

.cosmos-stat-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.2);
}

.cosmos-stat-sep {
    font-size: 28px;
    color: rgba(255,255,255,0.12);
    margin-bottom: 20px;
    font-family: 'JetBrains Mono', monospace;
}

.cosmos-tagline {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(13px, 1.4vw, 16px);
    color: rgba(255,255,255,0.18);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-align: center;
}

.cosmos-cats {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    max-width: 900px;
    padding: 0 24px;
}

.cosmos-cat-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 16px;
    border: 1px solid rgba(255,255,255,0.05);
    border-left: 2px solid var(--cat-color, rgba(255,255,255,0.1));
    border-radius: 10px;
    background: rgba(255,255,255,0.02);
    backdrop-filter: blur(6px);
    min-width: 120px;
    cursor: pointer;
    opacity: 0;
    transform: translateX(var(--fly-x, 0px)) translateY(var(--fly-y, 0px));
    transition: background 0.2s, border-color 0.2s,
                opacity 0.55s ease,
                transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}
.cosmos-cat-card.landed {
    opacity: 1;
    transform: translateX(0) translateY(0);
}

.cosmos-cat-card:hover {
    background: rgba(255,255,255,0.04);
    border-color: rgba(255,255,255,0.1);
}

.cosmos-cat-name {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: rgba(255,255,255,0.25);
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.cosmos-cat-count {
    font-family: 'Bodoni Moda', serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--cat-color, rgba(255,255,255,0.3));
    opacity: 0.7;
    line-height: 1;
}

/* ===== SITE FOOTER ===== */
.site-footer {
    position: relative;
    z-index: 10;
    background: rgba(6,6,6,0.85);
    backdrop-filter: blur(16px);
    border-top: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 -1px 0 rgba(255,255,255,0.04), 0 -30px 60px rgba(0,0,0,0.4);
    opacity: 0;
    transition: opacity 0.9s ease 0.15s;
}
.site-footer.visible {
    opacity: 1;
}

.site-footer-inner {
    max-width: 1440px;
    margin: 0 auto;
    padding: 14px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.footer-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 6px;
}
.footer-logo-sl {
    font-family: 'Bodoni Moda', serif;
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 0 12px rgba(255,255,255,0.2);
}
.footer-logo-dot {
    color: rgba(255,255,255,0.15);
    font-size: 13px;
}
.footer-logo-name {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: rgba(255,255,255,0.18);
    letter-spacing: 0.06em;
}
.footer-tagline {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: #1e1e1e;
    letter-spacing: 0.03em;
}

.footer-center {
    display: flex;
    align-items: center;
    gap: 10px;
}
.footer-author-name {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    font-weight: 500;
    color: #444;
    letter-spacing: -0.01em;
}
.footer-author-bio {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 11px;
    color: #222;
    line-height: 1;
}

.footer-right {
    display: flex;
    flex-direction: row;
    gap: 16px;
    align-items: center;
}
.footer-social {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: #222;
    text-decoration: none;
    transition: color 0.15s;
    letter-spacing: 0.03em;
}
.footer-social:hover { color: #555; }
.footer-social:hover img { opacity: 0.6; }
.footer-social img { opacity: 0.25; transition: opacity 0.15s; }
.footer-copy {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: #1a1a1a;
    letter-spacing: 0.04em;
    padding-left: 8px;
    border-left: 1px solid #1a1a1a;
}

.footer-bottom {
    display: none;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0;
    border-top: none;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: #1a1a1a;
    letter-spacing: 0.06em;
}

/* ===== MOBILE FILTER BUTTON ===== */
.mobile-filter-btn {
    display: none;
    background: transparent;
    border: 1px solid #222;
    border-radius: 8px;
    color: #555;
    font-size: 14px;
    padding: 5px 9px;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
    line-height: 1;
    flex-shrink: 0;
}
.mobile-filter-btn:hover { color: #aaa; border-color: #444; }

/* Overlay backdrop for mobile sidebar */
.sidebar-overlay {
    display: none;
    position: absolute;
    inset: 0;
    z-index: 19;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(2px);
    border-radius: 20px;
}
.sidebar-overlay.active { display: block; }

/* ===== TABLET (768px – 1024px) ===== */
@media (max-width: 1024px) {
    .layout-outer { padding: 170px 16px 0; }
    .panel-sl { height: 170px; }
    .panel-sl-s, .panel-sl-l { font-size: clamp(60px, 9vw, 120px); }

    .authors-list { grid-template-columns: repeat(2, 1fr); }
    .skills-list  { grid-template-columns: repeat(2, 1fr); }
}

/* ===== MOBILE (< 768px) ===== */
@media (max-width: 768px) {

    /* Header */
    header { padding: 12px 16px; }
    .logo-name { display: none; }
    .header-count { display: none; }

    /* SL panel — much smaller */
    .layout-outer { padding: 110px 12px 0; }
    .panel-sl {
        height: 110px;
        gap: 6px;
    }
    .panel-sl-s, .panel-sl-l {
        font-size: clamp(48px, 14vw, 80px);
    }
    .panel-sl-sub { font-size: 9px; letter-spacing: 0.4em; }

    /* Main layout frame */
    .layout {
        height: calc(100svh - 130px);
        min-height: 500px;
        border-radius: 14px;
        padding: 16px;
        gap: 0;
    }
    .layout::after { height: 70px; border-radius: 0 0 14px 14px; }

    /* Sidebar: slide-in fixed drawer */
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 260px;
        z-index: 10001;
        background: rgba(6,6,6,0.97);
        backdrop-filter: blur(24px);
        border-right: 1px solid rgba(255,255,255,0.07);
        padding: 24px 20px;
        transform: translateX(-100%);
        transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
        overflow-y: auto;
        height: 100%;
    }
    .sidebar.open {
        transform: translateX(0);
    }

    /* Overlay becomes fixed fullscreen backdrop */
    .sidebar-overlay {
        position: fixed;
        inset: 0;
        z-index: 10000;
        background: rgba(0,0,0,0.6);
        backdrop-filter: blur(2px);
        border-radius: 0;
    }

    /* Show filter button on mobile */
    .mobile-filter-btn { display: flex; }

    /* Content takes full width (sidebar is now fixed/out of flow) */
    .content { padding-left: 0; }

    /* Skills grid: single column */
    .skills-list { grid-template-columns: 1fr; gap: 10px; }

    /* Authors grid: 2 columns on mobile */
    .authors-list { grid-template-columns: repeat(2, 1fr); gap: 10px; }

    /* Skill card: slightly more compact */
    .skill-card { padding: 14px 16px; }
    .skill-description { max-height: 80px; font-size: 12px; }

    /* Content header: stack sort on small */
    .content-header {
        flex-wrap: wrap;
        gap: 8px;
        padding-bottom: 12px;
        margin-bottom: 14px;
    }
    .sort-row { gap: 4px; }
    .sort-select { font-size: 12px; padding: 5px 8px; }

    /* Search */
    .search-bar input { font-size: 13px; padding: 10px 14px; }

    /* Modal: full-screen on mobile */
    .modal {
        width: 95%;
        max-width: 95%;
        padding: 24px 20px;
        border-radius: 16px;
        max-height: 88svh;
        overflow-y: auto;
    }
    .modal-name { font-size: 20px; }
    .modal-description { max-height: 120px; }

    /* Cosmos section */
    .cosmos-section { gap: 40px; }
    .cosmos-stats { flex-wrap: wrap; justify-content: center; gap: 20px; }
    .cosmos-stat-sep { display: none; }
    .cosmos-stat-num { font-size: clamp(30px, 8vw, 48px); }
    .cosmos-cats { gap: 8px; padding: 0 12px; }
    .cosmos-cat-card { min-width: 90px; padding: 10px 12px; }
    .cosmos-tagline { font-size: 11px; padding: 0 20px; }

    /* Footer */
    .site-footer-inner {
        flex-direction: column;
        align-items: flex-start;
        padding: 16px 20px;
        gap: 12px;
    }
    .footer-center { display: none; }
    .footer-right { gap: 12px; }
    .footer-copy { padding-left: 6px; }

    /* Slot machine */
    .slot-drum { height: 240px; }
    .slot-item { height: 80px; }
    .slot-item-name { font-size: 16px; }
    .slot-drum::after { top: 80px; height: 80px; }
    .slot-frame { top: 80px; height: 80px; }

    /* Intro letters smaller on mobile */
    .letter { font-size: clamp(120px, 30vw, 200px); }
    .counter-box.grow { width: 260px; height: 130px; }
    .counter-number { font-size: 40px; }
}
