:root {
    --white: #FFFFFF; --off-white: #FAFAFA; --paper: #F5F5F3;
    --gray-50: #F9F9F9; --gray-100: #F0F0EE; --gray-200: #E5E5E3;
    --gray-300: #D4D4D2; --gray-400: #A3A3A1; --gray-500: #737371;
    --gray-600: #525250; --gray-700: #40403E; --gray-800: #262624; --gray-900: #1A1A18; --black: #000000;
    --accent: #c41e3a; --accent-hover: #a01830; --accent-light: rgba(196,30,58,0.08);
    --accent-glow: rgba(196,30,58,0.15);
    --font-sans: 'Inter', -apple-system, sans-serif; --font-serif: 'Newsreader', Georgia, serif; --font-mono: 'JetBrains Mono', monospace;
    --ease-swiss: cubic-bezier(0.25, 0.1, 0.25, 1);
    --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --sidebar-width: 280px;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { font-size: 16px; scroll-behavior: smooth; }
body { font-family: var(--font-sans); background: var(--off-white); color: var(--gray-900); line-height: 1.5; min-height: 100vh; -webkit-font-smoothing: antialiased; }
::selection { background: var(--accent); color: var(--white); }
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--gray-400); }

/* Parallax Background */
.parallax-bg { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 0; overflow: hidden; pointer-events: none; }
.floating-quote { position: absolute; color: rgba(196,30,58,0.04); font-family: var(--font-sans); font-weight: 700; user-select: none; will-change: transform; animation: floatQuote 25s ease-in-out infinite; }
.floating-quote.large { font-size: 400px; } .floating-quote.medium { font-size: 250px; } .floating-quote.small { font-size: 120px; } .floating-quote.tiny { font-size: 60px; opacity: 0.5; }
@keyframes floatQuote { 0%, 100% { transform: translateY(0) rotate(0deg); } 25% { transform: translateY(-30px) rotate(2deg); } 50% { transform: translateY(-15px) rotate(-1deg); } 75% { transform: translateY(-40px) rotate(1deg); } }

/* App Layout */
.app-layout { display: flex; min-height: 100vh; position: relative; z-index: 1; }

/* Desktop Sidebar - Refined */
.sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: var(--sidebar-width); background: rgba(255,255,255,0.85); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); border-right: 1px solid rgba(0,0,0,0.06); z-index: 100; display: flex; flex-direction: column; transition: transform 0.4s var(--ease-smooth); }

.sidebar-header { padding: 28px 24px 20px; }
.sidebar-logo { display: flex; align-items: center; gap: 8px; }
.sidebar-logo .quote-mark { color: var(--accent); font-size: 32px; font-weight: 300; line-height: 1; }
.sidebar-logo .brand-text { font-family: var(--font-sans); font-size: 15px; font-weight: 600; letter-spacing: 3px; text-transform: uppercase; color: var(--gray-900); }

.sidebar-search { padding: 0 20px 20px; }
.search-input { width: 100%; padding: 12px 16px 12px 44px; background: var(--gray-50); border: 1px solid transparent; border-radius: 12px; font-size: 14px; color: var(--gray-900); transition: all 0.2s; outline: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23737371' stroke-width='1.5'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: 14px center; }
.search-input::placeholder { color: var(--gray-400); }
.search-input:focus { background: var(--white); border-color: var(--gray-200); box-shadow: 0 0 0 4px var(--accent-light); }

.sidebar-create-btn { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 0 20px 24px; padding: 14px; background: linear-gradient(135deg, var(--accent) 0%, #d4334f 100%); color: var(--white); border: none; border-radius: 14px; font-size: 13px; font-weight: 600; cursor: pointer; transition: all 0.3s var(--ease-smooth); box-shadow: 0 4px 16px rgba(196,30,58,0.25); }
.sidebar-create-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(196,30,58,0.35); }
.sidebar-create-btn svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 2; fill: none; }

.sidebar-nav { flex: 1; padding: 0 12px; overflow-y: auto; }
.sidebar-section { font-size: 10px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; color: var(--gray-400); padding: 20px 12px 8px; }
.sidebar-item { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 12px; font-size: 14px; font-weight: 500; color: var(--gray-600); cursor: pointer; transition: all 0.2s; background: none; border: none; text-align: left; width: calc(100% - 8px); margin: 2px 4px; position: relative; }
.sidebar-item::before { content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 3px; height: 0; background: var(--accent); border-radius: 0 2px 2px 0; transition: height 0.2s; }
.sidebar-item:hover { background: var(--gray-50); color: var(--gray-900); }
.sidebar-item.active { background: var(--accent-light); color: var(--accent); }
.sidebar-item.active::before { height: 24px; }
.sidebar-item svg { width: 20px; height: 20px; stroke-width: 1.5; flex-shrink: 0; stroke: currentColor; fill: none; }

.sidebar-footer { padding: 20px; border-top: 1px solid rgba(0,0,0,0.06); }
.sidebar-profile { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 12px; cursor: pointer; transition: background 0.2s; }
.sidebar-profile:hover { background: var(--gray-50); }
.sidebar-profile img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; border: 2px solid var(--white); box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
.sidebar-profile-info { flex: 1; min-width: 0; }
.sidebar-profile-name { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-profile-handle { font-size: 12px; color: var(--gray-500); }

/* Main Content */
.main-content { flex: 1; margin-left: var(--sidebar-width); }
.content-area { max-width: 1400px; margin: 0 auto; padding: 40px 48px 120px; }

/* Screen Management */
.screen { display: none; opacity: 0; }
.screen.active { display: block; animation: fadeIn 0.5s var(--ease-smooth) forwards; }
@keyframes fadeIn { to { opacity: 1; } }

/* Feed Header - Modern */
.feed-header { margin-bottom: 40px; opacity: 0; animation: slideUp 0.6s var(--ease-smooth) 0.1s forwards; }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.feed-header h1 { font-family: var(--font-serif); font-size: 2.5rem; font-weight: 500; letter-spacing: -0.03em; margin-bottom: 8px; color: var(--gray-900); }
.feed-header p { font-size: 16px; color: var(--gray-500); font-weight: 400; }

/* Categories Pills */
.categories-bar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 32px; opacity: 0; animation: slideUp 0.6s var(--ease-smooth) 0.2s forwards; }
.category-tag { padding: 10px 20px; background: rgba(255,255,255,0.8); backdrop-filter: blur(10px); border: 1px solid rgba(0,0,0,0.06); border-radius: 50px; font-size: 13px; font-weight: 500; color: var(--gray-600); cursor: pointer; transition: all 0.2s; }
.category-tag:hover { background: var(--white); border-color: var(--gray-300); transform: translateY(-1px); }
.category-tag.active { background: var(--gray-900); color: var(--white); border-color: var(--gray-900); }

/* Featured Article - Hero Card */
.featured-article { background: var(--white); border-radius: 24px; overflow: hidden; margin-bottom: 48px; display: grid; grid-template-columns: 1.2fr 1fr; box-shadow: 0 4px 24px rgba(0,0,0,0.04); border: 1px solid rgba(0,0,0,0.04); opacity: 0; animation: slideUp 0.6s var(--ease-smooth) 0.3s forwards; transition: transform 0.3s, box-shadow 0.3s; cursor: pointer; }
.featured-article:hover { transform: translateY(-4px); box-shadow: 0 12px 40px rgba(0,0,0,0.08); }
.featured-image { width: 100%; height: 420px; object-fit: cover; background: linear-gradient(135deg, var(--gray-100) 0%, var(--gray-200) 100%); }
.featured-content { padding: 48px 40px; display: flex; flex-direction: column; justify-content: center; }
.featured-badge { display: inline-flex; align-items: center; gap: 8px; font-size: 10px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--accent); margin-bottom: 20px; }
.featured-badge::before { content: ''; width: 8px; height: 8px; background: var(--accent); border-radius: 50%; animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.6; transform: scale(1.2); } }
.featured-title { font-family: var(--font-serif); font-size: 2rem; font-weight: 500; line-height: 1.2; letter-spacing: -0.02em; margin-bottom: 16px; color: var(--gray-900); }
.featured-excerpt { font-size: 16px; color: var(--gray-600); line-height: 1.7; margin-bottom: 28px; }
.featured-meta { display: flex; align-items: center; gap: 16px; }
.featured-author { display: flex; align-items: center; gap: 14px; }
.featured-author img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; border: 2px solid var(--white); box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
.featured-author-info h4 { font-size: 15px; font-weight: 600; color: var(--gray-900); }
.featured-author-info p { font-size: 13px; color: var(--gray-500); }

/* Article Grid - Instagram x Medium Style */
.feed-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }

/* Article Card - Refined */
.article-card { background: var(--white); border-radius: 20px; overflow: hidden; box-shadow: 0 2px 16px rgba(0,0,0,0.04); border: 1px solid rgba(0,0,0,0.04); transition: all 0.3s var(--ease-smooth); cursor: pointer; opacity: 0; animation: cardReveal 0.6s var(--ease-smooth) forwards; }
.article-card:nth-child(1) { animation-delay: 0.4s; }
.article-card:nth-child(2) { animation-delay: 0.5s; }
.article-card:nth-child(3) { animation-delay: 0.6s; }
.article-card:nth-child(4) { animation-delay: 0.7s; }
.article-card:nth-child(5) { animation-delay: 0.8s; }
.article-card:nth-child(6) { animation-delay: 0.9s; }
@keyframes cardReveal { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
.article-card:hover { transform: translateY(-8px); box-shadow: 0 16px 48px rgba(0,0,0,0.1); }
.article-card-image { width: 100%; aspect-ratio: 4/3; object-fit: cover; background: linear-gradient(135deg, var(--gray-100) 0%, var(--gray-200) 100%); position: relative; }
.article-card-image::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.3) 0%, transparent 50%); opacity: 0; transition: opacity 0.3s; }
.article-card:hover .article-card-image::after { opacity: 1; }
.article-card-body { padding: 24px; }
.article-card-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.article-card-avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; border: 2px solid var(--white); box-shadow: 0 2px 6px rgba(0,0,0,0.1); }
.article-card-author { font-size: 13px; font-weight: 600; color: var(--gray-900); }
.article-card-time { font-size: 12px; color: var(--gray-400); }
.status-badge { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 6px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 12px; }
.status-badge.published { background: rgba(34,197,94,0.1); color: #16a34a; }
.status-badge.draft { background: rgba(234,179,8,0.1); color: #ca8a04; }
.status-badge.archived { background: rgba(107,114,128,0.1); color: #6b7280; }
.article-card-category { display: inline-block; font-size: 10px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }
.article-card-title { font-family: var(--font-serif); font-size: 18px; font-weight: 500; line-height: 1.35; margin-bottom: 10px; color: var(--gray-900); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.article-card-excerpt { font-size: 14px; color: var(--gray-500); line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 16px; }
.article-card-actions { display: flex; align-items: center; justify-content: space-between; padding-top: 16px; border-top: 1px solid var(--gray-100); }
.actions-group { display: flex; gap: 20px; }
.action-btn { display: inline-flex; align-items: center; gap: 6px; background: none; border: none; font-size: 13px; font-weight: 500; color: var(--gray-400); cursor: pointer; transition: all 0.2s; padding: 0; }
.action-btn:hover { color: var(--gray-900); }
.action-btn svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 1.5; fill: none; transition: all 0.2s; }
.action-btn.liked { color: var(--accent); }
.action-btn.liked svg { fill: var(--accent); stroke: var(--accent); }
.action-btn.saved svg { fill: var(--gray-900); stroke: var(--gray-900); }

/* Reading Layout */
.reading-layout { max-width: 780px; margin: 0 auto; }
.reading-header { display: flex; justify-content: space-between; align-items: center; padding: 20px 0; margin-bottom: 40px; border-bottom: 1px solid rgba(0,0,0,0.06); }
.back-btn { display: inline-flex; align-items: center; gap: 10px; background: none; border: none; font-size: 14px; color: var(--gray-500); cursor: pointer; transition: color 0.2s; padding: 10px 16px; border-radius: 10px; }
.back-btn:hover { color: var(--gray-900); background: var(--gray-50); }
.back-btn svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 1.5; fill: none; }
.tts-btn { display: inline-flex; align-items: center; gap: 10px; background: none; border: 1px solid var(--gray-200); padding: 10px 20px; border-radius: 12px; font-size: 13px; font-weight: 500; text-transform: uppercase; letter-spacing: 1px; color: var(--gray-600); cursor: pointer; transition: all 0.2s; }
.tts-btn:hover { background: var(--gray-50); border-color: var(--gray-300); }
.tts-btn.active { background: var(--gray-900); color: var(--white); border-color: var(--gray-900); }
.tts-btn svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 1.5; fill: none; }
.article-category-badge { display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--accent); margin-bottom: 20px; padding-bottom: 10px; border-bottom: 2px solid var(--accent); }
.article-full-title { font-family: var(--font-serif); font-size: 3rem; font-weight: 500; line-height: 1.15; letter-spacing: -0.03em; margin-bottom: 28px; color: var(--gray-900); }
.article-author-block { display: flex; align-items: center; gap: 20px; padding-bottom: 28px; border-bottom: 1px solid rgba(0,0,0,0.06); margin-bottom: 28px; }
.author-photo { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; border: 3px solid var(--white); box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.author-details h4 { font-size: 16px; font-weight: 600; color: var(--gray-900); }
.author-details p { font-size: 14px; color: var(--gray-500); }
.article-hero { width: 100%; border-radius: 20px; margin-bottom: 40px; background: linear-gradient(135deg, var(--gray-100) 0%, var(--gray-200) 100%); }
.article-body { font-family: var(--font-serif); font-size: 18px; line-height: 1.85; color: var(--gray-800); }
.article-body p { margin-bottom: 28px; }
.article-body p:first-of-type::first-letter { font-size: 4.5rem; float: left; line-height: 1; margin-right: 12px; margin-top: 0.08em; font-weight: 500; color: var(--accent); }
.article-footer { display: flex; justify-content: center; gap: 56px; padding: 40px 0; border-top: 2px solid var(--gray-900); margin-top: 48px; }
.action-swiss { display: flex; flex-direction: column; align-items: center; gap: 8px; background: none; border: none; cursor: pointer; color: var(--gray-400); transition: all 0.2s; padding: 12px; border-radius: 12px; }
.action-swiss:hover { color: var(--gray-900); background: var(--gray-50); }
.action-swiss svg { width: 26px; height: 26px; stroke: currentColor; stroke-width: 1.5; fill: none; }
.action-swiss span { font-size: 11px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; }
.action-swiss.liked { color: var(--accent); }
.action-swiss.liked svg { fill: var(--accent); }

/* Globe Container */
#globe-container { width: 100%; max-width: 1000px; height: 70vh; min-height: 500px; position: relative; cursor: grab; background: radial-gradient(circle at center, #ffffff 0%, #f0f0f0 100%); border-radius: 24px; box-shadow: 0 8px 32px rgba(0,0,0,0.06); overflow: hidden; margin: 0 auto; border: 1px solid rgba(0,0,0,0.04); }
#globe-container:active { cursor: grabbing; }
#globe-canvas { width: 100%; height: 100%; }
.stats-panel { position: absolute; bottom: 24px; left: 24px; background: rgba(255,255,255,0.9); backdrop-filter: blur(20px); border: 1px solid rgba(0,0,0,0.06); border-radius: 20px; padding: 24px; min-width: 240px; z-index: 20; box-shadow: 0 8px 32px rgba(0,0,0,0.08); }
.stats-title { font-size: 10px; text-transform: uppercase; letter-spacing: 2px; color: var(--accent); margin-bottom: 20px; font-weight: 700; }
.stat-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid rgba(0,0,0,0.04); }
.stat-row:last-child { border-bottom: none; }
.stat-label { font-size: 13px; color: var(--gray-600); }
.stat-value { font-family: var(--font-mono); font-size: 15px; color: var(--gray-900); font-weight: 600; }
.stat-value.highlight { color: var(--accent); }
.legend { position: absolute; top: 24px; right: 24px; background: rgba(255,255,255,0.9); backdrop-filter: blur(20px); border: 1px solid rgba(0,0,0,0.06); border-radius: 20px; padding: 20px; z-index: 20; box-shadow: 0 8px 32px rgba(0,0,0,0.08); }
.legend-item { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; font-size: 13px; color: var(--gray-700); }
.legend-item:last-child { margin-bottom: 0; }
.legend-dot { width: 10px; height: 10px; border-radius: 50%; }
.legend-dot.user { background: var(--accent); box-shadow: 0 0 8px rgba(196,30,58,0.4); }
.legend-dot.active { background: #22c55e; box-shadow: 0 0 8px rgba(34,197,94,0.4); }
.legend-dot.arc { background: #3b82f6; box-shadow: 0 0 8px rgba(59,130,246,0.4); }
.tooltip { position: absolute; background: rgba(255,255,255,0.95); backdrop-filter: blur(20px); border: 1px solid rgba(196,30,58,0.15); border-radius: 16px; padding: 20px; pointer-events: none; opacity: 0; transition: opacity 0.2s; z-index: 30; min-width: 200px; box-shadow: 0 12px 32px rgba(0,0,0,0.12); }
.tooltip.visible { opacity: 1; }
.tooltip-city { font-weight: 600; font-size: 16px; color: var(--gray-900); margin-bottom: 4px; }
.tooltip-country { font-size: 13px; color: var(--gray-600); margin-bottom: 12px; }
.tooltip-ip { font-family: var(--font-mono); font-size: 12px; color: var(--accent); padding-top: 12px; border-top: 1px solid rgba(0,0,0,0.06); }

/* Editor */
.editor-layout { display: grid; grid-template-columns: 1fr 320px; gap: 32px; min-height: calc(100vh - 200px); }
.editor-main { background: var(--white); border-radius: 24px; border: 1px solid rgba(0,0,0,0.04); padding: 40px; box-shadow: 0 4px 24px rgba(0,0,0,0.04); }
.editor-sidebar { display: flex; flex-direction: column; gap: 20px; }
.editor-panel { background: var(--white); border-radius: 20px; border: 1px solid rgba(0,0,0,0.04); padding: 24px; box-shadow: 0 2px 16px rgba(0,0,0,0.04); }
.editor-panel h3 { font-size: 10px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--gray-400); margin-bottom: 16px; }
.editor-title-input { width: 100%; font-family: var(--font-serif); font-size: 2.25rem; font-weight: 500; border: none; border-bottom: 2px solid rgba(0,0,0,0.06); padding-bottom: 20px; margin-bottom: 28px; outline: none; color: var(--gray-900); background: transparent; }
.editor-title-input::placeholder { color: var(--gray-300); }
.editor-textarea { width: 100%; min-height: 450px; font-family: var(--font-serif); font-size: 17px; line-height: 1.85; border: none; outline: none; resize: vertical; color: var(--gray-700); background: transparent; }
.editor-textarea::placeholder { color: var(--gray-300); }
.setting-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; }
.setting-label { font-size: 14px; color: var(--gray-600); }
.toggle-switch { width: 44px; height: 24px; background: var(--gray-200); border: 1px solid var(--gray-300); border-radius: 12px; position: relative; cursor: pointer; transition: all 0.2s; flex-shrink: 0; }
.toggle-switch.active { background: var(--accent); border-color: var(--accent); }
.toggle-switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; background: var(--white); border-radius: 50%; transition: transform 0.2s; box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
.toggle-switch.active::after { transform: translateX(20px); }
.publish-btn { width: 100%; padding: 16px; background: linear-gradient(135deg, var(--accent) 0%, #d4334f 100%); color: var(--white); border: none; border-radius: 14px; font-size: 13px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; cursor: pointer; transition: all 0.3s; margin-top: 16px; box-shadow: 0 4px 16px rgba(196,30,58,0.25); }
.publish-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(196,30,58,0.35); }

/* Chat */
.chat-layout { display: grid; grid-template-columns: 300px 1fr; gap: 0; min-height: calc(100vh - 200px); background: var(--white); border-radius: 24px; border: 1px solid rgba(0,0,0,0.04); overflow: hidden; box-shadow: 0 4px 24px rgba(0,0,0,0.04); }
.chat-sidebar-panel { background: var(--gray-50); border-right: 1px solid rgba(0,0,0,0.04); padding: 20px; }
.chat-room { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 14px; cursor: pointer; transition: all 0.2s; margin-bottom: 6px; }
.chat-room:hover { background: var(--gray-100); }
.chat-room.active { background: var(--accent-light); }
.chat-room-avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; border: 2px solid var(--white); box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
.chat-room-name { font-size: 14px; font-weight: 600; }
.chat-room-preview { font-size: 12px; color: var(--gray-500); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 180px; }
.chat-main { display: flex; flex-direction: column; }
.chat-main-header { padding: 20px 28px; border-bottom: 1px solid rgba(0,0,0,0.04); display: flex; align-items: center; gap: 16px; }
.chat-main-header h3 { font-size: 16px; font-weight: 600; }
.chat-main-header .status { width: 10px; height: 10px; background: #22c55e; border-radius: 50%; box-shadow: 0 0 8px rgba(34,197,94,0.4); }
.chat-main-body { flex: 1; padding: 28px; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; }
.message { max-width: 70%; padding: 16px 20px; border-radius: 16px; }
.message.received { background: var(--gray-100); align-self: flex-start; border-bottom-left-radius: 4px; }
.message.sent { background: var(--gray-900); color: var(--white); align-self: flex-end; border-bottom-right-radius: 4px; }
.message-author { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--gray-500); margin-bottom: 6px; }
.message-text { font-size: 15px; line-height: 1.5; }
.message-time { font-size: 11px; color: var(--gray-400); margin-top: 8px; }
.message.sent .message-time { color: rgba(255,255,255,0.5); }
.chat-main-footer { padding: 20px 28px; border-top: 1px solid rgba(0,0,0,0.04); display: flex; gap: 12px; }
.chat-main-input { flex: 1; padding: 14px 20px; background: var(--gray-50); border: 1px solid rgba(0,0,0,0.06); border-radius: 14px; font-size: 15px; outline: none; transition: all 0.2s; }
.chat-main-input:focus { border-color: var(--gray-300); background: var(--white); box-shadow: 0 0 0 4px var(--accent-light); }
.chat-send-btn { width: 52px; height: 52px; background: linear-gradient(135deg, var(--accent) 0%, #d4334f 100%); border: none; border-radius: 14px; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.2s; box-shadow: 0 4px 12px rgba(196,30,58,0.2); }
.chat-send-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(196,30,58,0.3); }
.chat-send-btn svg { width: 22px; height: 22px; stroke: var(--white); stroke-width: 2; fill: none; }

/* Profile */
.profile-layout { display: grid; grid-template-columns: 340px 1fr; gap: 40px; }
.profile-card { background: var(--white); border-radius: 24px; border: 1px solid rgba(0,0,0,0.04); padding: 32px; text-align: center; box-shadow: 0 4px 24px rgba(0,0,0,0.04); }
.profile-card img { width: 110px; height: 110px; border-radius: 50%; object-fit: cover; margin-bottom: 20px; border: 4px solid var(--white); box-shadow: 0 8px 24px rgba(0,0,0,0.12); }
.profile-card h2 { font-family: var(--font-serif); font-size: 1.5rem; font-weight: 500; margin-bottom: 4px; }
.profile-card .handle { font-size: 14px; color: var(--gray-500); margin-bottom: 16px; }
.profile-card .bio { font-size: 14px; color: var(--gray-600); line-height: 1.6; margin-bottom: 24px; }
.profile-stats { display: flex; justify-content: center; gap: 32px; padding: 24px 0; border-top: 1px solid rgba(0,0,0,0.06); border-bottom: 1px solid rgba(0,0,0,0.06); margin-bottom: 24px; }
.stat-block { text-align: center; }
.stat-val { font-size: 20px; font-weight: 600; color: var(--gray-900); }
.stat-lbl { font-size: 10px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: var(--gray-400); margin-top: 4px; }
.profile-btns { display: flex; gap: 12px; }
.profile-btn { flex: 1; padding: 14px; font-size: 12px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; border-radius: 12px; cursor: pointer; transition: all 0.2s; }
.profile-btn.primary { background: var(--gray-900); border: 2px solid var(--gray-900); color: var(--white); }
.profile-btn.primary:hover { background: var(--gray-700); border-color: var(--gray-700); }
.profile-btn.secondary { background: var(--white); border: 1px solid var(--gray-200); color: var(--gray-900); }
.profile-btn.secondary:hover { background: var(--gray-50); border-color: var(--gray-300); }
.profile-tabs { display: flex; border-bottom: 1px solid rgba(0,0,0,0.06); margin-bottom: 28px; }
.profile-tab { padding: 16px 24px; font-size: 14px; font-weight: 500; color: var(--gray-500); border: none; background: none; cursor: pointer; border-bottom: 2px solid transparent; transition: all 0.2s; }
.profile-tab.active { color: var(--gray-900); border-bottom-color: var(--accent); }

/* Toast */
.toast-container { position: fixed; bottom: 28px; right: 28px; z-index: 5000; display: flex; flex-direction: column; gap: 10px; }
.toast-swiss { background: var(--gray-900); color: var(--white); padding: 16px 28px; border-radius: 14px; font-size: 14px; font-weight: 500; animation: toastSlide 0.4s var(--ease-smooth); box-shadow: 0 8px 32px rgba(0,0,0,0.15); }
.toast-swiss.success { background: linear-gradient(135deg, var(--accent) 0%, #d4334f 100%); }
.toast-swiss.error { background: #dc2626; }
@keyframes toastSlide { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* Loading & Empty States */
.loading-spinner { display: flex; align-items: center; justify-content: center; padding: 80px; }
.spinner { width: 48px; height: 48px; border: 3px solid var(--gray-200); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty-state { text-align: center; padding: 80px 20px; color: var(--gray-500); }
.empty-state svg { width: 72px; height: 72px; stroke: var(--gray-300); margin-bottom: 20px; }
.empty-state h3 { font-size: 18px; color: var(--gray-900); margin-bottom: 8px; }

/* Mobile Navigation */
.bottom-nav { display: none; position: fixed; bottom: 0; left: 0; right: 0; background: rgba(255,255,255,0.95); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-top: 1px solid rgba(0,0,0,0.06); z-index: 1000; padding: 8px 0; padding-bottom: max(8px, env(safe-area-inset-bottom)); }
.nav-items { display: flex; justify-content: space-around; align-items: center; }
.nav-item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; background: transparent; border: none; padding: 8px 12px; cursor: pointer; flex: 1; transition: all 0.2s; border-radius: 12px; }
.nav-item:hover { background: var(--gray-50); }
.nav-item svg { width: 24px; height: 24px; stroke-width: 1.5; fill: none; }
.nav-item span { font-size: 10px; font-weight: 600; letter-spacing: 0.5px; text-transform: uppercase; }
.nav-item svg { stroke: var(--gray-400); }
.nav-item span { color: var(--gray-400); }
.nav-item.active svg { stroke: var(--gray-900); }
.nav-item.active span { color: var(--gray-900); }
.nav-item.create { background: linear-gradient(135deg, var(--accent) 0%, #d4334f 100%); }
.nav-item.create svg { stroke: var(--white); }
.nav-item.create span { color: var(--white); }
.mobile-header { display: none; position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,0.95); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-bottom: 1px solid rgba(0,0,0,0.06); }
.mobile-header-content { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; }
.mobile-logo { display: flex; align-items: center; gap: 6px; }
.mobile-logo .quote-mark { color: var(--accent); font-size: 24px; font-weight: 300; }
.mobile-logo .brand-text { font-size: 12px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; }
.mobile-actions { display: flex; gap: 10px; }
.mobile-btn { width: 42px; height: 42px; background: var(--white); border: 1px solid var(--gray-200); display: flex; align-items: center; justify-content: center; cursor: pointer; border-radius: 12px; transition: all 0.2s; }
.mobile-btn:hover { background: var(--gray-50); }
.mobile-btn svg { width: 20px; height: 20px; stroke: var(--gray-900); stroke-width: 1.5; fill: none; }

/* Responsive */
@media (max-width: 1200px) {
    .feed-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
    .featured-article { grid-template-columns: 1fr; }
    .featured-image { height: 280px; }
}
@media (max-width: 1024px) {
    .sidebar { display: none; }
    .main-content { margin-left: 0; }
    .mobile-header { display: block; }
    .bottom-nav { display: block; }
    .content-area { padding: 20px 20px 100px; }
    .feed-header h1 { font-size: 2rem; }
    .editor-layout { grid-template-columns: 1fr; }
    .editor-sidebar { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
    .chat-layout { grid-template-columns: 1fr; }
    .chat-sidebar-panel { display: none; }
    .profile-layout { grid-template-columns: 1fr; }
    .article-full-title { font-size: 2rem; }
    #globe-container { height: 60vh; min-height: 400px; }
    .stats-panel { bottom: 12px; left: 12px; min-width: 200px; padding: 18px; }
    .legend { top: 12px; right: 12px; padding: 16px; }
}
@media (max-width: 640px) {
    .feed-grid { grid-template-columns: 1fr; }
    .editor-sidebar { grid-template-columns: 1fr; }
    .featured-content { padding: 28px 24px; }
    .featured-title { font-size: 1.5rem; }
    .article-full-title { font-size: 1.75rem; }
    .article-body { font-size: 16px; }
}
