/*
Theme Name: DailyTalkz
Theme URI: https://dailytalkz.com
Author: DailyTalkz
Description: Custom Reddit-style theme for DailyTalkz
Version: 4.0
*/

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

:root {
  --orange: #FF4500;
  --blue: #0079D3;
  --blue-light: #e8f4fd;
  --bg: #DAE0E6;
  --white: #ffffff;
  --border: #EDEFF1;
  --text: #1c1c1c;
  --muted: #878a8c;
  --hover-bg: #EDEFF1;
  --header-h: 48px;
  --sidebar-w: 270px;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body { font-family: var(--font); background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.5; overflow-x: hidden; }
a { text-decoration: none; color: inherit; }
button { cursor: pointer; font-family: var(--font); }
img { max-width: 100%; }

/* ===== HEADER ===== */
.dt-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 9999;
  height: var(--header-h);
  background: var(--white);
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  padding: 0 20px;
  gap: 12px;
}

/* 1. Logo */
.dt-logo { flex-shrink: 0; display: flex; align-items: center; text-decoration: none; }
.dt-logo img { height: 36px; width: auto; display: block; object-fit: contain; }
.dt-logo-text { font-size: 18px; font-weight: 900; font-style: italic; letter-spacing: -1px; color: #FF4500; }
.dt-logo-text span { color: var(--blue); }

/* 2. Search bar — center mein, proper flex grow */
.dt-search {
  height: 36px;
  display: flex;
  align-items: center;
  border: 1.5px solid var(--orange);
  border-radius: 20px;
  padding: 0 6px 0 10px;
  background: var(--white);
  gap: 8px;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  justify-self: center;
}
.dt-snoo { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--orange); overflow: hidden; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.dt-snoo svg { width: 20px; height: 20px; }
.dt-search input { flex: 1; border: none; outline: none; font-size: 14px; color: var(--text); background: transparent; min-width: 0; }
.dt-search input::placeholder { color: var(--muted); }
.dt-ask-btn { display: flex; align-items: center; gap: 4px; padding: 0 10px; height: 28px; border-radius: 14px; border: 1px solid var(--border); background: var(--white); color: var(--orange); font-size: 13px; font-weight: 600; flex-shrink: 0; }

/* 3. Sign Up + Log In — right corner mein */
.dt-nav-right { display: flex; align-items: center; gap: 6px; flex-shrink: 0; justify-self: end; }
.dt-btn-outline { height: 32px; padding: 0 14px; border-radius: 20px; border: 1.5px solid var(--blue); background: transparent; font-size: 13px; font-weight: 700; color: var(--blue); text-decoration: none; display: flex; align-items: center; white-space: nowrap; }
.dt-btn-outline:hover { background: var(--blue-light); }
.dt-btn-solid { height: 32px; padding: 0 14px; border-radius: 20px; border: none; background: var(--orange); font-size: 13px; font-weight: 700; color: white; text-decoration: none; display: flex; align-items: center; white-space: nowrap; }
.dt-btn-solid:hover { background: #e03d00; }
.dt-create-btn { display: flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 20px; border: 1.5px solid var(--border); background: transparent; font-size: 13px; font-weight: 700; color: var(--text); text-decoration: none; }
.dt-user-btn { display: flex; align-items: center; gap: 8px; padding: 4px 10px; border-radius: 20px; border: 1px solid var(--border); text-decoration: none; color: var(--text); }
.dt-user-avatar { width: 26px; height: 26px; border-radius: 50%; }
.dt-dots-btn { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--border); background: var(--white); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }

/* ===== BODY ===== */
/* 4. Header aur neeche ka gap zero */
.dt-body {
  margin-top: var(--header-h);
  display: flex;
  position: relative;
  min-height: calc(100vh - var(--header-h));
  width: 100%;
  overflow-x: hidden;
}

/* ===== HAMBURGER ===== */
.dt-ham { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--border); background: var(--white); display: flex; align-items: center; justify-content: center; position: absolute; left: calc(var(--sidebar-w) - 17px); top: 10px; z-index: 10; }

/* ===== LEFT SIDEBAR ===== */
.dt-sidebar-left { width: var(--sidebar-w); flex-shrink: 0; background: var(--white); border-right: 1px solid var(--border); padding: 8px 0; overflow-y: auto; position: sticky; top: var(--header-h); height: calc(100vh - var(--header-h)); }
.dt-sidebar-left::-webkit-scrollbar { width: 4px; }
.dt-sidebar-left::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.dt-nav-item { display: flex; align-items: center; gap: 10px; padding: 10px 16px; font-size: 14px; font-weight: 500; color: var(--text); border-radius: 4px; margin: 1px 8px; text-decoration: none; }
.dt-nav-item:hover, .dt-nav-item.active { background: var(--hover-bg); }
.dt-nav-item svg { flex-shrink: 0; }
.dt-nav-sm { font-size: 13px; color: var(--muted); }
.dt-sb-section { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; padding: 10px 16px 4px; letter-spacing: 0.5px; display: flex; justify-content: space-between; align-items: center; }
.dt-sb-hr { height: 1px; background: var(--border); margin: 6px 0; }
.dt-cat-av { width: 24px; height: 24px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 9px; font-weight: 700; color: white; }
.dt-star-icon { margin-left: auto; opacity: 0; }
.dt-comm-item:hover .dt-star-icon { opacity: 1; }

/* ===== MAIN WRAPPER ===== */
/* 5. Post aur sidebars ka gap kam */
.dt-main-wrapper { flex: 1; display: flex; min-width: 0; padding-left: 20px; }
.dt-feed { flex: 1; min-width: 0; max-width: 740px; padding: 10px 8px; }

/* ===== SORT BAR ===== */
.dt-sort-bar { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.dt-sort-dd { display: flex; align-items: center; gap: 4px; padding: 6px 14px; border-radius: 20px; border: 1px solid var(--border); font-size: 14px; font-weight: 500; color: var(--text); cursor: pointer; background: var(--white); }
.dt-sort-dd:hover { background: var(--hover-bg); }

/* ===== POST CARD ===== */
.dt-post { background: var(--white); border: 1px solid var(--border); border-radius: 8px; margin-bottom: 8px; padding: 12px 12px 8px; }
.dt-post:hover { border-color: #818384; cursor: pointer; }
.dt-post-meta { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); margin-bottom: 8px; flex-wrap: wrap; }
.dt-post-av { width: 24px; height: 24px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 9px; font-weight: 700; color: white; }
.dt-post-sub { font-weight: 700; color: var(--text); font-size: 13px; }
.dt-post-sub:hover { text-decoration: underline; }
.dt-post-join { height: 26px; padding: 0 14px; border-radius: 20px; border: none; background: var(--blue); color: white; font-size: 12px; font-weight: 700; margin-left: auto; }
.dt-post-dots { background: transparent; border: none; color: var(--muted); padding: 0 2px; margin-left: 4px; }
.dt-post-title { font-size: 18px; font-weight: 500; color: var(--text); line-height: 1.3; margin-bottom: 8px; display: block; }
.dt-post-title:hover { color: var(--blue); }
.dt-post-excerpt { font-size: 14px; color: var(--text); line-height: 1.6; margin-bottom: 10px; }
.dt-post-img { width: 100%; max-height: 512px; object-fit: cover; border-radius: 8px; margin-bottom: 8px; display: block; }

/* ===== ACTION BAR ===== */
.dt-post-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
/* 6. Vote pill — upvote/downvote functional */
.dt-vote-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 20px;
  background: #f0f2f5; border: none; cursor: pointer;
  font-size: 14px; font-weight: 700; color: var(--text);
}
.dt-vote-pill .up, .dt-vote-pill .dn {
  color: var(--muted); display: flex; align-items: center;
  background: none; border: none; cursor: pointer; padding: 0;
}
.dt-vote-pill .up:hover { color: var(--orange); }
.dt-vote-pill .dn:hover { color: #7193FF; }
.dt-vote-pill .vcount { min-width: 20px; text-align: center; font-size: 13px; font-weight: 700; }
.dt-act-btn { display: inline-flex; align-items: center; gap: 5px; padding: 6px 12px; border-radius: 20px; background: #f0f2f5; border: none; cursor: pointer; font-size: 14px; font-weight: 700; color: var(--muted); text-decoration: none; }
.dt-act-btn:hover { background: #e2e4e8; color: var(--text); }

/* ===== RIGHT SIDEBAR ===== */
.dt-sidebar-right { width: 300px; flex-shrink: 0; padding: 10px 10px 10px 0; }
.dt-widget { background: var(--white); border: 1px solid var(--border); border-radius: 4px; margin-bottom: 12px; overflow: hidden; }
.dt-widget-hdr { padding: 10px 12px; font-size: 10px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; border-bottom: 1px solid var(--border); }
.dt-widget-hdr-row { padding: 10px 12px; font-size: 10px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.dt-widget-clear { font-size: 12px; font-weight: 700; color: var(--blue); text-decoration: none; text-transform: none; letter-spacing: 0; }
.dt-recent-row { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--border); text-decoration: none; color: inherit; }
.dt-recent-row:last-child { border-bottom: none; }
.dt-recent-row:hover { background: #f8f9fa; }
.dt-recent-left { flex: 1; min-width: 0; }
.dt-recent-meta { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--muted); margin-bottom: 4px; flex-wrap: wrap; }
.dt-recent-av { width: 18px; height: 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 7px; font-weight: 700; color: #fff; flex-shrink: 0; }
.dt-recent-sub { font-weight: 700; color: var(--text); font-size: 11px; }
.dt-recent-title { font-size: 14px; font-weight: 500; color: var(--text); line-height: 1.3; margin-bottom: 4px; }
.dt-recent-stats { font-size: 12px; color: var(--muted); }
.dt-recent-thumb { width: 70px; height: 70px; border-radius: 4px; background-size: cover; background-position: center; flex-shrink: 0; background-color: var(--border); }
.dt-comm-row { display: flex; align-items: center; gap: 10px; padding: 8px 12px; text-decoration: none; color: inherit; border-bottom: 1px solid var(--border); }
.dt-comm-row:last-of-type { border-bottom: none; }
.dt-comm-row:hover { background: #f8f9fa; }
.dt-comm-av { width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; color: #fff; }
.dt-comm-info { display: flex; flex-direction: column; gap: 2px; }
.dt-comm-name { font-size: 14px; font-weight: 500; color: var(--text); }
.dt-comm-mem { font-size: 12px; color: var(--muted); }
.dt-see-more { display: block; padding: 10px 12px; font-size: 14px; color: var(--blue); font-weight: 700; text-decoration: none; }
.dt-see-more:hover { background: #f8f9fa; }
.dt-sb-footer-links { padding: 8px 4px; font-size: 12px; color: var(--muted); line-height: 2.2; }
.dt-sb-footer-links a { color: var(--muted); text-decoration: none; margin-right: 8px; }
.dt-sb-footer-links a:hover { text-decoration: underline; }
.dt-sb-footer-links p { margin-top: 4px; font-size: 11px; }

/* ===== PAGINATION ===== */
.dt-pagination { display: flex; justify-content: center; gap: 6px; padding: 20px 0; flex-wrap: wrap; }
.dt-pagination .page-numbers { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border); font-size: 14px; font-weight: 700; color: var(--text); text-decoration: none; background: var(--white); }
.dt-pagination .page-numbers:hover { background: var(--hover-bg); }
.dt-pagination .page-numbers.current { background: var(--orange); color: white; border-color: var(--orange); }
.dt-pagination .page-numbers.prev, .dt-pagination .page-numbers.next { width: auto; padding: 0 14px; border-radius: 20px; }

/* ===== FOOTER ===== */
.dt-footer { background: var(--white); border-top: 1px solid var(--border); padding: 16px 20px; text-align: center; color: var(--muted); font-size: 12px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1100px) { .dt-sidebar-right { display: none; } }
@media (max-width: 768px) { .dt-sidebar-left { display: none; } .dt-main-wrapper { padding-left: 0; } }

/* ===== GAP FIX ===== */
.dt-body { margin-top: var(--header-h) !important; padding-top: 0 !important; }
.dt-main-wrapper { padding-top: 0 !important; }
.dt-feed { padding-top: 10px !important; }

/* Sort bar row jo header ke neeche grey mein dikh raha hai */
.dt-sort-row {
  background: var(--bg);
  padding: 8px 0 0 0;
  margin: 0;
}

/* Koi bhi element jo header ke baad extra space add kar raha ho */
.dt-body > * { margin-top: 0 !important; }

/* ===== THREE COLUMN FIXED SCROLL ===== */
html { height: 100%; }
body { height: 100%; overflow: hidden; margin: 0; }
.dt-body { height: calc(100vh - var(--header-h)); overflow: hidden; margin-top: var(--header-h); }
.dt-sidebar-left { overflow-y: auto; height: 100%; position: relative; top: 0; }
.dt-main-wrapper { overflow: hidden; height: 100%; display: flex; }
.dt-feed { overflow-y: auto; height: 100%; flex: 1; min-width: 0; scrollbar-width: none; } .dt-feed::-webkit-scrollbar { display: none; }
.dt-sidebar-right { overflow-y: auto; height: 100%; position: relative; top: 0; }
