/* ============================================ */
/* ROOT VARIABLES - BRAND COLORS                */
/* ============================================ */
:root {
    --lx-primary: #0b74db;
    --lx-primary-light: #3b82f6;
    --lx-primary-dark: #0b5bbf;
    --lx-secondary: #f59e0b;
    --lx-success: #10b981;
    --lx-danger: #ef4444;
    --lx-warning: #f59e0b;
    --lx-info: #3b82f6;
    --lx-purple: #8b5cf6;
    --lx-pink: #ec4899;
    
    --lx-dark: #0b1b2a;
    --lx-dark-light: #1e293b;
    --lx-light: #f8fafc;
    --lx-light-alt: #f1f5f9;
    
    --lx-gradient: linear-gradient(135deg, #0b74db 0%, #3b82f6 100%);
    
    --card-bg: #ffffff;
    --border-color: #e2e8f0;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    
    --radius-lg: 20px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --radius-xs: 6px;
    --radius-full: 9999px;
    
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 20px 40px -10px rgba(0, 0, 0, 0.2);
    
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

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

/* ============================================ */
/* SCROLLBAR                                    */
/* ============================================ */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--border-color);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb {
    background: var(--lx-primary);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--lx-primary-dark);
}

/* ============================================ */
/* READING PROGRESS BAR                         */
/* ============================================ */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: transparent;
    z-index: 9999;
}

.reading-progress-bar {
    height: 100%;
    background: var(--lx-gradient);
    width: 0%;
    transition: width 0.3s ease;
}

/* ============================================ */
/* BACK TO TOP                                  */
/* ============================================ */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--lx-gradient);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    transform: translateY(20px);
    transition: all var(--transition-normal);
    z-index: 99;
}

.back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

/* ============================================ */
/* MAIN CONTENT                                 */
/* ============================================ */
.main-content {
    padding: 40px 0;
}

.post-container {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px;
}

/* ============================================ */
/* SEARCH - PROFESSIONAL DESIGN                 */
/* ============================================ */
.search-container {
    max-width: 600px;
    margin: 24px auto 10px;
    padding: 0 20px;
    position: relative;
}

.search-wrapper {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 50px;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.06);
    padding: 4px 4px 4px 22px;
}

.search-wrapper:focus-within {
    border-color: rgba(11, 116, 219, 0.3);
    box-shadow: 0 4px 25px rgba(11, 116, 219, 0.08);
}

.search-wrapper .search-icon {
    color: #94a3b8;
    font-size: 1rem;
    opacity: 0.7;
    flex-shrink: 0;
}

.search-input {
    background: transparent;
    border: none;
    padding: 14px 14px;
    font-size: 1rem;
    width: 100%;
    outline: none;
    font-weight: 400;
    color: #1a1a2e;
    font-family: 'Inter', sans-serif;
}

.search-input::placeholder {
    color: #94a3b8;
    opacity: 0.7;
}

.search-btn {
    background: var(--lx-gradient);
    border: none;
    padding: 12px 28px;
    border-radius: 50px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(11, 116, 219, 0.3);
    font-family: 'Inter', sans-serif;
}

.search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(11, 116, 219, 0.4);
}

.search-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(11, 116, 219, 0.25);
}

/* Search Dropdown */
.search-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(226, 232, 240, 0.5);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.3s ease;
    z-index: 1000;
    max-height: 420px;
    overflow-y: auto;
    padding: 8px;
}

.search-dropdown.active {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
}

.search-dropdown::-webkit-scrollbar {
    width: 4px;
}

.search-dropdown::-webkit-scrollbar-track {
    background: transparent;
}

.search-dropdown::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 4px;
}

.search-dropdown::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* Search Results */
.search-result-item {
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 10px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.3);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: rgba(11, 116, 219, 0.05);
}

.search-result-title {
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 4px;
    font-size: 0.95rem;
}

.search-result-excerpt {
    color: #64748b;
    font-size: 0.85rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.search-result-category {
    display: inline-block;
    background: rgba(11, 116, 219, 0.08);
    color: #0b74db;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-top: 6px;
}

.search-result-author {
    color: #94a3b8;
    font-size: 0.8rem;
    margin-top: 4px;
}

.search-highlight {
    background: rgba(245, 158, 11, 0.2);
    color: #d97706;
    padding: 1px 4px;
    border-radius: 2px;
    font-weight: 600;
}

.search-no-results {
    padding: 30px 20px;
    text-align: center;
    color: #94a3b8;
    font-size: 0.95rem;
}

.search-no-results i {
    font-size: 28px;
    display: block;
    margin-bottom: 10px;
    opacity: 0.4;
}

.search-no-results strong {
    color: #1a1a2e;
}

.search-loading {
    padding: 30px 20px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: #94a3b8;
    font-size: 0.95rem;
}

/* ============================================ */
/* POST CARD                                   */
/* ============================================ */
.post-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.post-header {
    padding: 40px 40px 20px;
    border-bottom: 1px solid var(--border-color);
}

.post-category {
    display: inline-block;
    background: rgba(59, 130, 246, 0.1);
    color: var(--lx-primary);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.post-title {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
    color: var(--lx-dark);
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    flex-wrap: wrap;
}

.author-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.author-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--lx-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--lx-primary);
    font-weight: 600;
    font-size: 1.2rem;
}

.author-details h4 {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.post-stats {
    display: flex;
    gap: 15px;
    margin-left: auto;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.post-body {
    padding: 30px 40px;
}

.post-image {
    width: 100%;
    border-radius: var(--radius-md);
    margin-bottom: 30px;
    max-height: 500px;
    object-fit: cover;
}

.post-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-primary);
}

.post-content h2 {
    font-size: 1.8rem;
    margin: 30px 0 15px;
    color: var(--lx-dark);
}

.post-content h3 {
    font-size: 1.4rem;
    margin: 25px 0 12px;
    color: var(--lx-dark-light);
}

.post-content p {
    margin-bottom: 20px;
}

.post-content ul,
.post-content ol {
    margin: 20px 0 20px 30px;
}

.post-content li {
    margin-bottom: 10px;
}

.post-content blockquote {
    border-left: 4px solid var(--lx-primary);
    padding: 20px;
    margin: 30px 0;
    background: var(--lx-light);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    font-style: italic;
}

.post-content code {
    background: var(--lx-light);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.post-content pre {
    background: var(--lx-dark);
    color: white;
    padding: 20px;
    border-radius: var(--radius-md);
    overflow-x: auto;
    margin: 25px 0;
}

.post-footer {
    padding: 20px 40px 30px;
}

.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 25px;
}

.tag {
    background: white;
    color: var(--text-primary);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid var(--border-color);
    transition: all var(--transition-fast);
    text-decoration: none;
}

.tag:hover {
    background: var(--lx-primary);
    color: white;
    border-color: var(--lx-primary);
    transform: translateY(-2px);
}

/* ============================================ */
/* POST ACTIONS                                */
/* ============================================ */
.post-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-weight: 500;
}

.action-btn:hover {
    background: var(--lx-light);
    color: var(--lx-primary);
    border-color: var(--lx-primary-light);
    transform: translateY(-2px);
}

.action-btn.liked {
    color: var(--lx-danger);
    border-color: rgba(239, 68, 68, 0.2);
    background: rgba(239, 68, 68, 0.05);
}

.action-btn.saved {
    color: var(--lx-secondary);
    border-color: rgba(245, 158, 11, 0.2);
    background: rgba(245, 158, 11, 0.05);
}

/* Share Dropdown */
.share-dropdown {
    position: relative;
}

.share-options {
    position: absolute;
    bottom: 100%;
    right: 0;
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 15px;
    display: none;
    flex-direction: column;
    gap: 10px;
    min-width: 200px;
    margin-bottom: 10px;
    z-index: 10;
}

.share-options.active {
    display: flex;
}

.share-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--text-primary);
    transition: all var(--transition-fast);
}

.share-option:hover {
    background: var(--lx-light);
    color: var(--lx-primary);
}

.share-option.facebook {
    color: #1877f2;
}

.share-option.twitter {
    color: #1da1f2;
}

.share-option.linkedin {
    color: #0077b5;
}

.share-option.whatsapp {
    color: #25d366;
}

/* ============================================ */
/* TABLE OF CONTENTS                           */
/* ============================================ */
.toc-container {
    position: sticky;
    top: 100px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    margin-bottom: 20px;
}

.toc-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--lx-dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

.toc-list {
    list-style: none;
}

.toc-item {
    margin-bottom: 8px;
}

.toc-link {
    display: block;
    padding: 8px 12px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    border-left: 3px solid transparent;
}

.toc-link:hover,
.toc-link.active {
    color: var(--lx-primary);
    background: rgba(59, 130, 246, 0.05);
    border-left-color: var(--lx-primary);
}

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

.sidebar-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 25px;
    box-shadow: var(--shadow-md);
}

.card-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--lx-dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-title i {
    color: var(--lx-primary);
}

/* Related Posts */
.related-post {
    display: flex;
    gap: 15px;
    padding: 15px;
    border-radius: var(--radius-md);
    margin-bottom: 15px;
    transition: all var(--transition-fast);
    text-decoration: none;
    color: inherit;
    border: 1px solid transparent;
}

.related-post:hover {
    background: var(--lx-light);
    border-color: var(--border-color);
    transform: translateX(5px);
}

.related-post-image {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    flex-shrink: 0;
    background: var(--lx-light);
    display: flex;
    align-items: center;
    justify-content: center;
}

.related-post-content h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 5px;
    line-height: 1.4;
}

.related-post-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ============================================ */
/* COMMENTS                                    */
/* ============================================ */
.comments-section {
    margin-top: 50px;
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-md);
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 30px;
    color: var(--lx-dark);
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-title i {
    color: var(--lx-primary);
}

.comments-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: 15px;
}

.comments-count {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--lx-primary);
    background: rgba(59, 130, 246, 0.1);
    padding: 6px 12px;
    border-radius: 20px;
}

.comments-sort {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sort-select {
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: white;
    color: var(--text-secondary);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.sort-select:focus {
    outline: none;
    border-color: var(--lx-primary);
}

.comments-list {
    margin-bottom: 40px;
}

/* Comment */
.comment {
    display: flex;
    gap: 20px;
    padding: 25px;
    border-bottom: 1px solid var(--border-color);
    position: relative;
    transition: all var(--transition-normal);
}

.comment:last-child {
    border-bottom: none;
}

.comment:hover {
    background: var(--lx-light);
    border-radius: var(--radius-md);
}

.comment-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--lx-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.2rem;
    box-shadow: var(--shadow-sm);
}

.comment-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.comment-content {
    flex: 1;
    position: relative;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 10px;
}

.comment-author-info {
    display: flex;
    flex-direction: column;
}

.comment-author {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.comment-badge {
    background: var(--lx-gradient);
    color: white;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.comment-date {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.comment-text {
    color: var(--text-primary);
    line-height: 1.7;
    margin-bottom: 20px;
    font-size: 1rem;
    background: white;
    padding: 20px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.comment-actions {
    display: flex;
    gap: 15px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.comment-action {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all var(--transition-fast);
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
}

.comment-action:hover {
    background: var(--lx-light);
    color: var(--lx-primary);
    border-color: var(--border-color);
    transform: translateY(-1px);
}

.comment-action.liked {
    color: var(--lx-danger);
    background: rgba(239, 68, 68, 0.05);
    border-color: rgba(239, 68, 68, 0.1);
}

.comment-action.reply {
    color: var(--lx-primary);
    background: rgba(59, 130, 246, 0.05);
    border-color: rgba(59, 130, 246, 0.1);
}

/* Nested Replies */
.comment-replies {
    margin-top: 12px;
    margin-left: 20px;
    padding-left: 16px;
    border-left: 2px solid #e1e8ed;
    position: relative;
}

.comment.nested-level-1 {
    background: rgba(59, 130, 246, 0.02);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 15px;
}

.comment.nested-level-2 {
    background: rgba(59, 130, 246, 0.03);
    border-radius: var(--radius-md);
    padding: 18px;
    margin-bottom: 12px;
}

.comment.nested-level-3 {
    background: rgba(59, 130, 246, 0.04);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 10px;
}

.nested-indicator {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-left: 8px;
    background: var(--lx-light);
    padding: 2px 6px;
    border-radius: 10px;
}

/* Comment Options Dropdown */
.comment-options {
    position: relative;
}

.comment-options-btn {
    background: none;
    border: none;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--text-muted);
    transition: all var(--transition-fast);
    font-size: 14px;
}

.comment-options-btn:hover {
    background: var(--lx-light);
    color: var(--text-primary);
}

.comment-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    min-width: 150px;
    z-index: 1000;
    display: none;
    overflow: hidden;
    margin-top: 4px;
}

.comment-dropdown.active {
    display: block;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    text-decoration: none;
    color: var(--text-primary);
    background: none;
    border: none;
    width: 100%;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9rem;
    transition: background 0.2s ease;
}

.dropdown-item:hover {
    background: var(--lx-light);
}

.dropdown-item i {
    width: 18px;
    color: var(--text-muted);
}

.dropdown-item:hover i {
    color: var(--lx-primary);
}

/* Reply Form */
.reply-form {
    margin-top: 15px;
    padding: 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    display: none;
    animation: slideDown 0.3s ease;
}

.reply-form.active {
    display: block;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.reply-text {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.95rem;
    resize: vertical;
    min-height: 100px;
    transition: all var(--transition-normal);
}

.reply-text:focus {
    outline: none;
    border-color: var(--lx-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* ============================================ */
/* COMMENT FORM                                */
/* ============================================ */
.comment-form {
    background: var(--lx-light);
    padding: 30px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    transition: all var(--transition-normal);
}

.comment-form:focus-within {
    border-color: var(--lx-primary);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.08);
}

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

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

.comment-input-container {
    background: white;
    border-radius: var(--radius-md);
    border: 2px solid var(--border-color);
    transition: all var(--transition-normal);
    overflow: hidden;
}

.comment-input-container:focus-within {
    border-color: var(--lx-primary);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.comment-editor {
    width: 100%;
    padding: 16px 18px;
    min-height: 100px;
    max-height: 300px;
    overflow-y: auto;
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-primary);
    background: transparent;
    outline: none;
}

.comment-editor:empty:before {
    content: attr(placeholder);
    color: var(--text-muted);
    font-style: italic;
}

.comment-editor b,
.comment-editor strong {
    font-weight: 700;
}

.comment-editor i,
.comment-editor em {
    font-style: italic;
}

.comment-editor a {
    color: var(--lx-primary);
    text-decoration: underline;
    cursor: pointer;
}

.comment-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 16px;
    border-top: 1px solid var(--border-color);
    background: var(--lx-light-alt);
    flex-wrap: wrap;
    gap: 8px;
}

.comment-formatting {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.format-btn {
    background: none;
    border: none;
    padding: 6px 10px;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: var(--radius-xs);
    transition: all var(--transition-fast);
    font-size: 0.85rem;
}

.format-btn:hover {
    background: rgba(59, 130, 246, 0.1);
    color: var(--lx-primary);
}

.comment-char-count {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.comment-char-count.warning {
    color: var(--lx-warning);
}

.comment-char-count.error {
    color: var(--lx-danger);
}

/* Comment User Info */
.comment-user-info {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.comment-user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--lx-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
}

.comment-user-fields {
    flex: 1;
    min-width: 200px;
}

.input-icon-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: all var(--transition-fast);
}

.comment-input {
    width: 100%;
    padding: 12px 16px 12px 42px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.95rem;
    transition: all var(--transition-normal);
    background: white;
    color: var(--text-primary);
}

.comment-input:focus {
    outline: none;
    border-color: var(--lx-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.comment-input:focus+.input-icon,
.comment-input:focus~.input-icon {
    color: var(--lx-primary);
}

.comment-input[readonly] {
    background: var(--lx-light-alt);
    cursor: not-allowed;
    color: var(--text-secondary);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* Submit Row */
.comment-submit-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.comment-notice {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.comment-notice i {
    color: var(--lx-success);
    font-size: 0.9rem;
}

.comment-submit-btn {
    padding: 12px 28px;
    font-size: 0.95rem;
    border-radius: var(--radius-md);
    gap: 10px;
    transition: all var(--transition-normal);
    background: var(--lx-gradient);
    color: white;
    border: none;
    cursor: pointer;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(11, 116, 219, 0.25);
}

.comment-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(11, 116, 219, 0.35);
}

.comment-submit-btn:active {
    transform: translateY(0);
}

.comment-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* No Comments State */
.no-comments {
    text-align: center;
    padding: 60px 20px;
    background: var(--lx-light);
    border-radius: var(--radius-lg);
    margin-bottom: 30px;
}

.no-comments i {
    font-size: 48px;
    color: var(--lx-primary);
    margin-bottom: 20px;
    opacity: 0.7;
}

.no-comments h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.no-comments p {
    color: var(--text-secondary);
    margin-bottom: 25px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* Reply Editor */
.reply-editor {
    width: 100%;
    padding: 12px 16px;
    min-height: 80px;
    max-height: 200px;
    overflow-y: auto;
    font-family: inherit;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-primary);
    background: transparent;
    outline: none;
}

.reply-editor:empty:before {
    content: attr(placeholder);
    color: var(--text-muted);
    font-style: italic;
}

.reply-editor b,
.reply-editor strong {
    font-weight: 700;
}

.reply-editor i,
.reply-editor em {
    font-style: italic;
}

.reply-editor a {
    color: var(--lx-primary);
    text-decoration: underline;
    cursor: pointer;
}

.reply-input-container {
    background: white;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.reply-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 12px;
    border-top: 1px solid var(--border-color);
    background: var(--lx-light-alt);
    flex-wrap: wrap;
    gap: 6px;
}

.reply-formatting {
    display: flex;
    gap: 2px;
    flex-wrap: wrap;
}

.reply-format-btn {
    background: none;
    border: none;
    padding: 4px 8px;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: var(--radius-xs);
    transition: all var(--transition-fast);
    font-size: 0.8rem;
}

.reply-format-btn:hover {
    background: rgba(59, 130, 246, 0.1);
    color: var(--lx-primary);
}

.reply-char-count {
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* Emoji Picker */
.emoji-picker {
    position: fixed;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 4px;
    max-width: 250px;
    max-height: 200px;
    overflow-y: auto;
}

.reply-emoji-picker {
    animation: slideDown 0.2s ease;
}

.reply-emoji-picker::-webkit-scrollbar {
    width: 4px;
}

.reply-emoji-picker::-webkit-scrollbar-track {
    background: var(--border-color);
    border-radius: 2px;
}

.reply-emoji-picker::-webkit-scrollbar-thumb {
    background: var(--lx-primary);
    border-radius: 2px;
}

/* Comment Edit Form */
.comment-edit-form {
    padding: 15px;
    background: var(--lx-light);
    border-radius: var(--radius-sm);
}

.comment-edit-textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.95rem;
    resize: vertical;
    min-height: 80px;
    transition: all var(--transition-normal);
}

.comment-edit-textarea:focus {
    outline: none;
    border-color: var(--lx-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.comment-edit-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    justify-content: flex-end;
}

/* ============================================ */
/* PUBLIC FEED                                 */
/* ============================================ */
.public-feed-section {
    margin-top: 50px;
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-md);
}

.feed-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: 15px;
}

.feed-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.feed-card {
    background: white;
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all var(--transition-normal);
    border: 1px solid var(--border-color);
    cursor: pointer;
}

.feed-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.feed-card-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.feed-card-content {
    padding: 20px;
}

.feed-card-category {
    display: inline-block;
    background: rgba(59, 130, 246, 0.1);
    color: var(--lx-primary);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 12px;
    pointer-events: none;
}

.feed-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-primary);
    line-height: 1.4;
    pointer-events: none;
}

.feed-card-excerpt {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 15px;
    pointer-events: none;
}

.feed-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
    pointer-events: none;
}

.image-count-badge {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 11px;
    display: flex;
    align-items: center;
    gap: 4px;
    z-index: 1;
}

.image-count-badge i {
    font-size: 10px;
}

.feed-card .feed-read-more {
    position: relative;
    z-index: 2;
    pointer-events: auto;
}

.feed-card .feed-like {
    position: relative;
    z-index: 2;
    pointer-events: auto;
}

/* ============================================ */
/* GALLERY                                     */
/* ============================================ */
.post-gallery {
    margin: 30px 0;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--lx-light);
}

.gallery-slider {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.gallery-slides {
    display: flex;
    transition: transform 0.5s ease;
}

.gallery-slide {
    flex-shrink: 0;
    width: 100%;
    position: relative;
    background: #000;
}

.gallery-slide img {
    width: 100%;
    height: 500px;
    object-fit: contain;
    background: #f5f5f5;
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    z-index: 2;
}

.gallery-nav:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: translateY(-50%) scale(1.1);
}

.gallery-prev {
    left: 20px;
}

.gallery-next {
    right: 20px;
}

.gallery-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 2;
}

.gallery-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.gallery-dot.active {
    background: white;
    width: 30px;
    border-radius: 5px;
}

.gallery-counter {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    z-index: 2;
}

.gallery-thumbnails {
    display: flex;
    gap: 8px;
    padding: 15px;
    background: var(--card-bg);
    overflow-x: auto;
    border-top: 1px solid var(--border-color);
}

.gallery-thumbnail {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    cursor: pointer;
    opacity: 0.6;
    transition: all var(--transition-fast);
    border: 2px solid transparent;
}

.gallery-thumbnail:hover {
    opacity: 0.9;
    transform: scale(1.05);
}

.gallery-thumbnail.active {
    opacity: 1;
    border-color: var(--lx-primary);
    box-shadow: var(--shadow-sm);
}

/* ============================================ */
/* FOLLOW BUTTON                               */
/* ============================================ */
.author-follow-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
    white-space: nowrap;
    margin-left: 8px;
    vertical-align: middle;
}

.author-follow-btn:not(.following) {
    background: var(--lx-primary);
    color: white;
}

.author-follow-btn:not(.following):hover {
    background: var(--lx-primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(11, 116, 219, 0.3);
}

.author-follow-btn.following {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}

.author-follow-btn.following:hover {
    background: #c8e6c9;
    transform: translateY(-1px);
}

.author-follow-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.author-follow-btn i {
    font-size: 0.7rem;
}

.author-follow-btn .btn-text {
    font-size: 0.75rem;
}

/* Author Navigation */
.author-nav-btn {
    transition: all 0.2s ease;
    background: #f1f5f9 !important;
    color: #1e293b !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    font-size: 0.7rem !important;
    padding: 3px 8px !important;
}

.author-nav-btn:hover:not(:disabled) {
    background: #0b74db !important;
    color: white !important;
    border-color: #0b74db !important;
    transform: scale(1.02);
}

.author-nav-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed !important;
    transform: none !important;
}

.author-more-posts {
    background: #f8fafc;
    padding: 6px 10px;
    border-radius: 8px;
}

/* ============================================ */
/* TOAST                                       */
/* ============================================ */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: white;
    padding: 16px 24px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 12px;
    transform: translateY(100px);
    opacity: 0;
    transition: all var(--transition-normal);
    z-index: 1000;
    max-width: 400px;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast.success {
    border-left: 4px solid var(--lx-success);
}

.toast.error {
    border-left: 4px solid var(--lx-danger);
}

.toast.warning {
    border-left: 4px solid var(--lx-warning);
}

.toast-icon {
    font-size: 20px;
}

.toast.success .toast-icon {
    color: var(--lx-success);
}

.toast.error .toast-icon {
    color: var(--lx-danger);
}

.toast.warning .toast-icon {
    color: var(--lx-warning);
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.toast-message {
    font-size: 14px;
    color: var(--text-secondary);
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    transition: color var(--transition-fast);
}

.toast-close:hover {
    color: var(--text-primary);
}

/* ============================================ */
/* ERROR & EMPTY STATES                        */
/* ============================================ */
.error-state {
    text-align: center;
    padding: 60px 20px;
}

.error-state i {
    font-size: 64px;
    color: var(--lx-danger);
    margin-bottom: 20px;
}

.error-state h2 {
    font-size: 2rem;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.error-state p {
    color: var(--text-secondary);
    margin-bottom: 30px;
}

.empty-state {
    text-align: center;
    padding: 80px 20px;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.empty-state i {
    font-size: 80px;
    color: var(--lx-primary);
    opacity: 0.5;
    margin-bottom: 20px;
}

.empty-state h2 {
    font-size: 2rem;
    color: var(--text-primary);
    margin-bottom: 15px;
}

.empty-state p {
    color: var(--text-secondary);
    margin-bottom: 30px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* ============================================ */
/* AD PLACEMENT                                */
/* ============================================ */
#leaderXAdPlacement {
    background: #ffffff;
    border: 2px dashed #d1d5db;
    padding: 16px;
    border-radius: var(--radius-lg);
    display: block !important;
}

#adContainer {
    min-height: 250px;
    background: #f8fafc;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e2e8f0;
    padding: 20px;
    text-align: center;
}

/* ============================================ */
/* AGENT BUTTONS                               */
/* ============================================ */
.agent-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    margin: 0 4px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
    font-size: 0.8rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
    text-transform: uppercase;
    letter-spacing: 0.1px;
    white-space: nowrap;
}

.agent-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transition: left 0.6s ease;
}

.agent-btn:hover::before {
    left: 100%;
}

.agent-btn:hover {
    background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
    border-color: rgba(255, 255, 255, 0.2);
}

.agent-btn:active {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
}

.agent-btn i {
    font-size: 0.9rem;
    transition: transform 0.3s ease;
}

.agent-btn:hover i {
    transform: scale(1.1);
}

.view-subscription-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #b3a41b 0%, #0e1e9b 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    margin: 0 4px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
    font-size: 0.8rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(61, 16, 185, 0.2);
    text-transform: uppercase;
    letter-spacing: 0.1px;
    white-space: nowrap;
}

.view-subscription-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transition: left 0.6s ease;
}

.view-subscription-btn:hover::before {
    left: 100%;
}

.view-subscription-btn:hover {
    background: linear-gradient(135deg, #1422bc 0%, #0742cb 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(61, 16, 185, 0.3);
    border-color: rgba(255, 255, 255, 0.2);
}

.view-subscription-btn:active {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(61, 16, 185, 0.2);
}

.view-subscription-btn i {
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.view-subscription-btn:hover i {
    transform: scale(1.1) rotate(5deg);
}

/* ============================================ */
/* RESPONSIVE - TABLET (768px - 992px)         */
/* ============================================ */
@media (max-width: 992px) {
    .post-container {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
        margin-top: 30px;
    }
    
    .toc-container {
        position: relative;
        top: 0;
        max-height: none;
    }
    
    .post-title {
        font-size: 2rem;
    }
    
    .gallery-slide img {
        height: 350px;
    }
    
    .feed-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================ */
/* RESPONSIVE - MOBILE (max-width: 768px)      */
/* ============================================ */
@media (max-width: 768px) {
    .search-container {
        margin: 16px auto 8px;
        padding: 0 16px;
    }
    
    .search-wrapper {
        padding: 3px 3px 3px 16px;
    }
    
    .search-wrapper .search-icon {
        font-size: 0.85rem;
    }
    
    .search-input {
        padding: 12px 10px;
        font-size: 0.9rem;
    }
    
    .search-btn {
        padding: 10px 18px;
        font-size: 0.8rem;
    }
    
    .search-btn span {
        display: none;
    }
    
    .search-dropdown {
        max-height: 320px;
        top: calc(100% + 8px);
    }
    
    .search-result-item {
        padding: 10px 14px;
    }
    
    .search-result-title {
        font-size: 0.85rem;
    }
    
    .search-result-excerpt {
        font-size: 0.8rem;
    }
}

/* ============================================ */
/* RESPONSIVE - MOBILE (max-width: 640px)      */
/* ============================================ */
@media (max-width: 640px) {
    .container {
        padding: 0 10px;
    }
    
    .post-title {
        font-size: 1.3rem;
        line-height: 1.3;
    }
    
    .post-header {
        padding: 15px 15px 12px;
    }
    
    .post-body {
        padding: 15px;
    }
    
    .post-footer {
        padding: 15px;
    }
    
    .post-content {
        font-size: 0.95rem;
        line-height: 1.6;
    }
    
    .post-content h2 {
        font-size: 1.2rem;
        margin: 20px 0 10px;
    }
    
    .post-content h3 {
        font-size: 1rem;
        margin: 18px 0 8px;
    }
    
    .post-content blockquote {
        padding: 12px 15px;
        margin: 20px 0;
        font-size: 0.95rem;
    }
    
    .post-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .post-stats {
        margin-left: 0;
        justify-content: flex-start;
    }
    
    .post-actions {
        gap: 6px;
        justify-content: center;
    }
    
    .action-btn {
        padding: 6px 12px;
        font-size: 0.8rem;
        gap: 4px;
    }
    
    .action-btn .action-label {
        display: none;
    }
    
    .action-btn .action-count {
        display: inline;
    }
    
    .comments-section {
        padding: 15px;
        margin-top: 20px;
    }
    
    .comments-header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .comments-sort {
        align-self: flex-start;
        width: 100%;
    }
    
    .sort-select {
        width: 100%;
    }
    
    .comment {
        padding: 12px;
        gap: 10px;
        flex-direction: column;
    }
    
    .comment-avatar {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }
    
    .comment-text {
        padding: 12px;
        font-size: 0.9rem;
    }
    
    .comment-actions {
        gap: 6px;
        flex-wrap: wrap;
    }
    
    .comment-action {
        padding: 6px 10px;
        font-size: 0.8rem;
    }
    
    .comment-replies {
        margin-left: 12px;
        padding-left: 10px;
    }
    
    .comment-form {
        padding: 15px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .comment-user-info {
        flex-direction: column;
        align-items: stretch;
    }
    
    .comment-user-avatar {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .comment-submit-row {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .comment-submit-btn {
        width: 100%;
        justify-content: center;
    }
    
    .comment-toolbar {
        flex-direction: column;
        gap: 6px;
        padding: 6px 10px;
    }
    
    .comment-formatting {
        width: 100%;
        justify-content: center;
    }
    
    .comment-char-count {
        font-size: 0.7rem;
        text-align: center;
    }
    
    .comment-input {
        padding: 10px 12px 10px 34px;
        font-size: 0.9rem;
    }
    
    .input-icon {
        left: 10px;
        font-size: 0.8rem;
    }
    
    .gallery-slide img {
        height: 250px;
    }
    
    .gallery-nav {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }
    
    .gallery-thumbnail {
        width: 50px;
        height: 40px;
    }
    
    .gallery-dots {
        bottom: 10px;
        gap: 8px;
    }
    
    .gallery-dot {
        width: 8px;
        height: 8px;
    }
    
    .gallery-dot.active {
        width: 20px;
    }
    
    .feed-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .feed-card-image {
        height: 160px;
    }
    
    .feed-card-content {
        padding: 14px;
    }
    
    .feed-card-title {
        font-size: 1rem;
    }
    
    .feed-card-excerpt {
        font-size: 0.85rem;
    }
    
    .public-feed-section {
        padding: 15px;
        margin-top: 30px;
    }
    
    .feed-header {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }
    
    .feed-header .comments-sort {
        width: 100%;
    }
    
    .feed-header .sort-select {
        width: 100%;
        padding: 6px 10px;
        font-size: 0.8rem;
    }
    
    .sidebar {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .sidebar-card {
        padding: 15px;
    }
    
    .related-post {
        padding: 12px;
    }
    
    .related-post-image {
        width: 60px;
        height: 60px;
    }
    
    .related-post-content h4 {
        font-size: 0.9rem;
    }
    
    .toc-container {
        position: relative;
        top: 0;
        max-height: none;
    }
    
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 44px;
        height: 44px;
        font-size: 16px;
    }
    
    .toast {
        bottom: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
        padding: 12px 16px;
        font-size: 13px;
    }
    
    .agent-btn,
    .view-subscription-btn {
        width: 100%;
        justify-content: center;
        padding: 8px 12px;
        font-size: 0.75rem;
    }
    
    .author-follow-btn {
        padding: 2px 10px;
        font-size: 0.7rem;
    }
    
    .share-options {
        position: fixed;
        bottom: auto;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        right: auto;
        width: 280px;
        max-width: 90%;
        border-radius: 16px;
        z-index: 10000;
        margin: 0;
        padding: 16px;
    }
    
    .share-options.active {
        display: flex;
        flex-direction: column;
    }
    
    .share-option {
        padding: 12px 16px;
        font-size: 1rem;
    }
    
    #adContainer {
        min-height: 180px;
    }
    
    .no-comments {
        padding: 40px 15px;
    }
    
    .no-comments i {
        font-size: 36px;
        margin-bottom: 15px;
    }
    
    .no-comments h3 {
        font-size: 1.1rem;
    }
    
    .no-comments p {
        font-size: 0.9rem;
    }
    
    .nested-indicator {
        font-size: 0.65rem;
        padding: 1px 4px;
        margin-left: 4px;
    }
    
    .comment-badge {
        font-size: 0.6rem;
        padding: 1px 4px;
    }
}

/* ============================================ */
/* RESPONSIVE - VERY SMALL (max-width: 400px)  */
/* ============================================ */
@media (max-width: 400px) {
    .search-container {
        padding: 0 10px;
        margin: 12px auto 6px;
    }
    
    .search-wrapper {
        padding: 2px 2px 2px 12px;
    }
    
    .search-input {
        padding: 10px 8px;
        font-size: 0.85rem;
    }
    
    .search-btn {
        padding: 8px 14px;
        font-size: 0.75rem;
    }
    
    .search-btn i {
        font-size: 0.8rem;
    }
    
    .post-title {
        font-size: 1.1rem;
    }
    
    .comment {
        padding: 8px;
        gap: 6px;
    }
    
    .comment-avatar {
        width: 32px;
        height: 32px;
        font-size: 0.7rem;
    }
    
    .action-btn {
        padding: 4px 8px;
        font-size: 0.7rem;
    }
}

/* ============================================ */
/* RESPONSIVE - LANDSCAPE MODE                  */
/* ============================================ */
@media (max-height: 500px) and (orientation: landscape) {
    .gallery-slide img {
        height: 180px;
    }
    
    .comments-section {
        padding: 15px;
    }
}

/* ============================================ */
/* TOUCH-FRIENDLY                              */
/* ============================================ */
@media (pointer: coarse) {
    button,
    .btn,
    .action-btn,
    .comment-action,
    .nav-link,
    .create-card,
    .feed-card {
        min-height: 44px;
    }
    
    input,
    select,
    textarea {
        font-size: 16px !important;
    }
    
    .search-input {
        font-size: 16px !important;
    }
}

/* ============================================ */
/* PRINT STYLES                                */
/* ============================================ */
@media print {
    .public-header,
    .sidebar,
    .post-actions,
    .comments-section,
    .public-feed-section,
    .back-to-top,
    .reading-progress,
    .toast,
    .loading-overlay,
    .search-container {
        display: none !important;
    }
    
    .post-container {
        display: block !important;
        max-width: 100% !important;
    }
    
    .post-card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
    
    .post-content {
        font-size: 12pt !important;
        line-height: 1.5 !important;
    }
}