/* ─────────────────────────────────────────────────────────────────────────────
   DL Site — Public Stylesheet
   Dark glassmorphism theme · Myanmar + Inter fonts
   ───────────────────────────────────────────────────────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Myanmar:wght@300;400;600;700&family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ── Variables ─────────────────────────────────────────────────────────────── */
:root {
  --bg:           #07070f;
  --surface:      #0e0e1c;
  --surface2:     #141428;
  --border:       #1e1e38;
  --border-glow:  rgba(124,58,237,.35);
  --accent:       #7c3aed;
  --accent-dark:  #5b21b6;
  --accent2:      #0891b2;
  --accent-grad:  linear-gradient(135deg, #7c3aed 0%, #0891b2 100%);
  --accent-glow:  rgba(124,58,237,.25);
  --text:         #e4e4f0;
  --text-muted:   #6b6b90;
  --success:      #059669;
  --danger:       #dc2626;
  --glass-bg:     rgba(14,14,28,.7);
  --radius:       14px;
  --radius-sm:    8px;
  --shadow:       0 8px 32px rgba(0,0,0,.45);
  --shadow-glow:  0 0 40px rgba(124,58,237,.2), 0 8px 32px rgba(0,0,0,.5);
}

/* ── Reset ─────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 80% 50% at 20% -10%, rgba(124,58,237,.18) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 110%, rgba(8,145,178,.12) 0%, transparent 60%);
  background-attachment: fixed;
  color: var(--text);
  font-family: 'Inter', 'Noto Sans Myanmar', system-ui, sans-serif;
  min-height: 100vh;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ── Layout ────────────────────────────────────────────────────────────────── */
.container { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.py-8 { padding-top: 48px; padding-bottom: 64px; }

/* ── Header ────────────────────────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(7,7,15,.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
}
.logo {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 1.1rem; font-weight: 700; letter-spacing: -.02em;
  background: var(--accent-grad);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.logo svg { flex-shrink: 0; stroke: url(#logo-grad) #7c3aed; color: #7c3aed; }

/* ── Hero ──────────────────────────────────────────────────────────────────── */
.page-hero {
  text-align: center;
  margin-bottom: 48px;
}
.page-hero h1 {
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -.03em;
  background: var(--accent-grad);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 10px;
}
.page-hero p { color: var(--text-muted); font-size: 1rem; }

/* ── Posts grid ────────────────────────────────────────────────────────────── */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.post-card {
  display: flex; flex-direction: column;
  background: var(--glass-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .25s, border-color .25s, box-shadow .25s;
  backdrop-filter: blur(10px);
}
.post-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-glow);
  box-shadow: var(--shadow-glow);
}

.post-thumb {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--surface2);
}
.post-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s;
}
.post-card:hover .post-thumb img { transform: scale(1.04); }

.thumb-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
}
.thumb-badge {
  position: absolute; bottom: 8px; left: 8px;
  background: rgba(124,58,237,.85);
  backdrop-filter: blur(4px);
  border-radius: 20px;
  padding: 3px 10px;
  font-size: .72rem; font-weight: 600;
  display: flex; align-items: center; gap: 5px;
  color: #fff;
}

.post-info { padding: 16px; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.post-title {
  font-size: .95rem; font-weight: 600;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-desc {
  font-size: .82rem; color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-meta {
  margin-top: auto;
  display: flex; justify-content: space-between; align-items: center;
  font-size: .75rem; color: var(--text-muted);
}
.download-hint { color: var(--accent); font-weight: 600; }

/* ── Empty state ───────────────────────────────────────────────────────────── */
.empty-state {
  text-align: center; padding: 80px 20px;
  color: var(--text-muted);
}
.empty-state svg { margin: 0 auto 16px; opacity: .4; }
.empty-state p { font-size: 1rem; }

/* ── Post detail page ──────────────────────────────────────────────────────── */
.post-detail {
  max-width: 700px; margin: 0 auto;
  display: flex; flex-direction: column; gap: 24px;
}
.post-detail-thumb {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  aspect-ratio: 16/9;
  background: var(--surface2);
}
.post-detail-thumb img { width: 100%; height: 100%; object-fit: cover; }

.post-detail-body {
  background: var(--glass-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  backdrop-filter: blur(12px);
}
.post-detail-title {
  font-size: clamp(1.2rem, 3vw, 1.7rem);
  font-weight: 700; letter-spacing: -.02em;
  margin-bottom: 12px;
}
.post-detail-desc {
  color: var(--text-muted);
  font-size: .92rem;
  line-height: 1.8;
  margin-bottom: 14px;
}
.post-detail-meta {
  display: flex; align-items: center; gap: 8px;
  font-size: .78rem; color: var(--text-muted);
}

/* ── Download box ──────────────────────────────────────────────────────────── */
.download-box {
  background: var(--glass-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 24px;
  text-align: center;
  backdrop-filter: blur(12px);
  min-height: 240px;
  display: flex; align-items: center; justify-content: center;
}

/* Countdown */
.countdown-wrap {
  display: flex; flex-direction: column;
  align-items: center; gap: 20px;
  animation: fadeIn .4s;
}

.countdown-ring-container {
  position: relative;
  width: 130px; height: 130px;
  display: flex; align-items: center; justify-content: center;
}

.countdown-ring {
  position: absolute; top: 0; left: 0;
  transform: rotate(-90deg);
}
.ring-bg {
  fill: none;
  stroke: var(--border);
  stroke-width: 5;
}
.ring-progress {
  fill: none;
  stroke: url(#ring-grad);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 326.56;
  stroke-dashoffset: 326.56;
  transition: stroke-dashoffset 1s linear;
}

.countdown-number {
  font-size: 3rem; font-weight: 800;
  background: var(--accent-grad);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  z-index: 1;
}
.countdown-text {
  font-size: 1.05rem; font-weight: 600;
  color: var(--text-muted);
}

/* Download ready */
.download-ready {
  flex-direction: column;
  align-items: center; gap: 18px;
  animation: fadeInUp .5s ease;
}
.ready-icon {
  width: 80px; height: 80px;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-glow);
  border-radius: 50%;
  border: 2px solid var(--border-glow);
  color: var(--accent);
  animation: pulse-ring 2s infinite;
}
.ready-text {
  font-size: 1.1rem; font-weight: 600; color: var(--text);
}

.btn-download {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  background: var(--accent-grad);
  color: #fff;
  font-size: 1.15rem; font-weight: 700;
  padding: 16px 40px;
  border-radius: 100px;
  border: none; cursor: pointer;
  text-decoration: none;
  box-shadow: 0 4px 24px rgba(124,58,237,.45);
  transition: transform .2s, box-shadow .2s;
  animation: glow-pulse 2s ease-in-out infinite;
}
.btn-download:hover {
  transform: scale(1.04);
  box-shadow: 0 8px 36px rgba(124,58,237,.65);
}
.token-hint {
  font-size: .78rem; color: var(--text-muted);
  margin-top: 4px;
}

/* Error box */
.error-box {
  max-width: 460px; margin: 0 auto;
  background: rgba(220,38,38,.08);
  border: 1px solid rgba(220,38,38,.25);
  border-radius: var(--radius);
  padding: 40px;
  text-align: center;
}
.error-box h1 { font-size: 1.4rem; margin-bottom: 12px; color: #f87171; }
.error-box p  { color: var(--text-muted); margin-bottom: 20px; }

/* Back link */
.back-link {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--text-muted); font-size: .88rem;
  margin-top: 24px;
  transition: color .2s;
}
.back-link:hover { color: var(--accent); }

/* ── Footer ────────────────────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 20px 0;
  font-size: .8rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 32px;
}

/* ── Animations ────────────────────────────────────────────────────────────── */
@keyframes fadeIn {
  from { opacity: 0; } to { opacity: 1; }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes pulse-ring {
  0%, 100% { box-shadow: 0 0 0 0 rgba(124,58,237,.4); }
  50%       { box-shadow: 0 0 0 16px rgba(124,58,237,0); }
}
@keyframes glow-pulse {
  0%, 100% { box-shadow: 0 4px 24px rgba(124,58,237,.45); }
  50%       { box-shadow: 0 4px 40px rgba(124,58,237,.75); }
}

/* ── Responsive ────────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .posts-grid { grid-template-columns: 1fr; }
  .btn-download { font-size: 1rem; padding: 14px 28px; }
  .countdown-number { font-size: 2.4rem; }
}
