:root {
    --primary-color: #6366F1;
    --primary-hover: #4F46E5;
    --primary-light: #818CF8;
    --primary-glow: rgba(99, 102, 241, 0.25);
    --secondary-color: #64748B;
    --accent-color: #EC4899;
    --accent-glow: rgba(236, 72, 153, 0.2);
    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;
    --info: #3B82F6;
    --bg-light: #F8FAFC;
    --bg-card-light: rgba(255, 255, 255, 0.7);
    --bg-glass-light: rgba(255, 255, 255, 0.95);
    --bg-component-light: #f1f5f9;
    --bg-navbar-light: rgba(255, 255, 255, 0.95);
    --bg-sidebar-light: rgba(255, 255, 255, 0.9);
    --bg-input-light: #ffffff;
    --bg-button-light: #f8fafc;
    --bg-hover-light: rgba(0, 0, 0, 0.05);
    --bg-active-light: rgba(99, 102, 241, 0.1);
    --text-light: #1E293B;
    --text-secondary-light: #64748B;
    --text-hint-light: #94A3B8;
    --text-link-light: #6366F1;
    --text-link-hover-light: #4F46E5;
    --border-light: rgba(148, 163, 184, 0.3);
    --border-card-light: #e2e8f0;
    --border-input-light: #e2e8f0;
    --border-navbar-light: rgba(148, 163, 184, 0.2);
    --shadow-light: 0 4px 24px rgba(0, 0, 0, 0.06);
    --shadow-card-light: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-navbar-light: 0 1px 3px rgba(0, 0, 0, 0.1);
    --bg-dark: #0F172A;
    --bg-card-dark: rgba(30, 41, 59, 0.85);
    --bg-glass-dark: rgba(30, 41, 59, 0.75);
    --bg-component-dark: #334155;
    --bg-navbar-dark: rgba(15, 23, 42, 0.95);
    --bg-sidebar-dark: rgba(30, 41, 59, 0.9);
    --bg-input-dark: #1e293b;
    --bg-button-dark: #334155;
    --bg-hover-dark: rgba(255, 255, 255, 0.05);
    --bg-active-dark: rgba(99, 102, 241, 0.2);
    --text-dark: #F8FAFC;
    --text-secondary-dark: #CBD5E1;
    --text-hint-dark: #94A3B8;
    --text-link-dark: #60A5FA;
    --text-link-hover-dark: #818CF8;
    --border-dark: rgba(71, 85, 105, 0.6);
    --border-card-dark: #475569;
    --border-input-dark: #475569;
    --border-navbar-dark: rgba(71, 85, 105, 0.4);
    --shadow-dark: 0 4px 24px rgba(0, 0, 0, 0.4);
    --shadow-card-dark: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-navbar-dark: 0 1px 3px rgba(0, 0, 0, 0.3);
    --color-primary: #6366f1;
    --color-primary-hover: #4f46e5;
    --color-primary-light: #818cf8;
    --color-secondary: #64748b;
    --color-accent: #ec4899;
    --color-success: #10b981;
    --color-warning: #f59e0b;
    --color-error: #ef4444;
    --color-info: #3b82f6;
    --color-text-primary: #1e293b;
    --color-text-secondary: #64748b;
    --color-text-hint: #94a3b8;
    --color-text-link: #6366f1;
    --color-bg-page: #f8fafc;
    --color-bg-card: #ffffff;
    --color-bg-component: #f1f5f9;
    --color-bg-navbar: rgba(255, 255, 255, 0.95);
    --color-bg-sidebar: rgba(255, 255, 255, 0.9);
    --color-bg-input: #ffffff;
    --color-border: #e2e8f0;
    --color-border-card: #e2e8f0;
    --color-border-input: #e2e8f0;
    --color-border-navbar: rgba(148, 163, 184, 0.2);
    --color-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    --color-shadow-card: 0 1px 3px rgba(0, 0, 0, 0.1);
    --color-tag-bg: #e0e7ff;
    --color-tag-text: #6366f1;
    --color-tag-border: #c7d2fe;
    --color-tag-hover-bg: #c7d2fe;
    --color-tag-hover-text: #4f46e5;
    --color-tag-cloud-1: #6366f1;
    --color-tag-cloud-2: #ec4899;
    --color-tag-cloud-3: #10b981;
    --color-tag-cloud-4: #f59e0b;
    --color-tag-cloud-5: #3b82f6;
    --color-sidebar-category-bg: #f8fafc;
    --color-sidebar-category-text: #1e293b;
    --color-sidebar-category-hover-bg: #e0e7ff;
    --color-sidebar-category-hover-text: #6366f1;
    --color-sidebar-category-active-bg: #6366f1;
    --color-sidebar-category-active-text: #ffffff;
    --color-sidebar-category-count-bg: #ecf3fb;
    --color-sidebar-category-count-text: #64748b;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
html, body {
    height: 100%;
}
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    transition: background-color 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                color 0.3s ease,
                backdrop-filter 0.4s ease;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-image: linear-gradient(135deg, var(--primary-glow) 0%, transparent 50%);
    background-attachment: fixed;
}
main {
    flex: 1 0 auto;
}
footer {
    flex-shrink: 0;
}
.glass {
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
}
.theme-light {
    background-color: var(--bg-light);
    color: var(--text-light);
}
.theme-light .card {
    background: var(--bg-card-light);
    border: 1px solid var(--border-light);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--shadow-light);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.theme-light .card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(99, 102, 241, 0.12);
}
.theme-light .navbar {
    /*background: var(--bg-glass-light) !important;*/
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border-light);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.04);
}
.navbar-brand {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    font-size: 1.4rem;
}
.nav-link {
    position: relative;
    transition: color 0.3s ease, padding 0.3s ease;
}
.nav-link::after {
    content: '';
    position: static;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
    transition: width 0.3s ease, left 0.3s ease;
    border-radius: 2px;
}
.nav-link:hover::after,
.nav-link.active::after {
    /* width: 100%; */
    left: 0;
}
.nav-link.active {
    color: var(--primary-color) !important;
    font-weight: 600;
}
.theme-light .btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    border: none;
    box-shadow: 0 4px 15px var(--primary-glow);
    transition: all 0.3s ease;
    font-weight: 500;
}
.theme-light .btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-hover), var(--primary-color));
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--primary-glow);
}
.btn-outline-primary {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transition: all 0.3s ease;
}
.btn-outline-primary:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 4px 15px var(--primary-glow);
}
.theme-light .form-control, 
.theme-light .form-select {
    background: var(--bg-card-light);
    border: 1px solid var(--border-light);
    color: var(--text-light);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}
.theme-light .form-control:focus,
.theme-light .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-glow);
}
.dropdown-menu {
    background: var(--bg-glass-light);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-light);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}
.dropdown-item:hover {
    background: var(--primary-glow);
}
.article-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}
.article-card {
    background: var(--bg-card-light);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: var(--shadow-light);
}
.article-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.15);
    border-color: var(--primary-color);
}
.card-accent {
    height: 4px;
    transition: height 0.3s ease;
}
.article-card:hover .card-accent {
    height: 6px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light), var(--accent-color));
}
.card-content {
    padding: 1.25rem 1.25rem 0;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.card-footer {
    padding: 1rem 1.25rem 1.25rem;
}
.card-footer .card-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.75rem;
}
.card-category {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    color: var(--text-secondary-light);
}
.card-category i {
    color: var(--primary-color);
    font-size: 0.75rem;
}
.card-category .category-link,
.card-category .category-current {
    color: var(--text-secondary-light);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    margin: 0;
    padding: 0;
}
.card-category .category-link:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}
.author-info {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}
.author-info .author-avatar {
    font-size: 0.8rem;
    color: var(--primary-color);
}
.author-info .author-name {
    font-weight: 500;
    color: var(--text-secondary-light);
    font-size: 0.8rem;
}
.page-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-light);
    margin-bottom: 2rem;
    position: relative;
    padding-bottom: 0.75rem;
}
.page-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
    border-radius: 2px;
}
.page-header {
    margin-bottom: 2rem;
}
.page-description {
    color: var(--text-secondary-light);
    font-size: 1.1rem;
    margin-top: 0.5rem;
}
.article-header {
    margin-bottom: 0.5rem;
}
.article-title {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.4;
    color: inherit;
    transition: color 0.3s ease;
}
.article-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}
.article-title a:hover {
    color: var(--primary-color);
}
.article-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
    color: var(--text-secondary-light);
}
.meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}
.meta-icon {
    color: var(--primary-color);
    font-size: 0.8rem;
}
.meta-text {
    color: inherit;
}
.meta-divider {
    color: var(--border-light);
    user-select: none;
}
.meta-link {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}
.meta-link:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}
.article-excerpt {
    color: var(--text-secondary-light);
    line-height: 1.8;
    font-size: 0.95rem;
    margin: 0;
}
.article-excerpt p {
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}
.article-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-light);
}
.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    flex: 1;
}
.tag-item {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    padding: 0.3rem 0.6rem;
    border-radius: 12px;
    background: var(--color-sidebar-category-count-bg, var(--bg-glass-light));
    color: var(--text-secondary-light);
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}
.tag-item:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}
.tag-item.active {
    background: var(--primary-color) !important;
    color: white !important;
}
.btn-read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.25rem;
    /*background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));*/
    color: var(--admin-text-primary);
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    /*box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);*/
    white-space: nowrap;
}
.btn-read-more:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
    color: var(--admin-text-primary);
}
.btn-read-more:active {
    transform: translateY(0);
}
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
}
.empty-icon {
    font-size: 4rem;
    color: var(--border-light);
    margin-bottom: 1rem;
}
.empty-state p {
    color: var(--text-secondary-light);
    font-size: 1.1rem;
}
.sidebar-card {
    background: var(--bg-card-light);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--shadow-light);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.sidebar-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(99, 102, 241, 0.12);
}
.sidebar-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    /*border-bottom: 2px solid var(--primary-color);*/
}
.sidebar-title i {
    color: var(--primary-color);
}
.archive-group {
    margin-bottom: 1rem;
}
.archive-year {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}
.archive-months {
    list-style: none;
    padding: 0;
    margin: 0;
}
.archive-months li {
    margin-bottom: 0.35rem;
}
.archive-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.35rem 0.5rem;
    border-radius: 6px;
    color: var(--text-secondary-light);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}
.archive-link:hover {
    background: var(--primary-glow);
    color: var(--primary-color);
}
.archive-count {
    font-size: 0.75rem;
    padding: 0.15rem 0.4rem;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 8px;
    color: var(--primary-color);
}
.auth-container {
    width: 100%;
    max-width: 400px;
    margin: 2rem auto;
}
.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}
.auth-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}
.auth-subtitle {
    font-size: 1rem;
    color: var(--text-secondary-light);
}
.auth-card {
    background: var(--bg-card-light);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 2rem;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--shadow-light);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.auth-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.15);
    border-color: var(--primary-color);
}
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.auth-form .form-group {
    margin-bottom: 0;
}
.auth-input {
    width: 100%;
    padding: 0.875rem;
    border: 1px solid var(--border-light);
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background: var(--bg-light);
}
.auth-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}
.form-label {
    font-weight: 500;
    color: var(--text-light);
    margin-bottom: 0.5rem;
    display: block;
}
.form-error {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.8rem;
}
.form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    /**padding: 0.5rem 0;**/
}

.form-switch {
    /**padding-left: 2.5rem;**/
    position: relative;
}

.form-switch .form-check-input {
    position: absolute;
    right: -40%;
    top: 50%;
    transform: translateY(-50%);
    width: 2rem;
    height: 1.125rem;
    border-radius: 1rem;
    appearance: none;
    background-color: #e2e8f0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.form-switch .form-check-input::before {
    content: '';
    position: absolute;
    width: 0.875rem;
    height: 0.875rem;
    border-radius: 50%;
    background-color: white;
    top: 50%;
    left: 0.125rem;
    transform: translateY(-50%);
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.form-switch .form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.form-switch .form-check-input:checked::before {
    left: calc(100% - 0.875rem - 0.125rem);
}

.form-check-input {
    width: 1.125rem;
    height: 1.125rem;
    border: 2px solid var(--border-light);
    border-radius: 4px;
    cursor: pointer;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}
.form-check-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}
.form-check-label {
    font-size: 0.9rem;
    color: var(--text-secondary-light);
    cursor: pointer;
    user-select: none;
}
.btn-auth {
    width: 100%;
    padding: 0.875rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}
.btn-auth:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}
.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-light);
}
.auth-footer p {
    margin: 0;
    color: var(--text-secondary-light);
    font-size: 0.9rem;
}
.auth-link {
    color: var(--text-secondary-light);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}
.auth-link:hover {
    color: var(--primary-color);
    text-decoration: underline;
}
.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.category-item {
    margin-bottom: 0.5rem;
}
.category-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* padding: 0.5rem 0.75rem; */
    border-radius: 8px;
    background: var(--color-sidebar-category-bg, transparent);
    color: var(--color-sidebar-category-text, var(--text-light));
    text-decoration: none;
    transition: all 0.3s ease;
}
.category-link:hover {
    background: var(--color-sidebar-category-hover-bg, var(--primary-glow));
    color: var(--color-sidebar-category-hover-text, var(--primary-color));
}
.category-link.active {
    background: var(--color-tag-bg, var(--primary-glow));
    color: var(--color-sidebar-category-active-text, white);
}
.category-link.active .category-count {
    background: rgba(255, 255, 255, 0.2);
    color: var(--color-sidebar-category-count-text, white);
}
.category-name {
    font-weight: 500;
}
.category-count {
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    background: var(--color-sidebar-category-count-bg, var(--bg-glass-light));
    border-radius: 10px;
    color: var(--color-sidebar-category-count-text, var(--text-secondary-light));
}
.about-content {
    color: var(--text-secondary-light);
    font-size: 0.9rem;
    line-height: 1.7;
    margin: 0;
}
.article-detail {
    background: var(--bg-card-light);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--shadow-light);
}
.article-detail-header {
    margin-bottom: 1.5rem;
}
.article-detail-title {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-light);
    margin: 0;
    word-break: break-word;
}
.article-detail-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
    color: var(--text-secondary-light);
    margin-bottom: 1rem;
}
.article-detail-meta .meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}
.article-detail-meta .meta-icon {
    color: var(--primary-color);
    font-size: 0.9rem;
}
.article-detail-meta .meta-divider {
    color: var(--border-light);
    user-select: none;
}
.article-detail-meta .meta-link {
    color: var(--text-secondary-light);
    text-decoration: none;
    transition: color 0.3s ease;
}
.article-detail-meta .meta-link:hover {
    color: var(--primary-color);
    text-decoration: underline;
}
.article-divider {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-light), transparent);
    margin: 1.5rem 0;
}
.article-divider-end {
    margin-bottom: 1rem;
}
.article-detail-content {
    padding: 1rem 0;
    line-height: 1.8;
    font-size: 1rem;
    color: var(--text-light);
}
.article-detail-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1rem auto;
    display: block;
}
.article-detail-content pre {
    background: rgba(99, 102, 241, 0.05);
    border-radius: 8px;
    padding: 1rem;
    overflow-x: auto;
}
.article-detail-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}
.tags-label {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary-light);
}
.tags-label i {
    color: var(--primary-color);
}
.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.detail-tag-item {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
    border-radius: 12px;
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}
.detail-tag-item:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}
.article-detail-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-light);
}
.btn-action {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}
.btn-edit {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}
.btn-edit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
    color: white;
}
.btn-delete {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}
.btn-delete:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.4);
    color: white;
}
.article-comments {
    padding-top: 2rem;
    border-top: 2px solid var(--border-light);
}
.comments-header {
    margin-bottom: 1.5rem;
}
.comments-title {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-light);
    margin: 0;
}
.comments-title i {
    color: var(--primary-color);
}
.comment-form-wrapper {
    background: rgba(99, 102, 241, 0.05);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}
.comment-form .form-group {
    margin-bottom: 0.75rem;
}
.comment-input {
    width: 100%;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 0.75rem;
    font-size: 0.9rem;
    resize: vertical;
    min-height: 100px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.comment-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}
.form-actions {
    display: flex;
    justify-content: flex-end;
}
.btn-submit {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.25rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}
.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}
.comment-login-prompt {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(99, 102, 241, 0.05);
    border-radius: 12px;
    color: var(--text-secondary-light);
    margin-bottom: 1.5rem;
}
.guest-comment-form .form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.75rem;
}
.guest-comment-form .form-group.half {
    flex: 1;
}
.guest-comment-form .form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
    color: var(--text-secondary-light);
}
.guest-comment-form .required {
    color: var(--primary-color);
}
.guest-comment-form .captcha-group {
    margin-bottom: 0.75rem;
}
.guest-comment-form .captcha-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.guest-comment-form .captcha-input {
    width: 100px;
    padding: 0.5rem;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    font-size: 0.9rem;
}
.guest-comment-form .captcha-display {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    height: 36px;
    padding: 0.5rem 0.75rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    border-radius: 8px;
    user-select: none;
}
.guest-comment-form .btn-refresh-captcha {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    color: var(--primary-color);
    cursor: pointer;
    transition: all 0.3s ease;
}
.guest-comment-form .btn-refresh-captcha:hover {
    background: rgba(99, 102, 241, 0.2);
    transform: rotate(180deg);
}
.guest-info {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-top: 0.25rem;
}
.guest-email, .guest-ip {
    font-size: 0.75rem;
    color: var(--text-secondary-light);
    opacity: 0.7;
}
.guest-reply-form .reply-guest-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}
.guest-reply-form .reply-name-input,
.guest-reply-form .reply-email-input {
    flex: 1;
    min-width: 100px;
    padding: 0.5rem;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    font-size: 0.85rem;
}
.guest-reply-form .reply-captcha-wrapper {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}
.guest-reply-form .reply-captcha-input {
    width: 70px;
    padding: 0.5rem;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    font-size: 0.85rem;
}
.guest-reply-form .captcha-display-inline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 45px;
    height: 32px;
    padding: 0.25rem 0.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    border-radius: 8px;
    user-select: none;
}
.guest-reply-form .btn-refresh-captcha-sm {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    color: var(--primary-color);
    cursor: pointer;
    transition: all 0.3s ease;
}
.guest-reply-form .btn-refresh-captcha-sm:hover {
    background: rgba(99, 102, 241, 0.2);
    transform: rotate(180deg);
}
.reply-guest-info {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-left: 0.5rem;
}
.reply-guest-info .guest-email,
.reply-guest-info .guest-ip {
    font-size: 0.7rem;
}
.comment-login-prompt i {
    color: var(--primary-color);
    font-size: 1.25rem;
}
.comment-login-prompt .login-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}
.comment-login-prompt .login-link:hover {
    text-decoration: underline;
}
.comments-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.comment-item {
    background: var(--bg-card-light);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 1rem;
    transition: all 0.3s ease;
}
.comment-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.1);
}
.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}
.comment-author {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.author-avatar {
    font-size: 2rem;
    color: var(--primary-color);
}
.author-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.author-name {
    font-weight: 600;
    color: var(--text-light);
    font-size: 0.95rem;
}
.comment-time {
    font-size: 0.75rem;
    color: var(--text-secondary-light);
}
.btn-delete-comment {
    background: transparent;
    border: none;
    color: var(--text-secondary-light);
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}
.btn-delete-comment:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}
.comment-content {
    padding: 0.5rem 0;
}
.comment-content p {
    margin: 0;
    color: var(--text-light);
    line-height: 1.6;
}
.comment-replies {
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: rgba(99, 102, 241, 0.05);
    border-radius: 8px;
    border-left: 3px solid var(--primary-color);
}
.reply-item {
    margin-bottom: 0.5rem;
}
.reply-item:last-child {
    margin-bottom: 0;
}
.reply-author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
}
.reply-author i {
    color: var(--primary-color);
    font-size: 0.75rem;
}
.reply-name {
    font-weight: 500;
    color: var(--text-light);
}
.reply-time {
    color: var(--text-secondary-light);
    font-size: 0.75rem;
}
.reply-content {
    margin: 0.25rem 0 0 1.25rem;
    font-size: 0.85rem;
    color: var(--text-secondary-light);
}
.reply-form-wrapper {
    margin-top: 0.75rem;
}
.reply-form {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.reply-input {
    width: 100%;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 0.5rem;
    font-size: 0.85rem;
    resize: vertical;
    min-height: 60px;
    transition: border-color 0.3s ease;
}
.reply-input:focus {
    outline: none;
    border-color: var(--primary-color);
}
.btn-reply {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    align-self: flex-end;
}
.btn-reply:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}
.comments-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
}
.comments-empty .empty-icon {
    font-size: 3rem;
    color: var(--border-light);
    margin-bottom: 0.75rem;
}
.comments-empty p {
    color: var(--text-secondary-light);
    font-size: 0.95rem;
    margin: 0;
}
.meta-info i {
    color: var(--primary-color);
}
.tag-badge {
    font-size: 0.75rem;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    background: var(--color-sidebar-category-count-bg, var(--bg-glass-light));
    color: var(--text-secondary-light);
    font-weight: 500;
    transition: all 0.3s ease;
    margin-bottom: 0.5rem;
    display: inline-block;
    text-decoration: none;
    outline: none;
    border: 1px solid var(--color-tag-border, transparent);
}
.tag-badge:hover,
.tag-badge:focus {
    background: var(--primary-color);
    color: white;
    transform: scale(1.05);
    box-shadow: 0 4px 12px var(--primary-glow);
    text-decoration: none;
}
.tag-badge:focus {
    border-color: var(--color-tag-border, var(--primary-light));
    box-shadow: 0 0 0 3px var(--primary-glow);
}
.tag-badge.active {
    background: var(--primary-color) !important;
    color: white !important;
}
.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.markdown-content {
    line-height: 1.8;
    font-size: 1.05rem;
}
.markdown-content h1 { 
    font-size: 2rem; 
    font-weight: 700; 
    margin: 2rem 0 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.markdown-content h2 { 
    font-size: 1.5rem; 
    font-weight: 600; 
    margin: 1.5rem 0 0.75rem;
    color: var(--primary-color);
}
.markdown-content h3 { 
    font-size: 1.25rem; 
    font-weight: 600; 
    margin: 1.25rem 0 0.5rem;
}
.markdown-content p { 
    margin: 1rem 0; 
}
.markdown-content ul, 
.markdown-content ol { 
    padding-left: 1.5rem; 
    margin: 1rem 0; 
}
.markdown-content li { 
    margin: 0.5rem 0; 
}
.markdown-content blockquote { 
    border-left: 4px solid var(--primary-color); 
    padding: 1rem 1.5rem; 
    margin: 1.5rem 0; 
    color: var(--text-secondary-light);
    font-style: italic;
    background: var(--primary-glow);
    border-radius: 0 12px 12px 0;
}
.markdown-content code { 
    background: var(--primary-glow);
    color: var(--primary-color);
    padding: 0.2rem 0.5rem; 
    border-radius: 6px; 
    font-family: 'Fira Code', 'Consolas', monospace;
    font-size: 0.9em;
}
.markdown-content pre { 
    background: var(--bg-dark); 
    padding: 1.25rem; 
    border-radius: 12px; 
    overflow-x: auto; 
    margin: 1.5rem 0; 
    border: 1px solid var(--border-dark);
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.2);
}
.markdown-content pre code { 
    background: transparent; 
    padding: 0;
    color: #E2E8F0;
}
.markdown-content table { 
    width: 100%; 
    border-collapse: collapse; 
    margin: 1.5rem 0;
}
.markdown-content th, 
.markdown-content td { 
    padding: 0.75rem; 
    border: 1px solid var(--border-light); 
    text-align: left; 
}
.markdown-content th { 
    background: var(--primary-glow); 
    font-weight: 600; 
}
.markdown-content a { 
    color: var(--primary-color); 
    text-decoration: none; 
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}
.markdown-content a:hover { 
    border-bottom-color: var(--primary-color);
    color: var(--primary-hover);
}
.markdown-content img { 
    max-width: 100%; 
    border-radius: 12px; 
    margin: 1rem 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}
.pagination-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-top: 2rem;
    width: 100%;
}
.pagination {
    display: flex;
    justify-content: center;
    margin: 0;
}
.page-link {
    background: var(--bg-glass-light);
    border: 1px solid var(--border-light);
    color: var(--primary-color);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    margin: 0 2px;
}
.page-link:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}
.page-item.active .page-link {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}
.page-item.disabled .page-link {
    opacity: 0.5;
}
.comments-section {
    margin-top: 3rem;
}
.comment-card {
    background: var(--bg-card-light);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border-light);
}
.comment-author {
    font-weight: 600;
    color: var(--primary-color);
}
.comment-date {
    font-size: 0.8rem;
    color: var(--secondary-color);
}
.comment-content {
    margin-top: 0.75rem;
    line-height: 1.6;
}
.reply-form {
    margin-top: 1rem;
    padding-left: 1.5rem;
    border-left: 3px solid var(--primary-glow);
}
.admin-panel {
    min-height: 100vh;
}
.admin-sidebar {
    background: var(--bg-card-light);
    border-right: 1px solid var(--border-light);
    min-height: 100vh;
    padding: 1.5rem;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--shadow-light);
}
.admin-sidebar .nav-link {
    color: var(--text-light);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 0.25rem;
    transition: all 0.3s ease;
}
.admin-sidebar .nav-link:hover {
    background: var(--primary-glow);
    color: var(--primary-color);
    transform: translateX(4px);
}
.admin-sidebar .nav-link.active {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white !important;
    box-shadow: 0 4px 15px var(--primary-glow);
}
.admin-sidebar .nav-link.active::after {
    display: none;
}
.admin-content {
    padding: 2rem;
}
.search-form {
    position: relative;
}
.search-input {
    line-height: 40px !important;
    border: 1px solid #ccc !important;
    border-radius: 24px !important;
    outline: none;
    padding-left: 15px;
    padding-right: 45px;
    font-size: 14px !important;
}
.search-btn {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--secondary-color);
}
.admin-panel .card {
    background: var(--bg-card-light);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--shadow-light);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.admin-panel .card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(99, 102, 241, 0.12);
    border-color: var(--primary-color);
}
.admin-panel .card-header {
    background: rgba(99, 102, 241, 0.05);
    border-bottom: 1px solid var(--border-light);
    border-radius: 16px 16px 0 0 !important;
    padding: 1rem 1.25rem;
    font-weight: 600;
    color: var(--text-light);
}
.admin-panel .card-body {
    padding: 1.25rem;
}
.admin-panel .card-footer {
    background: transparent;
    border-top: 1px solid var(--border-light);
    border-radius: 0 0 16px 16px !important;
    padding: 1rem 1.25rem;
}
.admin-panel .stat-card {
    text-align: center;
    padding: 1.5rem;
    transition: all 0.3s ease;
}
.admin-panel .stat-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 48px rgba(99, 102, 241, 0.15);
}
.admin-panel .stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}
.admin-panel .stat-card .stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary-light);
}
@media (max-width: 1199px) {
    .article-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    .article-title {
        font-size: 1rem;
    }
    .page-title {
        font-size: 1.75rem;
    }
}
@media (max-width: 768px) {
    .article-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .page-title {
        font-size: 1.5rem;
    }
    .page-title::after {
        width: 40px;
        height: 3px;
    }
    .article-card {
        transform: none !important;
    }
    .article-card:hover {
        transform: translateY(-4px) !important;
    }
    .card-content {
        padding: 1rem 1rem 0;
    }
    .card-footer {
        padding: 0.75rem 1rem 1rem;
    }
    .card-footer .card-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }
    .card-category {
        margin-bottom: 0.25rem;
    }
    .article-title {
        font-size: 0.95rem;
    }
    .article-meta {
        flex-wrap: wrap;
        gap: 0.5rem;
        font-size: 0.8rem;
    }
    .meta-divider {
        display: none;
    }
    .meta-item {
        /* background: rgba(99, 102, 241, 0.08); */
        padding: 0.2rem 0.5rem;
        border-radius: 4px;
    }
    .author-info {
        /* background: rgba(99, 102, 241, 0.08); */
        padding: 0.2rem 0.5rem;
        border-radius: 4px;
.diff-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.diff-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: var(--bg-glass-light);
    border-radius: 8px;
}
.diff-label {
    font-weight: 500;
    color: var(--text-secondary-light);
    min-width: 100px;
}
.diff-delete {
    color: #ef4444;
    text-decoration: line-through;
}
.diff-add {
    color: #10B981;
    font-weight: 500;
}
.diff-arrow {
    color: var(--text-secondary-light);
    padding: 0 0.5rem;
}
.diff-same {
    color: var(--text-secondary-light);
    font-style: italic;
}
.bg-success-light {
    background: rgba(16, 185, 129, 0.1);
}
.ck-editor__editable {
    min-height: 400px;
    border-radius: 8px;
}
.ck-editor__top {
    border-radius: 8px 8px 0 0;
}
.ck-toolbar {
    background: var(--bg-card-light);
    border-color: var(--border-light);
}
.ck-button {
    color: var(--text-light);
}
.ck-button:hover {
    background: var(--primary-glow);
}
.ck-dropdown__panel {
    background: var(--bg-card-light);
    border-color: var(--border-light);
}
#autosave-status {
    animation: fadeIn 0.3s ease;
}
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
    .article-tags {
        width: 100%;
    }
    .sidebar-card {
        padding: 1rem;
    }
    .admin-sidebar {
        min-height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border-light);
    }
    .article-detail {
        padding: 1.25rem;
    }
    .article-detail-title {
        font-size: 1.5rem;
    }
    .article-detail-meta {
        flex-wrap: wrap;
        gap: 0.5rem;
        font-size: 0.8rem;
    }
    .article-detail-meta .meta-divider {
        display: none;
    }
    .article-detail-content {
        padding: 0.75rem 0;
        font-size: 0.95rem;
    }
}
.editor-fullscreen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-light);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    transition: opacity 0.3s ease;
}
.editor-fullscreen-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid var(--border-light);
    flex-shrink: 0;
}
.editor-fullscreen-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-light);
}
.editor-fullscreen-actions {
    display: flex;
    gap: 0.75rem;
}
.editor-fullscreen-content {
    flex: 1;
    overflow: hidden;
    padding: 1rem;
}
.editor-fullscreen-content #editor-wrapper {
    height: 100% !important;
}
.editor-fullscreen-content #editor-content {
    height: calc(100% - 42px) !important;
}
.card:has(#editor-wrapper):fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    margin: 0;
    padding: 0;
    border-radius: 0;
    z-index: 9999;
    overflow: hidden;
}
.card:has(#editor-wrapper):fullscreen .card-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}
.card:has(#editor-wrapper):fullscreen .card-body {
    height: calc(100vh - 60px);
    overflow: hidden;
    padding: 0;
}
.card:has(#editor-wrapper):fullscreen #editor-wrapper {
    height: calc(100vh - 80px) !important;
}
.card:has(#editor-wrapper):fullscreen #editor-content {
    height: calc(100% - 42px) !important;
}
.card:has(#editor-wrapper):-webkit-full-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    margin: 0;
    padding: 0;
    border-radius: 0;
    z-index: 9999;
    overflow: hidden;
}
.card:has(#editor-wrapper):-webkit-full-screen .card-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}
.card:has(#editor-wrapper):-webkit-full-screen .card-body {
    height: calc(100vh - 60px);
    overflow: hidden;
    padding: 0;
}
.card:has(#editor-wrapper):-webkit-full-screen #editor-wrapper {
    height: calc(100vh - 80px) !important;
}
.card:has(#editor-wrapper):-webkit-full-screen #editor-content {
    height: calc(100% - 42px) !important;
}
#editor-fullscreen {
    transition: all 0.3s ease;
}
#editor-fullscreen:hover {
    transform: scale(1.05);
}
:fullscreen,
:-webkit-full-screen {
    transition: opacity 0.3s ease;
}
.ql-toolbar {
    border: 1px solid var(--color-border) !important;
    border-radius: 0.375rem 0.375rem 0 0 !important;
    background: var(--color-bg-component) !important;
    padding: 0.5rem !important;
}
.ql-container {
    border: 1px solid var(--color-border) !important;
    border-top: none !important;
    border-radius: 0 0 0.375rem 0.375rem !important;
    background: var(--color-bg-page) !important;
    min-height: 300px !important;
}
.ql-editor {
    min-height: 450px !important;
    color: var(--color-text-primary) !important;
    font-size: 1rem !important;
    line-height: 1.6 !important;
}
.ql-editor.ql-blank::before {
    color: var(--color-text-hint) !important;
    font-style: normal !important;
}
.ql-undo, .ql-redo {
    width: 28px !important;
    height: 28px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}
.ql-undo::before {
    content: '\f0e2';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    font-size: 14px;
    color: var(--color-text-secondary);
}
.ql-redo::before {
    content: '\f01e';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    font-size: 14px;
    color: var(--color-text-secondary);
}
.ql-undo:hover::before,
.ql-redo:hover::before {
    color: var(--color-primary);
}
.ql-undo.ql-active::before,
.ql-redo.ql-active::before {
    color: var(--color-primary);
}
.ql-toolbar button {
    width: 28px !important;
    height: 28px !important;
    border: none !important;
    background: transparent !important;
    border-radius: 0.25rem !important;
    margin: 0 2px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}
.ql-toolbar button:hover {
    background: rgba(0, 0, 0, 0.05) !important;
}
.ql-toolbar button.ql-active {
    background: rgba(59, 130, 246, 0.1) !important;
    color: var(--color-primary) !important;
}
.ql-picker {
    height: 28px !important;
    border-radius: 0.25rem !important;
    margin: 0 2px !important;
}
.ql-picker-label {
    padding: 0 8px !important;
    font-size: 12px !important;
}
.ql-picker-options {
    background: var(--color-bg-page) !important;
    border: 1px solid var(--color-border) !important;
    border-radius: 0.375rem !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
}
.ql-picker-item {
    padding: 4px 8px !important;
    font-size: 12px !important;
}
.ql-picker-item:hover {
    background: var(--color-bg-component) !important;
}
.ql-picker-item.ql-selected {
    background: var(--color-primary) !important;
    color: white !important;
}
.search-form {
    position: relative;
}
.search-row {
    display: flex;
    align-items: center;
    gap: 0;
    border-radius: 0.375rem;
    overflow: hidden;
    border: 1px solid var(--color-border);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    border-radius: 24px !important;
}
.search-row:focus-within {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}
.search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 0.9rem;
    padding: 0.625rem 0.75rem;
    background: var(--color-bg-page);
    color: var(--color-text-primary);
}
.search-input::placeholder {
    color: var(--color-text-hint);
}
.search-btn {
    border: none;
    outline: none;
    background: var(--color-primary);
    color: white;
    padding: 0.625rem 1rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    border-radius: 24px !important;
}
.search-btn:hover {
    background: var(--color-secondary);
}
.search-btn i {
    font-size: 1rem;
}
.search-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem;
    color: var(--color-text-secondary);
}
.search-highlight {
    background-color: var(--color-warning);
    color: var(--color-bg-page);
    padding: 0.125rem 0.25rem;
    border-radius: 0.125rem;
    font-weight: 500;
}
.search-keyword {
    color: var(--color-primary);
    font-weight: 600;
}
.empty-suggestions {
    margin-top: 1rem;
}
.empty-suggestions p {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    margin-bottom: 0.5rem;
}
.suggestion-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.suggestion-tags .tag-item {
    background: var(--color-bg-component);
    padding: 0.375rem 0.75rem;
    border-radius: 0.25rem;
    font-size: 0.85rem;
}
    .article-detail-tags {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    .article-detail-actions {
        flex-direction: column;
        gap: 0.75rem;
    }
    .btn-action {
        width: 100%;
        justify-content: center;
    }
    .comment-form-wrapper {
        padding: 1rem;
    }
    .comment-item {
        padding: 0.875rem;
    }
    .comment-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    .btn-delete-comment {
        align-self: flex-end;
    }
    .reply-form {
        gap: 0.5rem;
    }
    .btn-reply {
        width: 100%;
        justify-content: center;
    }
    .pagination-wrapper {
        margin-top: 1.5rem;
    }
    .pagination {
        flex-wrap: wrap;
        gap: 0.25rem;
        justify-content: center;
    }
    .page-link {
        padding: 0.4rem 0.6rem;
        font-size: 0.85rem;
        margin: 0 1px;
    }
    .pagination-info small {
        font-size: 0.75rem;
    }
    .pagination .page-item:first-child .page-link,
    .pagination .page-item:last-child .page-link {
        padding: 0.4rem 0.5rem;
    }
    .auth-container {
        padding: 0 1rem;
    }
    .auth-card {
        padding: 1.5rem;
    }
    .auth-title {
        font-size: 1.5rem;
    }
    .auth-subtitle {
        font-size: 0.9rem;
    }
}
@media (prefers-reduced-motion:reduce) {
    .navbar-toggler {
        transition: none
    }
}

.navbar-toggler:hover {
    text-decoration: none
}

.navbar-toggler:focus {
    text-decoration: none;
    outline: 0;
    box-shadow:none; 
}

@media (max-width: 480px) {
    .article-grid {
        gap: 0.875rem;
    }
    .auth-container {
        padding: 0 0.75rem;
    }
    .auth-card {
        padding: 1.25rem;
    }
    .auth-title {
        font-size: 1.3rem;
    }
    .auth-subtitle {
        font-size: 0.85rem;
    }
    .auth-input {
        padding: 0.75rem;
        font-size: 0.9rem;
    }
    .btn-auth {
        padding: 0.75rem;
        font-size: 0.9rem;
    }
    .page-title {
        font-size: 1.3rem;
    }
    .card-content {
        padding: 0.875rem 0.875rem 0;
    }
    .card-footer {
        padding: 0.625rem 0.875rem 0.875rem;
    }
    .card-accent {
        height: 3px;
    }
    .article-card:hover .card-accent {
        height: 4px;
    }
    .article-title {
        font-size: 0.9rem;
    }
    .article-excerpt {
        font-size: 0.85rem;
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }
    .article-meta {
        font-size: 0.75rem;
    }
    .author-info .author-avatar {
        font-size: 0.8rem;
    }
    .author-info .author-name {
        font-size: 0.8rem;
    }
    .card-category {
        font-size: 0.75rem;
    }
    .tag-item {
        font-size: 0.7rem;
        padding: 0.2rem 0.4rem;
    }
    .btn-read-more {
        font-size: 0.75rem;
        padding: 0.35rem 0.75rem;
    }
    .sidebar-title {
        font-size: 0.9rem;
    }
    .article-detail {
        padding: 1rem;
    }
    .article-detail-title {
        font-size: 1.25rem;
    }
    .article-detail-meta {
        font-size: 0.75rem;
    }
    .article-detail-content {
        font-size: 0.9rem;
        line-height: 1.7;
    }
    .detail-tag-item {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }
    .btn-action {
        font-size: 0.8rem;
        padding: 0.5rem 1rem;
    }
    .comments-title {
        font-size: 1rem;
    }
    .comment-input {
        font-size: 0.85rem;
        min-height: 80px;
    }
    .author-avatar {
        font-size: 1.5rem;
    }
    .author-name {
        font-size: 0.85rem;
    }
    .comment-content p {
        font-size: 0.85rem;
    }
    .reply-input {
        font-size: 0.8rem;
        min-height: 50px;
    }
    .btn-reply {
        font-size: 0.75rem;
    }
    .pagination-wrapper {
        margin-top: 1rem;
    }
    .pagination {
        justify-content: center;
    }
    .page-link {
        padding: 0.35rem 0.5rem;
        font-size: 0.8rem;
    }
    .pagination-info {
        width: 100%;
        margin-top: 0.5rem;
        text-align: center;
    }
}