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

/* ===== Design Tokens ===== */
:root {
  --color-bg: #FAFAF7;
  --color-text: #1a1a1a;
  --color-text-muted: #6b6b6b;
  --color-accent: #FF5C35;
  --color-accent-hover: #e04d2a;
  --color-secondary: #8DB48E;
  --color-card-bg: #ffffff;
  --color-border: #e8e8e4;
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --radius: 12px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
  --max-width: 1280px;
}

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

/* ===== Base ===== */
html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

img, video, iframe {
  max-width: 100%;
  display: block;
}

/* ===== Typography ===== */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.125rem; }

/* ===== Layout ===== */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ===== Header / Nav ===== */
.site-header {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-card-bg);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.logo {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text);
}

.logo span {
  font-family: var(--font-body);
  font-style: normal;
  font-size: 1rem;
  font-weight: 400;
  color: var(--color-text-muted);
}

/* ===== Category Nav ===== */
.category-nav {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding: 1rem 0;
}

.category-nav a {
  display: inline-block;
  padding: 0.375rem 0.875rem;
  border-radius: 100px;
  font-size: 0.875rem;
  font-weight: 500;
  background: var(--color-card-bg);
  border: 1px solid var(--color-border);
  transition: all 0.2s ease;
}

.category-nav a:hover,
.category-nav a.active {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
}

/* ===== Hero ===== */
.hero {
  text-align: center;
  padding: 3rem 0 2rem;
}

.hero h1 {
  margin-bottom: 0.5rem;
}

.hero .tagline {
  font-size: 1.125rem;
  color: var(--color-text-muted);
}

/* ===== Video Grid ===== */
.video-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  padding: 1.5rem 0;
}

/* ===== Video Card ===== */
.video-card {
  display: block;
  background: var(--color-card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.video-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.video-card__thumbnail {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #e0e0dc;
}

.video-card__thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-card__info {
  padding: 0.875rem 1rem;
}

.video-card__info h3 {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.4;
  margin-bottom: 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.video-card__badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 500;
  background: var(--color-accent);
  color: #fff;
}

/* ===== Video Player (single video page) ===== */
.video-player {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
  margin-bottom: 1.5rem;
}

.video-player iframe,
.video-player video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* ===== Video Page Content ===== */
.video-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.video-page h1 {
  margin-bottom: 0.75rem;
}

.video-page .meta-description {
  font-size: 1.0625rem;
  color: var(--color-text-muted);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.video-page .source-link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.875rem;
  color: var(--color-accent);
  font-weight: 500;
  margin-bottom: 2.5rem;
}

.video-page .source-link:hover {
  color: var(--color-accent-hover);
}

/* ===== Related / More Videos ===== */
.related-section {
  padding: 2rem 0;
  border-top: 1px solid var(--color-border);
}

.related-section h2 {
  margin-bottom: 1.25rem;
}

/* ===== Section Titles ===== */
.section-title {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
}

/* ===== Category Page ===== */
.category-header {
  padding: 2.5rem 0 1rem;
}

.category-header h1 {
  margin-bottom: 0.25rem;
}

.category-header .count {
  color: var(--color-text-muted);
  font-size: 1rem;
}

/* ===== AdSense Slots ===== */
.adsense-slot {
  background: var(--color-border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  font-size: 0.8125rem;
  min-height: 90px;
  margin: 1.5rem 0;
}

.adsense-slot--leaderboard {
  min-height: 90px;
}

.adsense-slot--rectangle {
  min-height: 250px;
}

/* ===== Footer ===== */
.site-footer {
  border-top: 1px solid var(--color-border);
  padding: 2rem 0;
  margin-top: 3rem;
  text-align: center;
  color: var(--color-text-muted);
  font-size: 0.875rem;
}

.site-footer a {
  color: var(--color-accent);
}

.site-footer a:hover {
  color: var(--color-accent-hover);
}

/* ===== 404 Page ===== */
.not-found {
  text-align: center;
  padding: 4rem 1.5rem;
}

.not-found h1 {
  font-size: 4rem;
  margin-bottom: 0.5rem;
}

.not-found p {
  font-size: 1.125rem;
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
}

.not-found a {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: var(--color-accent);
  color: #fff;
  border-radius: var(--radius);
  font-weight: 500;
  transition: background 0.2s ease;
}

.not-found a:hover {
  background: var(--color-accent-hover);
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .video-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .video-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.375rem; }

  .hero {
    padding: 2rem 0 1.5rem;
  }

  .site-header .container {
    flex-direction: column;
    align-items: flex-start;
  }

  .video-page {
    padding: 1.5rem 1rem;
  }
}
