:root {
  --primary: #4F46E5;
  --primary-hover: #4338CA;
  --bg-color: #F8FAFC;
  --surface: #FFFFFF;
  --text-main: #0F172A;
  --text-muted: #64748B;
  --border: #E2E8F0;
}
body { margin: 0; font-family: 'Outfit', sans-serif; background-color: var(--bg-color); color: var(--text-main); }
.navbar { display: flex; justify-content: space-between; align-items: center; padding: 15px 40px; background: var(--surface); box-shadow: 0 1px 3px rgba(0,0,0,0.05); position: sticky; top: 0; z-index: 100; }
.nav-left, .nav-right { display: flex; align-items: center; gap: 20px; }
.logo { font-size: 24px; font-weight: 700; color: var(--primary); letter-spacing: -0.5px; }
.search-bar input { padding: 10px 20px; border-radius: 20px; border: 1px solid var(--border); background: var(--bg-color); width: 300px; font-family: 'Outfit', sans-serif; outline: none; }
.search-bar input:focus { border-color: var(--primary); }
.avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.btn { padding: 10px 20px; border-radius: 8px; font-weight: 600; font-family: 'Outfit', sans-serif; cursor: pointer; border: none; transition: 0.2s; }
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-outline { background: transparent; color: var(--text-main); border: 1px solid var(--border); }
.btn-outline:hover { background: var(--bg-color); }

/* Hero */
.hero { background: linear-gradient(135deg, #e0e7ff 0%, #ede9fe 100%); padding: 60px 40px; text-align: center; border-bottom: 1px solid var(--border); }
.hero-content h1 { font-size: 42px; margin: 0 0 15px 0; color: #1e1b4b; }
.hero-content p { font-size: 18px; color: #4338ca; margin: 0 0 25px 0; }
.trusted-by { display: flex; align-items: center; justify-content: center; gap: 15px; }
.avatar-group { display: flex; }
.avatar-group img { width: 35px; height: 35px; border-radius: 50%; border: 2px solid white; margin-left: -10px; }
.avatar-group img:first-child { margin-left: 0; }
.trusted-by span { color: #3730a3; font-size: 15px; }

/* Feed */
.feed-container { padding: 40px; max-width: 1400px; margin: 0 auto; }
.masonry-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.feed-item { background: var(--surface); border-radius: 16px; overflow: hidden; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05); transition: 0.2s; cursor: pointer; border: 1px solid var(--border); }
.feed-item:hover { transform: translateY(-4px); box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1); border-color: var(--primary); }
.feed-img { width: 100%; height: 250px; object-fit: cover; }
.feed-content { padding: 16px; }
.feed-author { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.feed-author img { width: 32px; height: 32px; border-radius: 50%; }
.feed-author span { font-weight: 600; font-size: 14px; }
.feed-time { font-size: 12px; color: var(--text-muted); margin-left: auto; }
.feed-caption { font-size: 14px; color: var(--text-muted); margin-bottom: 15px; line-height: 1.5; }
.feed-stats { display: flex; justify-content: space-between; font-size: 13px; font-weight: 500; border-top: 1px solid var(--border); padding-top: 12px; }

/* Modals */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(15, 23, 42, 0.7); backdrop-filter: blur(5px); display: none; justify-content: center; align-items: center; z-index: 999; padding: 20px; box-sizing: border-box; }
.modal-overlay.active { display: flex; }
.modal-content { background: var(--surface); width: 100%; max-width: 600px; border-radius: 16px; overflow: hidden; }
.modal-header { padding: 20px 24px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; }
.modal-header h3 { margin: 0; color: var(--primary); }
.close-btn { background: none; border: none; font-size: 24px; cursor: pointer; color: var(--text-muted); }
.modal-body { padding: 24px; max-height: 70vh; overflow-y: auto; }
.upload-area { border: 2px dashed var(--border); border-radius: 12px; padding: 40px 20px; text-align: center; margin-bottom: 24px; background: #f8fafc; cursor: pointer; transition: 0.2s;}
.upload-area:hover { background: #e0e7ff; border-color: var(--primary); }
.input-group { margin-bottom: 16px; }
.input-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.input-group input, .input-group textarea { width: 100%; padding: 10px; border: 1px solid var(--border); border-radius: 8px; font-family: 'Outfit', sans-serif; box-sizing: border-box; }
.stats-inputs { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 12px; background: #f8fafc; }

/* Post Detail Modal Full */
.post-detail-content { background: var(--surface); width: 100%; max-width: 1200px; height: 90vh; border-radius: 16px; display: flex; overflow: hidden; position: relative; }
.detail-close { position: absolute; top: 15px; right: 20px; z-index: 10; font-size: 30px; background: rgba(255,255,255,0.8); border-radius: 50%; width: 40px; height: 40px; }
.post-layout { display: flex; width: 100%; height: 100%; }
.post-left { flex: 6; background: #000; display: flex; align-items: center; justify-content: center; }
.post-left img { max-width: 100%; max-height: 100%; object-fit: contain; }
.post-right { flex: 4; display: flex; flex-direction: column; border-left: 1px solid var(--border); background: var(--surface); }
.detail-header { padding: 20px; display: flex; align-items: center; gap: 15px; border-bottom: 1px solid var(--border); }
.detail-header img { width: 48px; height: 48px; border-radius: 50%; }
.detail-author { font-weight: 700; font-size: 16px; }
.cert-badge { background: #10b981; color: white; padding: 2px 8px; border-radius: 12px; font-size: 11px; font-weight: bold; margin-left: 8px; }
.detail-time { font-size: 13px; color: var(--text-muted); margin-top: 4px; }
.detail-caption { padding: 20px 20px 10px 20px; font-size: 15px; line-height: 1.5; }

/* Copyright Meta Box */
.copyright-meta-box { background: #f1f5f9; padding: 15px; border-radius: 8px; margin: 0 20px 15px 20px; border: 1px solid #cbd5e1; font-size: 13px; }
.meta-row { display: flex; justify-content: space-between; margin-bottom: 6px; }
.meta-row:last-child { margin-bottom: 0; }
.meta-row span:first-child { color: var(--text-muted); font-weight: 500; }

.url-copy-box { margin: 0 20px 20px 20px; display: flex; gap: 10px; padding: 10px; background: var(--bg-color); border-radius: 8px; border: 1px solid var(--border); }
.url-copy-box input { flex: 1; border: none; background: transparent; outline: none; font-family: monospace; color: var(--primary); }
.detail-stats { display: flex; justify-content: space-around; padding: 15px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); font-weight: 600; margin: 0 20px; }
.comments-section { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 18px; }
.comment { display: flex; gap: 12px; }
.comment img { width: 36px; height: 36px; border-radius: 50%; }
.comment-text { background: var(--bg-color); padding: 12px 15px; border-radius: 12px; flex: 1; font-size: 14px; }
.comment-meta { display: flex; justify-content: space-between; margin-bottom: 6px; }
.comment-author { font-weight: 600; }
.comment-time { font-size: 12px; color: var(--text-muted); }
.add-comment { padding: 20px; border-top: 1px solid var(--border); display: flex; gap: 15px; align-items: center; }
.add-comment input { padding: 10px 15px; border-radius: 20px; border: 1px solid var(--border); outline: none; }

/* Footer */
.site-footer { background: #000; color: #666; padding: 60px 20px; text-align: center; margin-top: 40px; }
.social-links { display: flex; justify-content: center; gap: 15px; margin-bottom: 25px; }
.social-icon { display: flex; align-items: center; justify-content: center; width: 45px; height: 45px; border-radius: 50%; border: 1px solid #333; color: #fff; transition: 0.3s; text-decoration: none; }
.social-icon:hover { background: #333; color: white; }
.social-icon svg { width: 20px; height: 20px; }
.footer-copy { font-size: 14px; font-weight: 300; }

/* Dark mode */
body.dark-mode {
  --bg-color: #0F172A;
  --surface: #1E293B;
  --text-main: #F8FAFC;
  --text-muted: #94A3B8;
  --border: #334155;
}
body.dark-mode .modal-overlay { background: rgba(0, 0, 0, 0.8); }
body.dark-mode .hero { background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%); border-bottom: 1px solid var(--border); }
body.dark-mode .hero-content h1 { color: #fff; }
body.dark-mode .hero-content p, body.dark-mode .trusted-by span { color: #a5b4fc; }
body.dark-mode .copyright-meta-box, body.dark-mode .upload-area, body.dark-mode .modal-footer { background: #0F172A; border-color: var(--border); }
body.dark-mode .btn-outline { color: var(--text-main); }
body.dark-mode input, body.dark-mode textarea { background: #0F172A; color: #fff; border-color: var(--border); }

.btn-icon { background: transparent; border: none; font-size: 20px; cursor: pointer; color: var(--text-main); font-family: 'Outfit', sans-serif; display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; }
.btn-icon:hover { background: var(--border); }
