/* ============================================================================
   OnigiriForum - Complete Stylesheet
   Inspired by OnigiriJS Documentation & Discourse Design
   ============================================================================ */

/* ============================================================================
   RESET & BASE
   ============================================================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

/* Theme transition styles */
html.theme-transitioning * {
    transition: background-color 300ms ease-in-out,
                color 300ms ease-in-out,
                border-color 300ms ease-in-out !important;
}

/* ============================================================================
   CSS VARIABLES
   ============================================================================ */

:root {
    /* Background Colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-tertiary: #f3f4f6;
    --bg-gradient: linear-gradient(135deg, #fff5e6 0%, #ffe5cc 100%);
    
    /* Text Colors */
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    
    /* Accent Colors */
    --accent-color: #ff6b6b;
    --accent-hover: #ee5a24;
    --accent-gradient: linear-gradient(135deg, #ff6b6b, #ee5a24);
    
    /* Border & Shadow */
    --border-color: #e5e7eb;
    --border-accent: 2px solid var(--accent-color);
    --shadow-soft: 0 4px 20px rgba(0,0,0,0.08);
    --shadow-accent: 0 6px 20px rgba(238,90,36,0.3);
    
    /* Spacing */
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
    
    /* Status Colors */
    --success: #48bb78;
    --danger: #f56565;
    --warning: #ed8936;
    --info: #4299e1;
}

/* Dark Theme */
[data-theme="dark"] {
    --bg-primary: #111827;
    --bg-secondary: #1f2937;
    --bg-tertiary: #374151;
    --bg-gradient: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    
    --text-primary: #f9fafb;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    
    --accent-color: #ff8f8f;
    --accent-hover: #ff6b6b;
    
    --border-color: #374151;
    --shadow-soft: 0 4px 20px rgba(0,0,0,0.3);
}

/* ============================================================================
   BODY
   ============================================================================ */

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-gradient);
    min-height: 100vh;
    transition: background-color 0.3s, color 0.3s;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================================================
   HEADER
   ============================================================================ */

.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-soft);
    transition: all 0.3s;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px;
    gap: 1rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1.25rem;
    transition: all 0.2s;
}

.logo:hover {
    color: var(--accent-color);
    transform: scale(1.02);
}

.nav {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* User Menu */
.user-menu {
    position: relative;
}

.user-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--text-primary);
    transition: all 0.2s;
    font-family: inherit;
}

.user-toggle:hover {
    border-color: var(--accent-color);
    box-shadow: var(--shadow-soft);
}

.avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--accent-gradient);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.875rem;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    min-width: 200px;
    display: none;
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    animation: slideDown 0.2s ease-out;
}

.dropdown-menu.show {
    display: block;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-menu a {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: background 0.2s;
    border-bottom: 1px solid var(--border-color);
}

.dropdown-menu a:last-child {
    border-bottom: none;
}

.dropdown-menu a:hover {
    background: var(--bg-secondary);
    color: var(--accent-color);
}

/* Theme Toggle */
.theme-toggle {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover {
    border-color: var(--accent-color);
    transform: rotate(15deg);
    box-shadow: var(--shadow-soft);
}

.theme-toggle:active {
    transform: rotate(180deg);
}

/* Buttons */
.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s;
    font-family: inherit;
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    box-shadow: var(--shadow-accent);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(238,90,36,0.4);
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-tertiary);
    border-color: var(--accent-color);
}

.btn-block {
    width: 100%;
    display: block;
}

/* ============================================================================
   MAIN CONTENT
   ============================================================================ */

.main {
    padding: 2rem 0;
    min-height: calc(100vh - 200px);
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.page-header h1 {
    color: var(--text-primary);
    font-size: 2rem;
}

/* ============================================================================
   BREADCRUMB
   ============================================================================ */

.breadcrumb {
    margin-bottom: 1.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.breadcrumb a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

/* ============================================================================
   CATEGORIES
   ============================================================================ */

.categories {
    display: grid;
    gap: 1rem;
}

.category-card {
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all 0.3s;
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-soft);
    border-color: var(--accent-color);
}

.category-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    text-decoration: none;
    color: var(--text-primary);
}

.category-info h3 {
    color: var(--accent-color);
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.category-info h3::before {
    content: '🍙';
    font-size: 1.5rem;
}

.category-info p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.category-stats {
    display: flex;
    gap: 2rem;
}

.stat {
    text-align: center;
    min-width: 60px;
}

.stat-number {
    display: block;
    font-size: 1.75rem;
    font-weight: bold;
    color: var(--accent-color);
    line-height: 1;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.25rem;
}

/* ============================================================================
   TOPICS
   ============================================================================ */

.topic-list {
    display: grid;
    gap: 0.75rem;
}

.topic-item {
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 1.25rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.2s;
}

.topic-item:hover {
    background: var(--bg-secondary);
    transform: translateX(6px);
    border-left: 4px solid var(--accent-color);
    padding-left: calc(1.5rem - 2px);
}

.topic-info {
    flex: 1;
    min-width: 0;
}

.topic-title {
    font-weight: 600;
    color: var(--accent-color);
    margin-bottom: 0.25rem;
    font-size: 1.1rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.topic-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.topic-meta strong {
    color: var(--text-secondary);
}

.topic-stats {
    display: flex;
    gap: 1.5rem;
    text-align: center;
}

/* ============================================================================
   POSTS
   ============================================================================ */

.topic-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 3px solid var(--bg-tertiary);
}

.topic-header h1 {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.topic-stats-inline {
    margin-top: 0.75rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    display: flex;
    gap: 1.5rem;
}

.posts-container {
    display: grid;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.post {
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.5rem;
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 1.5rem;
    transition: all 0.2s;
}

.post:hover {
    box-shadow: var(--shadow-soft);
    border-color: var(--accent-color);
}

.post-sidebar {
    text-align: center;
}

.post-author-avatar {
    margin-bottom: 0.75rem;
}

.avatar-large {
    width: 80px;
    height: 80px;
    font-size: 2rem;
    margin: 0 auto;
}

.post-author-name {
    font-weight: 600;
    color: var(--accent-color);
    text-decoration: none;
    display: block;
    margin-bottom: 0.25rem;
    transition: color 0.2s;
}

.post-author-name:hover {
    color: var(--accent-hover);
}

.user-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-top: 0.25rem;
}

.badge-admin {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #92400e;
}

.badge-mod {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    color: #1e40af;
}

.post-author-stats {
    margin-top: 0.75rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.post-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.85rem;
    color: var(--text-muted);
}

.post-number {
    font-weight: 600;
    color: var(--accent-color);
}

.post-edited {
    font-style: italic;
    font-size: 0.8rem;
}

.post-content {
    line-height: 1.8;
    margin-bottom: 1rem;
    word-wrap: break-word;
}

.post-content code {
    background: var(--bg-tertiary);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
    font-size: 0.9em;
    color: var(--accent-color);
}

.post-content a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.2s;
}

.post-content a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

.post-actions {
    display: flex;
    gap: 1rem;
}

.btn-text {
    background: none;
    border: none;
    color: var(--accent-color);
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    font-size: 0.85rem;
    transition: all 0.2s;
    font-family: inherit;
}

.btn-text:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

.delete-post {
    color: var(--danger);
}

/* Reply Form */
.reply-form-container {
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.5rem;
}

.reply-form-container h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

/* ============================================================================
   FORMS
   ============================================================================ */

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-hint {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: normal;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    cursor: pointer;
}

/* ============================================================================
   AUTH PAGES
   ============================================================================ */

.auth-container {
    min-height: calc(100vh - 300px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
}

.auth-box {
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    padding: 2.5rem;
    max-width: 450px;
    width: 100%;
    box-shadow: var(--shadow-soft);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header h1 {
    color: var(--accent-color);
    margin-bottom: 0.5rem;
    font-size: 1.75rem;
}

.auth-header p {
    color: var(--text-muted);
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
}

.auth-footer a {
    color: var(--accent-color);
    font-weight: 600;
    text-decoration: none;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* ============================================================================
   PROFILE PAGE
   ============================================================================ */

.profile-container {
    max-width: 900px;
    margin: 0 auto;
}

.profile-header {
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    padding: 2rem;
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    margin-bottom: 2rem;
}

.profile-avatar-large img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--accent-color);
}

.profile-info {
    flex: 1;
}

.profile-info h1 {
    margin-bottom: 0.5rem;
    color: var(--accent-color);
}

.profile-bio {
    margin: 1rem 0;
    line-height: 1.6;
    color: var(--text-primary);
}

.profile-meta {
    display: flex;
    gap: 1.5rem;
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 1.5rem;
    text-align: center;
    transition: all 0.2s;
}

.stat-card:hover {
    border-color: var(--accent-color);
    box-shadow: var(--shadow-soft);
}

.stat-card .stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

.stat-card .stat-label {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.profile-content h2 {
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-size: 1.5rem;
}

.user-posts-list {
    display: grid;
    gap: 1rem;
}

.user-post-item {
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 1.5rem;
    transition: all 0.2s;
}

.user-post-item:hover {
    border-color: var(--accent-color);
    box-shadow: var(--shadow-soft);
}

.user-post-header {
    margin-bottom: 0.75rem;
}

.post-topic-title {
    font-weight: 600;
    color: var(--accent-color);
    text-decoration: none;
    font-size: 1.1rem;
}

.post-topic-title:hover {
    text-decoration: underline;
}

.post-category {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-left: 0.5rem;
}

.post-category a {
    color: var(--accent-color);
    text-decoration: none;
}

.user-post-preview {
    line-height: 1.6;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.user-post-footer {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ============================================================================
   MODAL
   ============================================================================ */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(2px);
}

.modal-content {
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-soft);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 2px solid var(--border-color);
}

.modal-header h2 {
    color: var(--text-primary);
    font-size: 1.5rem;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: color 0.2s;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.modal-close:hover {
    color: var(--danger);
    background: var(--bg-secondary);
}

.modal-content form {
    padding: 1.5rem;
}

/* ============================================================================
   FOOTER
   ============================================================================ */

.footer {
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    padding: 2rem 0;
    text-align: center;
    color: var(--text-muted);
    margin-top: 3rem;
}

/* ============================================================================
   ALERTS
   ============================================================================ */

.alert {
    padding: 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
    border: 2px solid;
}

.alert-success {
    background: #c6f6d5;
    border-color: var(--success);
    color: #22543d;
}

.alert-error {
    background: #fed7d7;
    border-color: var(--danger);
    color: #742a2a;
}

.alert-info {
    background: #dbeafe;
    border-color: var(--info);
    color: #1e40af;
}

[data-theme="dark"] .alert-success {
    background: rgba(72, 187, 120, 0.15);
    color: #86efac;
}

[data-theme="dark"] .alert-error {
    background: rgba(245, 101, 101, 0.15);
    color: #fca5a5;
}

[data-theme="dark"] .alert-info {
    background: rgba(66, 153, 225, 0.15);
    color: #93c5fd;
}

/* ============================================================================
   BADGES
   ============================================================================ */

.badge {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-right: 0.5rem;
}

.badge-pinned {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #92400e;
}

.badge-locked {
    background: linear-gradient(135deg, #fed7d7, #fca5a5);
    color: #991b1b;
}

/* ============================================================================
   EMPTY STATE
   ============================================================================ */

.empty-state {
    background: var(--bg-primary);
    border: 2px dashed var(--border-color);
    border-radius: var(--radius);
    padding: 3rem;
    text-align: center;
    color: var(--text-muted);
}

.empty-state::before {
    content: '🍙';
    display: block;
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* ============================================================================
   LOADING
   ============================================================================ */

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--border-color);
    border-radius: 50%;
    border-top-color: var(--accent-color);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================================================
   RESPONSIVE DESIGN
   ============================================================================ */

@media (max-width: 768px) {
    .header-content {
        flex-wrap: wrap;
    }
    
    .category-link {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .topic-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .topic-item:hover {
        padding-left: 1.5rem;
        border-left: 2px solid var(--accent-color);
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .post {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .post-sidebar {
        display: flex;
        align-items: center;
        gap: 1rem;
        text-align: left;
    }
    
    .avatar-large {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
        margin: 0;
    }
    
    .profile-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .profile-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .main {
        padding: 1rem 0;
    }
}

/* ============================================================================
   UTILITY CLASSES
   ============================================================================ */

.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }

/* ============================================================================
   ADMIN PANEL SPECIFIC STYLES
   ============================================================================ */

.admin-header {
    background: var(--accent-gradient);
    color: white;
    padding: 2rem;
    border-radius: var(--radius);
    margin-bottom: 2rem;
    box-shadow: var(--shadow-accent);
}

.admin-header h1 {
    color: white;
    margin-bottom: 0.5rem;
    font-size: 2rem;
}

.admin-header p {
    color: rgba(255, 255, 255, 0.95);
    font-size: 1.1rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s;
}

.stat-card:hover {
    border-color: var(--accent-color);
    box-shadow: var(--shadow-soft);
    transform: translateY(-4px);
}

.stat-card .number {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--accent-color);
    display: block;
    margin-bottom: 0.5rem;
    line-height: 1;
}

.stat-card .label {
    color: var(--text-muted);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.admin-section {
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    padding: 2rem;
    margin-bottom: 2rem;
}

.admin-section h2 {
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.admin-section h2::before {
    content: '🍙';
    font-size: 1.5rem;
}

.category-list {
    display: grid;
    gap: 1rem;
}

.category-item {
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s;
}

.category-item:hover {
    border-color: var(--accent-color);
    box-shadow: var(--shadow-soft);
}

.category-item-info {
    flex: 1;
    min-width: 0;
}

.category-item-info h3 {
    margin-bottom: 0.5rem;
    color: var(--accent-color);
    font-size: 1.1rem;
}

.category-item-info p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.category-item-info small {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.category-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

/* ============================================================================
   NOTIFICATION SYSTEM
   ============================================================================ */

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-soft);
    z-index: 10000;
    font-weight: 600;
    max-width: 400px;
    animation: slideInRight 0.3s ease-out;
}

.notification-success {
    background: var(--success);
    color: white;
    border-color: var(--success);
}

.notification-error {
    background: var(--danger);
    color: white;
    border-color: var(--danger);
}

.notification-info {
    background: var(--info);
    color: white;
    border-color: var(--info);
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

/* ============================================================================
   SCROLLBAR STYLING
   ============================================================================ */

::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb {
    background: var(--accent-color);
    border-radius: 6px;
    transition: background 0.2s;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-hover);
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--accent-color) var(--bg-tertiary);
}

/* ============================================================================
   TRANSITIONS & ANIMATIONS
   ============================================================================ */

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-up {
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================================================
   PRINT STYLES
   ============================================================================ */

@media print {
    .header,
    .sidebar,
    .footer,
    .post-actions,
    .theme-toggle,
    .user-menu,
    .btn {
        display: none !important;
    }
    
    .content {
        margin: 0;
        padding: 0;
        box-shadow: none;
    }
    
    .post {
        border: 1px solid #ddd;
        page-break-inside: avoid;
    }
}

/* ============================================================================
   ACCESSIBILITY
   ============================================================================ */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 3px solid var(--accent-color);
    outline-offset: 2px;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ============================================================================
   HIGH CONTRAST MODE
   ============================================================================ */

@media (prefers-contrast: high) {
    :root {
        --border-color: #000000;
        --text-primary: #000000;
        --bg-primary: #ffffff;
    }
    
    [data-theme="dark"] {
        --border-color: #ffffff;
        --text-primary: #ffffff;
        --bg-primary: #000000;
    }
}