/* =============================================
   AI Story Club — Design System
   Based on landing-v3.html reference design
   Direction: Warmth & Approachability
   ============================================= */

/* ===== DESIGN TOKENS ===== */
:root {
    --coral: #FF6B4A;
    --coral-light: #FF8A6B;
    --coral-dark: #E5523A;
    --teal: #2EC4B6;
    --teal-light: #3EDDD0;
    --sunny: #FFD166;
    --purple: #9B5DE5;
    --pink: #F15BB5;

    --gray-50: #FEF9F5;
    --gray-100: #FDF2EB;
    --gray-200: #F5E6D8;
    --gray-300: #E8D5C4;
    --gray-400: #C4B0A0;
    --gray-500: #8A7A6B;
    --gray-600: #5C5045;
    --gray-700: #3D3430;
    --gray-800: #2A2320;
    --gray-900: #1A1512;

    --bg: var(--gray-50);
    --text: var(--gray-800);
    --text-secondary: var(--gray-500);

    --font-display: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', 'Segoe UI', sans-serif;
    --font-body: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', 'Segoe UI', sans-serif;

    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 4rem;
    --space-xl: 8rem;

    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

[data-theme="dark"] {
    --bg: var(--gray-900);
    --text: var(--gray-100);
    --text-secondary: var(--gray-400);
}

/* ===== RESET ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
    font-family: var(--font-body); background: var(--bg); color: var(--text);
    line-height: 1.6; overflow-x: hidden; -webkit-font-smoothing: antialiased;
}
a { color: var(--coral); text-decoration: none; }
a:hover { color: var(--coral-dark); }
img { max-width: 100%; height: auto; }

/* ===== TYPOGRAPHY ===== */
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: 1.25rem; }
p { color: var(--text-secondary); line-height: 1.7; }

/* ===== LAYOUT ===== */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section { padding: var(--space-xl) 24px; }
.section-header { margin-bottom: var(--space-lg); }
.section-tag {
    display: inline-block; font-family: var(--font-display); font-size: 0.85rem;
    font-weight: 600; color: var(--coral); text-transform: uppercase;
    letter-spacing: 0.1em; margin-bottom: 12px;
}
.section-title { font-size: clamp(2rem, 4vw, 3rem); font-weight: 700; color: var(--text); margin-bottom: 16px; }
.section-desc { font-size: 1.1rem; color: var(--text-secondary); max-width: 600px; }
.section-footer { text-align: center; margin-top: var(--space-lg); }
.page-content { padding: 120px 0 60px; min-height: 60vh; }
.page-content h1 { margin-bottom: var(--space-md); }
.page-header { margin-bottom: var(--space-md); }
.content-body { max-width: 800px; margin: 0 auto; }

/* ===== NAV ===== */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 100; padding: 16px 0; transition: all 0.3s var(--ease-out); }
.nav.scrolled { background: rgba(254,249,245,0.9); backdrop-filter: blur(12px); box-shadow: 0 1px 0 var(--gray-200); padding: 10px 0; }
[data-theme="dark"] .nav.scrolled { background: rgba(26,21,18,0.9); }
.nav-inner { max-width: 1200px; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; }
.nav-logo { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; color: var(--text); text-decoration: none; display: flex; align-items: center; gap: 8px; }
.nav-logo:hover { color: var(--text); }
.nav-logo .logo-icon { width: 36px; height: 36px; background: var(--coral); border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; transition: transform 0.3s var(--ease-spring); }
.nav-logo:hover .logo-icon { transform: rotate(-10deg) scale(1.1); }
.nav-logo span { color: var(--coral); }
.nav-links { display: flex; gap: 32px; list-style: none; }
.nav-links a { font-size: 0.9rem; font-weight: 500; color: var(--text-secondary); text-decoration: none; transition: color 0.2s; position: relative; }
.nav-links a::after { content: ''; position: absolute; bottom: -4px; left: 0; width: 0; height: 2px; background: var(--coral); transition: width 0.3s var(--ease-out); }
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { width: 100%; }
.nav-actions { display: flex; align-items: center; gap: 12px; }

/* ===== BUTTONS ===== */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 14px 28px; border-radius: 12px; font-family: var(--font-display); font-size: 0.95rem; font-weight: 600; text-decoration: none; border: none; cursor: pointer; transition: all 0.3s var(--ease-out); }
.btn-primary { background: var(--coral); color: white; box-shadow: 0 4px 20px rgba(255,107,74,0.3); }
.btn-primary:hover { background: var(--coral-dark); transform: translateY(-2px); box-shadow: 0 8px 30px rgba(255,107,74,0.4); color: white; }
.btn-outline { background: transparent; color: var(--text); border: 2px solid var(--gray-300); }
.btn-outline:hover { border-color: var(--coral); color: var(--coral); transform: translateY(-2px); }
.btn-secondary { background: var(--gray-100); color: var(--text); }
.btn-secondary:hover { background: var(--gray-200); }
.btn-sm { padding: 8px 16px; font-size: 0.85rem; border-radius: 10px; }
.btn-lg { padding: 16px 36px; font-size: 1.1rem; }

/* ===== THEME TOGGLE ===== */
.theme-toggle { width: 44px; height: 44px; border-radius: 12px; border: 2px solid var(--gray-200); background: var(--bg); cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; transition: all 0.3s; }
.theme-toggle:hover { border-color: var(--coral); }

/* ===== HERO ===== */
.hero { min-height: 100vh; display: flex; align-items: center; position: relative; overflow: hidden; padding: 120px 24px 80px; }
.hero::before { content: ''; position: absolute; top: -50%; right: -20%; width: 800px; height: 800px; background: radial-gradient(circle, rgba(255,107,74,0.08) 0%, transparent 70%); border-radius: 50%; pointer-events: none; }
.hero-inner { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 1.2fr 1fr; gap: 60px; align-items: center; position: relative; z-index: 1; }
.hero-content { position: relative; }
.hero-badge { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; background: var(--coral); color: white; border-radius: 100px; font-size: 0.85rem; font-weight: 600; margin-bottom: 24px; animation: fadeInUp 0.6s var(--ease-out); }
.hero h1 { font-size: clamp(2.5rem, 5vw, 4.5rem); margin-bottom: 24px; }
.hero h1 .accent { color: var(--coral); position: relative; display: inline-block; }
.hero h1 .accent::after { content: ''; position: absolute; bottom: 4px; left: -4px; right: -4px; height: 12px; background: rgba(255,107,74,0.15); border-radius: 6px; z-index: -1; }
.hero-sub { font-size: 1.2rem; color: var(--text-secondary); line-height: 1.7; margin-bottom: 40px; max-width: 500px; }
.hero-buttons { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-visual { position: relative; }
.hero-card-stack { position: relative; width: 100%; max-width: 400px; margin: 0 auto; aspect-ratio: 3/4; }
.hero-card { position: absolute; width: 100%; background: white; border-radius: 20px; padding: 24px; box-shadow: 0 20px 60px rgba(0,0,0,0.08); border: 2px solid var(--gray-200); transition: transform 0.4s var(--ease-out); }
[data-theme="dark"] .hero-card { background: var(--gray-800); border-color: var(--gray-700); }
.hero-card:nth-child(1) { top: 0; left: 0; transform: rotate(-6deg); z-index: 3; }
.hero-card:nth-child(2) { top: 20px; left: 10px; transform: rotate(3deg); z-index: 2; }
.hero-card:nth-child(3) { top: 40px; left: -5px; transform: rotate(-2deg); z-index: 1; }
.hero-card:hover { transform: rotate(0deg) translateY(-8px); box-shadow: 0 30px 80px rgba(0,0,0,0.12); }
.hero-card-tag { display: inline-block; padding: 4px 12px; background: var(--coral); color: white; border-radius: 6px; font-size: 0.75rem; font-weight: 600; margin-bottom: 12px; }
.hero-card-title { font-family: var(--font-display); font-size: 1.3rem; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.hero-card-text { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.5; }
.hero-stats { display: flex; gap: 40px; margin-top: var(--space-lg); }

/* ===== STATS BANNER ===== */
.stats-banner { background: var(--coral); padding: var(--space-lg) 24px; position: relative; overflow: hidden; }
.stats-banner::before { content: ''; position: absolute; top: -100px; right: -100px; width: 400px; height: 400px; background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%); border-radius: 50%; }
.stats-grid { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; position: relative; z-index: 1; }
.stat-item { text-align: center; color: white; }
.stat-number { font-family: var(--font-display); font-size: clamp(2.5rem, 5vw, 4rem); font-weight: 700; line-height: 1; margin-bottom: 8px; }
.stat-label { font-size: 1.1rem; opacity: 0.9; }

/* ===== STORIES GRID ===== */
.stories-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 32px; }
.story-card { background: white; border-radius: 20px; overflow: hidden; border: 2px solid transparent; transition: all 0.4s var(--ease-out); cursor: pointer; text-decoration: none; color: inherit; display: block; }
[data-theme="dark"] .story-card { background: var(--gray-800); }
.story-card:hover { transform: translateY(-8px); border-color: var(--coral); box-shadow: 0 20px 60px rgba(255,107,74,0.15); }
.story-card-cover { height: 180px; position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.story-card-cover.scifi { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.story-card-cover.fantasy { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); }
.story-card-cover.mystery { background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); }
.story-card-cover-inner { font-size: 4rem; }
.story-card-body { padding: 24px; }
.story-card-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.story-card-category { font-size: 0.8rem; font-weight: 600; color: var(--coral); text-transform: uppercase; letter-spacing: 0.05em; }
.story-card-ai { font-size: 0.75rem; padding: 2px 8px; background: rgba(46,196,182,0.1); color: var(--teal); border-radius: 4px; font-weight: 600; }
.story-card-title { font-family: var(--font-display); font-size: 1.3rem; font-weight: 700; color: var(--text); margin-bottom: 8px; line-height: 1.3; }
.story-card-desc { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.5; margin-bottom: 16px; }
.story-card-footer { display: flex; align-items: center; justify-content: space-between; padding-top: 16px; border-top: 1px solid var(--gray-200); }
[data-theme="dark"] .story-card-footer { border-color: var(--gray-700); }
.story-card-author { display: flex; align-items: center; gap: 8px; }
.story-card-avatar { width: 32px; height: 32px; border-radius: 8px; background: var(--coral); color: white; display: flex; align-items: center; justify-content: center; font-size: 0.8rem; font-weight: 700; }
.story-card-stats { display: flex; gap: 12px; font-size: 0.85rem; color: var(--text-secondary); }

/* ===== CATEGORIES ===== */
.categories-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 16px; }
.category-pill { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 24px 16px; background: white; border-radius: 16px; border: 2px solid var(--gray-200); text-decoration: none; transition: all 0.3s var(--ease-out); color: var(--text); }
[data-theme="dark"] .category-pill { background: var(--gray-800); border-color: var(--gray-700); }
.category-pill:hover { border-color: var(--coral); transform: translateY(-4px); box-shadow: 0 12px 40px rgba(255,107,74,0.12); color: var(--text); }
.category-pill-icon { font-size: 2rem; }
.category-pill-label { font-family: var(--font-display); font-size: 0.9rem; font-weight: 600; color: var(--text); }
.category-pill-count { font-size: 0.8rem; color: var(--text-secondary); }

/* ===== FEATURES ===== */
.features-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 32px; }
.feature-card { padding: 32px; background: white; border-radius: 20px; border: 2px solid var(--gray-200); transition: all 0.4s var(--ease-out); }
[data-theme="dark"] .feature-card { background: var(--gray-800); border-color: var(--gray-700); }
.feature-card:hover { border-color: var(--teal); transform: translateY(-4px); }
.feature-icon { width: 56px; height: 56px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; margin-bottom: 20px; }
.feature-icon.ai { background: rgba(255,107,74,0.1); }
.feature-icon.community { background: rgba(46,196,182,0.1); }
.feature-icon.speed { background: rgba(255,209,102,0.1); }
.feature-icon.security { background: rgba(155,93,229,0.1); }
.feature-title { font-family: var(--font-display); font-size: 1.2rem; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.feature-desc { font-size: 0.95rem; color: var(--text-secondary); line-height: 1.6; }

/* ===== FOOTER ===== */
.footer { background: var(--gray-800); color: var(--gray-300); padding: var(--space-lg) 24px var(--space-md); }
[data-theme="dark"] .footer { background: var(--gray-900); }
.footer-inner { max-width: 1200px; margin: 0 auto; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 60px; margin-bottom: var(--space-lg); }
.footer-col { }
.footer-brand { font-family: var(--font-display); font-size: 1.3rem; font-weight: 700; color: white; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.footer-desc { font-size: 0.95rem; line-height: 1.6; margin-bottom: 20px; }
.footer-title { font-family: var(--font-display); font-size: 0.9rem; font-weight: 700; color: white; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 20px; }
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 12px; padding: 0; }
.footer-links a { color: var(--gray-400); text-decoration: none; font-size: 0.95rem; transition: color 0.2s; }
.footer-links a:hover { color: var(--coral); }
.footer-social { display: flex; gap: 12px; margin-bottom: 20px; }
.footer-social a { width: 40px; height: 40px; border-radius: 10px; background: rgba(255,255,255,0.1); display: flex; align-items: center; justify-content: center; color: var(--gray-400); text-decoration: none; transition: all 0.3s; }
.footer-social a:hover { background: var(--coral); color: white; }
.footer-bottom { padding-top: 32px; border-top: 1px solid var(--gray-700); text-align: center; font-size: 0.9rem; color: var(--gray-500); }

/* ===== BACK TO TOP ===== */
.back-to-top { position: fixed; bottom: 32px; right: 32px; width: 48px; height: 48px; border-radius: 14px; background: var(--coral); color: white; border: none; cursor: pointer; font-size: 1.2rem; box-shadow: 0 8px 30px rgba(255,107,74,0.3); opacity: 0; transform: translateY(20px); transition: all 0.4s var(--ease-out); z-index: 50; display: flex; align-items: center; justify-content: center; }
.back-to-top.visible { opacity: 1; transform: translateY(0); }
.back-to-top:hover { transform: translateY(-4px); }

/* ===== FORMS ===== */
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-weight: 600; margin-bottom: 6px; color: var(--text); font-size: 0.9rem; }
.form-control, .form-input { width: 100%; padding: 12px 16px; border: 2px solid var(--gray-200); border-radius: 12px; font-size: 1rem; font-family: inherit; transition: border-color 0.2s; background: white; color: var(--text); }
[data-theme="dark"] .form-control, [data-theme="dark"] .form-input { background: var(--gray-800); border-color: var(--gray-700); color: var(--gray-100); }
.form-control:focus, .form-input:focus { outline: none; border-color: var(--coral); box-shadow: 0 0 0 3px rgba(255,107,74,0.1); }

/* ===== AUTH PAGES ===== */
.auth-page { min-height: 100vh; display: flex; }
.auth-bg { flex: 1; background: linear-gradient(135deg, var(--coral), var(--coral-dark)); position: relative; overflow: hidden; }
.auth-wrapper { flex: 1; display: flex; align-items: center; justify-content: center; padding: 40px; }
.auth-card { background: white; border-radius: 24px; padding: 40px; box-shadow: 0 20px 60px rgba(0,0,0,0.08); border: 1px solid var(--gray-200); width: 100%; max-width: 420px; }
[data-theme="dark"] .auth-card { background: var(--gray-800); border-color: var(--gray-700); }
.auth-card-header { margin-bottom: 32px; }
.auth-title { font-size: 1.5rem; font-weight: 700; margin-bottom: 4px; }
.auth-subtitle { font-size: 0.9rem; color: var(--text-secondary); }
.auth-form { }
.auth-extra { text-align: center; margin-top: 24px; font-size: 0.9rem; color: var(--text-secondary); }
.auth-extra a { color: var(--coral); font-weight: 600; }
.auth-footer { text-align: center; margin-top: 20px; font-size: 0.8rem; color: var(--text-light); }
.auth-divider { display: flex; align-items: center; gap: 16px; margin: 24px 0; color: var(--text-secondary); font-size: 0.85rem; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--gray-200); }
.auth-social { display: flex; gap: 12px; }
.auth-social-btn { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 12px; border: 2px solid var(--gray-200); border-radius: 12px; background: transparent; cursor: pointer; font-size: 0.9rem; color: var(--text); transition: all 0.3s; }
.auth-social-btn:hover { border-color: var(--coral); color: var(--coral); }
.form-options { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.form-link { font-size: 0.85rem; color: var(--coral); }
.form-link:hover { text-decoration: underline; }
.btn-submit { width: 100%; padding: 14px; background: var(--coral); color: white; border: none; border-radius: 12px; font-size: 1rem; font-weight: 600; cursor: pointer; transition: all 0.3s; }
.btn-submit:hover { background: var(--coral-dark); transform: translateY(-2px); box-shadow: 0 8px 25px rgba(255,107,74,0.3); }

/* ===== STORY DETAIL ===== */
.story-hero { background: linear-gradient(135deg, var(--coral) 0%, var(--coral-dark) 100%); padding: 120px 0 80px; color: white; position: relative; overflow: hidden; }
.story-hero::before { content: ''; position: absolute; top: -50%; right: -20%; width: 600px; height: 600px; background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%); border-radius: 50%; }
.story-hero-content { position: relative; z-index: 1; }
.story-hero-breadcrumb { font-size: 0.85rem; opacity: 0.8; margin-bottom: 16px; }
.story-hero-breadcrumb a { color: white; text-decoration: underline; opacity: 0.9; }
.story-hero-breadcrumb a:hover { opacity: 1; }
.story-hero-title { font-size: clamp(1.8rem, 4vw, 2.5rem); font-weight: 800; margin-bottom: 12px; line-height: 1.2; }
.story-hero-meta { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.story-hero-author { display: flex; align-items: center; gap: 8px; font-size: 0.95rem; margin-bottom: 20px; flex-wrap: wrap; }
.story-hero-author a { color: white; font-weight: 600; }
.story-hero-actions { display: flex; gap: 10px; }
.story-layout { display: grid; grid-template-columns: 1fr 300px; gap: 32px; margin-top: 40px; }
.story-content { min-width: 0; }
.story-summary { background: var(--gray-100); border-radius: 16px; padding: 24px; margin-bottom: 24px; }
.story-summary h3 { font-size: 1.1rem; margin-bottom: 8px; }
.story-summary p { font-size: 0.95rem; color: var(--text-secondary); line-height: 1.7; }
.story-text { font-size: 1rem; line-height: 1.9; color: var(--text); margin-bottom: 32px; }
.story-tags { display: flex; align-items: center; gap: 8px; margin-bottom: 32px; flex-wrap: wrap; }
.story-chapters { margin-bottom: 32px; }
.story-chapters h3 { font-size: 1.1rem; margin-bottom: 16px; }
.story-comments { margin-bottom: 32px; }
.story-comments h3 { font-size: 1.1rem; margin-bottom: 16px; }
.story-sidebar { position: sticky; top: 80px; align-self: start; }
.sidebar-card { background: white; border: 1px solid var(--gray-200); border-radius: 16px; padding: 20px; margin-bottom: 16px; }
[data-theme="dark"] .sidebar-card { background: var(--gray-800); border-color: var(--gray-700); }
.sidebar-card h4 { font-size: 0.95rem; font-weight: 700; margin-bottom: 16px; }
.author-info { display: flex; align-items: center; gap: 12px; }
.author-avatar { width: 48px; height: 48px; border-radius: 50%; background: var(--coral); color: white; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1.2rem; flex-shrink: 0; }
.author-name { font-weight: 600; }
.author-meta { font-size: 0.8rem; color: var(--text-secondary); display: flex; gap: 12px; margin-top: 4px; }
.related-list { display: flex; flex-direction: column; gap: 8px; }
.related-item { display: flex; gap: 12px; padding: 8px 0; text-decoration: none; border-bottom: 1px solid var(--gray-100); color: var(--text); }
.related-item:last-child { border-bottom: none; }
.related-item:hover .related-title { color: var(--coral); }
.related-cover { width: 48px; height: 48px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; flex-shrink: 0; }
.related-info { flex: 1; min-width: 0; }
.related-title { font-size: 0.9rem; font-weight: 600; }
.related-meta { font-size: 0.8rem; color: var(--text-light); }
.chapter-list { display: flex; flex-direction: column; gap: 4px; }
.chapter-item { display: flex; align-items: center; gap: 16px; padding: 12px 16px; background: white; border: 1px solid var(--gray-200); border-radius: 10px; text-decoration: none; color: var(--text); transition: all 0.2s; }
[data-theme="dark"] .chapter-item { background: var(--gray-800); border-color: var(--gray-700); }
.chapter-item:hover { border-color: var(--coral); background: rgba(255,107,74,0.02); }
.chapter-num { font-size: 0.85rem; font-weight: 600; color: var(--coral); min-width: 60px; }
.chapter-title { flex: 1; font-size: 0.95rem; }
.chapter-date { font-size: 0.8rem; color: var(--text-light); }
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-secondary); }

/* ===== COMMENTS ===== */
.comments-list { display: flex; flex-direction: column; gap: 16px; }
.comment-item { display: flex; gap: 12px; }
.comment-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--coral); color: white; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.85rem; flex-shrink: 0; }
.comment-body { flex: 1; }
.comment-author { font-weight: 600; font-size: 0.9rem; margin-bottom: 4px; }
.comment-text { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.6; margin-bottom: 4px; }
.comment-date { font-size: 0.8rem; color: var(--text-light); }

/* ===== TAG ===== */
.tag-item { display: inline-block; padding: 4px 12px; background: var(--gray-100); border-radius: 100px; font-size: 0.85rem; color: var(--text-secondary); text-decoration: none; transition: all 0.2s; }
.tag-item:hover { background: var(--coral); color: white; }
.tag { display: inline-block; padding: 4px 12px; background: var(--gray-100); border-radius: 100px; font-size: 0.85rem; color: var(--text-secondary); }

/* ===== PROFILE ===== */
.profile-page { padding: 120px 0 60px; min-height: 60vh; }
.profile-header { display: flex; align-items: center; gap: 32px; margin-bottom: 40px; padding-bottom: 40px; border-bottom: 1px solid var(--gray-200); }
.profile-stats { display: flex; gap: 40px; }
.profile-stories { margin-top: 40px; }

/* ===== SEARCH ===== */
.search-form { margin-bottom: 32px; }
.search-results { display: flex; flex-direction: column; gap: 16px; }
.input-group { display: flex; gap: 8px; }

/* ===== PAGINATION ===== */
.pagination { display: flex; gap: 8px; justify-content: center; padding: 24px 0; }
.page-link { padding: 8px 14px; border-radius: 10px; background: white; border: 1px solid var(--gray-200); color: var(--text); text-decoration: none; font-size: 0.85rem; transition: all 0.2s; }
.page-link:hover { border-color: var(--coral); color: var(--coral); }
.page-link.active { background: var(--coral); color: white; border-color: var(--coral); }

/* ===== FLASH MESSAGES ===== */
.flash-messages { position: fixed; top: 80px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; }
.flash-message { display: flex; align-items: flex-start; gap: 12px; padding: 14px 18px; border-radius: 12px; box-shadow: 0 10px 40px rgba(0,0,0,0.1); min-width: 320px; max-width: 450px; animation: slideIn 0.3s var(--ease-out); }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
.flash-message--success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }
.flash-message--error { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.flash-message--warning { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }
.flash-message--info { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; }
.flash-message__close { background: none; border: none; cursor: pointer; font-size: 1rem; opacity: 0.5; padding: 0; line-height: 1; }

/* ===== TABLE ===== */
.data-table { background: white; border: 1px solid var(--gray-200); border-radius: 16px; overflow: hidden; }
.data-table table { width: 100%; border-collapse: collapse; }
.data-table th { padding: 12px 16px; text-align: left; font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-secondary); background: var(--gray-100); border-bottom: 1px solid var(--gray-200); }
.data-table td { padding: 12px 16px; border-bottom: 1px solid var(--gray-100); font-size: 0.9rem; }

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInRight { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: translateX(0); } }
.animate-on-scroll { opacity: 0; transform: translateY(30px); transition: all 0.6s var(--ease-out); }
.animate-on-scroll.visible { opacity: 1; transform: translateY(0); }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .hero-inner { grid-template-columns: 1fr; gap: 40px; }
    .hero-card-stack { display: none; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
    .story-layout { grid-template-columns: 1fr; }
    .story-sidebar { position: static; }
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .hero h1 { font-size: 2.5rem; }
    .hero-visual { order: -1; }
    .stories-grid { grid-template-columns: 1fr; }
    .features-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; gap: 32px; }
    .stats-grid { grid-template-columns: 1fr; gap: 24px; }
    .auth-page { flex-direction: column; }
    .auth-bg { display: none; }
    .flash-messages { left: 16px; right: 16px; }
    .flash-message { min-width: auto; max-width: none; }
}
