/* ================================
   CSS Variables & Reset
================================ */
:root {
    /* Primary palette - Deep forest green with warm accents */
    --primary-color: #1a4d2e;
    --primary-light: #2d6a4f;
    --primary-dark: #0d2818;
    --secondary-color: #4a7c59;
    --accent-color: #e8c547;
    
    /* Neutral palette - Warm cream and stone tones */
    --background-color: #faf8f5;
    --background-secondary: #f5f1eb;
    --card-background: #ffffff;
    
    /* Text colors */
    --text-primary: #1a1a1a;
    --text-secondary: #4a4a4a;
    --text-muted: #737373;
    --text-on-primary: #ffffff;
    
    /* Border colors */
    --border-color: #e5e0d8;
    --border-light: #f0ece4;
    
    /* Status colors */
    --error-color: #c53030;
    --success-color: #1a4d2e;
    --warning-color: #d69e2e;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.04), 0 2px 4px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.06), 0 4px 10px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.08), 0 8px 16px rgba(0, 0, 0, 0.04);
    
    /* Border radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    
    /* Transitions */
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--background-color);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

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

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

/* ================================
   Navbar
================================ */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-light);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--primary-dark);
    letter-spacing: -0.02em;
}

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

.logo-icon {
    font-size: 1.75rem;
}

.logo-text {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 600;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.625rem 1rem;
    border-radius: var(--radius-full);
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--primary-color);
    background: var(--background-secondary);
}

/* ================================
   Buttons
================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    border: 2px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--text-on-primary);
    border-color: var(--primary-color);
}

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

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border-color: var(--border-color);
}

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

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border-color: transparent;
    padding: 0.5rem 0.75rem;
}

.btn-ghost:hover {
    background: var(--background-secondary);
    color: var(--text-primary);
}

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

.btn-danger:hover {
    background: #a02828;
    border-color: #a02828;
}

.btn-full {
    width: 100%;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* ================================
   Main Container
================================ */
.main-container {
    flex: 1;
    max-width: 960px;
    width: 100%;
    margin: 0 auto;
    padding: var(--space-8) var(--space-6);
}

.page-header {
    text-align: center;
    margin-bottom: var(--space-10);
    padding: var(--space-8) 0;
}

.page-header h1 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: var(--space-3);
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.page-header p {
    color: var(--text-muted);
    font-size: 1.125rem;
    max-width: 540px;
    margin: 0 auto;
}

/* ================================
   Filter Section
================================ */
.filter-section {
    margin-bottom: var(--space-6);
    display: flex;
    align-items: center;
    gap: var(--space-4);
    flex-wrap: wrap;
}

.filter-select {
    padding: 0.75rem 2.5rem 0.75rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 500;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-full);
    background: var(--card-background);
    color: var(--text-primary);
    cursor: pointer;
    min-width: 200px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23737373' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    transition: var(--transition);
}

.filter-select:hover {
    border-color: var(--text-muted);
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(26, 77, 46, 0.1);
}

/* ================================
   Posts Container
================================ */
.posts-container {
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
}

.post-card {
    background: var(--card-background);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.post-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary-color), var(--secondary-color));
    opacity: 0;
    transition: var(--transition);
}

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

.post-card:hover::before {
    opacity: 1;
}

/* Post Card Content Layout with Vote */
.post-card-content {
    display: flex;
    gap: var(--space-5);
}

.post-vote-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-1);
    padding-top: var(--space-1);
}

.post-card-main {
    flex: 1;
    min-width: 0;
}

/* Vote Button Styles */
.vote-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--card-background);
    color: var(--text-muted);
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
}

.vote-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(26, 77, 46, 0.05);
    transform: translateY(-1px);
}

.vote-btn.voted {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--text-on-primary);
}

.vote-btn.voted:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

.vote-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.vote-icon {
    font-weight: 700;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vote-icon svg {
    width: 18px;
    height: 18px;
}

.vote-count {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-primary);
    min-width: 24px;
    text-align: center;
}

/* Vote Section on Post Detail Page */
.post-vote-section-detail {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-light);
}

.vote-btn-large {
    width: 52px;
    height: 52px;
    font-size: 1.4rem;
}

.vote-count-large {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.vote-label {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.post-card-header {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: var(--space-3);
    flex-wrap: wrap;
}

.post-category-badge {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--text-on-primary);
    padding: 0.375rem 0.875rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.post-issue-badge {
    background: var(--accent-color);
    color: var(--primary-dark);
    padding: 0.375rem 0.875rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
}

.post-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-2);
    line-height: 1.4;
    letter-spacing: -0.01em;
}

.post-card-title a {
    color: inherit;
    transition: var(--transition);
}

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

.post-card-preview {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    margin-bottom: var(--space-4);
    line-height: 1.6;
}

.post-card-image {
    width: 100%;
    max-height: 280px;
    object-fit: cover;
    border-radius: var(--radius-md);
    margin-bottom: var(--space-4);
}

.post-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-muted);
    font-size: 0.8125rem;
    flex-wrap: wrap;
    gap: var(--space-3);
    padding-top: var(--space-4);
    border-top: 1px solid var(--border-light);
}

.post-author {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-weight: 500;
}

.post-author svg {
    flex-shrink: 0;
}

.post-date {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.post-date svg {
    flex-shrink: 0;
}

.author-icon {
    font-size: 1.125rem;
    opacity: 0.8;
}

/* ================================
   Loading & Empty States
================================ */
.loading {
    text-align: center;
    padding: var(--space-12);
    color: var(--text-muted);
    font-size: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-4);
}

.loading::before {
    content: '';
    width: 32px;
    height: 32px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.no-posts {
    text-align: center;
    padding: var(--space-12);
    background: var(--card-background);
    border-radius: var(--radius-lg);
    color: var(--text-muted);
    border: 2px dashed var(--border-color);
}

/* ================================
   Auth Pages
================================ */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 70vh;
    padding: var(--space-8) var(--space-4);
}

.auth-card {
    background: var(--card-background);
    padding: var(--space-10);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 440px;
    border: 1px solid var(--border-light);
}

.auth-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2rem;
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: var(--space-2);
    text-align: center;
    letter-spacing: -0.02em;
}

.auth-subtitle {
    color: var(--text-muted);
    text-align: center;
    margin-bottom: var(--space-8);
    font-size: 0.9375rem;
}

.auth-tabs {
    display: flex;
    background: var(--background-secondary);
    border-radius: var(--radius-full);
    padding: 4px;
    margin-bottom: var(--space-8);
}

.auth-tab {
    flex: 1;
    padding: 0.75rem 1rem;
    background: none;
    border: none;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
    border-radius: var(--radius-full);
}

.auth-tab.active {
    color: var(--text-on-primary);
    background: var(--primary-color);
}

.auth-tab:hover:not(.active) {
    color: var(--text-primary);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
}

.auth-message {
    margin-top: var(--space-4);
    padding: var(--space-4);
    border-radius: var(--radius-md);
    text-align: center;
    display: none;
    font-size: 0.875rem;
    font-weight: 500;
}

.auth-message.error {
    display: block;
    background: #fef2f2;
    color: var(--error-color);
    border: 1px solid #fecaca;
}

.auth-message.success {
    display: block;
    background: #f0fdf4;
    color: var(--success-color);
    border: 1px solid #bbf7d0;
}

/* ================================
   Form Elements
================================ */
.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.form-group label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.required {
    color: var(--error-color);
    margin-left: 2px;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.875rem 1rem;
    font-size: 0.9375rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: var(--transition);
    font-family: inherit;
    background: var(--card-background);
    color: var(--text-primary);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover {
    border-color: var(--text-muted);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(26, 77, 46, 0.1);
}

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

.form-actions {
    display: flex;
    gap: var(--space-4);
    justify-content: flex-end;
    margin-top: var(--space-6);
}

.form-message {
    margin-top: var(--space-4);
    padding: var(--space-4);
    border-radius: var(--radius-md);
    text-align: center;
    display: none;
    font-size: 0.875rem;
    font-weight: 500;
}

.form-message.error {
    display: block;
    background: #fef2f2;
    color: var(--error-color);
    border: 1px solid #fecaca;
}

.form-message.success {
    display: block;
    background: #f0fdf4;
    color: var(--success-color);
    border: 1px solid #bbf7d0;
}

/* ================================
   Create Post Page
================================ */
.create-container {
    max-width: 720px;
    margin: 0 auto;
}

.create-card {
    background: var(--card-background);
    padding: var(--space-10);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-light);
}

.create-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2rem;
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: var(--space-2);
    letter-spacing: -0.02em;
}

.create-subtitle {
    color: var(--text-muted);
    margin-bottom: var(--space-8);
    font-size: 0.9375rem;
}

.create-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
}

/* Image Upload */
.image-upload-area {
    position: relative;
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-lg);
    transition: var(--transition);
    overflow: hidden;
    background: var(--background-secondary);
}

.image-upload-area:hover {
    border-color: var(--primary-color);
    background: rgba(26, 77, 46, 0.03);
}

.file-input {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 10;
}

.upload-placeholder {
    padding: var(--space-10);
    text-align: center;
    color: var(--text-muted);
}

.upload-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: var(--space-3);
    opacity: 0.7;
}

.upload-text {
    display: block;
    font-weight: 600;
    margin-bottom: var(--space-2);
    color: var(--text-secondary);
}

.upload-hint {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.image-preview {
    position: relative;
}

.image-preview img {
    width: 100%;
    max-height: 320px;
    object-fit: cover;
}

.remove-image {
    position: absolute;
    top: var(--space-3);
    right: var(--space-3);
    background: var(--error-color);
    color: white;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    cursor: pointer;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
}

.remove-image:hover {
    background: #a02828;
    transform: scale(1.05);
}

/* ================================
   Post Detail Page
================================ */
.post-detail-container {
    max-width: 840px;
    margin: 0 auto;
}

.post-detail-card {
    background: var(--card-background);
    border-radius: var(--radius-xl);
    padding: var(--space-10);
    box-shadow: var(--shadow-lg);
    margin-bottom: var(--space-8);
    border: 1px solid var(--border-light);
}

.post-header {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
    flex-wrap: wrap;
}

.post-issue-type {
    background: var(--accent-color);
    color: var(--primary-dark);
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius-full);
    font-size: 0.8125rem;
    font-weight: 600;
}

.post-detail-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2.25rem;
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: var(--space-4);
    line-height: 1.25;
    letter-spacing: -0.02em;
}

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

.post-image-container {
    margin-bottom: var(--space-6);
}

.post-detail-image {
    width: 100%;
    max-height: 480px;
    object-fit: cover;
    border-radius: var(--radius-lg);
}

.post-description {
    font-size: 1.0625rem;
    line-height: 1.8;
    color: var(--text-secondary);
    white-space: pre-wrap;
}

/* AI Suggestion */
.ai-suggestion {
    margin-top: var(--space-8);
    padding: var(--space-6);
    background: linear-gradient(135deg, rgba(26, 77, 46, 0.05), rgba(74, 124, 89, 0.08));
    border-radius: var(--radius-lg);
    border: 1px solid rgba(26, 77, 46, 0.15);
    position: relative;
    overflow: hidden;
}

.ai-suggestion::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary-color), var(--secondary-color));
}

.ai-suggestion-header {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: var(--space-3);
    font-size: 0.9375rem;
}

.ai-icon {
    font-size: 1.5rem;
}

/* ================================
   Replies Section
================================ */
.replies-section {
    background: var(--card-background);
    border-radius: var(--radius-xl);
    padding: var(--space-8);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
}

.replies-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: var(--space-6);
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.replies-count {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

.reply-form-container {
    margin-bottom: var(--space-6);
    padding-bottom: var(--space-6);
    border-bottom: 1px solid var(--border-light);
}

.reply-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.login-prompt {
    padding: var(--space-6);
    background: var(--background-secondary);
    border-radius: var(--radius-md);
    text-align: center;
    color: var(--text-muted);
    margin-bottom: var(--space-6);
    border: 1px solid var(--border-light);
}

.replies-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.reply-card {
    padding: var(--space-5);
    background: var(--background-secondary);
    border-radius: var(--radius-md);
    border-left: 3px solid var(--secondary-color);
    position: relative;
    transition: var(--transition);
}

.reply-card:hover {
    background: var(--background-color);
}

/* Best Answer Styles */
.reply-card.best-answer {
    background: linear-gradient(135deg, rgba(26, 77, 46, 0.05), rgba(74, 124, 89, 0.08));
    border-left: 4px solid var(--success-color);
    border: 2px solid var(--success-color);
    box-shadow: 0 2px 12px rgba(26, 77, 46, 0.12);
}

.best-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--text-on-primary);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: var(--space-3);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.reply-actions {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.mark-best-btn {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.mark-best-btn:hover {
    background: var(--primary-color);
    color: var(--text-on-primary);
}

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

.reply-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-3);
    flex-wrap: wrap;
    gap: var(--space-3);
}

.reply-author {
    font-weight: 600;
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: 0.9375rem;
}

.reply-date {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.reply-message {
    color: var(--text-secondary);
    line-height: 1.7;
    white-space: pre-wrap;
    font-size: 0.9375rem;
}

.no-replies {
    text-align: center;
    padding: var(--space-10);
    color: var(--text-muted);
    background: var(--background-secondary);
    border-radius: var(--radius-md);
}

/* ================================
   Not Found
================================ */
.not-found {
    text-align: center;
    padding: var(--space-12);
    background: var(--card-background);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
}

.not-found h2 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-3);
}

.not-found p {
    color: var(--text-muted);
    margin-bottom: var(--space-6);
}

/* ================================
   Footer
================================ */
.footer {
    background: var(--primary-dark);
    padding: var(--space-8) var(--space-6);
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
    margin-top: auto;
}

/* ================================
   Notification System
================================ */
.notification-wrapper {
    position: relative;
}

.notification-bell {
    position: relative;
    background: var(--background-secondary);
    border: none;
    cursor: pointer;
    padding: 0.625rem;
    font-size: 1.125rem;
    color: var(--text-secondary);
    transition: var(--transition);
    border-radius: var(--radius-full);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-bell:hover {
    background: var(--border-color);
    color: var(--primary-color);
}

.notification-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: var(--error-color);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid var(--card-background);
}

.notification-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 360px;
    max-height: 420px;
    overflow-y: auto;
    background: var(--card-background);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    z-index: 200;
    display: none;
}

.notification-dropdown.show {
    display: block;
    animation: slideDown 0.2s ease;
}

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

.notification-header {
    padding: var(--space-4) var(--space-5);
    border-bottom: 1px solid var(--border-light);
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9375rem;
}

.mark-all-read {
    font-size: 0.8125rem;
    color: var(--primary-color);
    cursor: pointer;
    background: none;
    border: none;
    font-weight: 500;
}

.mark-all-read:hover {
    text-decoration: underline;
}

.notification-list {
    max-height: 320px;
    overflow-y: auto;
}

.notification-item {
    padding: var(--space-4) var(--space-5);
    border-bottom: 1px solid var(--border-light);
    cursor: pointer;
    transition: var(--transition);
}

.notification-item:hover {
    background: var(--background-secondary);
}

.notification-item.unread {
    background: rgba(26, 77, 46, 0.04);
    border-left: 3px solid var(--primary-color);
}

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

.notification-message {
    font-size: 0.875rem;
    color: var(--text-primary);
    margin-bottom: var(--space-1);
    line-height: 1.5;
}

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

.notification-empty {
    padding: var(--space-10);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ================================
   Market Prices Page
================================ */
.market-container {
    max-width: 1080px;
    margin: 0 auto;
}

.market-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-8);
    flex-wrap: wrap;
    gap: var(--space-4);
}

.market-header h1 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2.25rem;
    font-weight: 600;
    color: var(--primary-dark);
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.market-header h1::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 2rem;
    background: linear-gradient(180deg, var(--primary-color), var(--secondary-color));
    border-radius: var(--radius-full);
}

.market-filters {
    display: flex;
    gap: var(--space-4);
    margin-bottom: var(--space-6);
    flex-wrap: wrap;
}

.market-filters input {
    padding: 0.75rem 1.25rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    min-width: 280px;
    transition: var(--transition);
}

.market-filters input:hover {
    border-color: var(--text-muted);
}

.market-filters input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(26, 77, 46, 0.1);
}

.market-table-wrapper {
    background: var(--card-background);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    border: 1px solid var(--border-light);
}

.market-table {
    width: 100%;
    border-collapse: collapse;
}

.market-table th,
.market-table td {
    padding: 1.25rem 1.5rem;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}

.market-table th {
    background: var(--background-secondary);
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.market-table tr:last-child td {
    border-bottom: none;
}

.market-table tr:hover td {
    background: var(--background-secondary);
}

.price-value {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.0625rem;
}

.no-prices {
    text-align: center;
    padding: var(--space-12);
    color: var(--text-muted);
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--card-background);
    padding: var(--space-10);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 480px;
    margin: var(--space-4);
    transform: translateY(-20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-xl);
}

.modal-overlay.show .modal-content {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-6);
}

.modal-header h2 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-dark);
}

.modal-close {
    background: var(--background-secondary);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    font-size: 1.25rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: var(--border-color);
    color: var(--text-primary);
}

.modal-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
}

.modal-actions {
    display: flex;
    gap: var(--space-4);
    margin-top: var(--space-2);
}

.modal-actions .btn {
    flex: 1;
}

/* ================================
   Profile Page
================================ */
.profile-container {
    max-width: 840px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
}

.profile-header-card {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: var(--radius-xl);
    padding: var(--space-10);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: var(--space-6);
    color: var(--text-on-primary);
    position: relative;
    overflow: hidden;
}

.profile-header-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(50%, -50%);
}

.profile-avatar {
    width: 96px;
    height: 96px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.2);
    color: var(--text-on-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 700;
    flex-shrink: 0;
    border: 3px solid rgba(255, 255, 255, 0.3);
}

.profile-header-info {
    flex: 1;
    position: relative;
    z-index: 1;
}

.profile-name {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-on-primary);
    margin-bottom: var(--space-2);
    letter-spacing: -0.02em;
}

.profile-email {
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: var(--space-1);
    font-size: 0.9375rem;
}

.profile-joined {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
}

.profile-card {
    background: var(--card-background);
    border-radius: var(--radius-xl);
    padding: var(--space-8);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
}

.profile-card h2 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.375rem;
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: var(--space-5);
}

.profile-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-5);
}

.profile-card-header h2 {
    margin-bottom: 0;
}

.profile-details {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.profile-field {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    padding-bottom: var(--space-4);
    border-bottom: 1px solid var(--border-light);
}

.profile-field:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.field-label {
    font-size: 0.8125rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.field-value {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
}

.profile-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-4);
}

.stat-item {
    text-align: center;
    padding: var(--space-4);
    background: var(--background-secondary);
    border-radius: var(--radius-md);
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-label {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-top: var(--space-1);
}

.profile-posts {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.profile-post-item {
    padding: var(--space-4);
    background: var(--background-secondary);
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.profile-post-item:hover {
    background: var(--background-color);
}

.profile-post-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-1);
}

.profile-post-title a {
    color: inherit;
}

.profile-post-title a:hover {
    color: var(--primary-color);
}

.profile-post-meta {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

/* ================================
   Responsive Design
================================ */
@media (max-width: 768px) {
    :root {
        --space-8: 1.5rem;
        --space-10: 2rem;
        --space-12: 2.5rem;
    }

    .nav-container {
        flex-wrap: wrap;
        gap: var(--space-3);
        padding: var(--space-4);
    }

    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: var(--space-2);
    }

    .page-header {
        padding: var(--space-4) 0;
        margin-bottom: var(--space-6);
    }

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

    .page-header p {
        font-size: 1rem;
    }

    .main-container {
        padding: var(--space-4);
    }

    .auth-card,
    .create-card,
    .post-detail-card,
    .profile-card {
        padding: var(--space-6);
    }

    .post-detail-title {
        font-size: 1.5rem;
    }

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

    .form-actions .btn {
        width: 100%;
    }

    .post-card-content {
        flex-direction: column;
        gap: var(--space-4);
    }

    .post-vote-section {
        flex-direction: row;
        justify-content: flex-start;
        padding-top: 0;
    }

    .profile-header-card {
        flex-direction: column;
        text-align: center;
        padding: var(--space-8);
    }

    .profile-avatar {
        width: 80px;
        height: 80px;
        font-size: 2rem;
    }

    .profile-name {
        font-size: 1.5rem;
    }

    .profile-stats {
        grid-template-columns: 1fr;
    }

    .notification-dropdown {
        width: calc(100vw - 2rem);
        right: -1rem;
    }
}

@media (max-width: 480px) {
    .logo-text {
        font-size: 1rem;
    }

    .btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.8125rem;
    }

    .post-card {
        padding: var(--space-4);
    }

    .post-card-title {
        font-size: 1.0625rem;
    }

    .filter-select {
        width: 100%;
    }

    .auth-title,
    .create-title {
        font-size: 1.5rem;
    }

    .market-header h1 {
        font-size: 1.75rem;
    }

    .replies-section {
        padding: var(--space-5);
    }
}
