/* ── Discover page — single-column social feed ── */

/* ── Sticky top bar ── */
.disc-topbar {
  position: sticky;
  top: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 32px;
  height: 64px;
  background: rgba(21,18,27,0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--hairline);
}

.disc-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}
.disc-brand-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), #a78bfa);
  color: var(--on-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 16px;
  box-shadow: 0 2px 12px var(--glow-primary);
  flex-shrink: 0;
}
.disc-brand-name {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(90deg, var(--primary) 0%, #c4b5fd 55%, #a3e635 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Search — centered, takes up the middle space */
.disc-search-wrap {
  flex: 1;
  max-width: 560px;
  margin: 0 auto;
  position: relative;
  display: flex;
  align-items: center;
}
.disc-search-icon {
  position: absolute;
  left: 14px;
  color: var(--muted);
  pointer-events: none;
  flex-shrink: 0;
}
.disc-search {
  width: 100%;
  height: 42px;
  padding: 0 40px 0 40px;
  background: var(--surface-soft);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  font-family: var(--font);
  font-size: 14px;
  color: var(--ink);
  outline: none;
  transition: border-color .15s, background .15s, box-shadow .15s;
  -webkit-appearance: none;
}
.disc-search:focus {
  border-color: var(--primary);
  background: var(--surface-mid);
  box-shadow: 0 0 0 3px rgba(208,188,255,0.12);
}
.disc-search::placeholder { color: var(--muted); }
.disc-result-count {
  position: absolute;
  right: 16px;
  font-size: 11px;
  color: var(--primary);
  font-weight: 600;
  pointer-events: none;
}

/* Top-right: account + icon buttons + post */
.disc-topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.disc-post-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 20px;
  background: var(--primary);
  color: var(--on-primary);
  border: none;
  border-radius: 999px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: opacity .15s, transform .1s, box-shadow .15s;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 0 2px 12px var(--glow-primary);
}
.disc-post-btn:hover { opacity: .9; transform: translateY(-1px); box-shadow: 0 4px 20px var(--glow-primary); }
.disc-post-btn:active { transform: none; opacity: .75; }


/* ── Feed wrapper ── */
.disc-feed-wrap {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px 24px 120px;
}
.disc-feed {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

/* Empty state */
.disc-empty {
  text-align: center;
  padding: 72px 0;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.disc-empty p { font-size: 16px; font-weight: 600; color: var(--body); margin: 0; }
.disc-empty span { font-size: 13px; color: var(--muted); }

/* ── Discover card ── */
.disc-card {
  background: var(--card-bg);
  border: 1px solid var(--hairline);
  border-radius: 16px;
  overflow: hidden;
  transition: border-color .2s, box-shadow .2s;
}
.disc-card:hover {
  border-color: rgba(208,188,255,.22);
  box-shadow: 0 4px 24px rgba(0,0,0,.18);
}

/* Card header */
.disc-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 15px 11px;
}
.disc-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--on-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
}
.disc-avatar--upload {
  background: var(--surface-strong);
  color: var(--muted);
}
.disc-card-meta {
  flex: 1;
  min-width: 0;
}
.disc-card-username {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color .15s;
}
.disc-card-username:hover { color: var(--primary); }
.disc-card-time {
  font-size: 11px;
  color: var(--muted);
  margin-top: 1px;
  display: block;
}
.disc-card-cat {
  color: var(--primary);
  opacity: .75;
}
.disc-card-save {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 6px 7px;
  border-radius: 8px;
  transition: color .15s, background .15s;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}
.disc-card-save:hover { color: var(--ink); background: var(--surface-soft); }
.disc-card-save.saved { color: var(--primary); }

/* Card media */
.disc-card-img {
  width: 100%;
  display: block;
  background: #0a0810;
  cursor: pointer;
  max-height: 560px;
  object-fit: cover;
  transition: opacity .15s;
}
.disc-card:hover .disc-card-img { opacity: .96; }

/* Card body */
.disc-card-body {
  padding: 11px 15px 13px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.disc-card-caption {
  font-size: 14px;
  font-weight: 400;
  color: var(--body);
  line-height: 1.5;
  cursor: pointer;
}
.disc-card-caption strong { font-weight: 600; color: var(--ink); }

/* Action row */
.disc-card-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  border-top: 1px solid var(--hairline);
  padding-top: 10px;
}
.disc-action {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  background: none;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: color .15s, background .15s;
  -webkit-tap-highlight-color: transparent;
  min-height: 36px;
}
.disc-action:hover { color: var(--ink); background: var(--surface-soft); }
.disc-action.upvoted { color: #f43f5e; }
.disc-action.upvoted:hover { color: #f43f5e; background: rgba(244,63,94,.08); }

/* ── Icon buttons (theme toggle, random) in topbar ── */
.disc-icon-btn {
  background: var(--surface-soft);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  padding: 6px 8px;
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  min-width: 34px;
  flex-shrink: 0;
  transition: background .15s, color .15s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.disc-icon-btn:hover { background: var(--surface-mid); color: var(--ink); }

/* ── Meme of the Day ── */
.motd-wrap {
  max-width: 1400px;
  margin: 0 auto;
  padding: 16px 24px 0;
}
.disc-card--motd {
  position: relative;
  cursor: pointer;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--hairline);
  transition: border-color .2s;
}
.disc-card--motd:hover { border-color: rgba(208,188,255,.3); }
.disc-card--motd img {
  width: 100%;
  max-height: 380px;
  object-fit: cover;
  display: block;
}
.motd-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--primary);
  color: var(--on-primary);
  font-family: var(--font);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  padding: 4px 10px;
  border-radius: 20px;
  z-index: 2;
}
.motd-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.78));
  color: #fff;
  padding: 36px 14px 14px;
  font-size: 13px;
  line-height: 1.4;
  z-index: 2;
}

/* ── Double-tap heart burst ── */
.heart-burst {
  position: fixed;
  width: 72px;
  height: 72px;
  margin: -36px 0 0 -36px;
  pointer-events: none;
  z-index: 9999;
  animation: heart-pop .55s ease-out forwards;
}
.heart-burst::before {
  content: '❤️';
  font-size: 56px;
  line-height: 1;
  display: block;
  text-align: center;
}
@keyframes heart-pop {
  0%   { transform: scale(0.2); opacity: 1; }
  55%  { transform: scale(1.35); opacity: 1; }
  100% { transform: scale(1.6); opacity: 0; }
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .disc-topbar { padding: 0 20px; gap: 14px; }
  .disc-search-wrap { max-width: 380px; }
}

@media (max-width: 768px) {
  .disc-topbar { padding: 0 16px; gap: 10px; height: 56px; }
  .disc-brand-name { font-size: 17px; }
  .disc-brand-icon { width: 32px; height: 32px; font-size: 14px; }
  .disc-search-wrap { max-width: none; }
  .disc-search { height: 38px; font-size: 13px; }
  .disc-feed-wrap { padding: 12px 10px 110px; }
  .disc-feed { grid-template-columns: 1fr; }
  .motd-wrap { padding: 12px 10px 0; }
  .disc-card { border-radius: 13px; }
}

@media (max-width: 480px) {
  .disc-topbar { padding: 0 12px; gap: 8px; height: 52px; }
  .disc-brand-name { font-size: 0; width: 0; overflow: hidden; }
  .disc-post-btn { padding: 8px 14px; font-size: 12px; }
  .disc-tab { padding: 10px 10px 8px; font-size: 12px; }
  .disc-feed-wrap { padding: 10px 8px 100px; }
  .disc-card { border-radius: 12px; }
  .disc-card-head { padding: 11px 12px 9px; }
  .disc-card-body { padding: 9px 12px 11px; }
  .disc-action { padding: 5px 8px; font-size: 11px; }
}
