/* ============================================================
   bezfiltar.com — Част 1: Основа, Хедър, Навигация
   ============================================================ */

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

:root {
    --bg: #f8f9fa;
    --white: #ffffff;
    --text-primary: #1a1a2e;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    --border: #e5e7eb;
    --border-light: #f0f0f0;
    --accent: #1a1a2e;
    --accent-hover: #2d2d4a;
    --green: #22c55e;
    --green-bg: #f0fdf4;
    --red: #ef4444;
    --red-bg: #fef2f2;
    --orange: #f59e0b;
    --orange-bg: #fffbeb;
    --blue: #3b82f6;
    --blue-bg: #eff6ff;
    --purple: #8b5cf6;
    --purple-bg: #f5f3ff;
    --pink: #ec4899;
    --pink-bg: #fdf2f8;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-lg: 0 4px 12px rgba(0,0,0,0.07);
    --radius: 10px;
    --radius-sm: 6px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

/* ============================================================
   HEADER
   ============================================================ */
.header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-primary);
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: var(--accent);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.logo-text {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
    line-height: 1.4;
    white-space: nowrap;
}

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

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}

.btn-ghost:hover {
    background: var(--bg);
    color: var(--text-primary);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

/* ============================================================
   NAVIGATION
   ============================================================ */
.nav-bar {
    background: var(--white);
    border-bottom: 1px solid var(--border-light);
}

.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 2px;
    overflow-x: auto;
    scrollbar-width: none;
}

.nav-inner::-webkit-scrollbar { display: none; }

.nav-item {
    padding: 12px 14px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    transition: all 0.15s ease;
    cursor: pointer;
}

.nav-item:hover { color: var(--text-primary); }

.nav-item.active {
    color: var(--text-primary);
    border-bottom-color: var(--accent);
}

.nav-spacer { flex: 1; }

.nav-sort {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 6px;
    background: var(--bg);
    border-radius: var(--radius-sm);
    margin: 8px 0;
    flex-shrink: 0;
}

.sort-btn {
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    background: transparent;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
    text-decoration: none;
    white-space: nowrap;
}

.sort-btn:hover { color: var(--text-secondary); }

.sort-btn.active {
    background: var(--white);
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}

/* ============================================================
   MAIN LAYOUT
   ============================================================ */
.main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    display: grid;
    grid-template-columns: 1fr 260px;
    gap: 24px;
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes toastIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes toastOut {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(12px); }
}

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

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.96) translateY(8px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}
/* ============================================================
   bezfiltar.com — Част 2: Списък, Пълна история, Пагинация
   ============================================================ */

/* ============================================================
   STORY LIST (index)
   ============================================================ */
.story-list {
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.story-card {
    background: var(--white);
    padding: 16px 20px;
    display: flex;
    gap: 14px;
    transition: background 0.15s ease;
    cursor: pointer;
}

.story-card:hover { background: #fcfcfd; }

.vote-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    min-width: 36px;
    padding-top: 2px;
}

.vote-btn {
    width: 32px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.15s ease;
}

.vote-btn:hover {
    background: var(--bg);
    color: var(--text-secondary);
}

.vote-btn.upvoted { color: var(--green); }
.vote-btn.downvoted { color: var(--red); }

.vote-count {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1;
}

.vote-count.positive { color: var(--green); }
.vote-count.negative { color: var(--red); }

.story-content {
    flex: 1;
    min-width: 0;
}

.story-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.category-tag {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.tag-istorii { background: var(--blue-bg); color: var(--blue); }
.tag-saveti  { background: var(--green-bg); color: #16a34a; }
.tag-taini   { background: var(--purple-bg); color: var(--purple); }
.tag-razkazi { background: var(--orange-bg); color: #d97706; }
.tag-misli   { background: var(--pink-bg); color: var(--pink); }
.tag-smechki { background: #fef9c3; color: #ca8a04; }

.story-time {
    font-size: 11px;
    color: var(--text-muted);
}

.story-title {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-primary);
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.story-excerpt {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 10px;
}

.story-footer {
    display: flex;
    align-items: center;
    gap: 16px;
}

.story-stat {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--text-muted);
    transition: color 0.15s ease;
}

.story-author {
    font-size: 12px;
    color: var(--text-muted);
    margin-left: auto;
}

.story-author strong {
    color: var(--text-secondary);
    font-weight: 500;
}

/* ============================================================
   PAGE HEADING & EMPTY STATE
   ============================================================ */
.page-heading { margin-bottom: 16px; }

.page-title {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.3px;
    margin-bottom: 2px;
}

.page-subtitle {
    font-size: 13px;
    color: var(--text-muted);
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: var(--white);
    border-radius: var(--radius);
}

.empty-state p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-top: 12px;
}

/* ============================================================
   PAGINATION & BREADCRUMB
   ============================================================ */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 24px 0;
}

.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--white);
    border: 1px solid var(--border);
    text-decoration: none;
    transition: all 0.15s ease;
}

.page-btn:hover {
    border-color: var(--text-muted);
    color: var(--text-primary);
}

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

.page-dots {
    padding: 0 4px;
    color: var(--text-muted);
    font-size: 13px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 16px;
    font-size: 12px;
    flex-wrap: wrap;
}

.breadcrumb a {
    color: var(--text-muted);
    transition: color 0.15s ease;
}

.breadcrumb a:hover { color: var(--text-primary); }

.breadcrumb-sep { color: var(--border); }

.breadcrumb-current {
    color: var(--text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ============================================================
   STORY FULL PAGE
   ============================================================ */
.story-full {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 24px;
}

.story-full-header {
    padding: 24px 24px 0;
}

.story-full-title {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: -0.3px;
    margin-bottom: 10px;
}

.story-full-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 0;
}

.story-full-body {
    display: flex;
    gap: 0;
}

.story-full-votes {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 24px 16px;
    border-right: 1px solid var(--border-light);
    flex-shrink: 0;
}

.vote-btn-lg {
    width: 40px;
    height: 36px;
}

.vote-count-lg {
    font-size: 16px;
    font-weight: 700;
}

.story-full-content {
    flex: 1;
    min-width: 0;
    padding: 24px;
}

.story-full-content p {
    font-size: 15px;
    line-height: 1.75;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.story-full-content p:last-of-type {
    margin-bottom: 0;
}

/* Mobile vote bar (hidden on desktop) */
.story-mobile-vote {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 14px 20px;
    border-top: 1px solid var(--border-light);
}

/* Share bar */
.share-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
}

.share-bar-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

.share-btn {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--white);
    color: var(--text-secondary);
    transition: all 0.15s ease;
    cursor: pointer;
    text-decoration: none;
}

.share-btn:hover {
    border-color: var(--text-muted);
    color: var(--text-primary);
    background: var(--bg);
}

/* ============================================================
   bezfiltar.com — Част 3: Коментари, Sidebar, Модали, Responsive
   ============================================================ */

/* ============================================================
   COMMENTS
   ============================================================ */
.comments-section { margin-top: 24px; }

.comments-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-light);
}

.comments-empty {
    text-align: center;
    padding: 32px 20px;
    color: var(--text-muted);
    font-size: 13px;
    background: var(--white);
    border-radius: var(--radius);
}

/* Comment form */
.comment-form {
    background: var(--white);
    border-radius: var(--radius);
    padding: 18px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}

.comment-form-row { margin-bottom: 10px; }
.comment-form-row:last-child { margin-bottom: 0; }

.comment-author-input,
.comment-form textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-family: inherit;
    color: var(--text-primary);
    background: var(--white);
    outline: none;
    transition: border-color 0.15s ease;
}

.comment-form textarea {
    font-size: 14px;
    resize: vertical;
    min-height: 80px;
    line-height: 1.6;
    padding: 10px 12px;
}

.comment-author-input:focus,
.comment-form textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(26,26,46,0.08);
}

.comment-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* Comment list */
.comments-list {
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.comment {
    display: flex;
    gap: 10px;
    background: var(--white);
    padding: 14px 16px;
}

.comment-vote-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    min-width: 30px;
    padding-top: 2px;
}

.vote-btn-sm {
    width: 26px;
    height: 22px;
}

.vote-btn-sm svg {
    width: 14px;
    height: 14px;
}

.vote-count-sm {
    font-size: 11px;
    font-weight: 600;
}

.comment-body {
    flex: 1;
    min-width: 0;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.comment-author {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.comment-text {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary);
}

.comment-reply-btn {
    display: inline-block;
    margin-top: 6px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: color 0.15s ease;
}

.comment-reply-btn:hover { color: var(--text-primary); }

/* Comment replies */
.comment-replies {
    margin-top: 12px;
    padding-left: 16px;
    border-left: 2px solid var(--border-light);
}

.comment-reply {
    padding: 10px 0;
    background: transparent !important;
}

.comment-replies .comment {
    padding: 10px 0;
    background: transparent;
    border-bottom: none;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sidebar-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: var(--shadow-sm);
}

.sidebar-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 14px;
}

.share-prompt {
    text-align: center;
    padding: 8px 0;
}

.share-prompt p {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 14px;
    line-height: 1.5;
}

.share-prompt .btn {
    width: 100%;
    justify-content: center;
    padding: 10px 16px;
}

.trending-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.trending-item {
    display: flex;
    gap: 10px;
    cursor: pointer;
}

.trending-num {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-muted);
    min-width: 18px;
    padding-top: 1px;
}

.trending-text {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.15s ease;
}

.trending-item:hover .trending-text { color: var(--accent-hover); }

.rules-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.rules-list li {
    font-size: 12.5px;
    color: var(--text-secondary);
    line-height: 1.5;
    padding-left: 16px;
    position: relative;
}

.rules-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 7px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--border);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.stat-item { text-align: center; }

.stat-number {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.stat-label {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Related Stories */
.related-section {
    margin-top: 24px;
    background: var(--white);
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: var(--shadow-sm);
}

.related-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.related-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-light);
    transition: color 0.15s ease;
}

.related-item:last-child { border-bottom: none; }
.related-item:hover .related-title { color: var(--accent-hover); }

.related-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-stats {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
    flex-shrink: 0;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
    max-width: 1200px;
    margin: 32px auto 0;
    padding: 20px;
    border-top: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    font-size: 12px;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.15s ease;
}

.footer-links a:hover { color: var(--text-primary); }

.footer-copy {
    font-size: 12px;
    color: var(--text-muted);
}

/* ============================================================
   MODAL
   ============================================================ */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 200;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(4px);
}

.modal-overlay.open { display: flex; }

.modal {
    background: var(--white);
    border-radius: 14px;
    width: 100%;
    max-width: 520px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    animation: modalIn 0.25s ease;
}

.modal-header {
    padding: 20px 24px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h2 {
    font-size: 17px;
    font-weight: 700;
}

.modal-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: var(--bg);
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.15s ease;
}

.modal-close:hover {
    background: var(--border);
    color: var(--text-primary);
}

.modal-body {
    padding: 20px 24px 24px;
}

.form-group { margin-bottom: 16px; }

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: inherit;
    color: var(--text-primary);
    background: var(--white);
    transition: border-color 0.15s ease;
    outline: none;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(26,26,46,0.08);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.6;
}

.form-hint {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
}

.form-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 20px;
}

/* ============================================================
   SEARCH OVERLAY
   ============================================================ */
.search-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 300;
    align-items: flex-start;
    justify-content: center;
    padding-top: 100px;
    backdrop-filter: blur(4px);
}

.search-overlay.open { display: flex; }

.search-box {
    position: relative;
    width: 90%;
    max-width: 560px;
    background: var(--white);
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    overflow: hidden;
    animation: searchIn 0.2s ease;
}

.search-box input {
    width: 100%;
    padding: 18px 50px 18px 50px;
    border: none;
    font-size: 16px;
    font-family: inherit;
    color: var(--text-primary);
    background: transparent;
    outline: none;
}

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

.search-box > svg {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-close {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.15s ease;
}

.search-close:hover {
    background: var(--bg);
    color: var(--text-primary);
}

.search-results {
    border-top: 1px solid var(--border-light);
    max-height: 400px;
    overflow-y: auto;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    transition: background 0.1s ease;
    cursor: pointer;
}

.search-result-item:hover { background: var(--bg); }

.search-result-cat {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    flex-shrink: 0;
}

.search-result-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.search-empty {
    padding: 24px 18px;
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
}

/* ============================================================
   TOAST
   ============================================================ */
.toast-container {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    pointer-events: none;
}

.toast {
    background: var(--accent);
    color: white;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    animation: toastIn 0.3s ease, toastOut 0.3s ease 2.2s forwards;
    pointer-events: auto;
}

/* ============================================================
   MOBILE BUTTON
   ============================================================ */
.mobile-nav-btn {
    display: none;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: var(--radius-sm);
}

.mobile-nav-btn:hover { background: var(--bg); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    .main {
        grid-template-columns: 1fr;
        padding: 12px;
        gap: 16px;
    }

    .sidebar { display: none; }

    .mobile-nav-btn { display: flex; }

    .nav-bar { display: none; }
    .nav-bar.mobile-open { display: block; }

    .header-inner { padding: 0 16px; }

    .story-card { padding: 14px 16px; }
    .story-excerpt { -webkit-line-clamp: 1; }
    .story-footer { gap: 12px; }
    .story-author { display: none; }

    /* Story full page mobile */
    .story-full-header { padding: 18px 18px 0; }
    .story-full-title { font-size: 19px; }
    .story-full-body { flex-direction: column; }

    .story-full-votes {
        flex-direction: row;
        justify-content: center;
        border-right: none;
        border-bottom: 1px solid var(--border-light);
        padding: 14px 16px;
        gap: 16px;
    }

    .story-mobile-vote { display: none; }
    .story-full-content { padding: 18px; }
    .story-full-content p { font-size: 14px; }

    .share-bar { margin-top: 20px; padding-top: 16px; }

    /* Comments mobile */
    .comment { padding: 12px; gap: 8px; }
    .comment-replies { padding-left: 12px; }

    /* Pagination mobile */
    .page-btn { min-width: 32px; height: 32px; font-size: 12px; }

    /* Footer mobile */
    .footer {
        margin-top: 16px;
        padding: 16px;
        flex-direction: column;
        align-items: flex-start;
    }

    /* Search mobile */
    .search-overlay { padding-top: 60px; }
    .search-box { width: 95%; }

    /* Modal mobile */
    .modal-overlay { padding: 12px; }
    .modal-header { padding: 16px 18px 0; }
    .modal-body { padding: 16px 18px 20px; }

    /* Related mobile */
    .related-stats { display: none; }
}
