:root {
    --primary-color: #0e426d;
    --primary-dark: #03182d;
    --secondary-color: #f8fafc;
    --accent-color: #06b6d4;
    --text-color: #1e293b;
    --text-light: #64748b;
    --text-muted: #94a3b8;
    --background: #ffffff;
    --surface: #f8fafc;
    --border-color: #e2e8f0;
    --error-color: #ef4444;
    --success-color: #10b981;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --border-radius: 0.5rem;
    --border-radius-lg: 0.75rem;
    --font-family: 'Inter', system-ui, -apple-system, sans-serif;
    --warning-color: #f59e0b;
    --warning-dark: #d97706;
    --info-color: #0891b2;
    --danger-color: #dc2626;
    --success-dark: #059669;

    /* Z-index Scale */
    --z-dropdown: 10;
    --z-modal: 40;
    --z-popover: 50;
    --z-tooltip: 60;
}

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

body {
    font-family: var(--font-family);
    background-color: var(--background);
    color: var(--text-color);
    line-height: 1.6;
    padding-top: 100px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Navigation */
.navbar {
    height: 100px;
    background-size: cover;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: var(--z-modal);
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
}

.nav-brand h1 {
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
}

.nav-brand i {
    margin-right: 0.5rem;
}

.nav-menu {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: white;
    font-weight: 500;
    transition: opacity 0.2s ease;
    position: relative;
}

.nav-link:hover {
    opacity: 0.8;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: white;
    margin: 3px 0;
    transition: 0.3s;
}

/* Main Content */
.main-content {
    margin-top: 0;
    padding: 0;
}

.view {
    display: none;
}

.view.active {
    display: block;
}

/* Page Header */
.page-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 0;
}

.page-header h1 {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.page-header p {
    font-size: 1.25rem;
    color: var(--text-light);
    max-width: 800px;
    margin: 0 auto;
}

/* Posts Grid */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.post-card {
    background: var(--background);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    overflow: hidden;
    border: 1px solid var(--border-color);
    cursor: pointer;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

.post-card-content {
    padding: 2rem;
}

.post-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 1rem;
    line-height: 1.3;
}

.post-card p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.post-author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.post-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-icon {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: var(--border-radius);
    transition: all 0.2s ease;
}

.btn-icon:hover {
    color: var(--primary-color);
    background-color: var(--surface);
}

/* Authentication Cards */
.auth-card,
.editor-card {
    max-width: 500px;
    margin: 0.5rem auto;
    background: var(--background);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 2.5rem;
    border: 1px solid var(--border-color);
}

.auth-card h2,
.editor-card h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text-color);
    font-weight: 600;
}

.auth-card i,
.editor-card i {
    margin-right: 0.5rem;
    color: var(--primary-color);
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: var(--background);
    color: var(--text-color);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

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

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

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background-color: var(--surface);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: var(--border-color);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

/* Error Messages */
.error-message {
    color: var(--error-color);
    font-size: 0.875rem;
    margin-top: 0.5rem;
    text-align: center;
}

/* Auth Switch */
.auth-switch {
    text-align: center;
    margin-top: 2rem;
    color: var(--text-light);
}

.auth-switch a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.auth-switch a:hover {
    text-decoration: underline;
}

/* Single Post */
.single-post {
    max-width: 1100px;
    margin: 0.5rem auto;
    background: var(--background);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    padding: 3rem;
    border: 1px solid var(--border-color);
}

.single-post h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.single-post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.875rem;
    color: var(--text-muted);
}

.single-post-content {
    font-size: 1.125rem;
    line-height: 1.7;
    color: var(--text-color);
}

.single-post-content p {
    margin-bottom: 1.5rem;
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.back-button:hover {
    color: var(--primary-dark);
}

/* Footer */
.footer {
    background-color: var(--surface);
    border-top: 1px solid var(--border-color);
    padding: 0;
    text-align: center;
    color: var(--text-light);
    margin-top: auto;
}

/* Loading and Empty States */
.loading {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
}

.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 100px;
        flex-direction: column;
        background-color: var(--background);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--shadow-lg);
        padding: 1rem 0; /* Fixed: Add padding for mobile menu items */
    }

    .nav-menu.active {
        left: 0;
    }

    /* Mobile nav link styles - ensure visibility */
    .nav-menu .nav-link {
        padding: 0.75rem 1.5rem !important;
        display: block;
        width: 100%;
        text-align: center;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        color: var(--text-color) !important; /* Ensure text is visible */
    }
    
    .nav-menu .nav-link:hover {
        opacity: 0.8;
    }
    
    /* Override inline display:none only when explicitly set */
    .nav-menu .nav-link[style*="display: none"] {
        display: none !important;
    }

    .hamburger {
        display: flex;
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .page-header h1 {
        font-size: 2rem;
    }

    .posts-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .auth-card,
    .editor-card,
    .single-post {
        margin: 1rem;
        padding: 1.5rem;
    }

    .form-actions {
        flex-direction: column;
    }

    .single-post h1 {
        font-size: 2rem;
    }

    .single-post-meta {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.post-card {
    animation: fadeIn 0.5s ease-out;
}

.view.active {
    animation: fadeIn 0.3s ease-out;
}

/* Success Message */
.success-message {
    color: var(--success-color);
    font-size: 0.875rem;
    margin-top: 0.5rem;
    text-align: center;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mb-0 {
    margin-bottom: 0;
}

.mt-2 {
    margin-top: 1rem;
}

.hidden {
    display: none !important;
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
    :root {
        --background: #0f172a;
        --surface: #1e293b;
        --text-color: #f8fafc;
        --text-light: #cbd5e1;
        --text-muted: #64748b;
        --border-color: #334155;
    }

    /* Dark mode navbar styling */
    .navbar {
        background-size: cover; /* Dark semi-transparent background */
        border-bottom-color: var(--border-color);
    }

    /* Ensure nav links have proper contrast in dark mode */
    .nav-link {
        color: var(--text-light); /* Slightly muted for better readability */
    }

    .nav-link:hover {
    .nav-link:hover {
        opacity: 0.8; /* Subtle fade on hover */
    }
    /* Dark mode mobile menu styling */
    .nav-menu {
        background-color: var(--surface);
    }
    }
}

/* Rich Text Editor Styles */
.editor-card {
    max-width: 1100px;
    margin: 0.5rem auto;
}

.rich-editor {
    min-height: 300px;
    background: var(--background);
    border-radius: var(--border-radius);
    border: 2px solid var(--border-color);
    font-family: var(--font-family);
}

.rich-editor:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Quill toolbar customization */
/* Quill button styling */
/* Editor info */
.editor-info {
    margin: 1rem 0;
    padding: 0.75rem 1rem;
    background: var(--surface);
    border-radius: var(--border-radius);
    border-left: 4px solid var(--primary-color);
    font-size: 0.875rem;
    color: var(--text-light);
}

.editor-info i {
    color: var(--primary-color);
    margin-right: 0.5rem;
}

/* Additional button style */
.btn-tertiary {
    background-color: var(--accent-color);
    color: white;
}

.btn-tertiary:hover {
    background-color: var(--info-color);
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: var(--z-popover);
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
}

.modal-content {
    background: var(--background);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-xl);
    max-width: 1100px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    animation: slideIn 0.3s ease-out;
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--surface);
    border-top-left-radius: var(--border-radius-lg);
    border-top-right-radius: var(--border-radius-lg);
}

.modal-header h2 {
    margin: 0;
    color: var(--text-color);
    font-size: 1.5rem;
    font-weight: 600;
}

.modal-header i {
    color: var(--primary-color);
    margin-right: 0.5rem;
}

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

.modal-close:hover {
    background-color: var(--error-color);
    color: white;
}

.modal-body {
    padding: 2rem;
    color: var(--text-color);
}

.modal-footer {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    padding: 1rem 2rem;
    border-top: 1px solid var(--border-color);
    background: var(--surface);
    border-bottom-left-radius: var(--border-radius-lg);
    border-bottom-right-radius: var(--border-radius-lg);
}

/* Preview post styles */
.preview-post h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.preview-post .post-meta {
    display: flex;
    gap: 2rem;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.875rem;
    color: var(--text-muted);
}

.preview-post .post-content {
    font-size: 1.125rem;
    line-height: 1.7;
    color: var(--text-color);
}

/* Rich content styling within posts */
.post-content h1,
.single-post-content h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-color);
    margin: 2rem 0 1rem 0;
    line-height: 1.3;
}

.post-content h2,
.single-post-content h2 {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 1.5rem 0 0.75rem 0;
    line-height: 1.3;
}

.post-content h3,
.single-post-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 1.25rem 0 0.5rem 0;
    line-height: 1.3;
}

.post-content p,
.single-post-content p {
    margin-bottom: 1rem;
}

.post-content ul,
.post-content ol,
.single-post-content ul,
.single-post-content ol {
    margin: 1rem 0;
    padding-left: 2rem;
}

.post-content li,
.single-post-content li {
    margin-bottom: 0.5rem;
}

.post-content blockquote,
.single-post-content blockquote {
    margin: 1.5rem 0;
    padding: 1rem 1.5rem;
    background: var(--surface);
    border-left: 4px solid var(--primary-color);
    border-radius: var(--border-radius);
    font-style: italic;
    color: var(--text-light);
}

.post-content a,
.single-post-content a {
    color: var(--primary-color);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s ease;
}

.post-content a:hover,
.single-post-content a:hover {
    border-bottom-color: var(--primary-color);
}

.post-content code,
.single-post-content code {
    background: var(--surface);
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.875rem;
    color: var(--primary-color);
}

.post-content pre,
.single-post-content pre {
    background: var(--surface);
    padding: 1rem;
    border-radius: var(--border-radius);
    overflow-x: auto;
    margin: 1rem 0;
    border: 1px solid var(--border-color);
}

.post-content pre code,
.single-post-content pre code {
    background: none;
    padding: 0;
    color: var(--text-color);
}

.post-content strong,
.single-post-content strong {
    font-weight: 600;
    color: var(--text-color);
}

.post-content em,
.single-post-content em {
    font-style: italic;
}

/* Enhanced post cards to handle rich content preview */
.post-card p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-card p * {
    font-size: inherit;
    line-height: inherit;
    margin: 0;
}

/* Responsive adjustments for rich editor */
@media (max-width: 768px) {
    
    
    .modal-content {
        width: 95%;
        margin: 1rem;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 1rem;
    }
    
    .modal-footer {
        flex-direction: column;
    }
    
    .preview-post h1 {
        font-size: 2rem;
    }
}

/* Dark mode adjustments for Quill */
@media (prefers-color-scheme: dark) {
    
    
    
    
    
    
}

/* Admin Panel Styles */
.admin-header {
    text-align: center;
    margin-bottom: 2rem;
    padding: 0;
    border-bottom: 1px solid var(--border-color);
}

.admin-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.admin-header p {
    color: var(--text-light);
    font-size: 1.125rem;
}

.admin-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
    overflow-x: auto;
}

.admin-tab {
    background: none;
    border: none;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.admin-tab:hover {
    color: var(--primary-color);
    background-color: var(--surface);
}

.admin-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    background-color: var(--surface);
}
.admin-section {
    background: var(--background);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
}

.admin-tab-content {
    display: none;
}

.admin-tab-content.active {
    display: block;
}

.admin-section h3 {
    color: var(--text-color);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.admin-section h3 i {
    color: var(--primary-color);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    font-weight: 500;
}

.form-group input[type="checkbox"] {
    margin-right: 0.5rem;
    width: auto;
    transform: scale(1.2);
}

.form-group label input[type="checkbox"] {
    margin-bottom: 0;
}

/* Code editor styling */
.code-editor-info {
    background: var(--surface);
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-light);
    border-left: 4px solid var(--accent-color);
}

.code-editor-info i {
    color: var(--accent-color);
    margin-right: 0.5rem;
}

textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.875rem;
    background-color: var(--background);
    color: var(--text-color);
    resize: vertical;
    transition: border-color 0.3s ease;
}

textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Users table */
.users-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.users-table th,
.users-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.users-table th {
    background-color: var(--surface);
    font-weight: 600;
    color: var(--text-color);
}

.users-table td {
    color: var(--text-light);
}

.user-status {
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.user-status.active {
    background-color: var(--success-color);
    color: white;
}

.user-status.pending {
    background-color: var(--warning-color);
    color: white;
}

.user-status.inactive {
    background-color: var(--error-color);
    color: white;
}

.user-role {
    padding: 0.25rem 0.5rem;
    border-radius: var(--border-radius);
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    border: 1px solid;
}

.user-role.admin {
    color: var(--primary-color);
    border-color: var(--primary-color);
    background-color: rgba(99, 102, 241, 0.1);
}

.user-role.user {
    color: var(--text-muted);
    border-color: var(--text-muted);
    background-color: var(--surface);
}

.user-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-small {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
}

.btn-approve {
    background-color: var(--success-color);
    color: white;
}

.btn-approve:hover {
    background-color: var(--success-dark);
}

.btn-reject {
    background-color: var(--error-color);
    color: white;
}

.btn-reject:hover {
    background-color: var(--danger-color);
}

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

.btn-make-admin:hover {
    background-color: var(--primary-dark);
}

/* Info message styling */
.info-message {
    background-color: rgba(6, 182, 212, 0.1);
    border: 1px solid var(--accent-color);
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-bottom: 1rem;
    color: var(--accent-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-message i {
    font-size: 1.125rem;
}

/* Success message enhancement */
.success-message {
    background-color: rgba(16, 185, 129, 0.1);
    border: 1px solid var(--success-color);
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-top: 1rem;
    color: var(--success-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.success-message:before {
    content: "\f058";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
}

/* Enhanced error messages */
.error-message {
    background-color: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--error-color);
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-top: 1rem;
    color: var(--error-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;

}
/* Hide empty error messages */
.error-message:empty {
    display: none;
}
/* Loading states */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-tooltip);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--surface);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive admin panel */
@media (max-width: 768px) {
    .admin-tabs {
        flex-direction: column;
    }
    
    .admin-tab {
        text-align: center;
        border-bottom: none;
        border-right: 3px solid transparent;
    }
    
    .admin-tab.active {
        border-right-color: var(--primary-color);
        border-bottom: none;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .users-table {
        font-size: 0.875rem;
    }
    
    .users-table th,
    .users-table td {
        padding: 0.5rem;
    }
    
    .user-actions {
        flex-direction: column;
    }
    
    
}

/* Dark mode admin panel */
@media (prefers-color-scheme: dark) {
    .users-table th {
        background-color: var(--surface);
    }
    
    .code-editor-info {
        background-color: var(--surface);
    }
    
    textarea {
        background-color: var(--background);
        color: var(--text-color);
    }
}

/* Enhanced navigation for admin */
.nav-link.admin-link {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 600;
}

/* Notification badges */
.nav-link .badge {
    background-color: var(--error-color);
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 0.7rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 0.5rem;
    position: relative;
    top: -2px;
}

/* Profile and Password Change Styles */
.profile-card {
    max-width: 1100px;
    margin: 0.5rem auto;
    background: var(--background);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 2.5rem;
    border: 1px solid var(--border-color);
}

.profile-card h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text-color);
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.profile-card h2 i {
    color: var(--primary-color);
}

.profile-info {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.info-section h3 {
    color: var(--text-color);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.info-item label {
    font-weight: 500;
    color: var(--text-light);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-item span {
    color: var(--text-color);
    font-size: 1rem;
    padding: 0.5rem 0;
}

.password-section {
    background: var(--surface);
    padding: 2rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.password-section h3 {
    color: var(--text-color);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.password-section h3 i {
    color: var(--accent-color);
}

.password-section .form-group {
    margin-bottom: 1.5rem;
}

.password-section input[type="password"] {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: var(--background);
    color: var(--text-color);
}

.password-section input[type="password"]:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.1);
}

.password-strength {
    margin-top: 0.5rem;
    font-size: 0.875rem;
}

.password-strength.weak {
    color: var(--error-color);
}

.password-strength.medium {
    color: var(--warning-color);
}

.password-strength.strong {
    color: var(--success-color);
}

/* Enhanced Users Table for Password Reset */
.user-actions .btn-reset-password {
    background-color: var(--warning-color);
    color: white;
}

.user-actions .btn-reset-password:hover {
    background-color: var(--warning-dark);
}

/* Password Reset Modal Specific Styles */
#password-reset-modal .modal-content {
    max-width: 500px;
}

#password-reset-modal .form-group label {
    margin-bottom: 0.5rem;
}

#password-reset-modal input[type="password"] {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    background-color: var(--background);
    color: var(--text-color);
    transition: border-color 0.3s ease;
}

#password-reset-modal input[type="password"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Profile navigation link styling */
.nav-link.profile-link {
    color: var(--accent-color);
    font-weight: 500;
}

.nav-link.profile-link:hover {
    opacity: 0.8;
}

/* Enhanced button styles for password actions */
.btn-change-password {
    background: linear-gradient(135deg, var(--accent-color), var(--info-color));
    color: white;
    transition: all 0.3s ease;
}

.btn-change-password:hover {
    background: linear-gradient(135deg, var(--info-color), var(--accent-color));
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

/* Password requirements info */
.password-requirements {
    background: rgba(6, 182, 212, 0.1);
    border: 1px solid var(--accent-color);
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: var(--accent-color);
}

.password-requirements ul {
    margin: 0.5rem 0 0 1rem;
    padding: 0;
}

.password-requirements li {
    margin: 0.25rem 0;
}

/* Success animations for password changes */
@keyframes passwordSuccess {
    0% {
        transform: scale(1);
        background-color: var(--success-color);
    }
    50% {
        transform: scale(1.05);
        background-color: var(--success-dark);
    }
    100% {
        transform: scale(1);
        background-color: var(--success-color);
    }
}

.password-success-animation {
    animation: passwordSuccess 0.6s ease-out;
}

/* Enhanced error styling for password fields */
.password-section .error-message {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius);
    background-color: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--error-color);
    color: var(--error-color);
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.password-section .success-message {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius);
    background-color: rgba(16, 185, 129, 0.1);
    border: 1px solid var(--success-color);
    color: var(--success-color);
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Responsive profile design */
@media (max-width: 768px) {
    .profile-card {
        margin: 1rem;
        padding: 1.5rem;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .password-section {
        padding: 1.5rem;
    }

    .info-item {
        padding: 0.75rem 0;
        border-bottom: 1px solid var(--border-color);
    }

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

/* Dark mode adjustments */
@media (prefers-color-scheme: dark) {
    .profile-card {
        background: var(--background);
        border-color: var(--border-color);
    }

    .password-section {
        background: var(--surface);
        border-color: var(--border-color);
    }

    .password-section input[type="password"] {
        background-color: var(--background);
        color: var(--text-color);
        border-color: var(--border-color);
    }
}

/* Loading state for password operations */
.password-loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.password-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--primary-color);
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Enhanced user role display in profile */
.info-item .user-role {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.info-item .user-role.admin {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
}

.info-item .user-role.user {
    background-color: var(--surface);
    color: var(--text-muted);
    border: 1px solid var(--border-color);
}
/* Handle WordPress-style classes in blog content */
.has-medium-font-size {
    font-size: 1.125rem;
    line-height: 1.6;
}

.wp-block-separator {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 2rem 0;
    clear: both;
}

.wp-block-image {
    margin: 1.5rem 0;
    text-align: center;
}

.wp-block-image img {
    max-width: 100%;
    height: auto;
}

.wp-block-list {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.wp-block-list li {
    margin-bottom: 0.5rem;
}


/* Fix any excessive top spacing */
.single-post {
    padding-top: 0;
    margin-top: 1rem !important;
}

/* Rich Editor Styles */
.editor-info-banner {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.editor-description {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: var(--background);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    border-left: 4px solid var(--primary-color);
}

.editor-mode-toggle {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 0.5rem;
    background: var(--surface);
    border-radius: var(--border-radius);
}

.toggle-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.toggle-option:hover {
    background: var(--background);
}

.toggle-option input[type="radio"] {
    margin: 0;
}

.rich-editor-container {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.code-editor-container {
    margin-top: 1rem;
}

.code-editor-container textarea {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9rem;
    line-height: 1.4;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1rem;
    resize: vertical;
    min-height: 150px;
}

.tinymce-editor {
    min-height: 200px;
}

/* TinyMCE Editor Customizations */
.tox .tox-toolbar,
.tox .tox-toolbar__primary {
    background: var(--surface) !important;
    border-bottom: 1px solid var(--border-color) !important;
}

.tox .tox-edit-area {
    border: none !important;
}

.tox .tox-edit-area__iframe {
    background: var(--background) !important;
}

.tox-tinymce {
    border: 1px solid var(--border-color) !important;
    border-radius: var(--border-radius) !important;
}

.tox .tox-menubar {
    background: var(--surface) !important;
    border-bottom: 1px solid var(--border-color) !important;
}

.tox .tox-statusbar {
    background: var(--surface) !important;
    border-top: 1px solid var(--border-color) !important;
}

/* Form Actions for Admin */
.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

/* Admin Section Enhancements */

.admin-section h3 {
    margin-top: 0;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

/* Enhanced Form Styling */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-group label i {
    margin-right: 0.5rem;
    color: var(--primary-color);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .editor-mode-toggle {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* Enhanced Button Styling */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}
}

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

/* Loading States */
.editor-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
    background: var(--background);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
}

.editor-loading::before {
    content: "";
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
/* SQLite Editor Styles */
.sqlite-editor-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.quick-actions {
    background: var(--surface);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.quick-actions h4 {
    margin: 0 0 1rem 0;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quick-action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.sql-editor-section {
    background: var(--background);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.sql-editor-section label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sql-editor-section textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9rem;
    line-height: 1.4;
    background-color: var(--background);
    color: var(--text-color);
    resize: vertical;
    transition: border-color 0.3s ease;
}

.sql-editor-section textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.sql-editor-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.sql-results-section,
.sql-history-section {
    background: var(--background);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.sql-results-section h4,
.sql-history-section h4 {
    margin: 0 0 1rem 0;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.query-info {
    margin-bottom: 1rem;
}

.query-success {
    background-color: rgba(16, 185, 129, 0.1);
    border: 1px solid var(--success-color);
    border-radius: var(--border-radius);
    padding: 1rem;
    color: var(--success-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.query-error {
    background-color: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--error-color);
    border-radius: var(--border-radius);
    padding: 1rem;
    color: var(--error-color);
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.results-table-container {
    max-height: 400px;
    overflow: auto;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
    background: var(--background);
}

.results-table th {
    background-color: var(--surface);
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-color);
    border-bottom: 2px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 10;
}

.results-table td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-light);
    vertical-align: top;
}

.results-table tr:nth-child(even) {
    background-color: var(--surface);
}

.results-table tr:hover {
    background-color: rgba(99, 102, 241, 0.05);
}

.null-value {
    color: var(--text-muted);
    font-style: italic;
    opacity: 0.7;
}

.long-text {
    cursor: help;
}

.results-summary {
    padding: 0.5rem 1rem;
    background: var(--surface);
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.8rem;
}

.no-results {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    font-style: italic;
}

.no-results.error {
    color: var(--error-color);
}

/* Query History Styles */
.query-history {
    max-height: 300px;
    overflow-y: auto;
}

.history-item {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    padding: 1rem;
}

.history-item.error {
    border-color: var(--error-color);
    background: rgba(239, 68, 68, 0.05);
}

.history-item.success {
    border-color: var(--success-color);
    background: rgba(16, 185, 129, 0.05);
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.history-status {
    color: var(--success-color);
    font-size: 0.875rem;
}

.history-item.error .history-status {
    color: var(--error-color);
}

.history-time {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.history-query {
    background: var(--background);
    padding: 0.5rem;
    border-radius: 3px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.8rem;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    border: 1px solid var(--border-color);
}

.history-success {
    color: var(--success-color);
    font-size: 0.8rem;
    font-weight: 500;
}

.history-error {
    color: var(--error-color);
    font-size: 0.8rem;
    font-weight: 500;
}

.no-history {
    text-align: center;
    padding: 1rem;
    color: var(--text-muted);
    font-style: italic;
}

/* Enhanced button styling for SQLite editor */
.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Warning banner for SQLite editor */
.editor-info-banner {
    background: linear-gradient(135deg, var(--warning-color), #f97316);
    color: white;
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Responsive design for SQLite editor */
@media (max-width: 768px) {
    .quick-action-buttons {
        flex-direction: column;
    }
    
    .sql-editor-actions {
        flex-direction: column;
    }
    
    .results-table-container {
        overflow-x: auto;
    }
    
    .results-table {
        min-width: 600px;
    }
    
    .history-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

/* Dark mode adjustments for SQLite editor */
@media (prefers-color-scheme: dark) {
    .sql-editor-section textarea {
        background-color: var(--background);
        color: var(--text-color);
        border-color: var(--border-color);
    }
    
    .results-table {
        background: var(--background);
    }
    
    .results-table th {
        background-color: var(--surface);
    }
}

/* Simple SQLite Editor container */
.sqlite-editor-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sqlite-editor-container textarea {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9rem;
}

    font-weight: 600;
    font-size: 0.9rem;
}

.admin-posts-table tbody tr:hover {
    background: var(--hover-bg);
}

.admin-posts-table .post-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.post-author-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--accent-color);
    color: white;
    border-radius: 1rem;
    font-size: 0.85rem;
    font-weight: 500;
}

.posts-stats {
    background: var(--surface);
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
}

.posts-stats h4 {
    margin: 0 0 0.5rem 0;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.posts-stats p {
    margin: 0;
    color: var(--text-secondary);
}

/* Responsive design for admin posts table */
    background: var(--surface);
    color: var(--text-color);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.admin-posts-table th,
.admin-posts-table td {
    color: var(--text-color);
}

.admin-posts-thead {
    background: var(--background);
}

.admin-post-row.even { background: var(--surface); }
.admin-post-row.odd  { background: var(--background); }
.admin-post-row.archived { opacity: 0.8; }

/* Ensure preview text and metadata are readable */
.admin-posts-table td strong {
    color: var(--text-color);
}

/* Dark mode adjustments for admin posts table */
@media (prefers-color-scheme: dark) {
    .admin-posts-table th,
    .admin-posts-table td {
        color: var(--text-light);
    }
    
    .admin-posts-table td strong {
        color: var(--text-color);
    }
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .admin-posts-table th,
    .admin-posts-table td {
        font-size: 0.95rem;
        padding: 8px;
    }
}

/* Enhanced admin component styling for consistent dark mode support */

/* Admin forms and inputs */
.admin-section .form-group input,
.admin-section .form-group textarea,
.admin-section .form-group select {
    background-color: var(--background);
    color: var(--text-color);
    border-color: var(--border-color);
}

.admin-section .form-group input:focus,
.admin-section .form-group textarea:focus,
.admin-section .form-group select:focus {
    border-color: var(--primary-color);
    background-color: var(--background);
}

.admin-section .form-group label {
    color: var(--text-color);
}

/* Admin buttons with consistent styling */
.admin-section .btn,
.admin-section button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    transition: background-color 0.3s ease;
}

.admin-section .btn:hover,
.admin-section button:hover:not(:disabled) {
    background-color: var(--primary-dark);
}

/* Success/error message styling */
.admin-section .success-message,
.admin-section .error-message {
    padding: 1rem;
    border-radius: var(--border-radius);
    margin: 1rem 0;
}

.admin-section .success-message {
    background-color: rgba(16, 185, 129, 0.1);
    border: 1px solid var(--success-color);
    color: var(--success-color);
}

.admin-section .error-message {
    background-color: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--error-color);
    color: var(--error-color);
}

/* Admin stats boxes */
.users-stats,
.admin-stats {
    background-color: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-bottom: 1rem;
}

.users-stats h4,
.admin-stats h4 {
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.users-stats p,
.admin-stats p {
    color: var(--text-light);
    margin: 0;
}

/* Enhanced users table styling */
.users-table {
    background-color: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.users-table th {
    background-color: var(--background);
    color: var(--text-color);
}

.users-table td {
    color: var(--text-color);
    background-color: var(--surface);
}

.users-table tr:nth-child(even) td {
    background-color: var(--background);
}

.users-table tr:hover td {
    background-color: var(--border-color);
}

/* User status badges */
.user-status.active {
    background-color: rgba(16, 185, 129, 0.2);
    color: var(--success-color);
}

.user-status.pending {
    background-color: rgba(245, 158, 11, 0.2);
    color: var(--warning-color);
}

.user-status.inactive {
    background-color: rgba(107, 114, 126, 0.2);
    color: var(--text-muted);
}

/* User role badges */
.user-role.admin {
    background-color: rgba(99, 102, 241, 0.2);
    color: var(--primary-color);
    font-weight: 600;
}

.user-role.user {
    background-color: rgba(107, 114, 126, 0.2);
    color: var(--text-light);
}

/* Action buttons in tables */
.user-actions,
.post-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.user-actions button,
.post-actions button {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    border-radius: var(--border-radius);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Specific button colors for actions */
.btn-approve { background-color: var(--success-color); color: white; }
.btn-reject { background-color: var(--error-color); color: white; }
.btn-make-admin { background-color: var(--primary-color); color: white; }
.btn-reset-password { background-color: var(--accent-color); color: white; }
.btn-edit { background-color: var(--warning-color); color: white; }
.btn-delete { background-color: var(--error-color); color: white; }

.btn-approve:hover { background-color: var(--success-dark); }
.btn-reject:hover { background-color: var(--danger-color); }
.btn-make-admin:hover { background-color: var(--primary-dark); }
.btn-reset-password:hover { background-color: var(--info-color); }
.btn-edit:hover { background-color: var(--warning-dark); }
.btn-delete:hover { background-color: var(--danger-color); }

/* Dark mode specific adjustments */
@media (prefers-color-scheme: dark) {
    .admin-section .form-group input,
    .admin-section .form-group textarea,
    .admin-section .form-group select {
        background-color: var(--surface);
        color: var(--text-light);
        border-color: var(--border-color);
    }
    
    .admin-section .form-group input:focus,
    .admin-section .form-group textarea:focus,
    .admin-section .form-group select:focus {
        background-color: var(--background);
        color: var(--text-color);
    }
    
    .users-table td,
    .admin-posts-table td {
        color: var(--text-light);
    }
    
    .users-table td strong,
    .admin-posts-table td strong {
        color: var(--text-color);
    }
}

/* Modal dark mode styling */
@media (prefers-color-scheme: dark) {
    .modal-content {
        background-color: var(--surface);
        border: 1px solid var(--border-color);
    }
    
    .modal-header {
        background-color: var(--background);
        border-bottom-color: var(--border-color);
    }
    
    .modal-header h2 {
        color: var(--text-color);
    }
    
    .modal-body {
        background-color: var(--surface);
    }
    
    .modal-footer {
        background-color: var(--background);
        border-top-color: var(--border-color);
    }
    
    .modal-close {
        color: var(--text-muted);
    }
    
    .modal-close:hover {
        color: var(--text-color);
    }
}

/* Quill Image Resize Module Styles */
.ql-editor img {
    max-width: 100%;
    height: auto;
}

.ql-editor .ql-image-resize-module {
    position: relative;
}

.ql-editor .image-resize-handle {
    position: absolute;
    background: var(--primary-color);
    border: 1px solid white;
    width: 8px;
    height: 8px;
    cursor: nw-resize;
}

.ql-editor .image-resize-handle-nw {
    top: -4px;
    left: -4px;
    cursor: nw-resize;
}

.ql-editor .image-resize-handle-ne {
    top: -4px;
    right: -4px;
    cursor: ne-resize;
}

.ql-editor .image-resize-handle-sw {
    bottom: -4px;
    left: -4px;
    cursor: sw-resize;
}

.ql-editor .image-resize-handle-se {
    bottom: -4px;
    right: -4px;
    cursor: se-resize;
}

.ql-editor .image-resize-display {
    position: absolute;
    top: -25px;
    left: 0;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
    pointer-events: none;
}

/* File upload button in Quill toolbar */
.ql-toolbar .ql-file {
    position: relative;
}

.ql-toolbar .ql-file:before {
    content: "📎";
    font-size: 14px;
    line-height: 1;
}

.ql-toolbar .ql-file:hover {
    color: var(--primary-color);
}

/* File download links styling */
.ql-editor a[href*="/uploads/files/"] {
    background-color: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 8px 12px;
    text-decoration: none;
    display: inline-block;
    margin: 4px 0;
    transition: background-color 0.2s;
}

.ql-editor a[href*="/uploads/files/"]:hover {
    background-color: var(--primary-color);
    color: white;
}

/* Enhanced file download styling */
.ql-editor a[href*="/uploads/files/"]:after {
    content: " ⬇";
    font-size: 12px;
    opacity: 0.7;
}

/* Specific styling for JSON/YAML download links */
.ql-editor a[href$=".json"]:before,
.ql-editor a[href$=".yaml"]:before,
.ql-editor a[href$=".yml"]:before {
    content: "{}";
    font-weight: bold;
    margin-right: 4px;
    color: #007bff;
}

.ql-editor a[href$=".json"]:before {
    content: "{ }";
}

.ql-editor a[href$=".yaml"]:before,
.ql-editor a[href$=".yml"]:before {
    content: "≡";
}

/* EasyMDE Markdown Editor Styling */
.EasyMDEContainer {
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    background: var(--background);
}

.EasyMDEContainer .CodeMirror {
    border: none;
    font-family: 'Fira Code', 'Monaco', 'Cascadia Code', 'Roboto Mono', monospace;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-color);
    background: var(--background);
    border-radius: var(--border-radius);
    min-height: 300px;
}

.EasyMDEContainer .CodeMirror-focused {
    border: none;
    outline: none;
    box-shadow: 0 0 0 3px rgb(6 182 212 / 0.1);
}

.EasyMDEContainer .CodeMirror-cursor {
    border-left: 2px solid var(--primary-color);
}

.EasyMDEContainer .CodeMirror-selected {
    background: rgba(6, 182, 212, 0.1);
}

.EasyMDEContainer .editor-toolbar {
    border: none;
    border-bottom: 1px solid var(--border-color);
    background: var(--surface);
    padding: 8px;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.EasyMDEContainer .editor-toolbar.fullscreen {
    background: var(--surface);
}

.EasyMDEContainer .editor-toolbar a {
    border: none;
    border-radius: 4px;
    color: var(--text-color);
    font-size: 14px;
    width: 30px;
    height: 30px;
    margin: 0 2px;
    transition: all 0.2s ease;
}

.EasyMDEContainer .editor-toolbar a:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.EasyMDEContainer .editor-toolbar a.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.EasyMDEContainer .editor-toolbar i.separator {
    border-left: 1px solid var(--border-color);
    margin: 0 6px;
}

/* Preview styling */
.EasyMDEContainer .editor-preview,
.EasyMDEContainer .editor-preview-side {
    background: var(--background);
    font-family: var(--font-family);
    color: var(--text-color);
    padding: 16px;
    border-left: 1px solid var(--border-color);
}

.EasyMDEContainer .editor-preview h1,
.EasyMDEContainer .editor-preview h2,
.EasyMDEContainer .editor-preview h3,
.EasyMDEContainer .editor-preview h4,
.EasyMDEContainer .editor-preview h5,
.EasyMDEContainer .editor-preview h6 {
    color: var(--text-color);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.3em;
    margin-bottom: 1em;
}

.EasyMDEContainer .editor-preview code {
    background: var(--surface);
    color: var(--primary-color);
    padding: 2px 4px;
    border-radius: 3px;
    font-family: 'Fira Code', monospace;
}

.EasyMDEContainer .editor-preview pre {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 16px;
    overflow-x: auto;
}

.EasyMDEContainer .editor-preview pre code {
    background: none;
    padding: 0;
    border: none;
    border-radius: 0;
}

.EasyMDEContainer .editor-preview blockquote {
    border-left: 4px solid var(--primary-color);
    margin: 0 0 16px 0;
    padding-left: 16px;
    color: var(--text-light);
    font-style: italic;
}

.EasyMDEContainer .editor-preview table {
    border-collapse: collapse;
    width: 100%;
    margin: 16px 0;
}

.EasyMDEContainer .editor-preview th,
.EasyMDEContainer .editor-preview td {
    border: 1px solid var(--border-color);
    padding: 8px 12px;
    text-align: left;
}

.EasyMDEContainer .editor-preview th {
    background: var(--surface);
    font-weight: 600;
}

/* Status bar */
.EasyMDEContainer .editor-statusbar {
    border-top: 1px solid var(--border-color);
    background: var(--surface);
    color: var(--text-light);
    font-size: 12px;
    padding: 8px;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
}

/* Fullscreen mode */
.EasyMDEContainer.fullscreen {
    z-index: 9999;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--background);
}

.EasyMDEContainer.fullscreen .CodeMirror {
    min-height: calc(100vh - 80px);
}

/* Syntax highlighting for code blocks in preview */
.EasyMDEContainer .editor-preview pre code.hljs {
    padding: 0;
    background: transparent;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .EasyMDEContainer .editor-toolbar a {
        width: 28px;
        height: 28px;
        font-size: 12px;
        margin: 0 1px;
    }
    
    .EasyMDEContainer .CodeMirror {
        font-size: 13px;
        min-height: 250px;
    }
    
    .EasyMDEContainer .editor-preview,
    .EasyMDEContainer .editor-preview-side {
        padding: 12px;
    }
}

/* Dark theme support (if needed) */
@media (prefers-color-scheme: dark) {
    .EasyMDEContainer .CodeMirror {
        background: #1a1a1a;
        color: #e0e0e0;
    }
    
    .EasyMDEContainer .editor-toolbar {
        background: #2d2d2d;
    }
    
    .EasyMDEContainer .editor-preview,
    .EasyMDEContainer .editor-preview-side {
        background: #1a1a1a;
        color: #e0e0e0;
    }
}

/* Custom button styling for image and file upload */
.EasyMDEContainer .editor-toolbar a.fa-image:before {
    content: "\f03e";
}

.EasyMDEContainer .editor-toolbar a.fa-paperclip:before {
    content: "\f0c6";
}

/* Guide modal styling */
.editor-guide {
    font-family: var(--font-family);
}

.editor-guide h1, .editor-guide h2, .editor-guide h3 {
    color: var(--text-color);
}

.editor-guide code {
    background: var(--surface);
    color: var(--primary-color);
    padding: 2px 4px;
    border-radius: 3px;
}

/* Header Logo Appearance Settings Styles */
.radio-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.5rem 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #f9f9f9;
    transition: all 0.3s ease;
}

.radio-option:hover {
    background: #e9e9e9;
    border-color: var(--primary-color);
}

.radio-option input[type="radio"] {
    margin: 0;
}

.radio-option input[type="radio"]:checked + span {
    color: var(--primary-color);
    font-weight: 500;
}

.logo-preview-container {
    background: #f8f9fa;
}

#site-header-logo {
    max-height: 60px;
    max-width: 100%;
    height: auto;
    width: auto;
}

/* Clickable banner styles */
.nav-brand {
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.nav-brand:hover h1 {
    opacity: 0.8;
}
