/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: #2c3e50;
    color: white;
    padding: 1rem 0;
    margin-bottom: 2rem;
    transition: background-color 0.3s ease;
}

[data-theme="dark"] .header {
    background: #1a1a1a;
    border-bottom: 1px solid var(--border-color);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
}

.nav a {
    color: white;
    text-decoration: none;
    margin-left: 1.5rem;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.nav a:hover {
    background-color: #34495e;
}

[data-theme="dark"] .nav a:hover {
    background-color: #2d2d2d;
}

/* Theme Toggle */
.theme-toggle {
    display: inline-flex;
    align-items: center;
    margin-left: 1.5rem;
}

.theme-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 30px;
}

.theme-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "🌙";
    height: 22px;
    width: 22px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

input:checked + .slider {
    background-color: #64b5f6;
}

input:checked + .slider:before {
    content: "☀️";
    transform: translateX(30px);
}

/* Main content */
.main {
    min-height: 60vh;
}

/* Posts Grid */
.posts-grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
}

.post-card {
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px var(--shadow-color);
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px var(--shadow-color);
}

.post-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    border-bottom: 1px solid var(--border-color);
}

.post-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.post-card:hover .post-thumbnail {
    transform: scale(1.05);
}

.post-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.post-title {
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
    line-height: 1.3;
    color: var(--text-primary);
}

.post-title a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s;
}

.post-title a:hover {
    color: #3498db;
}

.post-meta {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.post-excerpt {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.read-more {
    display: inline-block;
    color: #3498db;
    text-decoration: none;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border: 2px solid #3498db;
    border-radius: 6px;
    transition: all 0.3s;
    align-self: flex-start;
}

.read-more:hover {
    background: #3498db;
    color: white;
    transform: translateY(-2px);
}

/* Single Post */
.single-post {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px var(--shadow-color);
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
}

.post-featured-image {
    margin-bottom: 2rem;
    border-radius: 8px;
    overflow: hidden;
}

.featured-image {
    width: 100%;
    max-height: 500px;
    object-fit: contain;
    border-radius: 8px;
}

.post-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-primary);
    margin-bottom: 2rem;
}

.post-content p {
    margin-bottom: 1.5rem;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #3498db;
    text-decoration: none;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border: 2px solid #3498db;
    border-radius: 6px;
    transition: all 0.3s;
}

.back-link:hover {
    background: #3498db;
    color: white;
    transform: translateX(-5px);
}

/* Forms */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: var(--text-primary);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
}

/* Buttons */
.btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s;
}

.btn:hover {
    background: #2980b9;
}

.btn-primary {
    background: #27ae60;
}

.btn-primary:hover {
    background: #219a52;
}

.btn-danger {
    background: #e74c3c;
}

.btn-danger:hover {
    background: #c0392b;
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

.btn-small {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
}

/* Login page */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: var(--bg-primary);
}

.login-container {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px var(--shadow-color);
    width: 100%;
    max-width: 400px;
    border: 1px solid var(--border-color);
}

.login-form {
    margin: 1.5rem 0;
}

/* Footer */
.footer {
    background: #34495e;
    color: white;
    text-align: center;
    padding: 1.5rem 0;
    margin-top: 3rem;
    transition: background-color 0.3s ease;
}

[data-theme="dark"] .footer {
    background: #1a1a1a;
    border-top: 1px solid var(--border-color);
}

/* Error messages */
.error {
    background: #e74c3c;
    color: white;
    padding: 0.75rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.image-error {
    background: #f8d7da;
    color: #721c24;
    padding: 1rem;
    border-radius: 4px;
    border: 1px solid #f5c6cb;
}

[data-theme="dark"] .image-error {
    background: #b71c1c;
    color: #ef9a9a;
    border-color: #c62828;
}

/* No posts */
.no-posts {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
    background: var(--bg-card);
    border-radius: 8px;
    grid-column: 1 / -1;
    border: 1px solid var(--border-color);
}

.no-posts h2 {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.no-posts p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

/* Dashboard Styles */
.dashboard-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.post-form-section,
.posts-list-section {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px var(--shadow-color);
    border: 1px solid var(--border-color);
}

.posts-list {
    max-height: 600px;
    overflow-y: auto;
}

.post-item {
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-radius: 8px;
    background: var(--bg-secondary);
}

.post-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.admin-post-thumbnail {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.post-item h3 {
    margin: 0;
    color: var(--text-primary);
    flex: 1;
}

.dashboard-post-meta {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.post-content-preview {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.4;
}

.post-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.current-image {
    margin-bottom: 1rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

/* Alert Styles */
.alert {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

[data-theme="dark"] .alert-success {
    background: #1b5e20;
    color: #a5d6a7;
    border-color: #2e7d32;
}

[data-theme="dark"] .alert-error {
    background: #b71c1c;
    color: #ef9a9a;
    border-color: #c62828;
}

/* Form Improvements */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.form-group input[type="text"],
.form-group input[type="file"],
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s;
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.form-group small {
    display: block;
    margin-top: 0.5rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Button Improvements */
.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s;
}

.btn-small {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
}

.btn-primary {
    background: #27ae60;
    color: white;
}

.btn-primary:hover {
    background: #219a52;
    transform: translateY(-1px);
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background: #c0392b;
}

/* Image Placeholder */
.image-placeholder {
    background: var(--bg-secondary);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Dashboard Header */
.dashboard-header {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px var(--shadow-color);
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
}

.dashboard-header h1 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.dashboard-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Enhanced Markdown Styles */
.post-content h1 {
    font-size: 2.5rem;
    margin: 2rem 0 1rem 0;
    color: var(--text-primary);
    border-bottom: 3px solid var(--border-color);
    padding-bottom: 0.5rem;
    line-height: 1.2;
    font-weight: 700;
}

.post-content h2 {
    font-size: 2rem;
    margin: 1.8rem 0 1rem 0;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.4rem;
    line-height: 1.3;
    font-weight: 600;
}

.post-content h3 {
    font-size: 1.75rem;
    margin: 1.6rem 0 0.8rem 0;
    color: var(--text-primary);
    line-height: 1.3;
    font-weight: 600;
}

.post-content h4 {
    font-size: 1.5rem;
    margin: 1.4rem 0 0.6rem 0;
    color: var(--text-primary);
    line-height: 1.3;
    font-weight: 600;
}

.post-content h5 {
    font-size: 1.25rem;
    margin: 1.2rem 0 0.4rem 0;
    color: var(--text-primary);
    line-height: 1.4;
    font-weight: 600;
}

.post-content h6 {
    font-size: 1.1rem;
    margin: 1rem 0 0.2rem 0;
    color: var(--text-muted);
    font-weight: 600;
    line-height: 1.4;
}

.post-content p {
    margin-bottom: 1.5rem;
    line-height: 1.7;
    color: var(--text-primary);
}

.post-content ul, 
.post-content ol {
    margin: 1.2rem 0;
    padding-left: 2.5rem;
    color: var(--text-primary);
}

.post-content li {
    margin-bottom: 0.6rem;
    line-height: 1.6;
}

.post-content ul li {
    list-style-type: disc;
}

.post-content ol li {
    list-style-type: decimal;
}

.post-content li > ul,
.post-content li > ol {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.post-content code {
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'Courier New', Monaco, monospace;
    font-size: 0.9em;
    border: 1px solid var(--border-color);
}

.post-content pre {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1.5rem 0;
    border: 1px solid var(--border-color);
    line-height: 1.5;
}

.post-content pre code {
    background: none;
    padding: 0;
    border: none;
    color: var(--text-primary);
    font-size: 0.95em;
    display: block;
}

/* Enhanced Blockquote Styles */
.post-content blockquote {
    border-left: 4px solid #3498db;
    margin: 1.5rem 0;
    padding: 1.5rem 2rem;
    background: var(--bg-secondary);
    font-style: italic;
    color: var(--text-primary);
    border-radius: 0 8px 8px 0;
}

.post-content blockquote p {
    margin-bottom: 1rem;
}

.post-content blockquote p:last-child {
    margin-bottom: 0;
}

/* Excel-Style Table Styles - Clean Lines Only */
.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    background: var(--bg-card);
    box-shadow: 0 1px 3px var(--shadow-color);
}

.post-content thead {
    background: var(--bg-secondary);
}

.post-content th {
    background: var(--bg-secondary);
    font-weight: 600;
    color: var(--text-primary);
    padding: 0.875rem 1rem;
    border-bottom: 2px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    text-align: left;
    font-size: 0.95rem;
}

.post-content th:last-child {
    border-right: none;
}

.post-content td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    color: var(--text-primary);
    line-height: 1.5;
}

.post-content td:last-child {
    border-right: none;
}

.post-content tbody tr:last-child td {
    border-bottom: 1px solid var(--border-color);
}

.post-content tbody tr:nth-child(even) {
    background: var(--bg-secondary);
}

.post-content tbody tr:hover {
    background: var(--bg-primary);
}

/* Links */
.post-content a {
    color: #3498db;
    text-decoration: none;
    transition: color 0.3s ease;
}

.post-content a:hover {
    color: #2980b9;
    text-decoration: underline;
}

/* Task List Styles */
.post-content input[type="checkbox"] {
    margin-right: 0.5rem;
    transform: scale(1.1);
}

.post-content .task-list-item {
    list-style-type: none;
    margin-left: -1.5rem;
}

/* Horizontal Rule */
.post-content hr {
    border: none;
    height: 1px;
    background: var(--border-color);
    margin: 2rem 0;
}

/* Image Styles */
.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
}

/* CSS Variables for Themes */
:root {
    --bg-primary: #f8f9fa;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --text-primary: #333333;
    --text-secondary: #555555;
    --text-muted: #6c757d;
    --border-color: #dee2e6;
    --shadow-color: rgba(0,0,0,0.1);
}

[data-theme="dark"] {
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --bg-card: #2d2d2d;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --text-muted: #888888;
    --border-color: #404040;
    --shadow-color: rgba(0, 0, 0, 0.3);
}

/* Dark Mode Enhancements */
[data-theme="dark"] .post-content code {
    background: #363636;
    border-color: #404040;
}

[data-theme="dark"] .post-content pre {
    background: #363636;
    border-color: #404040;
}

[data-theme="dark"] .post-content blockquote {
    background: #363636;
    border-left-color: #64b5f6;
}

/* Preview specific styles */
#preview-content table,
#rendered-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    background: var(--bg-card);
    box-shadow: 0 1px 3px var(--shadow-color);
}

#preview-content th,
#preview-content td,
#rendered-content th,
#rendered-content td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
}

#preview-content th:last-child,
#preview-content td:last-child,
#rendered-content th:last-child,
#rendered-content td:last-child {
    border-right: none;
}

#preview-content th,
#rendered-content th {
    background: var(--bg-secondary);
    font-weight: 600;
    color: var(--text-primary);
    padding: 0.875rem 1rem;
    border-bottom: 2px solid var(--border-color);
}

#preview-content tr:nth-child(even),
#rendered-content tr:nth-child(even) {
    background: var(--bg-secondary);
}

#preview-content blockquote,
#rendered-content blockquote {
    border-left: 4px solid #3498db;
    margin: 1.5rem 0;
    padding: 1.5rem 2rem;
    background: var(--bg-secondary);
    font-style: italic;
    color: var(--text-primary);
    border-radius: 0 8px 8px 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .dashboard-content {
        grid-template-columns: 1fr;
    }

    .post-header {
        flex-direction: column;
    }

    .admin-post-thumbnail {
        width: 100%;
        height: 120px;
    }

    .posts-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .post-card {
        margin: 0 1rem;
    }

    .post-image {
        height: 180px;
    }

    .post-content {
        padding: 1.25rem;
    }

    .single-post {
        padding: 1.5rem;
    }

    .header .container {
        flex-direction: column;
        gap: 1rem;
    }

    .nav a {
        margin-left: 0.5rem;
        margin-right: 0.5rem;
    }
    
    .theme-toggle {
        margin-left: 0.5rem;
    }

    /* Responsive tables */
    .post-content table {
        font-size: 0.9rem;
    }
    
    .post-content th,
    .post-content td {
        padding: 0.5rem 0.75rem;
    }
    
    .post-content h1 {
        font-size: 2rem;
    }
    
    .post-content h2 {
        font-size: 1.75rem;
    }
    
    .post-content h3 {
        font-size: 1.5rem;
    }
    
    .post-content h4 {
        font-size: 1.25rem;
    }

    .post-content blockquote {
        padding: 1rem 1.5rem;
        margin: 1rem 0;
    }
}

@media (max-width: 480px) {
    .post-card {
        margin: 0 0.5rem;
    }

    .post-image {
        height: 160px;
    }

    .post-content {
        padding: 1rem;
    }

    .post-title {
        font-size: 1.2rem;
    }

    .single-post {
        padding: 1rem;
    }

    .container {
        padding: 0 15px;
    }

    .post-content h1 {
        font-size: 1.75rem;
    }
    
    .post-content h2 {
        font-size: 1.5rem;
    }
    
    .post-content h3 {
        font-size: 1.25rem;
    }

    .post-content ul,
    .post-content ol {
        padding-left: 1.5rem;
    }

    .post-content table {
        font-size: 0.85rem;
    }

    .post-content th,
    .post-content td {
        padding: 0.5rem;
    }
}

/* Print Styles */
@media print {
    .header,
    .footer,
    .theme-toggle,
    .back-link {
        display: none;
    }
    
    .post-content h1, 
    .post-content h2, 
    .post-content h3, 
    .post-content h4, 
    .post-content h5, 
    .post-content h6 {
        color: #000;
        border-bottom-color: #ccc;
    }
    
    .post-content table {
        border: 1px solid #ccc;
    }
    
    .post-content th,
    .post-content td {
        border-color: #ccc;
    }
    
    .post-content code {
        background: #f8f8f8;
        border-color: #ddd;
    }
    
    .post-content pre {
        background: #f8f8f8;
        border-color: #ddd;
    }

    .post-content blockquote {
        background: #f8f8f8;
        border-left-color: #3498db;
    }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
    }
    
    .post-card:hover {
        transform: none !important;
    }
}

/* Focus styles for accessibility */
.btn:focus,
.nav a:focus,
.form-group input:focus,
.form-group textarea:focus,
.back-link:focus,
.read-more:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

/* Selection styles */
::selection {
    background: #3498db;
    color: white;
}

::-moz-selection {
    background: #3498db;
    color: white;
}
/* Infinite Scroll Styles */
.loading-indicator {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
}

.loading-dots {
    display: inline-block;
    position: relative;
    width: 80px;
    height: 20px;
}

.loading-dots div {
    position: absolute;
    top: 8px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--text-muted);
    animation-timing-function: cubic-bezier(0, 1, 1, 0);
}

.loading-dots div:nth-child(1) {
    left: 8px;
    animation: loading-dots1 0.6s infinite;
}

.loading-dots div:nth-child(2) {
    left: 8px;
    animation: loading-dots2 0.6s infinite;
}

.loading-dots div:nth-child(3) {
    left: 32px;
    animation: loading-dots2 0.6s infinite;
}

.loading-dots div:nth-child(4) {
    left: 56px;
    animation: loading-dots3 0.6s infinite;
}

@keyframes loading-dots1 {
    0% { transform: scale(0); }
    100% { transform: scale(1); }
}

@keyframes loading-dots3 {
    0% { transform: scale(1); }
    100% { transform: scale(0); }
}

@keyframes loading-dots2 {
    0% { transform: translate(0, 0); }
    100% { transform: translate(24px, 0); }
}

/* Smooth loading animations */
.post-card {
    transition: transform 0.3s ease, opacity 0.3s ease, box-shadow 0.3s ease;
}

.post-card.loading {
    opacity: 0.6;
}

.post-card.new-post {
    animation: slideUp 0.5s ease forwards;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Load more button enhancements */
#load-more-btn {
    background: linear-gradient(135deg, #3498db, #2980b9);
    border: none;
    border-radius: 8px;
    padding: 12px 30px;
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(52, 152, 219, 0.3);
}

#load-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.4);
    background: linear-gradient(135deg, #2980b9, #3498db);
}

#load-more-btn:active {
    transform: translateY(0);
}

#load-more-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* End of posts message */
.end-of-posts {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    font-style: italic;
    border-top: 1px solid var(--border-color);
    margin-top: 2rem;
}
 
/* Add these to your existing /css/style.css */

/* Image placeholder for when images are not available */
.image-placeholder {
    background: var(--bg-secondary);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    border: 1px dashed var(--border-color);
}

/* Loading indicator */
.loading-indicator {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
}

.loading-dots {
    display: inline-block;
    position: relative;
    width: 80px;
    height: 20px;
}

.loading-dots div {
    position: absolute;
    top: 8px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--text-muted);
    animation-timing-function: cubic-bezier(0, 1, 1, 0);
}

.loading-dots div:nth-child(1) {
    left: 8px;
    animation: loading-dots1 0.6s infinite;
}

.loading-dots div:nth-child(2) {
    left: 8px;
    animation: loading-dots2 0.6s infinite;
}

.loading-dots div:nth-child(3) {
    left: 32px;
    animation: loading-dots2 0.6s infinite;
}

.loading-dots div:nth-child(4) {
    left: 56px;
    animation: loading-dots3 0.6s infinite;
}

@keyframes loading-dots1 {
    0% { transform: scale(0); }
    100% { transform: scale(1); }
}

@keyframes loading-dots3 {
    0% { transform: scale(1); }
    100% { transform: scale(0); }
}

@keyframes loading-dots2 {
    0% { transform: translate(0, 0); }
    100% { transform: translate(24px, 0); }
}

/* End of posts message */
.end-of-posts {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    font-style: italic;
    border-top: 1px solid var(--border-color);
    margin-top: 2rem;
}
