:root {
    --bg-outside: #000000;
    --bg-app: #000000;
    --surface-color: #121214;
    --surface-hover: #1c1c1e;
    --text-primary: #ffffff;
    --text-secondary: #8e8e93;
    --accent-color: #ff453a;
    --accent-glow: rgba(255, 69, 58, 0.15);
    --border-radius: 20px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, Helvetica, sans-serif;
    background-color: var(--bg-outside);
    color: var(--text-primary);
    -webkit-tap-highlight-color: transparent;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    display: flex;
    justify-content: center;
    min-height: 100vh;
}

.mobile-wrapper {
    width: 100%;
    max-width: 480px;
    background-color: var(--bg-app);
    min-height: 100vh;
    position: relative;
    box-shadow: 0 0 60px rgba(0, 0, 0, 1);
    display: flex;
    flex-direction: column;
}

#loading-screen {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle at center, #1a1a1c 0%, #000000 100%);
    z-index: 9999;
    display: flex; 
    flex-direction: column; 
    justify-content: space-between;
    align-items: center;
    padding: 100px 0 60px 0;
    transition: opacity 0.5s ease;
}

.logo-container { margin: auto; text-align: center; }

.loader {
    width: 40px; height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.08); 
    border-top-color: var(--accent-color);
    border-radius: 50%; 
    animation: spin 0.8s linear infinite;
}

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

.app-container {
    padding: 16px; 
    padding-bottom: 120px; 
    flex: 1; 
    overflow-y: auto;
    scroll-behavior: smooth;
}

.app-container::-webkit-scrollbar { display: none; }

.page-title { 
    font-size: 32px; 
    font-weight: 800; 
    margin-bottom: 20px; 
    padding-top: 10px; 
    letter-spacing: -0.5px; 
}

.section-title { 
    font-size: 13px; 
    font-weight: 700; 
    color: var(--text-secondary); 
    margin: 28px 0 16px 0; 
    text-transform: uppercase; 
    letter-spacing: 1px; 
}

/* Старый search-container для мест где используется в других вкладках */
.search-container { position: relative; width: 100%; margin-bottom: 24px; display: flex; align-items: center; }
.search-input {
    width: 100%;
    box-sizing: border-box;
    background-color: var(--surface-color) !important;
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: #ffffff !important;
    padding: 16px 16px 16px 48px;
    border-radius: 18px;
    font-size: 16px;
    outline: none;
    -webkit-appearance: none;
    transition: all 0.2s ease;
}
.search-input:focus {
    border-color: var(--accent-color);
    background-color: #1a1a1c !important;
}
.search-input::placeholder { color: #636366; font-weight: 500; }
.search-icon-input { position: absolute; left: 16px; color: #636366; pointer-events: none; }
.search-input:focus + .search-icon-input { color: var(--accent-color); }

/* --- ПОИСК --- */
.search-bar-wrap {
    position: relative;
    margin-bottom: 16px;
}
.search-bar-input {
    width: 100%;
    box-sizing: border-box;
    background: var(--surface-color);
    border: 1.5px solid rgba(255,255,255,0.07);
    color: #fff;
    padding: 17px 48px;
    border-radius: 20px;
    font-size: 16px;
    font-family: inherit;
    outline: none;
    -webkit-appearance: none;
    transition: border-color 0.2s ease, background 0.2s ease;
}
.search-bar-input:focus {
    border-color: var(--accent-color);
    background: #0e0e10;
}
.search-bar-input::placeholder { color: #48484a; font-weight: 500; }
.search-bar-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #48484a;
    pointer-events: none;
    transition: color 0.2s;
}
.search-bar-input:focus ~ .search-bar-icon { color: var(--accent-color); }
.search-clear-btn {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 26px; height: 26px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    border: none;
    color: #8e8e93;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
}
.search-clear-btn:active { background: rgba(255,255,255,0.2); transform: translateY(-50%) scale(0.88); }

.search-results-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}
.search-results-count {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}
.search-query-chip {
    background: var(--accent-glow);
    color: var(--accent-color);
    padding: 3px 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.search-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 52px 24px 20px;
    gap: 12px;
    text-align: center;
}
.search-empty-icon {
    width: 70px; height: 70px;
    background: rgba(255,69,58,0.08);
    border: 1px solid rgba(255,69,58,0.12);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 4px;
    color: var(--accent-color);
    opacity: 0.7;
}
.search-empty-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.3px;
    margin: 0;
}
.search-empty-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
    line-height: 1.6;
    margin: 0;
    max-width: 280px;
}

.search-no-results {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 48px 24px;
    gap: 10px;
    text-align: center;
    color: var(--text-secondary);
}
.search-no-results svg { opacity: 0.25; margin-bottom: 4px; }
.search-no-results-title { font-size: 17px; font-weight: 700; color: var(--text-primary); }
.search-no-results-sub  { font-size: 14px; font-weight: 500; line-height: 1.5; }

.tab-content { display: none; animation: slideUpFade 0.4s ease; }
.tab-content.active { display: block; }
@keyframes slideUpFade { 
    from { opacity: 0; transform: translateY(15px); } 
    to { opacity: 1; transform: translateY(0); } 
}

/* --- ГЛАВНАЯ --- */
.home-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0 20px;
}
.home-brand {
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.home-brand-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}
.home-brand-title {
    font-size: 32px;
    font-weight: 900;
    color: var(--text-primary);
    letter-spacing: -1px;
    line-height: 1;
    font-family: Impact, 'Arial Black', sans-serif;
}
.home-random-btn {
    display: flex;
    align-items: center;
    gap: 7px;
    background: var(--surface-color);
    border: 1px solid rgba(255,255,255,0.08);
    color: var(--text-secondary);
    padding: 10px 16px;
    border-radius: 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}
.home-random-btn:active { background: var(--surface-hover); transform: scale(0.95); color: var(--text-primary); }
.home-random-btn.spin svg { animation: spin 0.6s linear infinite; }

.feed-context-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 14px;
    padding: 10px 14px;
    margin-bottom: 16px;
    animation: fadeInUp 0.2s ease;
}
.feed-context-inner {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}
.feed-context-clear {
    width: 24px; height: 24px;
    background: rgba(255,255,255,0.08);
    border: none;
    border-radius: 50%;
    color: #636366;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s;
    flex-shrink: 0;
}
.feed-context-clear:active { background: rgba(255,255,255,0.15); transform: scale(0.88); }

/* --- КАРТОЧКИ ИСТОРИЙ --- */
.story-card {
    background-color: var(--surface-color) !important;
    border: 1px solid rgba(255,255,255,0.05) !important;
    border-radius: 20px !important;
    padding: 16px !important;
    margin-bottom: 12px !important;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, background-color 0.15s ease;
    position: relative;
    overflow: hidden;
}
.story-card:active {
    transform: scale(0.98);
    background-color: var(--surface-hover) !important;
}
.story-card-exclusive {
    border-color: rgba(255,159,10,0.2) !important;
}
.story-card-exclusive::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, #FF9F0A, #FFD60A);
    border-radius: 2px 2px 0 0;
}

/* Премиальный VIP-бейдж */
.exclusive-badge { 
    background: linear-gradient(90deg, #FF9F0A 0%, #FFD60A 100%) !important; 
    color: #000 !important; 
    padding: 3px 8px !important; 
    font-size: 10px !important; 
    border-radius: 6px !important; 
    font-weight: 800 !important; 
    text-transform: uppercase !important; 
    display: inline-flex !important; 
    align-items: center !important;
    margin-left: 0 !important; 
    border: none !important;
    box-shadow: 0 2px 8px rgba(255, 159, 10, 0.25) !important; 
}

/* Аккуратный бейдж прослушивания */
.listened-badge { 
    background: rgba(48, 209, 88, 0.15) !important; 
    color: #30d158 !important; 
    padding: 3px 8px !important; 
    font-size: 10px !important; 
    border-radius: 6px !important; 
    font-weight: 800 !important; 
    text-transform: uppercase !important; 
    display: inline-flex !important; 
    align-items: center !important; 
    gap: 4px !important; 
    border: none !important; 
    box-shadow: none !important; 
}
.listened-badge svg { margin-top: -1px; width: 10px; height: 10px; }

/* Компактные кнопки лайков и закладок */
.like-btn, .fav-btn { 
    background: rgba(255, 255, 255, 0.05) !important; 
    border: none !important; 
    color: var(--text-secondary) !important; 
    border-radius: 12px !important; 
    padding: 8px 10px !important; 
    display: flex; 
    align-items: center; 
    justify-content: center;
    gap: 6px; 
    font-size: 13px !important; 
    font-weight: 700 !important; 
    cursor: pointer; 
    transition: all 0.2s ease; 
}
.like-btn.active, .fav-btn.active { 
    background: var(--accent-glow) !important; 
    color: var(--accent-color) !important; 
    box-shadow: none !important; 
}
.like-btn:active, .fav-btn:active { transform: scale(0.9); }

/* Элементы карточки истории */
.story-card-badges {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}
.story-card-main {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}
.story-card-content {
    flex: 1;
    min-width: 0;
}
.story-card-actions-top {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
    margin-top: 2px;
}
.story-card-title {
    margin: 0 0 4px;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.3px;
    line-height: 1.3;
    color: var(--text-primary);
}
.story-card-author {
    margin: 0;
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}
.story-card-stats {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 14px;
}
.story-stat {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
}
.story-stat-dot {
    font-size: 11px;
    color: rgba(255,255,255,0.2);
}

.story-action-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px;
    border: none;
    border-radius: 13px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}
.story-action-send {
    background: var(--accent-glow);
    color: var(--accent-color);
}
.story-action-send:active { background: rgba(255,69,58,0.22); transform: scale(0.97); }
.story-action-series {
    background: rgba(255,255,255,0.05);
    color: var(--text-primary);
    border: 1px solid rgba(255,255,255,0.07) !important;
}
.story-action-series:active { background: rgba(255,255,255,0.1); transform: scale(0.97); }

/* Legacy send-btn for backward compat */
.send-btn {
    width: 100%;
    background-color: var(--accent-glow) !important;
    color: var(--accent-color) !important;
    border: none !important;
    padding: 12px !important;
    border-radius: 12px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s ease;
}
.send-btn:active {
    background-color: rgba(255, 69, 58, 0.2) !important;
    transform: scale(0.97);
}

.delete-btn { background-color: transparent; color: var(--accent-color); border: 1px solid rgba(255, 69, 58, 0.2); padding: 8px 16px; border-radius: 12px; font-size: 13px; font-weight: 600; cursor: pointer; transition: all 0.2s; }
.delete-btn:active { background-color: rgba(255, 69, 58, 0.1); transform: scale(0.95); }

/* --- АВТОРЫ --- */
.authors-top {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-top: 10px;
}
.authors-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
    margin: 0;
}

.authors-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.author-grid-card {
    background: var(--surface-color);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 20px;
    padding: 20px 14px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.15s ease;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.author-grid-card:active { transform: scale(0.96); background: var(--surface-hover); }

.author-grid-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 800;
    flex-shrink: 0;
    border: none;
}

.author-grid-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
    word-break: break-word;
}

.author-grid-meta {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
}

/* Старые стили для скелетона авторов — оставляем */
.author-card { background-color: var(--surface-color); border: 1px solid rgba(255, 255, 255, 0.03); border-radius: var(--border-radius); padding: 16px; margin-bottom: 12px; display: flex; align-items: center; gap: 14px; transition: transform 0.2s ease; }
.author-card:active { transform: scale(0.97); }
.author-avatar { width: 50px; height: 50px; flex-shrink: 0; background: linear-gradient(135deg, #2c2c2e 0%, #151515 100%); border: 1px solid rgba(255,255,255,0.06); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 20px; color: var(--text-primary); }
.author-info { flex-grow: 1; min-width: 0; }
.author-info h3 { font-size: 16px; margin-bottom: 2px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.author-info p { font-size: 13px; color: var(--text-secondary); font-weight: 500; }
.follow-btn { flex-shrink: 0; background-color: rgba(255,255,255,0.08); color: var(--text-primary); border: none; padding: 8px 14px; border-radius: 12px; font-size: 13px; font-weight: 600; cursor: pointer; transition: all 0.2s ease; }
.follow-btn:active { background-color: rgba(255,255,255,0.15); transform: scale(0.95); }

/* --- ПРОФИЛЬ --- */
.profile-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 28px 0 24px;
    gap: 10px;
}
.profile-avatar-wrap {
    position: relative;
    margin-bottom: 4px;
}
.profile-avatar-wrap::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-color), #6b0000);
    z-index: 0;
    opacity: 0.6;
    filter: blur(6px);
}
.profile-avatar-large {
    width: 86px;
    height: 86px;
    background: linear-gradient(135deg, #2a0000, #1a1a1c);
    border: 2.5px solid rgba(255,69,58,0.4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
    font-weight: 800;
    color: var(--accent-color);
    position: relative;
    z-index: 1;
}
.profile-hero-name {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.4px;
    color: var(--text-primary);
    margin: 0;
}
.profile-hero-username {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
    margin: 0;
    min-height: 20px;
}

.profile-stats-row {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-color);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 20px;
    padding: 18px 0;
    margin-bottom: 28px;
    gap: 0;
}
.profile-stat {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}
.profile-stat-value {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.5px;
    line-height: 1;
}
.profile-stat-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.profile-stat-sep {
    width: 1px;
    height: 36px;
    background: rgba(255,255,255,0.06);
    flex-shrink: 0;
}

.profile-group-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 0 4px;
    margin: 0 0 8px 4px;
}
.profile-group {
    background: var(--surface-color);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 18px;
    overflow: hidden;
    margin-bottom: 20px;
}
.profile-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    cursor: pointer;
    transition: background 0.15s ease;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}
.profile-row:last-child { border-bottom: none; }
.profile-row:active { background: rgba(255,255,255,0.04); }
.profile-row-left {
    display: flex;
    align-items: center;
    gap: 13px;
}
.profile-row-icon {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.profile-chevron {
    color: rgba(255,255,255,0.25);
    flex-shrink: 0;
}
.profile-row-value {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
}

.settings-list { background-color: var(--surface-color); border-radius: var(--border-radius); overflow: hidden; border: 1px solid rgba(255,255,255,0.04); }
.settings-item { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px; border-bottom: 1px solid rgba(255, 255, 255, 0.03); font-size: 16px; font-weight: 600; cursor: pointer; transition: background-color 0.2s; }
.settings-item:hover, .settings-item:active { background-color: rgba(255,255,255,0.04); }
.settings-item:last-child { border-bottom: none; }
.settings-item .arrow { color: #636366; display: flex; align-items: center; justify-content: center; transition: transform 0.2s ease; }
.settings-item:active .arrow { transform: translateX(6px); color: var(--text-primary); }

/* --- НИЖНЯЯ ПАНЕЛЬ --- */
.bottom-nav { 
    position: fixed; 
    bottom: 0; 
    left: 50%; 
    transform: translateX(-50%); 
    width: 100%; 
    max-width: 480px; 
    height: 90px; 
    background-color: rgba(12, 12, 14, 0.75); 
    backdrop-filter: blur(20px); 
    -webkit-backdrop-filter: blur(20px); 
    display: flex; 
    justify-content: space-around; 
    align-items: center; 
    padding-bottom: env(safe-area-inset-bottom, 15px); 
    border-top: 1px solid rgba(255, 255, 255, 0.05); 
    border-top-left-radius: 24px; 
    border-top-right-radius: 24px; 
    z-index: 1000; 
}
.nav-btn { background: none; border: none; color: #636366; display: flex; flex-direction: column; align-items: center; justify-content: center; flex: 1; cursor: pointer; transition: all 0.3s ease; gap: 4px; }
.nav-btn svg { width: 24px; height: 24px; stroke-width: 2.2; transition: all 0.3s ease; }
.nav-btn span { font-size: 11px; font-weight: 600; }
.nav-btn.active { color: var(--accent-color); }
.nav-btn.active svg { transform: translateY(-2px); color: var(--accent-color); }
.nav-btn.active span { color: var(--accent-color); }
.nav-btn:active { transform: scale(0.9); }

/* --- АДМИН ПАНЕЛЬ --- */

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}
.admin-item-enter {
    animation: fadeInUp 0.25s ease forwards;
}

.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0 24px 0;
}
.admin-header-title {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
}
.admin-header-title svg { color: var(--accent-color); }
.admin-badge {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.5px;
    color: var(--accent-color);
    background: var(--accent-glow);
    padding: 4px 10px;
    border-radius: 8px;
    border: 1px solid rgba(255,69,58,0.2);
}

.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}
.stat-card {
    background: var(--surface-color);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 18px;
    padding: 16px 10px 14px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    transition: transform 0.2s ease;
    position: relative;
    overflow: hidden;
}
.stat-card::after {
    content: '';
    position: absolute;
    top: 0; left: 16px; right: 16px;
    height: 2px;
    border-radius: 0 0 2px 2px;
    opacity: 0.8;
}
.stat-card:nth-child(1)::after { background: #0a84ff; }
.stat-card:nth-child(2)::after { background: var(--accent-color); }
.stat-card:nth-child(3)::after { background: #30d158; }
.stat-card:active { transform: scale(0.96); }
.stat-icon {
    width: 36px; height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.stat-icon-users  { background: rgba(10, 132, 255, 0.15); color: #0a84ff; }
.stat-icon-stories { background: rgba(255, 69, 58, 0.15); color: var(--accent-color); }
.stat-icon-authors { background: rgba(48, 209, 88, 0.15); color: #30d158; }
.stat-title {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.stat-value {
    font-size: 26px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
}

.admin-section {
    background: var(--surface-color);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 22px;
    padding: 18px;
    margin-bottom: 14px;
}

.admin-section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.admin-section-icon {
    width: 32px; height: 32px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.broadcast-icon { background: rgba(255, 159, 10, 0.15); color: #ff9f0a; }
.system-icon    { background: rgba(142, 142, 147, 0.15); color: #8e8e93; }
.ads-icon       { background: rgba(191, 90, 242, 0.15); color: #bf5af2; }
.authors-icon   { background: rgba(48, 209, 88, 0.15); color: #30d158; }
.stories-icon   { background: rgba(255, 69, 58, 0.15); color: var(--accent-color); }
.users-icon     { background: rgba(10, 132, 255, 0.15); color: #0a84ff; }
.notif-icon     { background: rgba(255, 214, 10, 0.15); color: #ffd60a; }
.backup-icon    { background: rgba(10, 132, 255, 0.15); color: #0a84ff; }

.admin-section-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.2px;
}

.admin-system-list { display: flex; flex-direction: column; gap: 4px; }
.admin-system-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,0.03);
}
.admin-system-item:last-child { border-bottom: none; padding-bottom: 0; }
.admin-system-item-left { display: flex; align-items: center; gap: 12px; }
.admin-system-item-label { display: block; font-size: 15px; font-weight: 600; color: var(--text-primary); }
.admin-system-item-desc  { display: block; font-size: 12px; color: var(--text-secondary); font-weight: 500; margin-top: 2px; }

.admin-action-row {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}
.admin-preview-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 13px;
    background: rgba(255,255,255,0.06);
    color: var(--text-primary);
    border: none;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.admin-preview-btn:active { background: rgba(255,255,255,0.1); transform: scale(0.97); }

.admin-send-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 13px;
    background: var(--accent-color);
    color: #fff;
    border: none;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 16px rgba(255,69,58,0.3);
}
.admin-send-btn:active { transform: scale(0.97); box-shadow: none; }

.admin-ghost-btn {
    background: rgba(255,255,255,0.04);
    color: var(--text-secondary);
    border: 1px dashed rgba(255,255,255,0.12);
    padding: 12px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.admin-ghost-btn:active { background: rgba(255,255,255,0.08); transform: scale(0.98); }

.admin-add-btn {
    background: rgba(48,209,88,0.12);
    color: #30d158;
    border: 1px solid rgba(48,209,88,0.2);
    padding: 6px 14px;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}
.admin-add-btn:active { transform: scale(0.9); background: rgba(48,209,88,0.2); }

.add-btn {
    background: rgba(48,209,88,0.15);
    color: #30d158;
    border: none;
    padding: 6px 12px;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}
.add-btn:active { transform: scale(0.9); }

/* IOS Переключатель */
.ios-switch {
    appearance: none;
    width: 50px; height: 30px;
    background: rgba(255,255,255,0.1);
    border-radius: 15px;
    position: relative;
    cursor: pointer;
    outline: none;
    transition: 0.3s;
}
.ios-switch::after {
    content: '';
    position: absolute;
    top: 2px; left: 2px;
    width: 26px; height: 26px;
    background: #fff;
    border-radius: 50%;
    transition: 0.3s cubic-bezier(0.32, 0.72, 0, 1);
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}
.ios-switch:checked { background: #30d158; }
.ios-switch:checked::after { transform: translateX(20px); }

/* --- МОДАЛЬНЫЕ ОКНА --- */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.8); z-index: 10000; display: flex; justify-content: center; align-items: center; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); opacity: 0; animation: fadeInModal 0.3s forwards; }
@keyframes fadeInModal { to { opacity: 1; } }
.modal-content { background: var(--surface-color); padding: 24px; border-radius: 28px; width: 88%; max-width: 360px; border: 1px solid rgba(255,255,255,0.06); transform: translateY(20px); animation: popModal 0.3s forwards; }
@keyframes popModal { to { transform: translateY(0); } }

.input-group { margin-bottom: 20px; }
.input-group label { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 600; color: var(--text-secondary); }
.modal-input { width: 100%; box-sizing: border-box; background-color: #000; border: 1px solid rgba(255, 255, 255, 0.05); color: var(--text-primary); padding: 14px; border-radius: 14px; font-size: 16px; outline: none; transition: all 0.2s ease; }
.modal-input:focus { border-color: var(--accent-color); }

/* --- ФИЛЬТРЫ --- */
.filter-bar { display: flex; gap: 8px; margin-bottom: 18px; overflow-x: auto; scrollbar-width: none; }
.filter-bar::-webkit-scrollbar { display: none; }
.filter-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px;
    background: rgba(255,255,255,0.06);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    color: var(--text-secondary);
    transition: all 0.2s ease;
    cursor: pointer;
}
.filter-chip.active {
    background: var(--text-primary);
    color: #000;
}
.filter-chip.active svg { stroke: #000; }
.filter-chip:active { transform: scale(0.95); }

/* --- СПИСОК ЭПИЗОДОВ --- */
.episode-item { display: flex; justify-content: space-between; align-items: center; padding: 14px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.04); }
.episode-item:last-child { border-bottom: none; }
.episode-info { flex: 1; padding-right: 12px; }
.episode-title { font-size: 15px; font-weight: 700; margin-bottom: 4px; color: var(--text-primary); }
.episode-duration { font-size: 13px; color: var(--text-secondary); font-weight: 500; }
.episode-send-btn { background: var(--accent-glow); color: var(--accent-color); border: none; padding: 10px 14px; border-radius: 12px; font-size: 13px; font-weight: 700; cursor: pointer; transition: all 0.2s; flex-shrink: 0; }
.episode-send-btn:active { background: rgba(255, 69, 58, 0.2); transform: scale(0.9); }
/* --- SKELETON LOADERS --- */
.skeleton-card {
    background-color: var(--surface-color) !important;
    border: 1px solid rgba(255, 255, 255, 0.02) !important;
    border-radius: 20px !important;
    padding: 16px !important;
    margin-bottom: 14px !important;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.skeleton {
    background: linear-gradient(90deg, rgba(255,255,255,0.03) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.03) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite linear;
    border-radius: 8px;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skel-title { height: 24px; width: 70%; }
.skel-author { height: 16px; width: 40%; }
.skel-stats { height: 16px; width: 30%; }
.skel-btn { height: 44px; width: 100%; border-radius: 12px; margin-top: 8px; }
.skel-avatar { width: 50px; height: 50px; border-radius: 50%; }
/* --- ВИЗУАЛЬНЫЙ КОНСТРУКТОР КНОПОК --- */
.kb-container {
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 12px;
    min-height: 60px;
}
.kb-row {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 10px;
    margin-bottom: 10px;
}
.kb-row-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 8px;
}
.kb-controls-btns button {
    background: rgba(255, 255, 255, 0.08);
    border: none; color: #fff;
    border-radius: 6px; padding: 4px 10px; margin-left: 4px; cursor: pointer;
}
.kb-controls-btns button:active { transform: scale(0.9); }
.kb-controls-btns .kb-del { color: var(--accent-color); background: rgba(255, 69, 58, 0.1); }
.kb-grid {
    display: grid; gap: 8px; align-items: start;
}
.kb-btn-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px; padding: 8px;
    position: relative;
}
.kb-btn-card input {
    width: 100%; box-sizing: border-box; background: transparent;
    border: none; border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff; font-size: 13px; padding: 6px 4px; margin-bottom: 6px; outline: none;
}
.kb-btn-card input:focus { border-color: #30d158; }
.kb-btn-del {
    width: 100%; background: transparent; border: none;
    color: var(--text-secondary); font-size: 11px; cursor: pointer; padding: 4px;
}
.kb-btn-del:active { color: var(--accent-color); }
.kb-add-col {
    background: rgba(48, 209, 88, 0.1); color: #30d158; border: 1px dashed rgba(48, 209, 88, 0.3);
    border-radius: 10px; padding: 8px; display: flex; align-items: center; justify-content: center;
    cursor: pointer; font-size: 13px; font-weight: 600; min-height: 85px; transition: 0.2s;
}
.kb-add-col:active { background: rgba(48, 209, 88, 0.2); }

/* --- ADMIN LIST ITEMS --- */
.admin-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255,255,255,0.025);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 14px;
    padding: 11px 13px;
    margin-bottom: 8px;
    transition: background 0.15s ease, transform 0.15s ease;
}
.admin-item:last-of-type { margin-bottom: 0; }
.admin-item:active { background: rgba(255,255,255,0.05); transform: scale(0.99); }

.admin-item-avatar {
    width: 42px; height: 42px;
    border-radius: 12px;
    flex-shrink: 0;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 17px;
    color: var(--accent-color);
    background-color: var(--accent-glow);
}
.admin-item-avatar-author {
    background-color: rgba(48,209,88,0.12);
    color: #30d158;
    border-radius: 50%;
}
.admin-item-avatar-user {
    background-color: rgba(10,132,255,0.12);
    color: #0a84ff;
    border-radius: 12px;
}

.admin-item-info { flex: 1; min-width: 0; }
.admin-item-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}
.admin-item-meta {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
    margin-top: 3px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.admin-item-badge {
    font-size: 9px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 5px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.admin-item-badge-excl {
    background: rgba(255,214,10,0.15);
    color: #ffd60a;
}

.admin-item-actions { display: flex; gap: 6px; flex-shrink: 0; }
.admin-icon-btn {
    width: 32px; height: 32px;
    border-radius: 9px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s;
    flex-shrink: 0;
}
.admin-icon-btn-edit {
    background: rgba(255,255,255,0.07);
    color: #8e8e93;
}
.admin-icon-btn-edit:active { background: rgba(255,255,255,0.14); color: #fff; transform: scale(0.88); }
.admin-icon-btn-delete {
    background: rgba(255,69,58,0.1);
    color: var(--accent-color);
}
.admin-icon-btn-delete:active { background: rgba(255,69,58,0.2); transform: scale(0.88); }
.admin-icon-btn-link {
    background: rgba(10,132,255,0.1);
    color: #0a84ff;
}
.admin-icon-btn-link:active { background: rgba(10,132,255,0.2); transform: scale(0.88); }

.admin-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 28px 0 10px;
    color: var(--text-secondary);
    gap: 8px;
}
.admin-empty-state svg { opacity: 0.3; }
.admin-empty-state span { font-size: 13px; font-weight: 500; }

/* --- LOAD MORE --- */
.admin-load-more-wrap {
    padding: 14px 0 4px;
    display: flex;
    justify-content: center;
}
.admin-load-more-btn {
    background: rgba(255,255,255,0.04);
    color: var(--text-secondary);
    border: 1px solid rgba(255,255,255,0.08);
    padding: 10px 28px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
}
.admin-load-more-btn:active { background: rgba(255,255,255,0.1); transform: scale(0.98); }