@font-face {
  font-family: "Vazir";
  src: url("../fonts/VAZIR-REGULAR.TTF") format("truetype");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Vazir";
  src: url("../fonts/VAZIR-BOLD.TTF") format("truetype");
  font-weight: 700;
  font-display: swap;
}

:root {
  --bg: #14101a;
  --surface: #211a2c;
  --surface-2: #2b2339;
  --text: #f3eef8;
  --muted: #b5aac4;
  --accent: #e8b84a;
  --green: #3fbf7f;
  --amber: #e8b84a;
  --red: #e5645f;
  --gray: #7d748c;
  --radius: 14px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Vazir", Tahoma, "Segoe UI", sans-serif;
  line-height: 1.7;
}

.site-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.8rem 1rem;
  background: var(--surface);
  border-bottom: 1px solid var(--surface-2);
}
.brand { color: var(--accent); font-weight: 800; font-size: 1.25rem; text-decoration: none; letter-spacing: 0.5px; }
.nav a { color: var(--text); text-decoration: none; margin-inline-start: 1rem; }

.container { max-width: 1100px; margin: 0 auto; padding: 1.2rem 1rem 3rem; }
.page-title { margin: 0.4rem 0 0.2rem; font-size: 1.5rem; }
.page-sub { margin: 0 0 1.2rem; color: var(--muted); font-size: 0.95rem; }
.empty { color: var(--muted); text-align: center; padding: 3rem 0; }

.grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (min-width: 700px)  { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex; flex-direction: column;
  border: 1px solid var(--surface-2);
  border-top: 4px solid var(--gray);
}
.card.state-open { border-top-color: var(--green); }
.card.state-upcoming { border-top-color: var(--amber); }
.card.state-soldout_next, .card.state-soldout { border-top-color: var(--red); }

.poster { position: relative; aspect-ratio: 2 / 3; background: var(--surface-2); }
.poster img { width: 100%; height: 100%; object-fit: cover; display: block; }
.poster-fallback {
  height: 100%; display: flex; align-items: center; justify-content: center;
  padding: 1rem; text-align: center; font-weight: 700; color: var(--muted);
}
.badge {
  position: absolute; top: 0.5rem; inset-inline-start: 0.5rem;
  background: rgba(0, 0, 0, 0.7); color: var(--text);
  padding: 0.1rem 0.6rem; border-radius: 999px; font-size: 0.8rem;
}
.state-open .badge { background: var(--green); color: #07281a; }
.state-upcoming .badge { background: var(--amber); color: #3a2a00; }
.state-soldout_next .badge, .state-soldout .badge { background: var(--red); color: #fff; }

.card-body { padding: 0.8rem; display: flex; flex-direction: column; gap: 0.4rem; flex: 1; }
.card-title { margin: 0; font-size: 1.05rem; }
.msg { margin: 0; font-weight: 700; font-size: 0.95rem; }
.state-open .msg { color: var(--green); }
.detail { margin: 0; color: var(--muted); font-size: 0.85rem; }

.lines { list-style: none; margin: 0; padding: 0; font-size: 0.85rem; color: var(--muted); }
.lines li { display: flex; justify-content: space-between; gap: 0.5rem; padding: 0.15rem 0; }
.lines b { color: var(--text); white-space: nowrap; }

.timer {
  margin-top: auto;
  background: var(--surface-2);
  border-radius: 10px;
  padding: 0.5rem 0.6rem;
  text-align: center;
}
.timer-label { display: block; font-size: 0.75rem; color: var(--muted); }
.timer-value { display: block; font-size: 1.2rem; font-weight: 800; color: var(--accent); }

.site-footer { text-align: center; color: var(--muted); font-size: 0.8rem; padding: 1.5rem 0; }
