@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Professional Light Blue Theme */
    --primary: #4DA8FF;
    --primary-hover: #2EA8FF;
    --primary-light: #69B9FF;
    --accent: #8CCBFF;
    --bg: #F8FAFB;
    --surface: #FFFFFF;
    --border: #E1E8ED;
    --text-primary: #0B1C33;
    --text-secondary: #4A5568;
    --text-muted: #718096;
    --light-surface: #F1F5F9;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.06);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.65;
    color: var(--text-primary);
    background-color: var(--bg);
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Page Loader */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.3s ease;
}

.page-loader.hidden {
    opacity: 0;
    pointer-events: none;
}

.loader-content {
    text-align: center;
}

.loader-logo {
    animation: pulse 1.5s ease-in-out infinite;
}

.loader-logo img {
    max-height: 128px;
    width: auto;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        transform: scale(0.98);
    }
}

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

body.loading {
    overflow: hidden;
}

::-webkit-scrollbar {
    display: none;
}

html {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Header */
.header {
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: background 0.3s ease;
}

.header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow-md);
}

.header .container {
    position: relative;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
}

.logo {
    font-size: 20px;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
    letter-spacing: -0.02em;
    transition: color 0.2s ease;
}

.logo:hover {
    color: var(--primary-hover);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 32px;
}

.nav-menu a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary);
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Hero Section */
.hero {
    padding: 80px 0 60px;
    text-align: center;
    background: var(--bg);
    position: relative;
    transition: all 0.3s ease;
}

.hero.collapsed {
    padding: 20px 0;
}

.hero.collapsed .container > * {
    display: none;
}

.hero-toggle {
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.hero-toggle:hover {
    color: var(--primary);
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.hero-toggle svg {
    transition: transform 0.3s ease;
}

.hero.collapsed .hero-toggle svg {
    transform: rotate(180deg);
}

.hero h1 {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-primary);
    letter-spacing: -0.03em;
    line-height: 1.2;
}

.hero p {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 640px;
    margin: 0 auto 32px;
    line-height: 1.6;
}

.cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--primary);
    color: white;
    padding: 12px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    transition: all 0.2s ease;
}

.cta-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* Main Content */
.main {
    padding: 80px 0;
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 80px;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 40px;
    margin-bottom: 60px;
}

.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.no-results svg {
    margin: 0 auto 16px;
    opacity: 0.3;
}

.no-results h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.no-results p {
    font-size: 15px;
}

/* Post Card */
.post-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.post-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.post-card:hover img {
    transform: scale(1.02);
}

.post-card-content {
    padding: 28px;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    font-size: 13px;
    color: var(--text-muted);
}

.post-date {
    display: flex;
    align-items: center;
    gap: 6px;
}

.post-category {
    padding: 4px 10px;
    background: var(--light-surface);
    border-radius: 4px;
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 12px;
}

.post-card h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
    line-height: 1.4;
    letter-spacing: -0.02em;
}

.post-card h3 a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.post-card h3 a:hover {
    color: var(--primary);
}

.post-excerpt {
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.65;
    font-size: 15px;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: gap 0.2s ease;
}

.read-more:hover {
    gap: 8px;
}

/* Sidebar */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.widget {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 18px;
}

.widget h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.search-box {
    position: relative;
    display: flex;
    gap: 8px;
}

.search-box input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--light-surface);
    color: var(--text-primary);
    font-size: 15px;
    transition: all 0.2s ease;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--surface);
    box-shadow: 0 0 0 3px rgba(77, 168, 255, 0.1);
}

.search-btn {
    padding: 12px 20px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.search-btn:hover {
    background: var(--primary-hover);
    box-shadow: var(--shadow-sm);
}

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

.category-list li {
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}

.category-list li:last-child {
    border-bottom: none;
}

.category-list a {
    color: var(--text-secondary);
    text-decoration: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.category-list a:hover {
    color: var(--primary);
}

.category-list a.active {
    color: var(--primary);
    font-weight: 600;
}

.category-count {
    background: var(--light-surface);
    color: var(--text-secondary);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 500;
}

/* Popular Posts */
.popular-posts {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.popular-post {
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.popular-post:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.popular-post h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
    line-height: 1.4;
}

.popular-post h4 a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.popular-post h4 a:hover {
    color: var(--primary);
}

.popular-post .post-meta {
    font-size: 12px;
    color: var(--text-muted);
}

/* About Page */
.about-content {
    max-width: 1000px;
    margin: 0 auto;
}

.about-section {
    margin-bottom: 60px;
}

.about-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 60px;
    align-items: start;
}

.about-text h2 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--text-primary);
}

.about-text h3 {
    font-size: 20px;
    font-weight: 600;
    margin: 32px 0 16px;
    color: var(--text-primary);
}

.about-text p {
    margin-bottom: 20px;
    line-height: 1.7;
    color: var(--text-secondary);
}

.about-text ul {
    margin: 16px 0 24px 24px;
}

.about-text li {
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.about-image img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 8px;
}

.author-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 40px;
    margin-bottom: 60px;
}

.author-grid {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 40px;
    align-items: start;
}

.author-image img {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
}

.author-info h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.author-info h3 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--primary);
}

.author-title {
    font-size: 16px;
    color: var(--text-muted);
    margin-bottom: 20px;
    font-style: italic;
}

.social-links {
    display: flex;
    gap: 16px;
    margin-top: 24px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--light-surface);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-secondary);
    transition: all 0.15s ease;
}

.social-links a:hover {
    background: var(--light-surface);
    border-color: var(--primary);
    color: var(--primary);
}

.highlights-section {
    text-align: center;
}

.highlights-section h2 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 40px;
    color: var(--text-primary);
}

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

.highlight-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 28px 20px;
    text-align: center;
    transition: border-color 0.15s ease;
}

.highlight-card:hover {
    border-color: var(--text-secondary);
}

.highlight-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: var(--light-surface);
    border-radius: 8px;
    margin: 0 auto 16px;
    color: var(--primary);
}

.highlight-card h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.highlight-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}



/* Contact Page */
.contact-content {
    max-width: 1000px;
    margin: 0 auto;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    margin-bottom: 60px;
}

.contact-form-section h2,
.contact-info-section h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 32px;
    color: var(--text-primary);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

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

.form-group input,
.form-group select,
.form-group textarea {
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg);
    color: var(--text-primary);
    font-size: 14px;
    transition: all 0.2s ease;
}

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

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

.submit-btn {
    background: var(--primary);
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.submit-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.contact-item {
    display: flex;
    gap: 16px;
}

.contact-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: var(--light-surface);
    border-radius: 8px;
    color: var(--primary);
    flex-shrink: 0;
}

.contact-details h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.contact-details p {
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.social-media {
    margin-top: 40px;
}

.social-media h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.faq-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 40px;
}

.faq-section h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 32px;
    color: var(--text-primary);
    text-align: center;
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
}

.faq-item h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.faq-item p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Additional Responsive Styles */
@media (max-width: 768px) {
    /* About Page Tablet */
    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .author-section {
        padding: 32px;
    }
    
    .author-grid {
        grid-template-columns: 1fr;
        gap: 32px;
        text-align: center;
    }
    
    .highlights-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 24px;
    }
    

    
    /* Contact Page Tablet */
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 50px;
    }
}

@media (max-width: 480px) {
    /* About Page Mobile */
    .about-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .author-grid {
        grid-template-columns: 1fr;
        gap: 24px;
        text-align: center;
    }
    
    .author-image img {
        width: 150px;
        height: 150px;
        margin: 0 auto;
    }
    
    .highlights-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    

    
    /* Contact Page Mobile */
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .faq-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

/* Category Detail Page */
.category-hero {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 60px 0;
}

.category-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.category-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.category-header p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.6;
}

.category-stats {
    display: flex;
    justify-content: center;
    gap: 32px;
    flex-wrap: wrap;
}

.article-count {
    background: var(--primary);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

.last-updated {
    color: var(--text-muted);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.category-articles {
    margin-bottom: 40px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 60px;
    flex-wrap: wrap;
}

.pagination-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.15s ease;
}

.pagination-btn:hover {
    background: var(--light-surface);
    border-color: var(--text-secondary);
    color: var(--text-primary);
}

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

.pagination-numbers {
    display: flex;
    align-items: center;
    gap: 4px;
}

.pagination-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.15s ease;
}

.pagination-number:hover {
    background: var(--light-surface);
    border-color: var(--text-secondary);
    color: var(--text-primary);
}

.pagination-number.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.pagination-dots {
    color: var(--text-muted);
    padding: 0 8px;
    font-weight: 500;
}

/* 404 Error Page */
.error-page {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 0;
}

.error-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.error-icon {
    color: var(--primary);
    margin-bottom: 32px;
}

.error-number {
    font-size: 6rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 20px;
    letter-spacing: -0.03em;
}

.error-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.error-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    line-height: 1.6;
}

.error-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 60px;
    flex-wrap: wrap;
}

.home-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--primary);
    color: white;
    padding: 12px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    transition: all 0.2s ease;
}

.home-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.error-actions .back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--surface);
    color: var(--text-secondary);
    padding: 10px 20px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.error-actions .back-btn:hover {
    background: var(--light-surface);
    border-color: var(--text-secondary);
    color: var(--text-primary);
}

.error-search {
    margin-bottom: 60px;
}

.error-search h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.error-search .search-box {
    position: relative;
    max-width: 400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
}

.error-search .search-box input {
    width: 100%;
    padding: 12px 16px 12px 40px;
    border: 1px solid var(--border);
    border-radius: 6px 0 0 6px;
    background: var(--bg);
    color: var(--text-primary);
    font-size: 14px;
}

.error-search .search-box svg {
    position: absolute;
    left: 12px;
    color: var(--text-muted);
    z-index: 1;
}

.error-search .search-box button {
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 0 6px 6px 0;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.error-search .search-box button:hover {
    background: var(--primary-hover);
}

.popular-links h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 24px;
}

.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    max-width: 500px;
    margin: 0 auto;
}

.popular-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.15s ease;
}

.popular-link:hover {
    background: var(--light-surface);
    border-color: var(--text-secondary);
    color: var(--text-primary);
}

/* Additional Responsive Styles for New Pages */
@media (max-width: 768px) {
    .category-header h1 {
        font-size: 2rem;
    }
    
    .category-stats {
        gap: 16px;
        flex-direction: column;
        align-items: center;
    }
    
    .pagination {
        gap: 4px;
    }
    
    .pagination-btn {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .pagination-number {
        width: 36px;
        height: 36px;
        font-size: 13px;
    }
    
    .error-number {
        font-size: 6rem;
    }
    
    .error-title {
        font-size: 1.5rem;
    }
    
    .error-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .links-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .category-hero {
        padding: 40px 0;
    }
    
    .category-header h1 {
        font-size: 1.75rem;
    }
    
    .category-header p {
        font-size: 1rem;
    }
    
    .pagination {
        margin-top: 40px;
    }
    
    .error-number {
        font-size: 4rem;
    }
    
    .error-search .search-box {
        flex-direction: column;
        max-width: 300px;
    }
    
    .error-search .search-box input {
        border-radius: 6px 6px 0 0;
    }
    
    .error-search .search-box button {
        border-radius: 0 0 6px 6px;
        width: 100%;
    }
    
    .error-search .search-box svg {
        top: 12px;
    }
}

/* Article Page */
.article-header {
    padding: 60px 0;
    text-align: center;
    background: var(--bg);
}

.article-title {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 20px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    letter-spacing: -0.03em;
    line-height: 1.25;
}

.article-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 24px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.article-cover {
    width: 100%;
    max-width: 800px;
    height: 360px;
    object-fit: cover;
    border-radius: 4px;
    margin: 0 auto;
    display: block;
}

.article-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 60px 20px;
}

.article-content h2 {
    font-size: 24px;
    font-weight: 600;
    margin: 28px 0 14px;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.article-content h3 {
    font-size: 20px;
    font-weight: 600;
    margin: 24px 0 12px;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.article-content p {
    margin-bottom: 20px;
    line-height: 1.7;
    color: var(--text-secondary);
}

.article-content blockquote {
    border-left: 3px solid var(--primary);
    padding: 20px 24px;
    margin: 32px 0;
    background: var(--light-surface);
    font-style: italic;
    color: var(--text-secondary);
    border-radius: 0 4px 4px 0;
}

.article-content code {
    background: var(--surface);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 14px;
}

.article-content ul,
.article-content ol {
    margin: 16px 0 16px 24px;
}

.article-content li {
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.article-content a {
    color: var(--primary);
    text-decoration: underline;
    transition: color 0.2s ease;
}

.article-content a:hover {
    color: var(--primary-hover);
}

/* Share Buttons */
.share-section {
    padding: 60px 0;
    background: var(--surface);
}

.share-section .container {
    max-width: 800px;
    text-align: center;
}

.share-section h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 24px;
    color: var(--text-primary);
}

.share-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 16px;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: 4px;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 14px;
    transition: all 0.15s ease;
}

.share-btn:hover {
    background: var(--light-surface);
    border-color: var(--text-secondary);
    color: var(--text-primary);
}

/* Navigation */
.post-navigation {
    max-width: 800px;
    margin: 40px auto;
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.nav-post {
    flex: 1;
    padding: 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.nav-post:hover {
    border-color: var(--primary);
}

.nav-post-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-post-title {
    font-weight: 600;
    margin-top: 4px;
}

/* Related Posts */
.related-posts {
    padding: 40px 0;
    background: var(--surface);
    border-top: 1px solid var(--border);
}

.related-posts h2 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 24px;
    color: var(--text-primary);
}

.related-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
}

.related-list li {
    padding: 14px 16px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    transition: all 0.2s ease;
}

.related-list li:hover {
    border-color: var(--primary-light);
    transform: translateX(4px);
    box-shadow: var(--shadow-sm);
}

.related-list a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.related-list a::before {
    content: '→';
    color: var(--accent);
    font-weight: 600;
}

/* Breadcrumb */
.breadcrumb {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 12px 0;
}

.breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.breadcrumb li {
    display: flex;
    align-items: center;
}

.breadcrumb a {
    font-size: 14px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.breadcrumb a:hover {
    color: var(--primary);
}

.breadcrumb .active {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 600;
}

.breadcrumb svg {
    color: var(--text-secondary);
    margin: 0 4px;
}

/* Footer */
.footer {
    background: var(--text-primary);
    border-top: 1px solid var(--border);
    padding: 40px 0 20px;
    margin-top: 0;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 32px;
}

.footer-section h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #FFFFFF;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-links a {
    color: #B8C5D6;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--primary-light);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #718096;
    font-size: 14px;
}

/* Responsive */
@media (max-width: 768px) {
    .hero {
        padding: 60px 0 40px;
    }
    
    .hero h1 {
        font-size: 36px;
    }
    
    .hero p {
        font-size: 17px;
    }
    
    .main {
        padding: 60px 0;
    }
    
    .content-grid {
        grid-template-columns: 1fr;
        gap: 60px;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .article-title {
        font-size: 28px;
    }
    
    .article-meta {
        flex-direction: column;
        gap: 8px;
    }
    
    .post-navigation {
        flex-direction: column;
    }
    
    .share-buttons {
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 20px;
    }
    
    .hero {
        padding: 48px 0 32px;
    }
    
    .hero h1 {
        font-size: 32px;
    }
    
    .hero p {
        font-size: 16px;
    }
    
    .main {
        padding: 48px 0;
    }
    
    .posts-grid {
        gap: 28px;
    }
    
    .article-content {
        padding: 20px 16px;
    }
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--primary);
    color: white;
    padding: 12px 20px;
    border-radius: 6px;
    z-index: 1000;
    animation: slideIn 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Comments Section */
.comments-section {
    padding: 60px 0;
    background: var(--bg);
}

.comments-section h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 32px;
    color: var(--text-primary);
}

.comment-form-wrapper {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 32px;
    margin-bottom: 40px;
}

.comment-form-wrapper h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 24px;
    color: var(--text-primary);
}

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

.comment-form input,
.comment-form textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg);
    color: var(--text-primary);
    font-size: 15px;
    font-family: inherit;
    transition: all 0.2s ease;
}

.comment-form input[readonly] {
    background: var(--light-surface);
    cursor: not-allowed;
    opacity: 0.7;
}

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

.reply-btn,
.toggle-replies-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.reply-btn:hover,
.toggle-replies-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(77, 168, 255, 0.05);
}

.toggle-replies-btn svg {
    transition: transform 0.3s ease;
}



.reply-form-container {
    margin-top: 12px;
}

.reply-form {
    background: var(--light-surface);
    padding: 16px;
    border-radius: 6px;
    border: 1px solid var(--border);
}

.reply-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--bg);
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    min-height: 80px;
    resize: vertical;
    margin-bottom: 12px;
}

.reply-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(77, 168, 255, 0.1);
}

.reply-actions {
    display: flex;
    gap: 8px;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

.btn-cancel {
    padding: 8px 16px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-cancel:hover {
    background: var(--light-surface);
    border-color: var(--text-secondary);
}

.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(77, 168, 255, 0.1);
}

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

.comment-form .btn {
    padding: 12px 32px;
    font-size: 15px;
    font-weight: 600;
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.comment-thread {
    margin-top: 15px;
}

.comment-thread:first-child {
    margin-top: 0;
}

.comment-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
}

.replies-container {
    margin-left: 40px;
    margin-top: 15px;
    padding-left: 20px;
    border-left: 2px solid var(--border);
}

.comment-reply {
    margin-top: 15px;
}

.comment-reply:first-child {
    margin-top: 0;
}

.loading-comments,
.no-comments {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
    font-size: 15px;
}

.comment-item:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-sm);
}

@media (max-width: 768px) {
    .replies-container {
        margin-left: 20px;
        padding-left: 15px;
    }
    
    .comment-actions {
        flex-wrap: wrap;
    }
}

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

.comment-author {
    font-weight: 600;
    color: var(--primary);
    font-size: 15px;
}

.comment-date {
    font-size: 13px;
    color: var(--text-muted);
}

.comment-body {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 15px;
    word-wrap: break-word;
}

/* Auth Pages */
.auth-page {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    padding: 60px 0;
}

.auth-container {
    max-width: 450px;
    margin: 0 auto;
}

.auth-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 40px;
    box-shadow: var(--shadow-lg);
}

.auth-card h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
    text-align: center;
}

.auth-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

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

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

/* Input with Icon Styles */
.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-icon .input-icon {
    position: absolute;
    left: 12px;
    color: var(--text-muted);
    z-index: 1;
    pointer-events: none;
}

.input-with-icon input {
    width: 100%;
    padding: 12px 16px 12px 44px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg);
    color: var(--text-primary);
    font-size: 15px;
    transition: all 0.2s ease;
}

.input-with-icon input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--surface);
    box-shadow: 0 0 0 3px rgba(77, 168, 255, 0.1);
}

.input-with-icon input:focus + .input-icon,
.input-with-icon:focus-within .input-icon {
    color: var(--primary);
}

/* Password Input with Toggle */
.password-input {
    position: relative;
}

.password-input input {
    padding-right: 44px;
}

.password-toggle {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-toggle:hover {
    color: var(--primary);
    background: rgba(77, 168, 255, 0.1);
}

.password-toggle:focus {
    outline: none;
    color: var(--primary);
}

.btn-block {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.auth-switch {
    text-align: center;
    margin-top: 24px;
    color: var(--text-secondary);
    font-size: 14px;
}

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

.auth-switch a:hover {
    color: var(--primary-hover);
}

@media (max-width: 480px) {
    .auth-card {
        padding: 32px 24px;
    }
}

/* Profile Page */
.profile-page {
    padding: 60px 0;
    min-height: calc(100vh - 200px);
}



.profile-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    max-width: 800px;
    margin: 0 auto;
}

.profile-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 24px;
}

.profile-section:first-child {
    grid-column: 1 / -1;
}

.profile-section h2 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.main-content {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.main-content .widget {
    margin-bottom: 40px;
}

.main-content .widget:last-child {
    margin-bottom: 0;
}

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

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

.profile-form input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg);
    color: var(--text-primary);
    font-size: 15px;
    transition: all 0.2s ease;
}

.profile-form input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(77, 168, 255, 0.1);
}

.account-info {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}

.info-item:last-child {
    border-bottom: none;
    justify-content: flex-start;
}

.info-item label {
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 14px;
}

.info-item span {
    color: var(--text-primary);
    font-size: 14px;
}

.btn-logout {
    background: #dc3545;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-logout:hover {
    background: #c82333;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* Auth Menu */
.auth-menu {
    display: flex;
    align-items: center;
    gap: 12px;
}

.auth-buttons {
    display: flex;
    gap: 8px;
}

.btn-login,
.btn-register {
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-login {
    color: var(--primary);
    border: 1px solid var(--primary);
    background: transparent;
}

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

.btn-register {
    background: var(--primary);
    color: white;
    border: 1px solid var(--primary);
}

.btn-register:hover {
    background: var(--primary-hover);
}

.user-menu {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-name {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 500;
}

.profile-dropdown {
    position: relative;
}

.profile-btn {
    background: var(--light-surface);
    border: 1px solid var(--border);
    padding: 8px;
    border-radius: 50%;
    cursor: pointer;
    color: var(--primary);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-btn:hover {
    background: var(--primary);
    color: white;
    box-shadow: var(--shadow-sm);
}

.profile-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    min-width: 280px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 1000;
}

.profile-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.profile-header-mini {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
}

.profile-avatar-mini {
    width: 40px;
    height: 40px;
    background: var(--light-surface);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    flex-shrink: 0;
}

.profile-info-mini {
    flex: 1;
    min-width: 0;
}

.profile-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.profile-email {
    font-size: 12px;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-menu-divider {
    height: 1px;
    background: var(--border);
    margin: 0 8px;
}

.profile-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
}

.profile-menu-item:hover {
    background: var(--light-surface);
    color: var(--primary);
}

.profile-menu-item:first-of-type {
    border-radius: 0;
}

.profile-menu-item:last-of-type {
    border-radius: 0 0 8px 8px;
}

.logout-btn:hover {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

@media (max-width: 768px) {
    .profile-content {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .auth-buttons {
        flex-direction: column;
        gap: 4px;
    }
    
    .user-name {
        display: none;
    }
    
    .profile-menu {
        min-width: 260px;
        right: -20px;
    }
}

.toggle-comments-btn {
    width: 100%;
    padding: 12px 20px;
    background: rgba(77, 168, 255, 0.08);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--primary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.toggle-comments-btn:hover {
    background: rgba(77, 168, 255, 0.12);
    border-color: var(--primary-light);
}

.toggle-comments-btn svg {
    transition: transform 0.3s ease;
}

.btn {
    background: var(--primary);
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn:hover {
    background: var(--primary-hover);
    box-shadow: var(--shadow-sm);
}

@media (max-width: 768px) {
    .comments-section {
        padding: 40px 0;
    }
    
    .comment-form-wrapper {
        padding: 24px;
    }
    
    .comment-item {
        padding: 16px;
    }
    
    .sort-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .sort-controls select,
    .sort-controls input {
        width: 100%;
    }
}

/* Articles Page */
.section-header {
    margin-bottom: 40px;
}

.section-header h2 {
    margin-bottom: 20px;
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
}

.sort-controls {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
}

.sort-controls select,
.sort-controls input {
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--surface);
    color: var(--text-primary);
    font-size: 15px;
    transition: all 0.2s ease;
}

.sort-controls select:focus,
.sort-controls input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(77, 168, 255, 0.1);
}

#posts .posts-grid {
    margin-top: 0;
}

/* Add Article Form Styles - Simple */
.add-article-form {
    max-width: 800px;
    margin: 0 auto;
}

.article-form {
    background: var(--surface);
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: 4px;
}

.article-form .form-group {
    margin-bottom: 16px;
}

.article-form label {
    display: block;
    margin-bottom: 4px;
    font-weight: 500;
    color: var(--text-primary);
}

.article-form input,
.article-form textarea,
.article-form select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--bg);
    color: var(--text-primary);
    font-size: 14px;
}

.article-form input:focus,
.article-form textarea:focus,
.article-form select:focus {
    outline: none;
    border-color: var(--primary);
}

.article-form .submit-btn {
    padding: 8px 16px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
}

.article-form .form-group:has(input[type="file"]) {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px;
    background: var(--light-surface);
}

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

.search-section {
    margin-bottom: 24px;
    padding: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 4px;
}

.search-section .search-box {
    max-width: 400px;
}

.text-editor-section {
    margin-bottom: 24px;
    padding: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 4px;
}

.editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.editor-search {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    max-width: 300px;
}

.editor-search input {
    flex: 1;
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--bg);
    color: var(--text-primary);
    font-size: 12px;
}

.editor-search input:focus {
    outline: none;
    border-color: var(--primary);
}

.search-nav-btn {
    padding: 6px;
    background: var(--light-surface);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.editor-header h3 {
    margin: 0;
    font-size: 16px;
    color: var(--text-primary);
}

.editor-actions {
    display: flex;
    gap: 8px;
}

.expand-btn,
.copy-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
}

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

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

#textEditor {
    width: 100%;
    min-height: 120px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--bg);
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
}

#textEditor:focus {
    outline: none;
    border-color: var(--primary);
}

#textEditor.expanded {
    min-height: 400px;
    height: 400px;
}

.message {
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: 8px;
    font-weight: 500;
}

.message.success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.message.error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.message.loading {
    background: #dbeafe;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

/* Articles List Section */
.articles-list-section {
    grid-column: 1 / -1;
    margin-top: 40px;
}

.post-card .article-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.post-card .btn-edit,
.post-card .btn-delete {
    flex: 1;
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    text-align: center;
}

.post-card .btn-edit {
    background: var(--surface);
    color: var(--primary);
    border-color: var(--primary);
}

.post-card .btn-delete {
    background: var(--surface);
    color: #dc3545;
    border-color: #dc3545;
}

.btn-cancel {
    display: none;
    margin-left: 8px;
    padding: 8px 16px;
    background: var(--surface);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
}

/* Image Upload Styles */
.form-group input[type="file"] {
    padding: 8px;
    border: 2px dashed var(--border);
    border-radius: 8px;
    background: var(--light-surface);
    cursor: pointer;
    transition: all 0.2s ease;
}

.form-group input[type="file"]:hover {
    border-color: var(--primary);
    background: rgba(77, 168, 255, 0.05);
}

.form-group small {
    display: block;
    margin: 8px 0 4px;
    font-size: 12px;
    color: var(--text-muted);
}



