/* Base */
@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

:root {
  /* Brand */
  --primary: #35b3e3;
  --primary-2: #1f8db7;

  /* Theme */
  --bg: #070b10;
  --panel: rgba(255, 255, 255, 0.04);
  --panel-2: rgba(255, 255, 255, 0.02);
  --text: #eaf2f7;
  --muted: rgba(234, 242, 247, 0.78);
  --line: rgba(255, 255, 255, 0.09);

  --radius: 16px;
  --shadow: 0 14px 40px rgba(0, 0, 0, 0.55);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  min-height: 100vh;
  background:
    radial-gradient(900px 500px at 20% -10%, rgba(53, 179, 227, 0.22) 0%, rgba(53, 179, 227, 0.00) 55%),
    radial-gradient(700px 380px at 95% 0%, rgba(53, 179, 227, 0.14) 0%, rgba(53, 179, 227, 0.00) 58%),
    linear-gradient(180deg, #05070b 0%, var(--bg) 55%, #04070c 100%);
  color: var(--text);
  font-family: "Poppins", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Header */
header {
  position: sticky;
  top: 0;
  z-index: 10;
  text-align: center;
  padding: 16px 20px;
  font-size: clamp(20px, 2.6vw, 30px);
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  background: rgba(7, 11, 16, 0.72);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  position: sticky;
}

header::after {
  content: "";
  display: block;
  height: 2px;
  margin-top: 12px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  opacity: 0.85;
}

/* Layout */
article {
  max-width: 1040px;
  margin: 40px auto;
  padding: 0 20px;
}

footer {
  border-top: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.35);
  color: var(--muted);
  padding: 28px 20px;
}

footer p {
  text-align: center;
  font-size: 0.9rem;
}

/* Typography */
h1, h2, h3 { line-height: 1.2; margin: 24px 0 12px; }

h1 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  letter-spacing: 0.2px;
  text-align: center;
}

h2 {
  font-size: clamp(20px, 3vw, 26px);
  margin-top: 32px;
}

h3 {
  font-size: clamp(18px, 2.5vw, 20px);
  color: var(--text);
}

p, li { color: rgba(234, 242, 247, 0.86); }
em, strong { color: #ffffff; }

a {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: 0.2s ease;
}

a:hover { border-bottom-color: var(--primary); }

/* Trend heading */
.trend-head {
  margin: 18px 0 10px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(53, 179, 227, 0.12), rgba(255, 255, 255, 0.02));
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.35);
}

.section-title {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.2px;
}

.section-subtitle {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* Images */
article img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.45);
}

/* Button */
.btn-hover.color-9 {
  display: flex;
  margin: 18px auto;
  padding: 12px 22px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #041018;
  font-weight: 800;
  letter-spacing: 0.35px;
  text-transform: uppercase;
  font-size: 13px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  cursor: pointer;
  justify-content: center;
  max-width: 340px;
  box-shadow: 0 16px 38px rgba(53, 179, 227, 0.18);
  transform: translateY(0);
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.2s ease;
  user-select: none;
}

.btn-hover.color-9:hover {
  transform: translateY(-2px);
  opacity: 0.96;
  box-shadow: 0 22px 52px rgba(53, 179, 227, 0.22);
}

.btn-hover.color-9:focus-visible {
  outline: 2px solid rgba(53, 179, 227, 0.6);
  outline-offset: 2px;
}

/* Tables */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  background: transparent;
  border-radius: var(--radius);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

thead th {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
  color: var(--text);
  font-weight: 700;
  text-align: left;
  white-space: nowrap;
}

th, td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

tbody tr:hover { background: rgba(255, 255, 255, 0.03); }

/* Blockquotes */
blockquote {
  margin: 18px 0;
  padding: 14px 16px;
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  border-left: 4px solid var(--primary);
  border-radius: 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

/* Lists */
ul { padding-left: 20px; }
ul li { margin: 6px 0; }

/* Footer links layout */
.wrap.list-footer { max-width: 1040px; margin: 0 auto; }
.wrap.list-footer ul {
  list-style: none;
  padding: 10px 0 0;
  margin: 12px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
}
.wrap.list-footer li a {
  color: var(--text);
  border-bottom-color: rgba(53, 179, 227, 0.55);
}

hr { border: 0; height: 1px; background: var(--line); }

/* Movie grid */
#grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  margin: 14px 0 8px;
}

.card {
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.35);
  transform: translateY(0);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.card:hover {
  transform: translateY(-3px);
  border-color: rgba(53, 179, 227, 0.55);
  box-shadow: var(--shadow);
}

.card:focus-visible {
  outline: 2px solid rgba(53, 179, 227, 0.6);
  outline-offset: 2px;
}

.poster {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: rgba(0, 0, 0, 0.25);
}

.meta {
  padding: 12px 12px 14px;
  display: grid;
  gap: 8px;
}

.title {
  color: var(--text);
  font-weight: 800;
  font-size: 0.95rem;
  line-height: 1.25;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.details {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  align-items: center;
}

.detail {
  font-size: 0.8rem;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  padding: 4px 10px;
  border-radius: 999px;
}

.detail .label {
  color: rgba(234, 242, 247, 0.9);
  font-weight: 700;
  margin-right: 6px;
}

.detail.rating {
  border-color: rgba(234, 179, 8, 0.25);
}

.star {
  color: #eab308;
  margin-right: 6px;
}

.overview {
  font-size: 0.82rem;
  color: rgba(234, 242, 247, 0.78);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.err {
  max-width: 780px;
  margin: 16px auto;
  padding: 12px 14px;
  background: rgba(255, 0, 72, 0.12);
  border: 1px solid rgba(255, 0, 72, 0.28);
  border-radius: 12px;
}

/* Skeleton loading */
.card.skeleton {
  pointer-events: none;
}

.card.skeleton .poster,
.card.skeleton .title,
.card.skeleton .detail,
.card.skeleton .overview {
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
}

.card.skeleton .title {
  height: 14px;
  border-radius: 10px;
}

.card.skeleton .detail {
  height: 20px;
  min-width: 86px;
  border-radius: 999px;
}

.card.skeleton .overview {
  height: 44px;
  border-radius: 12px;
}

.card.skeleton .poster::after,
.card.skeleton .title::after,
.card.skeleton .detail::after,
.card.skeleton .overview::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.12),
    transparent
  );
  animation: shimmer 1.15s infinite;
}

@keyframes shimmer {
  100% { transform: translateX(100%); }
}

/* Utility */
.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Small screens */
@media (max-width: 600px) {
  header { padding: 14px 16px; }
  article { margin: 28px auto; }
  th, td { padding: 10px 12px; }
  .btn-hover.color-9 { width: 100%; }
  #grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
}
