/* Modern Blog CSS - Contemporary Design */

/* CSS Variables for Modern Design System */
:root {
    /* Colors */
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #f59e0b;
    --accent: #ec4899;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    
    /* Neutral Colors */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    
    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-display: 'Playfair Display', Georgia, serif;
    
    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    
    /* Transitions */
    --transition-fast: 150ms ease-in-out;
    --transition-normal: 250ms ease-in-out;
    --transition-slow: 350ms ease-in-out;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    line-height: 1.6;
    color: var(--gray-800);
    background: linear-gradient(135deg, #0c0c0c 0%, #1a1a2e 25%, #16213e 50%, #0f3460 75%, #533483 100%);
    background-attachment: fixed;
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* Animated Background Particles */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    animation: float 20s ease-in-out infinite;
    z-index: -1;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-20px) rotate(1deg); }
    66% { transform: translateY(10px) rotate(-1deg); }
}

/* Modern Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--gray-200);
    z-index: 1000;
    transition: var(--transition-normal);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--gray-900);
    text-decoration: none;
}

.brand-logo {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.brand-text {
    font-family: var(--font-display);
    font-weight: 600;
}

.nav-menu {
    display: flex;
    gap: var(--space-lg);
    align-items: center;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-lg);
    color: var(--gray-600);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition-fast);
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
    background: var(--gray-50);
    transform: translateY(-1px);
}

.nav-link i {
    font-size: 0.9rem;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.bar {
    width: 25px;
    height: 3px;
    background: var(--gray-700);
    border-radius: 2px;
    transition: var(--transition-fast);
}

/* Main Content */
.main-content {
    margin-top: 70px;
    min-height: calc(100vh - 70px);
}

.page {
    display: none;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.page.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
    animation: slideInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Modern Hero Section */
.hero-section {
    padding: var(--space-3xl) var(--space-lg);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3xl);
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    min-height: 80vh;
}

.hero-content {
    z-index: 2;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-2xl);
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: var(--space-lg);
}

.hero-title {
    font-family: var(--font-display);
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.1;
    color: white;
    margin-bottom: var(--space-lg);
    animation: slideInUp 1s ease-out;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

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

.gradient-text {
    background: linear-gradient(135deg, #fbbf24, #f59e0b, #d97706, #fbbf24);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease-in-out infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.hero-description {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: var(--space-2xl);
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: var(--space-lg);
    flex-wrap: wrap;
}

/* Modern Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-xl);
    border: none;
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition-normal);
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: var(--transition-normal);
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.btn-primary:hover::after {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 35px rgba(99, 102, 241, 0.4);
}

.btn-outline {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.btn-large {
    padding: var(--space-lg) var(--space-2xl);
    font-size: 1.1rem;
}

.btn-full {
    width: 100%;
    justify-content: center;
}

/* Hero Visual */
.hero-visual {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.floating-cards {
    position: relative;
    width: 300px;
    height: 300px;
}

.card {
    position: absolute;
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-xl);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
    animation: float 6s ease-in-out infinite, pulse 2s ease-in-out infinite;
    cursor: pointer;
    transition: all 0.3s ease;
}

.card:hover {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.2);
}

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

.card i {
    font-size: 1.5rem;
    margin-bottom: var(--space-xs);
}

.card-1 {
    top: 20px;
    left: 50px;
    animation-delay: 0s;
}

.card-2 {
    top: 120px;
    right: 30px;
    animation-delay: 2s;
}

.card-3 {
    bottom: 40px;
    left: 80px;
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* Section Headers */
.section-header {
    text-align: center;
    margin-bottom: var(--space-2xl);
}

.section-header h1,
.section-header h2 {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 600;
    color: white;
    margin-bottom: var(--space-md);
}

.section-header p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
}

/* Recent Posts Section */
.recent-posts-section {
    padding: var(--space-3xl) var(--space-lg);
    max-width: 1200px;
    margin: 0 auto;
}

/* Modern Posts Grid */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: var(--space-xl);
}

.post-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-2xl);
    padding: var(--space-xl);
    box-shadow: var(--shadow-lg);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.post-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.post-card:hover::before {
    transform: scaleX(1);
}

.post-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
    background: rgba(255, 255, 255, 0.98);
}

/* Lighting Effect for Clicked Posts */
.post-card.clicked {
    animation: lightingEffect 2s ease-in-out, pulseGlow 0.5s ease-in-out;
    box-shadow: 
        0 0 20px rgba(99, 102, 241, 0.6),
        0 0 40px rgba(99, 102, 241, 0.4),
        0 0 60px rgba(99, 102, 241, 0.2),
        0 25px 50px rgba(0, 0, 0, 0.15);
    border: 2px solid rgba(99, 102, 241, 0.8);
    transform: translateY(-12px) scale(1.05);
}

@keyframes pulseGlow {
    0% { transform: translateY(-12px) scale(1.05); }
    50% { transform: translateY(-12px) scale(1.08); }
    100% { transform: translateY(-12px) scale(1.05); }
}

@keyframes lightingEffect {
    0% {
        box-shadow: 
            0 0 5px rgba(99, 102, 241, 0.3),
            0 0 10px rgba(99, 102, 241, 0.2),
            0 0 15px rgba(99, 102, 241, 0.1),
            var(--shadow-lg);
    }
    25% {
        box-shadow: 
            0 0 30px rgba(99, 102, 241, 0.8),
            0 0 60px rgba(99, 102, 241, 0.6),
            0 0 90px rgba(99, 102, 241, 0.4),
            0 25px 50px rgba(0, 0, 0, 0.15);
    }
    50% {
        box-shadow: 
            0 0 40px rgba(99, 102, 241, 0.9),
            0 0 80px rgba(99, 102, 241, 0.7),
            0 0 120px rgba(99, 102, 241, 0.5),
            0 25px 50px rgba(0, 0, 0, 0.15);
    }
    75% {
        box-shadow: 
            0 0 30px rgba(99, 102, 241, 0.8),
            0 0 60px rgba(99, 102, 241, 0.6),
            0 0 90px rgba(99, 102, 241, 0.4),
            0 25px 50px rgba(0, 0, 0, 0.15);
    }
    100% {
        box-shadow: 
            0 0 20px rgba(99, 102, 241, 0.6),
            0 0 40px rgba(99, 102, 241, 0.4),
            0 0 60px rgba(99, 102, 241, 0.2),
            0 25px 50px rgba(0, 0, 0, 0.15);
    }
}

.post-card h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: var(--space-md);
    line-height: 1.3;
}

.post-meta {
    display: flex;
    gap: var(--space-lg);
    margin-bottom: var(--space-md);
    font-size: 0.9rem;
    color: var(--gray-500);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.post-excerpt {
    color: var(--gray-600);
    margin-bottom: var(--space-lg);
    line-height: 1.6;
}

.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.tag {
    background: var(--gray-100);
    color: var(--gray-700);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-md);
    font-size: 0.8rem;
    font-weight: 500;
}

/* Write Post Page */
.write-container {
    max-width: 800px;
    margin: 0 auto;
    padding: var(--space-3xl) var(--space-lg);
}

.write-header {
    text-align: center;
    margin-bottom: var(--space-2xl);
}

.write-header h1 {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 600;
    color: white;
    margin-bottom: var(--space-md);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
}

.write-header p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
}

.post-form {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-2xl);
    padding: var(--space-2xl);
    box-shadow: var(--shadow-xl);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-lg);
}

.form-group {
    margin-bottom: var(--space-xl);
}

.form-group label {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: var(--space-sm);
    font-size: 1rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: var(--space-md);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition-fast);
    background: white;
}

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

/* Modern Editor */
.editor-container {
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: white;
}

.editor-toolbar {
    display: flex;
    gap: var(--space-sm);
    padding: var(--space-md);
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
    flex-wrap: wrap;
}

.toolbar-group {
    display: flex;
    gap: var(--space-xs);
    padding-right: var(--space-md);
    border-right: 1px solid var(--gray-200);
}

.toolbar-group:last-child {
    border-right: none;
}

.toolbar-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-600);
    transition: var(--transition-fast);
}

.toolbar-btn:hover {
    background: var(--gray-200);
    color: var(--gray-900);
}

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

.post-editor {
    min-height: 300px;
    padding: var(--space-lg);
    font-size: 1rem;
    line-height: 1.6;
    border: none;
    outline: none;
}

.post-editor:empty:before {
    content: attr(placeholder);
    color: var(--gray-400);
    font-style: italic;
}

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

/* Posts Container */
.posts-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--space-3xl) var(--space-lg);
}

.posts-controls {
    display: flex;
    gap: var(--space-lg);
    margin-bottom: var(--space-2xl);
    flex-wrap: wrap;
}

.search-container {
    position: relative;
    flex: 1;
    min-width: 300px;
}

.search-container i {
    position: absolute;
    left: var(--space-md);
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
}

.search-input,
.sort-select {
    width: 100%;
    padding: var(--space-md) var(--space-md) var(--space-md) 3rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    color: var(--gray-800);
}

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

.sort-select {
    min-width: 180px;
    padding-left: var(--space-md);
}

/* Authentication Pages */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 70px);
    padding: var(--space-xl);
}

.auth-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-2xl);
    padding: var(--space-2xl);
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 450px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.auth-header {
    text-align: center;
    margin-bottom: var(--space-2xl);
}

.auth-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-lg);
    color: white;
    font-size: 2rem;
}

.auth-header h2 {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: var(--space-sm);
}

.auth-header p {
    color: var(--gray-600);
    font-size: 1rem;
}

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

.input-container {
    position: relative;
}

.input-container i {
    position: absolute;
    left: var(--space-md);
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
    z-index: 1;
}

.input-container input,
.input-container textarea {
    padding-left: 3rem;
}

.auth-switch {
    text-align: center;
    margin-top: var(--space-lg);
}

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

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

/* Profile Page */
.profile-container {
    max-width: 800px;
    margin: 0 auto;
    padding: var(--space-3xl) var(--space-lg);
}

.profile-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-2xl);
    padding: var(--space-2xl);
    box-shadow: var(--shadow-xl);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Edit Profile Page */
.edit-profile-container {
    max-width: 600px;
    margin: 0 auto;
    padding: var(--space-3xl) var(--space-lg);
}

.edit-profile-header {
    text-align: center;
    margin-bottom: var(--space-2xl);
}

.edit-profile-header h1 {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 600;
    color: white;
    margin-bottom: var(--space-md);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
}

.edit-profile-header p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
}

.edit-profile-form {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-2xl);
    padding: var(--space-2xl);
    box-shadow: var(--shadow-xl);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.profile-header {
    display: flex;
    gap: var(--space-xl);
    margin-bottom: var(--space-2xl);
    align-items: flex-start;
}

.profile-avatar {
    font-size: 4rem;
    color: var(--primary);
    flex-shrink: 0;
}

.profile-info h2 {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: var(--space-sm);
}

.profile-info p {
    color: var(--gray-600);
    margin-bottom: var(--space-sm);
    min-height: 1.2em; /* Ensure bio has minimum height even when empty */
}

#profile-bio {
    font-style: italic; /* Make bio visually distinct */
    color: var(--gray-500);
    font-size: 0.95rem;
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-lg);
    margin-bottom: var(--space-2xl);
}

.stat-card {
    background: var(--gray-50);
    border-radius: var(--radius-xl);
    padding: var(--space-lg);
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.stat-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.stat-content {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--gray-600);
}

.profile-actions {
    display: flex;
    gap: var(--space-lg);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--gray-200);
}

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

.modal-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    margin: 5% auto;
    padding: 0;
    border-radius: var(--radius-2xl);
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.modal-header {
    padding: var(--space-xl) var(--space-2xl);
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
}

.modal-header h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

.close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: var(--space-sm);
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
}

.close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.modal-body {
    padding: var(--space-2xl);
}

.modal-footer {
    padding: var(--space-xl) var(--space-2xl);
    border-top: 1px solid var(--gray-200);
    display: flex;
    gap: var(--space-lg);
    justify-content: flex-end;
    background: var(--gray-50);
    border-radius: 0 0 var(--radius-2xl) var(--radius-2xl);
}

.post-actions {
    display: flex;
    gap: var(--space-lg);
    margin-top: var(--space-xl);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--gray-200);
}

/* Footer */
.footer {
    background: rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: var(--space-3xl) 0 var(--space-lg) 0;
    margin-top: var(--space-3xl);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: var(--space-3xl);
    margin-bottom: var(--space-xl);
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.footer-brand .brand-logo {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    margin-bottom: var(--space-sm);
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.footer-brand .brand-text {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 600;
    color: white;
    margin-bottom: var(--space-xs);
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    margin-bottom: var(--space-lg);
}

.social-media {
    display: flex;
    gap: var(--space-md);
}

.social-icon {
    width: 45px;
    height: 45px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    text-decoration: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.social-icon:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    text-decoration: none;
    color: white;
}

.social-icon.instagram {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.social-icon.twitter {
    background: #000000;
}

.social-icon.github {
    background: #333333;
}

.social-icon.linkedin {
    background: #0077b5;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-xl);
}

.footer-section h4 {
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: var(--space-md);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section li {
    margin-bottom: var(--space-sm);
}

.footer-section a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.footer-section a:hover {
    color: white;
    text-decoration: none;
    transform: translateX(4px);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: var(--space-lg);
    text-align: center;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
    font-size: 0.9rem;
}

.footer-brand .brand-text {
    font-size: 1.1rem;
}

.footer-content p {
    color: var(--gray-600);
    font-size: 0.9rem;
}

/* Messages */
.message {
    padding: var(--space-md);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-lg);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-weight: 500;
}

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

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

.message.info {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    border: 1px solid rgba(99, 102, 241, 0.2);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: var(--space-3xl);
    color: rgba(255, 255, 255, 0.8);
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: var(--space-lg);
    color: rgba(255, 255, 255, 0.6);
}

.empty-state h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    color: white;
    margin-bottom: var(--space-md);
}

.empty-state p {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.7);
}

/* Authentication Required */
.auth-required {
    text-align: center;
    padding: var(--space-3xl);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-xl);
    border: 1px solid rgba(255, 255, 255, 0.2);
    max-width: 500px;
    margin: var(--space-3xl) auto;
}

.auth-required i {
    font-size: 4rem;
    color: var(--primary);
    margin-bottom: var(--space-lg);
}

.auth-required h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: var(--space-md);
}

.auth-required p {
    color: var(--gray-600);
    margin-bottom: var(--space-xl);
}

.auth-required .btn {
    margin: var(--space-sm);
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding-top: var(--space-2xl);
        transition: var(--transition-normal);
    }

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

    .nav-toggle {
        display: flex;
    }

    .nav-toggle.active .bar:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .nav-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active .bar:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }

    .hero-section {
        grid-template-columns: 1fr;
        text-align: center;
        padding: var(--space-2xl) var(--space-lg);
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-actions {
        justify-content: center;
    }

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

    .posts-controls {
        flex-direction: column;
    }

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

    .profile-header {
        flex-direction: column;
        text-align: center;
    }

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

    .modal-content {
        width: 95%;
        margin: 10% auto;
    }

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

@media (max-width: 480px) {
    .nav-container {
        padding: 0 var(--space-md);
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .write-container,
    .posts-container,
    .profile-container {
        padding: var(--space-lg) var(--space-md);
    }

    .modal-body {
        padding: var(--space-lg);
    }

    .modal-footer {
        padding: var(--space-lg);
    }

    .footer-content {
        padding: 0 var(--space-md);
        grid-template-columns: 1fr;
        gap: var(--space-xl);
        text-align: center;
    }

    .footer-links {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }

    .social-media {
        justify-content: center;
    }

    .auth-card {
        padding: var(--space-xl);
    }
}

/* Loading Animation */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: var(--space-2xl);
}

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

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

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Focus Styles */
*:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Selection Styles */
::selection {
    background: var(--primary);
    color: white;
}