/* --- CSS Reset & Variables --- */



/* Локальные шрифты (вместо Google Fonts) */
@font-face {
    font-family: 'Inter';
    src: url('/static/fonts/inter-400.woff2') format('woff2');
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('/static/fonts/inter-600.woff2') format('woff2');
    font-weight: 600;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('/static/fonts/inter-800.woff2') format('woff2');
    font-weight: 800;
    font-display: swap;
}

@font-face {
    font-family: 'Merriweather';
    src: url('/static/fonts/merriweather-400.woff2') format('woff2');
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: 'Merriweather';
    src: url('/static/fonts/merriweather-700.woff2') format('woff2');
    font-weight: 700;
    font-display: swap;
}




:root {
    /* === ТЕМНАЯ ТЕМА (Мягкая ночь) === */
    --bg-body: #121212;
    --bg-card: #1E1E1E;
    --bg-paper: #1a1a1a;
    --text-main: #d0d0d0;
    --text-muted: #888888;
    --text-code: #d4d4d4;
    
    --accent: #BB86FC; 
    --accent-hover: #9965f4;
    
    --border: #333333;
    --header-bg: rgba(18, 18, 18, 0.95);
    --header-height: 70px;
    --shadow: 0 4px 20px rgba(0,0,0,0.5);
    
    --input-bg: #111111;
    --input-border: #333333;
    --input-text: #ffffff;
    --code-bg: #111111;
    
    /* Спец-цвет кнопки Войти для темной темы (Белый на черном) */
    --btn-auth-bg: #ffffff;
    --btn-auth-text: #000000;
}

/* === СВЕТЛАЯ ТЕМА (Warm Paper / Sepia) === */
body.light-theme {
    --bg-body: #F5F5F7;
    --bg-card: #FFFFFF;
    --bg-paper: #FFFFFF;
    
    --text-main: #1D1D1F;
    --text-muted: #86868B;
    --text-code: #1D1D1F;
    
    --accent: #7D4CDB;
    --accent-hover: #5F30BA;
    
    --border: #D2D2D7;
    --header-bg: rgba(245, 245, 247, 0.95);
    --shadow: 0 4px 20px rgba(0,0,0,0.05);
    
    --input-bg: #EAEAEA;
    --input-border: #D1D1D1;
    --input-text: #000000;
    --code-bg: #F0F0F0;
    
    /* Спец-цвет кнопки Войти для светлой темы (Черный на белом) */
    --btn-auth-bg: #000000;
    --btn-auth-text: #ffffff;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    background: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    padding-top: var(--header-height);
    transition: background 0.3s ease, color 0.3s ease;
}

a { color: inherit; text-decoration: none; transition: 0.2s ease; }
a:hover { color: var(--accent); }

/* --- Layout Grid --- */
.container {
    max-width: 1200px;
    margin: 40px auto; 
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
    align-items: start;
}

/* --- Header (Fixed) --- */
header {
    background: var(--header-bg);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    z-index: 1000;
    display: flex;
    align-items: center;
    box-shadow: var(--shadow);
    transition: background 0.3s ease, border-color 0.3s ease;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo { 
    font-family: 'Inter', sans-serif;
    font-weight: 800; 
    font-size: 1.4rem; 
    letter-spacing: -0.5px;
    text-transform: uppercase;
    color: var(--text-main);
}

.nav-links { display: flex; gap: 20px; align-items: center; }
.nav-links a { font-size: 0.95rem; font-weight: 500; color: var(--text-muted); }
.nav-links a:hover, .nav-links a.active { color: var(--text-main); }

.nav-links .btn-login {
    border: 1px solid var(--border);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text-main);
}
.nav-links .btn-login:hover { border-color: var(--accent); color: var(--accent); }

/* Кнопка смены темы */
.theme-toggle {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-main);
    width: 36px; height: 36px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
    transition: 0.2s;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }

/* --- Content Area --- */
main { min-height: 80vh; }

/* --- Sidebar --- */
aside {
    position: sticky;
    top: calc(var(--header-height) + 20px); 
}

.widget {
    background: var(--bg-card);
    padding: 25px;
    border-radius: 16px;
    border: 1px solid var(--border);
    margin-bottom: 24px;
    box-shadow: var(--shadow);
}

.widget h3 { 
    margin-top: 0; 
    font-size: 0.85rem; 
    color: var(--text-muted); 
    text-transform: uppercase; 
    letter-spacing: 1.2px; 
    margin-bottom: 15px;
    font-weight: 700;
}

.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { 
    background: var(--bg-body); 
    color: var(--text-muted);
    border: 1px solid var(--border);
    padding: 6px 12px; 
    border-radius: 6px; 
    font-size: 0.8rem; 
    transition: all 0.2s;
}
.tag:hover { border-color: var(--accent); color: var(--accent); }

/* --- Markdown Styles (Global) --- */
.markdown-body { color: var(--text-code); font-size: 1.1rem; }
.markdown-body h2 { 
    font-family: 'Merriweather', serif; 
    color: var(--text-main); 
    margin-top: 40px; 
    border-bottom: 1px solid var(--border); 
    padding-bottom: 10px; 
}
.markdown-body h3 { color: var(--text-main); margin-top: 30px; font-weight: 600; }
.markdown-body p { margin-bottom: 20px; line-height: 1.8; }
.markdown-body ul, .markdown-body ol { margin-bottom: 20px; padding-left: 25px; }
.markdown-body li { margin-bottom: 8px; }
.markdown-body blockquote { 
    border-left: 4px solid var(--accent); 
    margin: 30px 0; 
    padding: 10px 20px; 
    background: rgba(128, 128, 128, 0.05);
    font-style: italic;
    color: var(--text-muted);
}
.markdown-body pre {
    background: var(--code-bg);
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    border: 1px solid var(--border);
    margin: 20px 0;
}
.markdown-body code {
    font-family: 'Courier New', monospace;
    background: rgba(128, 128, 128, 0.1);
    padding: 2px 5px;
    border-radius: 4px;
    font-size: 0.9em;
    color: var(--accent);
}
.markdown-body img { max-width: 100%; height: auto; border-radius: 8px; margin: 20px 0; display: block; }
.markdown-body strong { color: var(--text-main); font-weight: 700; }

/* --- Mobile Responsive --- */
@media (max-width: 900px) {
    .container { 
        grid-template-columns: 1fr; 
        margin-top: 20px;
        padding: 0 15px;
    } 
    aside { display: none; }
    .header-inner { padding: 0 15px; }
    .nav-links a:not(.btn-login, .theme-toggle) { display: none; }
    .logo { font-size: 1.2rem; }
}

/* --- Breadcrumbs --- */
.breadcrumbs { margin-bottom: 20px; font-size: 0.85rem; color: var(--text-muted); }
.breadcrumbs ol { list-style: none; padding: 0; margin: 0; display: flex; align-items: center; }
.breadcrumbs a { color: var(--text-muted); border-bottom: 1px dotted transparent; transition: 0.2s; }
.breadcrumbs a:hover { color: var(--accent); border-bottom-color: var(--accent); }
.breadcrumbs .separator { margin: 0 8px; opacity: 0.4; color: var(--text-muted); }
.breadcrumbs .current { color: var(--text-main); font-weight: 500; opacity: 0.8; }

/* --- Full Post Card --- */
.full-post-card {
    background: var(--bg-paper);
    padding: 40px;
    border-radius: 16px;
    border: 1px solid var(--border);
    transition: background 0.3s, border 0.3s;
}

/* Post Meta */
.post-meta-top {
    display: flex; align-items: center; gap: 15px; margin-bottom: 15px;
    font-size: 0.9rem; color: var(--text-muted);
}
.category-label { color: var(--accent); font-weight: 700; text-transform: uppercase; }
.post-title-main { color: var(--text-main); font-family: 'Merriweather', serif; font-size: 2.5rem; line-height: 1.2; margin-top: 0; }

/* Post Tags */
.article-tags { margin-bottom: 25px; display: flex; flex-wrap: wrap; gap: 15px; }
.minimal-tag { color: var(--text-muted); font-size: 0.9rem; font-weight: 500; opacity: 0.8; transition: 0.2s; }
.minimal-tag:hover { color: var(--accent); opacity: 1; text-decoration: underline; }

/* Post Image */
.main-image { width: 100%; border-radius: 12px; margin-bottom: 30px; border: 1px solid var(--border); }

/* --- Comments --- */
.comments-section { margin-top: 60px; padding-top: 30px; border-top: 1px solid var(--border); }
.comments-section h3 { color: var(--text-main); }

.comment-placeholder textarea {
    width: 100%; 
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    color: var(--input-text);
    padding: 15px; 
    border-radius: 8px; 
    font-family: inherit; margin-bottom: 10px;
    font-size: 1rem;
    transition: 0.3s;
}
.comment-placeholder textarea:focus { outline: none; border-color: var(--accent); }

.btn-comment {
    background: var(--bg-body); 
    color: var(--text-main); 
    border: 1px solid var(--border); 
    padding: 8px 20px; 
    border-radius: 6px; cursor: pointer; font-weight: 500;
    transition: 0.2s;
}
.btn-comment:hover { border-color: var(--accent); color: var(--accent); }

/* --- Feed Card Styles --- */
.post-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 30px;
    transition: transform 0.2s;
}
.post-card:hover { transform: translateY(-2px); border-color: #555; }

.post-cover { display: block; height: 240px; overflow: hidden; }
.post-cover img { width: 100%; height: 100%; object-fit: cover; }

.post-body { padding: 25px; }

.post-title { margin: 10px 0; font-size: 1.5rem; line-height: 1.3; font-family: 'Merriweather', serif; }
.post-title a { color: var(--text-main); }
.post-teaser { color: var(--text-muted); font-size: 1rem; margin-bottom: 20px; }

.badge-premium { 
    background: rgba(187, 134, 252, 0.1); 
    color: var(--accent); 
    padding: 2px 8px; 
    border-radius: 4px; 
    font-size: 0.75rem; 
    font-weight: 700;
    margin-left: 10px;
}

.post-footer { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--border); padding-top: 15px; margin-top: 15px; }
.read-more { font-weight: 600; font-size: 0.9rem; color: var(--text-main); }
.post-tags span { font-size: 0.8rem; color: var(--text-muted); margin-left: 10px; }


/* --- Кнопка "Наверх" --- */
#scrollToTopBtn {
    display: none; 
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 99;
    border: none;
    outline: none;
    background-color: var(--accent);
    color: white;
    cursor: pointer;
    padding: 15px;
    border-radius: 50%;
    font-size: 18px;
    width: 50px;
    height: 50px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    transition: background-color 0.3s, transform 0.2s, opacity 0.3s;
    opacity: 0.8;
}

#scrollToTopBtn:hover {
    background-color: var(--accent-hover);
    transform: translateY(-3px);
    opacity: 1;
}

@media (max-width: 768px) {
    #scrollToTopBtn {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
        font-size: 16px;
        padding: 10px;
    }
}


/* ======================================================== */
/* --- NEW: Article & Paywall Styles (Added 08.01.2026) --- */
/* ======================================================== */

.post-content {
    min-height: 200px; 
    position: relative;
}

.cover-wrapper { position: relative; overflow: hidden; border-radius: 12px; margin-bottom: 30px; }
.blur-image { filter: blur(20px) brightness(0.7); transform: scale(1.05); }

.partial-text { 
    mask-image: linear-gradient(to bottom, black 20%, transparent 100%); 
    -webkit-mask-image: linear-gradient(to bottom, black 20%, transparent 100%); 
    opacity: 0.5; pointer-events: none; user-select: none;
    margin-bottom: 0;
}

/* Paywall Container */
.paywall-container { 
    background: var(--bg-card); 
    border: 1px solid var(--accent); 
    border-radius: 16px; 
    position: relative; 
    z-index: 10;
    padding: 40px; 
    text-align: center; 
    box-shadow: 0 20px 50px rgba(0,0,0,0.4);
    overflow: hidden;
    margin-top: 20px;
}

/* Overlap Effect for Partial Mode */
.paywall-container.overlap { margin-top: -80px; }

/* Paywall Shine Effect */
.paywall-container::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

.lock-icon-lg { 
    font-size: 3rem; margin-bottom: 10px; display: inline-block; 
    animation: float 3s ease-in-out infinite; 
}
@keyframes float { 
    0%, 100% { transform: translateY(0); } 
    50% { transform: translateY(-5px); } 
}

.paywall-desc { color: var(--text-muted); margin-bottom: 30px; font-size: 1rem; line-height: 1.5; }

/* Price Preview (Guest) */
.price-preview-row {
    display: flex; justify-content: center; gap: 10px; margin-bottom: 20px;
}
.mini-price-tag {
    background: rgba(255, 215, 0, 0.1); 
    color: #FFD700; 
    border: 1px solid #FFD700;
    padding: 4px 10px; 
    border-radius: 20px; 
    font-size: 0.85rem; 
    font-weight: 600;
}
.ticket-tag {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(187, 134, 252, 0.1);
}

/* Auth Buttons */
.auth-buttons-column {
    display: flex; flex-direction: column; align-items: center; gap: 15px; margin-top: 20px;
}

.btn-auth {
    /* Берет спец-переменные из :root, чтобы был контраст */
    background: var(--btn-auth-bg); 
    color: var(--btn-auth-text);
    
    width: 100%; max-width: 280px; text-align: center; display: block;
    font-weight: 800; /* Жирный текст */
}
.btn-auth:hover { opacity: 0.9; transform: translateY(-2px); }

.btn-text-link { color: var(--text-muted); font-size: 0.9rem; transition: 0.2s; }
.btn-text-link:hover { color: var(--accent); }

/* Paywall Cards (Authenticated) */
.paywall-cards {
    display: flex; flex-wrap: wrap; gap: 20px; justify-content: center; margin-bottom: 20px;
}
.buy-card {
    background: var(--bg-body); border: 1px solid var(--border);
    border-radius: 12px; padding: 20px; min-width: 220px; flex: 1; max-width: 300px;
    display: flex; flex-direction: column; align-items: center; gap: 10px;
    transition: 0.3s;
}
.buy-card:hover { transform: translateY(-3px); border-color: var(--accent); }
.highlight-card { border-color: var(--accent); background: rgba(187, 134, 252, 0.03); }

.buy-label { font-size: 0.85rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.buy-price { font-size: 1.8rem; font-weight: 800; color: var(--text-main); }

/* Buttons General */
.btn-premium {
    border: none; padding: 12px 24px; border-radius: 8px;
    font-weight: 700; cursor: pointer; font-size: 0.95rem; width: 100%;
    transition: all 0.2s; 
    text-decoration: none;
    /* Убрали color: #333, чтобы не ломать контраст */
    color: inherit; 
}

.btn-one-off { 
    background: #333; 
    color: #fff !important; /* Белый текст всегда */
}
.btn-one-off:hover { background: #444; }

.btn-pack {
    background: linear-gradient(135deg, var(--accent), #7D4CDB);
    color: #fff !important; /* Белый текст на фиолетовом */
    box-shadow: 0 4px 15px rgba(125, 76, 219, 0.4);
}
.btn-pack:hover { 
    background: linear-gradient(135deg, #a66af5, #6a3abf);
    box-shadow: 0 6px 20px rgba(125, 76, 219, 0.6);
    transform: translateY(-1px);
}


.ticket-row { 
    margin-top: 20px; padding-top: 15px; border-top: 1px dashed var(--border); 
    display: flex; gap: 10px; align-items: center; justify-content: center;
    color: var(--text-muted); font-size: 0.9rem;
}
.btn-ticket {
    background: transparent; border: 1px solid var(--accent); color: var(--accent);
    padding: 5px 15px; border-radius: 20px; cursor: pointer; font-size: 0.85rem;
}
.btn-ticket:hover { background: var(--accent); color: #fff; }






.comments-locked {
    text-align: center; padding: 40px; color: var(--text-muted);
    background: rgba(128,128,128, 0.05); border-radius: 8px; margin-top: 40px;
    border: 1px dashed var(--border);
}

@media (max-width: 600px) {
    .paywall-cards { flex-direction: column; }
    .buy-card { width: 100%; max-width: none; }
}


/* --- Sidebar User Widget --- */
.user-widget-header { display: flex; align-items: center; gap: 10px; margin-bottom: 15px; }
.mini-avatar { width: 40px; height: 40px; background: var(--accent); color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1.2rem; }
.user-name { font-weight: 700; font-size: 0.95rem; color: var(--text-main); }
.user-status { font-size: 0.75rem; color: var(--accent); text-transform: uppercase; letter-spacing: 0.5px; }

.user-balance-row { 
    display: flex; justify-content: space-between; 
    background: rgba(128,128,128, 0.08); 
    padding: 10px 15px; border-radius: 8px; margin-bottom: 20px; font-size: 0.9rem;
    color: var(--text-muted);
    border: 1px dashed var(--border);
}
.balance-val { font-weight: 700; color: var(--text-main); }

.btn-sidebar-action { 
    display: block; text-align: center; background: var(--bg-body); 
    border: 1px solid var(--border); padding: 10px; border-radius: 8px; 
    font-size: 0.9rem; transition: 0.2s; color: var(--text-main); font-weight: 600;
}
.btn-sidebar-action:hover { border-color: var(--accent); color: var(--accent); }

.btn-sidebar-outline { 
    display: block; text-align: center; border: 1px solid var(--border); 
    color: var(--text-main); padding: 10px; border-radius: 8px; margin-bottom: 10px; 
    font-size: 0.9rem; transition: 0.2s;
}
.btn-sidebar-outline:hover { border-color: var(--text-main); }

.btn-sidebar-solid { 
    display: block; text-align: center; background: var(--accent); 
    color: #fff; padding: 10px; border-radius: 8px; font-size: 0.9rem; 
    font-weight: 600; transition: 0.2s;
}
.btn-sidebar-solid:hover { opacity: 0.9; transform: translateY(-1px); }



/* --- Header Profile Improvements --- */

/* Скрываем текстовые ссылки на маленьких экранах */
@media (max-width: 600px) {
    .desktop-menu { display: none; }
}
.desktop-menu { display: flex; gap: 20px; margin-right: 15px; }

/* Кнопка профиля в шапке */
.header-profile-btn {
    display: flex; align-items: center; gap: 8px;
    padding: 4px 8px; border-radius: 20px;
    transition: 0.2s; border: 1px solid transparent;
}
.header-profile-btn:hover {
    background: rgba(128,128,128, 0.1);
    border-color: var(--border);
}

.header-username {
    font-weight: 600; color: var(--text-main); font-size: 0.9rem;
}

.header-avatar {
    width: 32px; height: 32px;
    background: var(--accent); color: #fff;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 0.9rem;
}

/* На мобильных скрываем имя, оставляем только аватарку для экономии места */
@media (max-width: 480px) {
    .header-username { display: none; }
}


/* --- Mobile User Strip (Мобильная полоска профиля) --- */

/* По умолчанию (на ПК) скрыта */
.mobile-user-strip { display: none; }

/* Показываем ТОЛЬКО на мобильных */
@media (max-width: 900px) {
    .mobile-user-strip {
        display: flex;
        align-items: center;
        justify-content: space-between;
        
        /* Отступы и стиль */
        margin: 15px 15px 0 15px; /* Сверху 15px от хедера */
        padding: 12px 15px;
        background: var(--bg-card);
        border: 1px solid var(--border);
        border-radius: 12px;
        box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    }
    
    /* Скрываем обычную кнопку профиля в хедере на мобильных, чтобы не дублировать */
    .header-profile-btn { display: none !important; }
}

.mus-left { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.mus-avatar { 
    width: 36px; height: 36px; 
    background: var(--accent); color: #fff; 
    border-radius: 50%; 
    display: flex; align-items: center; justify-content: center; 
    font-weight: 700; 
}
.mus-name { font-weight: 700; color: var(--text-main); font-size: 0.95rem; }

.mus-right { display: flex; align-items: center; gap: 15px; }
.mus-tickets { font-size: 0.9rem; color: var(--text-muted); font-weight: 600; }



/* Улучшенная карточка подписки */
/* --- Улучшенная карточка подписки (Адаптивная к теме) --- */
.buy-card.best-value {
    /* Фон теперь зависит от темы: Темная - темный градиент, Светлая - белый */
    background: var(--bg-card); 
    border: 1px solid var(--accent);
    box-shadow: 0 4px 20px rgba(124, 77, 255, 0.15); /* Цвет тени универсален или прозрачен */
    transform: scale(1.02);
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
}

/* В светлой теме добавим легкий серый фон, чтобы выделялось */
body.light-theme .buy-card.best-value {
    background: linear-gradient(145deg, #ffffff, #f0f0f5);
    box-shadow: 0 4px 25px rgba(125, 76, 219, 0.15);
}

.sub-badge-floating {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.buy-sub-title {
    display: block;
    color: var(--accent);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
    font-weight: 700;
}

.buy-plan-name {
    display: block;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-main); /* Теперь цвет берется из переменной (черный в светлой теме) */
    margin-bottom: 10px;
}

.price-block {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 5px;
}
.buy-price {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-main); /* Цена тоже адаптируется */
}
.price-period { color: var(--text-muted); font-size: 0.9rem; }

/* Цена в день */
.price-per-day {
    font-size: 0.85rem; 
    margin-bottom: 15px;
    /* Зеленый цвет для выгоды (он хорошо виден на обоих фонах) */
    color: #28a745; 
    font-weight: 600;
}
/* В темной теме делаем его чуть ярче */
body:not(.light-theme) .price-per-day { color: #4cd964; }


.plan-benefits-mini {
    list-style: none;
    padding: 0;
    margin: 15px 0 20px 0;
    text-align: left;
    font-size: 0.85rem;
    color: var(--text-muted); /* Серый текст (читаем везде) */
}
.plan-benefits-mini li { margin-bottom: 5px; }

/* Кнопка "Оформить подписку" */
.btn-pack.glow-effect {
    box-shadow: 0 0 15px var(--accent);
    animation: pulse-glow 3s infinite;
}
@keyframes pulse-glow {
    0% { box-shadow: 0 0 5px var(--accent); }
    50% { box-shadow: 0 0 15px var(--accent); }
    100% { box-shadow: 0 0 5px var(--accent); }
}


/* --- SEARCH BAR --- */
.search-wrapper {
    position: relative;
    margin-right: 15px;
}

/* Общие стили инпута */
.search-wrapper input {
    background: rgba(128, 128, 128, 0.1);
    border: 1px solid transparent;
    border-radius: 20px;
    padding: 6px 15px;
    color: var(--text-main);
    font-size: 0.9rem;
    width: 200px;
    transition: all 0.3s ease;
    outline: none;
}
.search-wrapper input:focus {
    width: 260px;
    background: var(--bg-card);
    border-color: var(--accent);
    box-shadow: 0 0 10px rgba(124, 77, 255, 0.2);
}

/* Выпадающий список */
.search-dropdown {
    position: absolute;
    top: 100%; left: 0; width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px; margin-top: 5px;
    box-shadow: var(--shadow);
    display: none; z-index: 2000; overflow: hidden;
}
.search-item {
    display: block; padding: 10px 15px;
    border-bottom: 1px solid var(--border);
    color: var(--text-main); text-decoration: none; transition: 0.2s;
}
.search-item:hover { background: rgba(128, 128, 128, 0.1); padding-left: 20px; }
.search-cat { font-size: 0.75rem; color: var(--accent); text-transform: uppercase; display: block; }
.search-title { font-size: 0.9rem; font-weight: 600; }

/* === МОБИЛЬНЫЕ НАСТРОЙКИ === */
@media (max-width: 900px) {
    /* Скрываем поиск в шапке (он там не помещается) */
    .desktop-search { display: none; }
    
    /* Мобильный поиск растягиваем на всю ширину */
    .mobile-search-container input { width: 100% !important; }
}


/* --- ГРУППА ПОИСКА (Инпут + Кнопка) --- */
.search-input-group {
    position: relative;
    display: flex;
    align-items: center;
}

/* Инпут (поле ввода) */
.search-wrapper input {
    background: rgba(128, 128, 128, 0.1);
    border: 1px solid transparent;
    border-radius: 20px;
    padding: 8px 40px 8px 15px; /* Справа отступ 40px под кнопку */
    color: var(--text-main);
    font-size: 0.9rem;
    width: 220px;
    transition: all 0.3s ease;
    outline: none;
}

.search-wrapper input:focus {
    width: 280px;
    background: var(--bg-card);
    border-color: var(--accent);
    box-shadow: 0 0 10px rgba(124, 77, 255, 0.2);
}

/* Кнопка с лупой */
.search-btn-js {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
    border-radius: 50%;
}
.search-btn-js:hover {
    color: var(--accent);
    background: rgba(128,128,128, 0.1);
}

/* Мобильный поиск растягиваем */
@media (max-width: 900px) {
    .mobile-search-container input { width: 100% !important; }
    /* На мобилке при фокусе ширина не меняется (она и так 100%) */
    .mobile-search-container input:focus { width: 100% !important; }
}


/* --- СТИЛИ ДЛЯ ТЕГОВ --- */
.feed-tags {
    display: flex;
    gap: 8px; /* Расстояние между тегами */
    flex-wrap: wrap;
    margin-left: auto; /* Прижать вправо (если нужно) */
}

.tag-link {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    padding: 2px 8px;
    border-radius: 12px;
    background: rgba(128, 128, 128, 0.1); /* Легкий фон */
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

/* При наведении — подсвечиваем */
.tag-link:hover {
    color: var(--text-main);
    background: var(--bg-card);
    border-color: var(--accent);
    transform: translateY(-1px); /* Чуть приподнять */
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}


/* Теги на странице статьи (чуть крупнее) */
.large-tag {
    font-size: 0.85rem;
    padding: 4px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
}

/* Размытый текст для Ghost режима */
.blur-text-line {
    color: transparent;
    text-shadow: 0 0 5px rgba(150, 150, 150, 0.5);
    user-select: none;
}

/* Рамка для платных статей в ленте */
.paid-border {
    border: 1px solid rgba(255, 215, 0, 0.2); /* Золотистая рамка */
}
