/* 
 * Main Styles for DaktiLog
 * Inspired by 1000kitap design
 * Mobile-first responsive design
 */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #ec4899;
    --success: #10b981;
    --success-dark: #059669;
    --warning: #f59e0b;
    --warning-dark: #d97706;
    --danger: #ef4444;
    --danger-dark: #dc2626;
    --info: #3b82f6;
    --info-dark: #2563eb;
    --dark: #1e293b;
    --light: #f8fafc;
    --gray: #64748b;
    --gray-light: #e2e8f0;
    --border-radius: 12px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.06);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background-color: #f1f5f9;
    color: var(--dark);
    line-height: 1.6;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
}

/* Layout */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%);
    color: var(--dark);
    padding: 20px;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--gray-light);
}

/* Admin Sidebar */
.admin-sidebar {
    width: 280px;
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    color: white;
    padding: 20px;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.admin-sidebar-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 10px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 20px;
}

.admin-sidebar-header .sidebar-logo {
    width: 40px;
    height: 40px;
    background: var(--primary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.admin-sidebar-header .sidebar-logo svg {
    width: 24px;
    height: 24px;
    color: white;
}

.admin-sidebar-header .sidebar-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
}

.admin-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.admin-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--border-radius);
    transition: var(--transition);
    cursor: pointer;
    color: rgba(255, 255, 255, 0.7);
}

.admin-nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.admin-nav-item.active {
    background: var(--primary);
    color: white;
}

.admin-nav-item svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.admin-sidebar-bottom {
    margin-top: auto;
}

.admin-sidebar-footer {
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
}

/* Admin nav secondary (bottom navigation like siteye dön/çıkış) */
.admin-nav-secondary {
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 16px;
}

.admin-nav-secondary .admin-nav-item {
    color: rgba(255, 255, 255, 0.7);
}

.admin-nav-secondary .admin-nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

/* Admin Main Content */
.admin-main {
    flex: 1;
    margin-left: 280px;
    padding: 20px;
    min-height: 100vh;
    width: calc(100% - 280px);
    overflow-x: hidden;
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 10px 20px;
    border-bottom: 1px solid var(--gray-light);
    margin-bottom: 20px;
}

.sidebar-logo-link {
    text-decoration: none;
    flex-shrink: 0;
}

.sidebar-logo {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.sidebar-logo svg {
    width: 24px;
    height: 24px;
    color: white;
}

.sidebar-logo .logo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

.sidebar-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dark);
    margin: 0;
}

.sidebar-title-link {
    text-decoration: none;
}

.logo-text-dark {
    color: var(--dark);
    font-size: 1.5rem;
    font-weight: 700;
}

.logo-text-red {
    color: var(--danger);
    font-size: 1.5rem;
    font-weight: 700;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--border-radius);
    transition: var(--transition);
    cursor: pointer;
    color: var(--gray);
}

.nav-item:hover {
    background: rgba(99, 102, 241, 0.1);
    color: var(--dark);
}

.nav-item.active {
    background: var(--primary);
    color: white;
}

.nav-item svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.nav-text {
    font-weight: 500;
}

.category-list {
    margin-top: 20px;
}

.category-list-title {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--gray);
    margin-bottom: 12px;
    padding: 0 10px;
}

.category-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border-radius: var(--border-radius);
    margin-bottom: 4px;
    transition: var(--transition);
    color: var(--gray);
}

.category-item:hover {
    background: rgba(99, 102, 241, 0.05);
    color: var(--dark);
}

.category-item.active {
    background: rgba(99, 102, 241, 0.15);
    border-left: 3px solid var(--primary);
}

.category-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Sidebar Overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
}

.sidebar-overlay.active {
    display: block;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 280px;
    margin-right: 280px;
    padding: 20px;
    min-height: 100vh;
    width: calc(100% - 560px);
    overflow-x: hidden;
}

/* Right Sidebar */
.right-sidebar {
    width: 280px;
    background: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%);
    color: var(--dark);
    padding: 20px;
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
    border-left: 1px solid var(--gray-light);
    display: flex;
    flex-direction: column;
}

/* Right sidebar hidden by default on mobile */
@media (max-width: 999.99px) {
    .right-sidebar {
        transform: translateX(100%);
    }
}

.right-sidebar-header {
    padding: 0 10px 20px;
    border-bottom: 1px solid var(--gray-light);
    margin-bottom: 20px;
}

.right-sidebar-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dark);
    margin: 0;
}

.right-sidebar-content {
    flex: 1;
}

.right-sidebar-footer {
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid var(--gray-light);
    text-align: center;
    color: var(--gray);
    font-size: 0.85rem;
}

.sidebar-widget {
    margin-bottom: 24px;
}

.sidebar-widget:last-child {
    margin-bottom: 0;
}

.widget-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 12px;
    padding: 0 10px;
}

.widget-title svg {
    width: 18px;
    height: 18px;
    color: var(--primary);
}

.widget-content {
    background: white;
    border-radius: var(--border-radius);
    padding: 12px;
    box-shadow: var(--shadow);
}

.widget-item {
    display: block;
    padding: 10px 12px;
    border-radius: 8px;
    color: var(--gray);
    font-size: 0.9rem;
    transition: var(--transition);
    text-decoration: none;
    margin-bottom: 4px;
}

.widget-item:hover {
    background: var(--light);
    color: var(--primary);
}

.about-text {
    color: var(--gray);
    font-size: 0.85rem;
    line-height: 1.6;
    margin: 0;
}

.stat-mini {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--gray-light);
}

.stat-mini:last-child {
    border-bottom: none;
}

.stat-label {
    color: var(--gray);
    font-size: 0.85rem;
}

.stat-value {
    color: var(--dark);
    font-weight: 600;
    font-size: 0.9rem;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: var(--transition);
}

.menu-toggle:hover {
    background: var(--light);
}

.menu-toggle svg {
    width: 24px;
    height: 24px;
    color: var(--dark);
}

/* Right Menu Toggle (for right sidebar on tablets) */
.right-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: var(--transition);
}

.right-menu-toggle:hover {
    background: var(--light);
}

.right-menu-toggle svg {
    width: 24px;
    height: 24px;
    color: var(--dark);
}

/* Right Sidebar Overlay */
.right-sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
}

.right-sidebar-overlay.active {
    display: block;
}

.search-box {
    position: relative;
}

.search-box input {
    padding: 10px 16px 10px 40px;
    border: 1px solid var(--gray-light);
    border-radius: 20px;
    width: 250px;
    font-size: 0.875rem;
    transition: var(--transition);
    font-family: inherit;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
    width: 300px;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.search-box svg {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--gray);
    pointer-events: none;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.text-gray {
    color: var(--gray);
    font-size: 0.9rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: 20px;
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-primary:disabled {
    background: var(--gray-light);
    cursor: not-allowed;
    transform: none;
}

.btn-primary:disabled:hover {
    background: var(--gray-light);
    transform: none;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--gray-light);
    color: var(--dark);
}

.btn-outline:hover {
    background: var(--light);
    border-color: var(--gray);
}

.btn-ghost {
    background: transparent;
    color: var(--dark);
}

.btn-ghost:hover {
    background: var(--light);
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: var(--danger-dark);
}

.btn-warning {
    background: var(--warning);
    color: white;
}

.btn-warning:hover {
    background: var(--warning-dark);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
}

.btn svg {
    width: 18px;
    height: 18px;
}

.w-100 {
    width: 100%;
    justify-content: center;
}

/* Page Header */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 700;
}

.page-description {
    color: var(--gray);
    margin-top: 4px;
    flex-basis: 100%;
}

/* Post Card */
.post-card {
	position: relative;
    background: white;
    border-radius: var(--border-radius);
    padding: 24px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    transition: var(--transition);
}
/* Görünmez ana linki tüm karta yayan sihirli kod */
.post-card-overlay-link::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    z-index: 1; /* Kartın en tabanına yayılır */
}

/* Kartın içindeki yazar, etiket, video ve butonların tıklanabilir kalması için */
.post-card .sub-link {
    position: relative;
    z-index: 2; /* Hayalet linkin üst katmanına çıkarır */
}
/* KULLANICI DENEYİMİ İÇİN (İsteğe bağlı): 
   Kartın boş bir yerine gelindiğinde post-card'a hafif bir hover efekti verelim */
.post-card:hover {
	transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
   /* background-color: rgba(249, 249, 249, 0.05); Temanıza göre rengi değiştirebilirsiniz */
    cursor: pointer;
}

/* Post Card Post*/
.post-card-post {
    background: white;
    border-radius: var(--border-radius);
    padding: 24px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    transition: var(--transition);
}

.post-card-post:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.post-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
    gap: 12px;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.post-category {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.post-anonymous {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--gray);
    font-size: 0.875rem;
}

.post-author {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--dark);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.post-author:hover {
    color: var(--primary);
}

.post-author a {
    color: inherit;
    text-decoration: none;
}

.post-date {
    color: var(--gray);
    font-size: 0.875rem;
    white-space: nowrap;
}

.post-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--dark);
    line-height: 1.3;
}

.post-title a {
    color: var(--dark);
    transition: var(--transition);
}

.post-title a:hover {
    color: var(--primary);
}

.post-excerpt {
    color: var(--gray);
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-content {
    margin-bottom: 20px;
    line-height: 1.8;
}

.post-content p {
    margin-bottom: 0.75em;
}

.post-content p:last-child {
    margin-bottom: 0;
}

.post-content a {
    color: var(--primary);
    text-decoration: underline;
}

.post-content ul,
.post-content ol {
    margin: 0.5em 0 0.75em 1.25em;
}

.post-content strong {
    font-weight: 700;
}

.post-content em {
    font-style: italic;
}

.post-content u {
    text-decoration: underline;
}

.post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid var(--gray-light);
    flex-wrap: wrap;
    gap: 12px;
}

.post-stats {
    display: flex;
    gap: 20px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--gray);
    font-size: 0.875rem;
}

.stat-item svg {
    width: 18px;
    height: 18px;
}

/* Post Actions */
.post-actions {
    display: flex;
    gap: 8px;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1px solid var(--gray-light);
    border-radius: 20px;
    background: white;
    color: var(--dark);
    font-size: 0.875rem;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.action-btn:hover {
    background: var(--light);
    border-color: var(--gray);
}

.action-btn.liked {
    background: var(--danger);
    color: white;
    border-color: var(--danger);
}

/* Alerts */
.alert {
    padding: 14px 20px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-danger {
    background: #fef2f2;
    color: var(--danger);
    border: 1px solid #fecaca;
}

.alert-success {
    background: #f0fdf4;
    color: var(--success);
    border: 1px solid #bbf7d0;
}

.alert-warning {
    background: #fffbeb;
    color: var(--warning);
    border: 1px solid #fde68a;
}

.alert-info {
    background: #eff6ff;
    color: var(--info);
    border: 1px solid #bfdbfe;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--dark);
    font-size: 0.9rem;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--gray-light);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
    font-family: inherit;
    background: white;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.form-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--gray-light);
    border-radius: var(--border-radius);
    font-size: 1rem;
    min-height: 150px;
    resize: vertical;
    transition: var(--transition);
    font-family: inherit;
    line-height: 1.6;
}

.form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

/* Quill Editor Styles */
.quill-editor-container {
    border: 1px solid var(--gray-light);
    border-radius: var(--border-radius);
    background: white;
}

.quill-editor-container .ql-toolbar {
    border-top: none;
    border-left: none;
    border-right: none;
    border-bottom: 1px solid var(--gray-light);
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.quill-editor-container .ql-container {
    border: none;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    font-family: inherit;
    font-size: 1rem;
    min-height: 150px;
}

.quill-editor-container .ql-editor {
    min-height: 150px;
    line-height: 1.6;
}

.quill-editor-container .ql-editor:focus {
    outline: none;
}

.quill-editor-container .content-editor {
    display: none !important;
}

.ql-snow .ql-toolbar button:hover {
    color: var(--primary);
}

.ql-snow .ql-toolbar button.ql-active {
    color: var(--primary);
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    flex-wrap: wrap;
}

/* Auth Pages */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: calc(100vh - 200px);
    padding: 40px 20px;
}

.auth-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 40px;
    max-width: 420px;
    width: 100%;
    box-shadow: var(--shadow-lg);
}

.auth-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 24px;
    text-align: center;
}

.auth-form {
    display: flex;
    flex-direction: column;
}

.auth-footer {
    text-align: center;
    margin-top: 20px;
    color: var(--gray);
    font-size: 0.9rem;
}

.auth-footer a {
    color: var(--primary);
    font-weight: 500;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: var(--border-radius);
    padding: 32px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.modal-body {
    color: var(--dark);
    line-height: 1.6;
}

.rules-intro {
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.rules-list {
    padding-left: 20px;
    margin: 0;
}

.rules-list li {
    margin-bottom: 12px;
    color: var(--dark);
}

.rules-list li:last-child {
    margin-bottom: 0;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
}

.modal-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--light);
}

.modal-close svg {
    width: 24px;
    height: 24px;
    color: var(--gray);
}

/* Comments */
.comments-section {
    margin-top: 30px;
}

.comments-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.comment-form {
    margin-bottom: 24px;
    padding: 20px;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.comment-card {
    background: var(--light);
    border-radius: var(--border-radius);
    padding: 16px;
    margin-bottom: 12px;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.comment-author {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    color: var(--dark);
    font-size: 0.9rem;
}

.comment-date {
    color: var(--gray);
    font-size: 0.8rem;
}

.comment-content {
    color: var(--dark);
    line-height: 1.6;
    font-size: 0.95rem;
}

.comment-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    padding-top: 8px;
    border-top: 1px solid var(--gray-light);
}

.comment-like-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border: 1px solid var(--gray-light);
    border-radius: 16px;
    background: white;
    color: var(--dark);
    font-size: 0.8rem;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.comment-like-btn:hover {
    background: var(--light);
    border-color: var(--gray);
}

.comment-like-btn.liked {
    background: var(--danger);
    color: white;
    border-color: var(--danger);
}

.comment-report-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border: 1px solid var(--gray-light);
    border-radius: 16px;
    background: white;
    color: var(--gray);
    font-size: 0.8rem;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.comment-report-btn:hover {
    background: var(--warning);
    color: white;
    border-color: var(--warning);
}

.comment-reply-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--gray);
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s ease;
}

.comment-reply-btn:hover {
    background: var(--primary);
    color: white;
}

.comment-like-static {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border-radius: 16px;
    background: var(--light);
    color: var(--gray);
    font-size: 0.8rem;
}

.comment-like-static svg {
    width: 16px;
    height: 16px;
}

.comment-like-btn svg,
.comment-report-btn svg,
.comment-reply-btn svg {
    width: 16px;
    height: 16px;
}

.login-prompt {
    text-align: center;
    margin-bottom:24px;
    padding: 30px;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    color: var(--gray);
}

.login-prompt a {
    color: var(--primary);
    font-weight: 500;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.pagination-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    border: 1px solid var(--gray-light);
    color: var(--dark);
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.9rem;
    font-weight: 500;
}

.pagination-item:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.pagination-item.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Avatar Component */
.avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    flex-shrink: 0;
}

.avatar.avatar-sm {
    width: 24px;
    height: 24px;
    font-size: 0.65rem;
}

.avatar.avatar-lg {
    width: 48px;
    height: 48px;
    font-size: 1rem;
}

/* Uploaded image avatars - always circular like default avatars */
.avatar.avatar-img {
    padding: 0;
    overflow: hidden;
    background: none;
    border-radius: 50%;
}

.avatar.avatar-img img {
    width: 100%;
    height: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
    border-radius: 50%;
}

.avatar.avatar-img.avatar-sm {
    width: 24px;
    height: 24px;
}

.avatar.avatar-img.avatar-sm img {
    width: 24px;
    height: 24px;
}

.avatar.avatar-img.avatar-lg {
    width: 48px;
    height: 48px;
}

.avatar.avatar-img.avatar-lg img {
    width: 48px;
    height: 48px;
}

/* Profile Page */
.profile-container {
    max-width: 800px;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 32px;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-bottom: 24px;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.profile-avatar .avatar {
    width: 80px;
    height: 80px;
    font-size: 1.5rem;
}

.profile-avatar .avatar.avatar-img {
    width: 80px;
    height: 80px;
}

.profile-avatar .avatar.avatar-img img {
    width: 80px;
    height: 80px;
}

.profile-info {
    flex: 1;
}

.profile-username {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.profile-email {
    color: var(--gray);
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.profile-bio {
    color: var(--dark);
    font-size: 0.95rem;
    line-height: 1.6;
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.profile-stats .stat-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--shadow);
    text-align: center;
}

.profile-stats .stat-card h3 {
    font-size: 0.85rem;
    color: var(--gray);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.profile-stats .stat-card p {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.profile-posts {
    margin-top: 24px;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.no-posts {
    text-align: center;
    padding: 40px;
    color: var(--gray);
    font-size: 1.1rem;
}

.no-posts a {
    color: var(--primary);
    font-weight: 500;
}

/* Admin Dashboard */
.admin-dashboard {
    max-width: 1200px;
}

.admin-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 24px;
}

.admin-section {
    background: white;
    border-radius: var(--border-radius);
    padding: 24px;
    box-shadow: var(--shadow);
    margin-bottom: 24px;
    overflow-x: auto;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 24px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.stat-icon {
    width: 48px;
    height: 48px;
    background: var(--light);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon svg {
    width: 24px;
    height: 24px;
    color: var(--primary);
}

.stat-info h3 {
    font-size: 0.8rem;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.stat-info p {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--dark);
}

/* Admin Table */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

@media (max-width: 768px) {
    .admin-table {
        min-width: 100%;
        font-size: 0.8rem;
    }
    
    .admin-table th,
    .admin-table td {
        white-space: nowrap;
        padding: 8px 10px;
    }
}

.admin-table th {
    text-align: left;
    padding: 12px 16px;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--gray);
    border-bottom: 2px solid var(--gray-light);
    font-weight: 600;
    white-space: nowrap;
}

.admin-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--gray-light);
    font-size: 0.9rem;
}

.admin-table tbody tr:hover {
    background: var(--light);
}

.admin-table .btn-sm {
    gap: 4px;
    padding: 4px 10px;
}

.admin-table .btn-sm svg {
    width: 16px;
    height: 16px;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-success {
    background: #d1fae5;
    color: var(--success);
}

.badge-warning {
    background: #fef3c7;
    color: var(--warning);
}

.badge-danger {
    background: #fee2e2;
    color: var(--danger);
}

.badge-info {
    background: #dbeafe;
    color: var(--info);
}

/* Report Details */
.report-details {
    padding: 20px;
    background: var(--light);
    border-radius: var(--border-radius);
    margin-bottom: 20px;
}

.report-details p {
    margin-bottom: 8px;
}

.report-details p strong {
    display: inline-block;
    min-width: 120px;
}

.post-content-preview {
    background: white;
    border: 1px solid var(--gray-light);
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 20px;
    line-height: 1.8;
    max-height: 400px;
    overflow-y: auto;
}

.report-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* Admin Form */
.admin-form {
    max-width: 600px;
}

/* Search Results Dropdown */
.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--gray-light);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    margin-top: 8px;
    max-height: 400px;
    overflow-y: auto;
    display: none;
    z-index: 200;
}

.search-result-item {
    display: block;
    padding: 12px 16px;
    border-bottom: 1px solid var(--gray-light);
    transition: var(--transition);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: var(--light);
}

.search-result-title {
    display: block;
    font-weight: 500;
    margin-bottom: 4px;
}

.search-result-meta {
    display: block;
    font-size: 0.8rem;
    color: var(--gray);
}

/* Captcha Styles */
.captcha-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.captcha-image-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

.captcha-image {
    border-radius: var(--border-radius);
    cursor: pointer;
    height: 60px;
    width: 220px;
    object-fit: cover;
    border: 2px solid var(--gray-light);
    transition: var(--transition);
}

.captcha-image:hover {
    border-color: var(--primary);
}

.captcha-refresh {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--gray-light);
    border-radius: 50%;
    background: white;
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
}

.captcha-refresh:hover {
    background: var(--light);
    border-color: var(--primary);
    color: var(--primary);
}

.captcha-refresh svg {
    width: 20px;
    height: 20px;
}

.captcha-input {
    -moz-appearance: textfield;
}

.captcha-input::-webkit-outer-spin-button,
.captcha-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }

/* Right menu toggle visible on tablet only (769px to 999px) */
@media (max-width: 999.99px) and (min-width: 768px) {
    .right-menu-toggle {
        display: block;
    }
}

/* Mobile (below 768px) - right menu toggle hidden */
@media (max-width: 767.99px) {
    .right-menu-toggle {
        display: none;
    }
}

/* Mobile Responsive (below 768px) */
@media (max-width: 768px) {
    body {
        overflow-x: hidden;
    }
    
    .app-container {
        overflow-x: hidden;
    }
    
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .admin-sidebar {
        transform: translateX(-100%);
    }
    
    .admin-sidebar.active {
        transform: translateX(0);
    }
    
    .sidebar-overlay.active {
        display: block;
    }
    
    .main-content {
        margin-left: 0;
        margin-right: 0;
        width: 100%;
        max-width: 100%;
        padding: 12px;
    }
    
    .admin-main {
        margin-left: 0;
        margin-right: 0;
        width: 100%;
        max-width: 100%;
        padding: 12px;
    }
    
    .right-sidebar {
        display: none;
    }
    
.menu-toggle {
        display: block;
    }
    
    .post-header {
        flex-direction: column;
    }
    
    .post-title {
        font-size: 1.25rem;
    }
    
    .auth-card {
        padding: 24px;
    }
    
    .profile-header {
        flex-direction: column;
        text-align: center;
    }
    
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .header {
        padding: 12px 16px;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .header-left {
        flex: 1;
        min-width: 0;
    }
    
    .header-right .btn .btn-text {
        display: none;
    }
    
    .header-left .btn .btn-text {
        display: none;
    }
    
    .post-footer {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .post-actions {
        width: 100%;
    }
    
    .action-btn {
        flex: 1;
        justify-content: center;
    }
    
    /* Admin section mobile fix */
    .admin-section {
        padding: 16px;
        margin-left: -12px;
        margin-right: -12px;
        border-radius: 0;
        width: calc(100% + 24px);
    }
    
    .admin-dashboard {
        overflow: hidden;
    }
    
    .stat-card {
        padding: 16px;
    }
    
    .stat-info p {
        font-size: 1.25rem;
    }
    
    .stat-icon {
        width: 40px;
        height: 40px;
    }
    
    .stat-icon svg {
        width: 20px;
        height: 20px;
    }
}

/* Tablet mode (769px to 999px) */
@media (max-width: 999.99px) and (min-width: 768px) {
    .right-sidebar {
        transform: translateX(100%);
    }
    
    .right-sidebar.active {
        display: flex !important;
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 280px;
        margin-right: 0;
        width: calc(100% - 280px);
    }
}

/* Below 768px - right sidebar completely hidden */
@media (max-width: 767.99px) {
    .right-sidebar {
        display: none !important;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .search-box {
        display: none;
    }
    
    .admin-table {
        font-size: 0.75rem;
    }
    
    .admin-table th,
    .admin-table td {
        padding: 6px 8px;
    }
    
    .post-card {
        padding: 16px;
    }
    
.modal-content {
        padding: 20px;
    }
    
    .header-right .btn {
        padding: 8px 14px;
        font-size: 0.8rem;
    }
    
    .header-left .btn .btn-text {
        display: none;
    }
}

/* Emoji Reactions */
.post-reactions {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--gray-light);
}

.reactions-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.reaction-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border: 1px solid var(--gray-light);
    border-radius: 16px;
    background: white;
    color: var(--dark);
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.reaction-btn:hover {
    background: var(--light);
    border-color: var(--primary);
    transform: translateY(-1px);
}

.reaction-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.reaction-emoji {
    font-size: 1.1rem;
}

.reaction-count {
    font-size: 0.75rem;
    min-width: 16px;
    text-align: center;
}

.reaction-display {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: var(--light);
    border-radius: 12px;
    font-size: 0.85rem;
}

.reaction-display .reaction-emoji {
    font-size: 1rem;
}

/* Profile Edit Page */
.profile-edit-container {
    max-width: 600px;
}

.profile-edit-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.profile-edit-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 32px;
    box-shadow: var(--shadow);
}

.profile-edit-form {
    display: flex;
    flex-direction: column;
}

.form-divider {
    border: none;
    border-top: 1px solid var(--gray-light);
    margin: 24px 0;
}

.form-section-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--dark);
}

.form-help {
    color: var(--gray);
    font-size: 0.85rem;
    margin-top: 4px;
}

/* Post Image */
.post-image {
    margin: 16px 0;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.post-image img {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    transition: var(--transition);
}

.post-image-thumb {
    margin: 12px 0;
    border-radius: var(--border-radius);
    overflow: hidden;
    max-height: 200px;
}

.post-image-thumb img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    transition: var(--transition);
}

/* Post Tags */
.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0;
    padding: 4px 0;
}

.post-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: var(--light);
    color: var(--gray);
    border-radius: 12px;
    font-size: 0.8rem;
    transition: var(--transition);
}

.post-tag:hover {
    background: var(--primary);
    color: white;
}

.post-tag svg {
    width: 14px;
    height: 14px;
}

/* Notification Badge */
.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--danger);
    color: white;
    font-size: 0.7rem;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    padding: 2px 6px;
}

.btn-outline {
    position: relative;
}

/* User Dropdown Menu */
.user-dropdown {
    position: relative;
    display: inline-flex;
}

.user-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: 1px solid var(--gray-light);
    border-radius: 20px;
    padding: 4px 12px 4px 4px;
    cursor: pointer;
    font-family: inherit;
    color: var(--dark);
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
}

.user-dropdown-toggle:hover {
    background: var(--light);
    border-color: var(--gray);
}

.user-dropdown-toggle .avatar {
    width: 32px;
    height: 32px;
    font-size: 0.8rem;
}

.user-dropdown-name {
    white-space: nowrap;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-dropdown-chevron {
    width: 16px;
    height: 16px;
    color: var(--gray);
    transition: transform 0.2s ease;
}

.user-dropdown.open .user-dropdown-chevron {
    transform: rotate(180deg);
}

.user-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 200px;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--gray-light);
    padding: 6px;
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}

.user-dropdown.open .user-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    color: var(--dark);
    font-size: 0.9rem;
    transition: var(--transition);
}

.user-dropdown-item svg {
    width: 18px;
    height: 18px;
    color: var(--gray);
}

.user-dropdown-item:hover {
    background: var(--light);
    color: var(--primary);
}

.user-dropdown-item:hover svg {
    color: var(--primary);
}

.user-dropdown-item.active {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
}

.user-dropdown-item.active svg {
    color: var(--primary);
}

.user-dropdown-badge {
    margin-left: auto;
    background: var(--danger);
    color: white;
    font-size: 0.7rem;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    padding: 2px 6px;
}

/* Notification List */
.notifications-list {
    margin-top: 20px;
}

.notification-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-bottom: 12px;
    transition: var(--transition);
}

.notification-card.unread {
    background: linear-gradient(90deg, var(--light) 0%, white 100%);
    border-left: 3px solid var(--primary);
}

.notification-icon {
    width: 40px;
    height: 40px;
    background: var(--light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notification-icon svg {
    width: 20px;
    height: 20px;
    color: var(--primary);
}

.notification-content {
    flex: 1;
}

.notification-content p {
    color: var(--dark);
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.notification-date {
    color: var(--gray);
    font-size: 0.8rem;
}

.notification-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--light);
    transition: var(--transition);
    flex-shrink: 0;
}

.notification-link:hover {
    background: var(--primary);
    color: white;
}

.notification-link svg {
    width: 18px;
    height: 18px;
}

.notification-delete:hover {
    background: var(--success);
    color: white;
}

/* Bookmark Button */
.action-btn.bookmarked {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.bookmark-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Password Requirements */
.password-requirements {
    margin-top: 8px;
}

.requirements-list {
    list-style: none;
    padding: 8px 12px;
    margin: 8px 0 0 0;
    background: var(--light);
    border-radius: 8px;
    font-size: 0.85rem;
}

.requirement {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    color: var(--gray);
    transition: var(--transition);
}

.requirement:before {
    content: '';
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--gray-light);
    display: inline-block;
    flex-shrink: 0;
}

.requirement.valid {
    color: var(--success);
}

.requirement.valid:before {
    background: var(--success);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 10px;
}

@media (max-width: 768px) {
    .profile-edit-card {
        padding: 20px;
    }
}

/* Charts Grid */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 20px;
}

@media (max-width: 768px) {
    .charts-grid {
        grid-template-columns: 1fr;
    }
}

.chart-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--shadow);
    min-height: 250px;
}

.chart-card h4 {
    margin-bottom: 16px;
    font-size: 1rem;
    color: var(--gray);
}

.chart-card canvas {
    max-width: 100%;
}

/* Checkbox Styles */
.checkbox-container {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    height: 20px;
    width: 20px;
    background-color: white;
    border: 2px solid var(--gray-light);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    flex-shrink: 0;
}

.checkbox-container:hover .checkmark {
    border-color: var(--primary);
}

.checkbox-container input:checked ~ .checkmark {
    background-color: var(--primary);
    border-color: var(--primary);
}

.checkmark:after {
    content: "";
    display: none;
}

.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

.checkbox-container .checkmark:after {
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-text {
    font-size: 0.9rem;
    color: var(--dark);
}

.rules-link {
    color: var(--primary);
    font-size: 0.9rem;
    text-decoration: underline;
    cursor: pointer;
    margin-left: 4px;
}

.rules-link:hover {
    color: var(--primary-dark);
}

/* Video Embed Styles */
.post-video {
    width: 100%;
    height: 350px;
    border-radius: var(--border-radius);
    margin: 16px 0;
    box-shadow: var(--shadow);
}

.post-video-thumb {
    margin: 12px 0;
    border-radius: var(--border-radius);
    overflow: hidden;
    max-height: 200px;
}

.post-video-thumb iframe {
    width: 100%;
    height: 180px;
    border: none;
}

@media (max-width: 480px) {
    .post-video {
        height: 200px;
    }
}

/* Infinite Scroll Loading Indicator */
.infinite-scroll-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    color: var(--gray);
}

.infinite-scroll-loading svg {
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* WebP Image Styles */
.lazy-image {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lazy-image.loaded {
    opacity: 1;
}

/* Search Link - visible on all devices */
.search-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--border-radius);
    transition: var(--transition);
    cursor: pointer;
    color: var(--gray);
    text-decoration: none;
    margin-top: 12px;
    border: 1px solid var(--gray-light);
    background: white;
}

.search-link:hover {
    background: var(--light);
    color: var(--dark);
}

.search-link svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* Keep mobile-search-link class for backward compatibility */
.mobile-search-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--border-radius);
    transition: var(--transition);
    cursor: pointer;
    color: var(--gray);
    text-decoration: none;
    margin-top: 12px;
    border: 1px solid var(--gray-light);
    background: white;
}

.mobile-search-link:hover {
    background: var(--light);
    color: var(--dark);
}

.mobile-search-link svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* Search Page Styles */
.search-page-container {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

.search-form {
    width: 100%;
    max-width: 500px;
}

.search-box.search-page {
    display: block !important;
    width: 100%;
}

.search-box.search-page input {
    width: 100% !important;
    font-size: 1rem;
    padding: 12px 16px 12px 44px;
}

@media (max-width: 768px) {
    .search-page-container {
        margin: 12px;
    }
    
    .search-form {
        max-width: none;
    }
}

/* Search Submit Button */
.search-submit-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.search-submit-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-50%) scale(1.05);
}

.search-submit-btn svg {
    width: 18px;
    height: 18px;
    color: white;
}

/* ===== Private Messaging System ===== */

.btn-disabled {
    opacity: 0.55;
    cursor: not-allowed;
    background: var(--gray-light, #e2e8f0);
    color: var(--gray, #64748b);
    border: 1px solid var(--gray-light, #e2e8f0);
}

/* Message Send Page */
.message-send-container,
.messages-container {
    max-width: 720px;
    margin: 24px auto;
    padding: 0 16px;
}

.message-send-header,
.messages-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.message-send-card,
.messages-list {
    background: var(--white, #fff);
    border: 1px solid var(--gray-light, #e2e8f0);
    border-radius: 14px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.message-receiver-info {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: var(--light, #f8fafc);
    border-radius: 10px;
    margin-bottom: 20px;
}

.message-send-form .form-group {
    margin-bottom: 18px;
}

.alert-link {
    color: var(--primary);
    font-weight: 600;
    margin-left: 8px;
    text-decoration: underline;
}

/* Messages Tabs */
.messages-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.messages-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 10px;
    background: var(--white, #fff);
    border: 1px solid var(--gray-light, #e2e8f0);
    color: var(--dark, #1e293b);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition, 0.2s);
}

.messages-tab svg {
    width: 18px;
    height: 18px;
}

.messages-tab.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.messages-unread {
    font-size: 0.9rem;
    color: var(--gray, #64748b);
    font-weight: 600;
}

/* Message Items */
.message-item {
    display: flex;
    gap: 14px;
    padding: 16px;
    border-radius: 10px;
    border: 1px solid var(--gray-light, #e2e8f0);
    margin-bottom: 12px;
    transition: var(--transition, 0.2s);
}

.message-item.unread {
    background: #eef2ff;
    border-color: var(--primary);
}

.message-avatar {
    flex-shrink: 0;
}

.message-body {
    flex: 1;
    min-width: 0;
}

.message-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 0.9rem;
}

.message-date {
    color: var(--gray, #64748b);
    font-size: 0.82rem;
}

.message-to {
    color: var(--gray, #64748b);
    font-size: 0.82rem;
}

.unread-dot {
    background: var(--primary);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
}

.message-subject {
    margin: 6px 0 4px;
    font-size: 1rem;
    color: var(--dark, #1e293b);
}

.message-text {
    color: var(--gray, #64748b);
    font-size: 0.9rem;
    line-height: 1.5;
    word-break: break-word;
}

.message-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    color: var(--primary);
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 6px;
    transition: var(--transition, 0.2s);
}

.action-btn svg {
    width: 15px;
    height: 15px;
}

.action-btn:hover {
    background: var(--light, #f8fafc);
}

.action-btn.action-danger {
    color: var(--danger);
}

.reply-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: #ede9fe;
    color: #7c3aed;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
    text-transform: uppercase;
}

.reply-badge svg {
    width: 12px;
    height: 12px;
}

.message-subject-link {
    text-decoration: none;
    display: block;
}

.message-subject-link:hover .message-subject {
    color: var(--primary);
    text-decoration: underline;
}

/* Message Detail Page */
.message-detail-card {
    background: var(--white, #fff);
    border: 1px solid var(--gray-light, #e2e8f0);
    border-radius: 14px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.message-detail-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--gray-light, #e2e8f0);
    margin-bottom: 16px;
}

.message-detail-sender {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 1rem;
}

.message-full-text {
    color: var(--dark, #1e293b);
    font-size: 0.95rem;
    line-height: 1.7;
    white-space: pre-wrap;
    word-break: break-word;
}

.role-badge {
    background: var(--primary);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
    text-transform: uppercase;
}

.reply-context {
    background: var(--light, #f8fafc);
    border-left: 3px solid var(--primary);
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 18px;
    font-size: 0.85rem;
    color: var(--gray, #64748b);
}

.reply-context svg {
    width: 16px;
    height: 16px;
    vertical-align: middle;
    margin-right: 4px;
    color: var(--primary);
}

.reply-quote {
    margin: 8px 0 0;
    padding: 8px 12px;
    background: var(--white, #fff);
    border-radius: 6px;
    border: 1px solid var(--gray-light, #e2e8f0);
    color: var(--dark, #1e293b);
    font-size: 0.85rem;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
}

@media (max-width: 600px) {
    .message-item {
        flex-direction: column;
    }
}

/* ===== Popüler Sayfası (Kompakt Panel) ===== */

.page-header.compact {
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.page-header.compact .page-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.4rem;
}

.period-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.period-tab {
    padding: 7px 16px;
    border-radius: 20px;
    background: white;
    border: 1px solid var(--gray-light);
    color: var(--gray);
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
}

.period-tab:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.period-tab.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.popular-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.popular-panel {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.panel-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 18px;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--dark);
    border-bottom: 1px solid var(--gray-light);
    background: var(--light);
}

.panel-head svg {
    width: 18px;
    height: 18px;
    color: var(--primary);
}

.rank-rows {
    padding: 6px 8px;
}

.rank-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 10px;
    border-radius: 8px;
    transition: var(--transition);
    text-decoration: none;
    color: inherit;
}

.rank-row:hover {
    background: var(--light);
}

.user-row:hover {
    background: rgba(99, 102, 241, 0.08);
}

.rank-num {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    background: var(--gray-light);
    color: var(--gray);
}

.rank-row:nth-child(1) .rank-num { background: linear-gradient(135deg, #fbbf24, #f59e0b); color: #fff; }
.rank-row:nth-child(2) .rank-num { background: linear-gradient(135deg, #cbd5e1, #94a3b8); color: #fff; }
.rank-row:nth-child(3) .rank-num { background: linear-gradient(135deg, #d9915a, #b45309); color: #fff; }

.rank-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.rank-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--dark);
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: var(--transition);
}

a.rank-title:hover,
.rank-row:hover .rank-title {
    color: var(--primary);
}

.rank-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    color: var(--gray);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cat-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.rank-value {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary);
    white-space: nowrap;
}

.rank-value svg {
    width: 15px;
    height: 15px;
}

.panel-empty {
    padding: 24px 18px;
    text-align: center;
    color: var(--gray);
    font-size: 0.85rem;
}

.site-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.site-stat {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.site-stat:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.site-stat-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(99, 102, 241, 0.12);
    color: var(--primary);
}

.site-stat-icon svg {
    width: 22px;
    height: 22px;
}

.site-stat-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.site-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark);
    line-height: 1.2;
}

.site-stat-label {
    font-size: 0.8rem;
    color: var(--gray);
    white-space: nowrap;
}

@media (max-width: 768px) {
    .popular-grid {
        grid-template-columns: 1fr;
    }

    .site-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
}

@media (max-width: 420px) {
    .site-stats {
        grid-template-columns: 1fr;
    }
}

/* Popüler Etiketler */
.tags-section {
    margin-top: 28px;
}

.tags-section .section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 16px;
}

.tags-section .section-title svg {
    width: 22px;
    height: 22px;
    color: var(--primary);
}

.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.popular-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 20px;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.popular-tag:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    filter: brightness(1.08);
}

.popular-tag .tag-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.25);
    font-size: 0.75rem;
    font-weight: 700;
}

/* Cookie Consent Banner */
#cookieConsentBanner {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    max-width: 600px;
    margin: 0 auto;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    padding: 24px;
    z-index: 9999;
    display: none;
    border: 1px solid var(--gray-light);
}

.cookie-consent-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.cookie-consent-text {
    color: var(--dark);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}

.cookie-consent-text a {
    color: var(--primary);
    text-decoration: underline;
    font-weight: 500;
}

.cookie-consent-text a:hover {
    color: var(--primary-dark);
}

.cookie-consent-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.cookie-consent-actions .btn {
    flex: 1;
    min-width: 120px;
    justify-content: center;
}

.cookie-consent-actions .btn-accept {
    background: var(--primary);
    color: white;
}

.cookie-consent-actions .btn-accept:hover {
    background: var(--primary-dark);
}

.cookie-consent-actions .btn-reject {
    background: transparent;
    border: 1px solid var(--gray-light);
    color: var(--dark);
}

.cookie-consent-actions .btn-reject:hover {
    background: var(--light);
    border-color: var(--gray);
}

@media (max-width: 480px) {
    #cookieConsentBanner {
        left: 10px;
        right: 10px;
        bottom: 10px;
        padding: 20px;
    }

    .cookie-consent-actions {
        flex-direction: column;
    }

    .cookie-consent-actions .btn {
        width: 100%;
    }
}

/* Profile Optional Fields */
.profile-details {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--gray-light);
}

.profile-details h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 12px;
}

.profile-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}

.profile-detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.profile-detail-item .detail-label {
    font-size: 0.85rem;
    color: var(--gray);
    font-weight: 500;
}

.profile-detail-item .detail-value {
    font-size: 0.95rem;
    color: var(--dark);
    font-weight: 600;
}

/* Profile Edit Privacy Fields */
.privacy-field-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 15px;
}

.privacy-field-group .form-group {
    margin-bottom: 0;
}

.privacy-toggle {
    display: flex;
    gap: 15px;
    align-items: center;
}

.privacy-label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--gray);
}

.privacy-label input[type="radio"] {
    width: 16px;
    height: 16px;
}

.privacy-note {
    font-size: 0.85rem;
    color: var(--danger);
    margin-top: 5px;
    display: block;
}

.form-section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark);
    margin: 20px 0 10px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--dark);
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

 
  
/* Quill Blockquote Styles */  
.ql-editor blockquote,  
.post-content blockquote,  
.comment-content blockquote {  
    margin: 1em 0;  
    padding: 0.5em 1em;  
    border-left: 4px solid var(--primary);  
    background: var(--light);  
    font-style: italic;  
    color: var(--gray);  
}  
  
.ql-editor blockquote p,  
.post-content blockquote p,  
.comment-content blockquote p {  
    margin: 0;  
}  
  
.ql-blockquote {  
    border-color: var(--gray-light);  
} 

 
