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

:root {
  --bg: #1a1a2e;
  --bg-surface: #16213e;
  --bg-card: #0f3460;
  --text: #e0e0e0;
  --text-muted: #a0a0b0;
  --accent: #e2a812;
  --accent-hover: #f0be30;
  --border: #2a2a4a;
  --radius: 8px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header */

header {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  padding: 2.5rem 0 1.5rem;
  text-align: center;
}

header h1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
}

.subtitle {
  color: var(--text-muted);
  margin: 0.25rem 0 1.25rem;
}

nav {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

nav a {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
}

nav a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

/* Recently added poster grid */

.poster-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 1rem;
  margin-top: 0.75rem;
}

.poster-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  transition: border-color 0.2s, transform 0.2s;
}

.poster-item:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.poster-item img {
  display: block;
  width: 100%;
  aspect-ratio: 2/3;
  object-fit: cover;
}

.poster-info {
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.poster-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.poster-meta {
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.poster-type {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  margin-top: 0.15rem;
}

.loading-msg {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--text-muted);
  padding: 2rem 0;
}

/* Quick link cards */

.quick-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}

.quick-links .card {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.2s, transform 0.2s;
}

.quick-links .card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.quick-links .card h3 {
  color: var(--accent);
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.quick-links .card p {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Sections */

section {
  margin: 2.5rem 0;
}

h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--accent);
  margin: 1.25rem 0 0.5rem;
}

p {
  margin-bottom: 0.75rem;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

ol,
ul {
  margin: 0.5rem 0 1rem 1.5rem;
}

li {
  margin-bottom: 0.35rem;
}

/* Table */

table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.5rem 0 1rem;
}

td {
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
}

td:first-child {
  font-weight: 600;
  color: #fff;
  width: 40%;
}

/* FAQ accordions */

details {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 0.5rem;
}

summary {
  padding: 0.75rem 1rem;
  cursor: pointer;
  font-weight: 500;
  color: #fff;
  list-style: none;
}

summary::before {
  content: "+ ";
  color: var(--accent);
  font-weight: 700;
}

details[open] summary::before {
  content: "- ";
}

details p {
  padding: 0 1rem 0.75rem;
  color: var(--text-muted);
}

/* Footer */

footer {
  margin-top: 3rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--border);
  text-align: center;
}

footer p {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Responsive */

@media (max-width: 600px) {
  header h1 {
    font-size: 1.5rem;
  }

  nav {
    gap: 1rem;
  }

  .poster-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 0.75rem;
  }

  .quick-links {
    grid-template-columns: 1fr;
  }
}
