@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&display=swap');

:root {
  --navy: #1a2940;
  --navy-light: #2a3d5a;
  --sky: #2b6cb0;
  --sky-light: #3182ce;
  --sky-hover: #2c5282;
  --gold: #b8860b;
  --gold-light: #d4a017;
  --bg: #ffffff;
  --bg-soft: #f7f8fa;
  --bg-card: #ffffff;
  --text: #1a202c;
  --text-secondary: #4a5568;
  --text-muted: #718096;
  --border: #e2e8f0;
  --border-hover: #cbd5e0;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.1);
  --font-brand: 'Myriad Pro', 'Myriad', 'Segoe UI', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── NAV ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: var(--text);
}

.nav-brand img {
  height: 44px;
  width: 44px;
  border-radius: 8px;
}

.nav-brand-text {
  font-family: var(--font-brand);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--navy);
}

.nav-brand-sub {
  font-size: 0.7rem;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-weight: 600;
  margin-top: -2px;
}

.nav-links {
  display: flex;
  gap: 4px;
  list-style: none;
}

.nav-links a {
  display: block;
  padding: 8px 16px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  border-radius: 6px;
  transition: all 0.2s;
  letter-spacing: 0.02em;
}

.nav-links a:hover {
  color: var(--text);
  background: var(--bg-soft);
}

.nav-links a.active {
  color: var(--sky);
  background: rgba(43, 108, 176, 0.06);
  font-weight: 600;
}

/* mobile hamburger */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 8px;
}

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 16px 24px;
    gap: 4px;
    box-shadow: var(--shadow-md);
  }
  .nav-links.open { display: flex; }
}

/* ── MAIN ── */
main { flex: 1; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── HERO (homepage) ── */
.hero {
  padding: 80px 0 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 700px 400px at 50% 0%, rgba(43,108,176,0.04), transparent),
    radial-gradient(ellipse 400px 300px at 80% 90%, rgba(184,134,11,0.03), transparent);
  pointer-events: none;
}

.hero-logo {
  width: 120px;
  height: 120px;
  border-radius: 20px;
  margin-bottom: 32px;
  box-shadow: var(--shadow-lg);
}

.hero h1 {
  font-family: var(--font-brand);
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 12px;
  color: var(--navy);
}

.hero h1 span {
  color: var(--gold);
}

.hero-tagline {
  font-size: 1rem;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-weight: 600;
  margin-bottom: 40px;
}

.hero-text {
  max-width: 680px;
  margin: 0 auto;
  text-align: left;
}

.hero-text p {
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.hero-divider {
  width: 60px;
  height: 2px;
  background: var(--gold);
  margin: 40px auto;
  border-radius: 2px;
}

.hero-social {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 40px;
}

.hero-social a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.25s;
  background: var(--bg);
}

.hero-social a:hover {
  border-color: var(--sky);
  color: var(--sky);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.hero-social svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* ── PAGE HEADER (feed pages) ── */
.page-header {
  padding: 56px 0 40px;
  text-align: center;
  position: relative;
}

.page-header h1 {
  font-family: var(--font-brand);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--navy);
}

.page-header p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.page-header a {
  color: var(--sky);
  text-decoration: none;
  font-weight: 500;
}

.page-header a:hover {
  text-decoration: underline;
}

/* ── FEED GRID ── */
.feed-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding-bottom: 48px;
}

@media (max-width: 860px) {
  .feed-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 540px) {
  .feed-grid { grid-template-columns: 1fr; }
}

.feed-card {
  background: var(--bg-card);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
}

.feed-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.feed-card-thumb {
  aspect-ratio: 16/9;
  background: var(--bg-soft);
  overflow: hidden;
  position: relative;
}

.feed-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}

.feed-card:hover .feed-card-thumb img {
  transform: scale(1.05);
}

.feed-card-thumb .play-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.2);
  opacity: 0;
  transition: opacity 0.3s;
}

.feed-card:hover .play-icon {
  opacity: 1;
}

.play-icon svg {
  width: 48px;
  height: 48px;
  fill: white;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.4));
}

.feed-card-body {
  padding: 18px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.feed-card-title {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.45;
  margin-bottom: 8px;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.feed-card-title a {
  color: inherit;
  text-decoration: none;
}

.feed-card-title a:hover {
  color: var(--sky);
}

.feed-card-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: auto;
}

.feed-card-platform {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  margin-bottom: 6px;
}

/* ── PAGINATION ── */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 16px 0 64px;
}

.pagination button {
  padding: 10px 20px;
  background: var(--bg);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 500;
  transition: all 0.2s;
}

.pagination button:hover:not(:disabled) {
  background: var(--bg-soft);
  color: var(--text);
  border-color: var(--sky);
}

.pagination button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.pagination .page-info {
  font-size: 0.85rem;
  color: var(--text-muted);
  padding: 0 12px;
}

/* ── RECOMMENDATIONS ── */
.reco-section {
  padding: 20px 0 60px;
}

.reco-category {
  margin-bottom: 40px;
}

.reco-category h2 {
  font-family: var(--font-brand);
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--navy);
  position: relative;
  padding-bottom: 12px;
}

.reco-category h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 2px;
  background: var(--gold);
  border-radius: 2px;
}

.reco-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.reco-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px;
  transition: all 0.25s;
}

.reco-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.reco-card a {
  color: var(--sky);
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
}

.reco-card a:hover {
  text-decoration: underline;
}

.reco-card p {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 4px;
}

/* ── EMBED CONTAINER ── */
.embed-note {
  text-align: center;
  padding: 40px 24px;
  color: var(--text-muted);
  font-size: 0.95rem;
  max-width: 600px;
  margin: 0 auto 32px;
  background: var(--bg-soft);
  border-radius: 12px;
  border: 1px solid var(--border);
}

.embed-note a {
  color: var(--sky);
  text-decoration: none;
  font-weight: 600;
}

.embed-note a:hover {
  text-decoration: underline;
}

.embed-note a.visit-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding: 12px 28px;
  background: var(--sky);
  color: #ffffff;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.25s;
}

.embed-note a.visit-btn:hover {
  background: var(--sky-hover);
  color: #ffffff;
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(43,108,176,0.2);
}

/* ── FOOTER ── */
.site-footer {
  text-align: center;
  padding: 32px 24px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.82rem;
  letter-spacing: 0.02em;
}

/* ── LOADING ── */
.loading-state {
  text-align: center;
  padding: 80px 24px;
  color: var(--text-muted);
}

.loading-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--sky);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── FADE-IN ANIMATION ── */
.fade-in {
  animation: fadeIn 0.5s ease both;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.feed-card:nth-child(1) { animation-delay: 0s; }
.feed-card:nth-child(2) { animation-delay: 0.05s; }
.feed-card:nth-child(3) { animation-delay: 0.1s; }
.feed-card:nth-child(4) { animation-delay: 0.15s; }
.feed-card:nth-child(5) { animation-delay: 0.2s; }
.feed-card:nth-child(6) { animation-delay: 0.25s; }
.feed-card:nth-child(7) { animation-delay: 0.3s; }
.feed-card:nth-child(8) { animation-delay: 0.35s; }
.feed-card:nth-child(9) { animation-delay: 0.4s; }

/* ── SERVER-SIDE PAGINATION LINKS ── */
.page-btn {
  display: inline-block;
  padding: 10px 20px;
  background: var(--bg);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s;
}

a.page-btn:hover {
  background: var(--bg-soft);
  color: var(--text);
  border-color: var(--sky);
}

.page-btn.disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* ── EMPTY STATE ── */
.empty-state {
  text-align: center;
  padding: 60px 24px;
  color: var(--text-muted);
  font-size: 1rem;
}
