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

:root {
  --bg: #0d0d0f;
  --surface: #16161a;
  --surface2: #1e1e24;
  --accent: #7f5af0;
  --accent2: #2cb67d;
  --text: #fffffe;
  --muted: #94a1b2;
  --radius: 10px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Segoe UI', system-ui, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

/* ── Header ── */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2.5rem;
  background: var(--surface);
  border-bottom: 1px solid #ffffff12;
  position: sticky;
  top: 0;
  z-index: 100;
  will-change: transform;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -1px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

nav { display: flex; gap: 1.5rem; }
nav a { color: var(--muted); font-size: 0.9rem; transition: color .2s; }
nav a:hover { color: var(--text); }

/* ── Main ── */
main {
  flex: 1;
  padding: 2rem 3rem;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

/* ── Hero ── */
.hero { text-align: center; padding: 5rem 1rem 3rem; }
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); margin-bottom: .75rem; line-height: 1.1; }
.hero h1 span { color: var(--accent); }
.hero p { color: var(--muted); margin-bottom: 2rem; font-size: 1.15rem; }

.btn-primary {
  display: inline-block;
  background: linear-gradient(135deg, var(--accent), #6b46e0);
  color: #fff;
  padding: .75rem 2rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: .95rem;
  transition: opacity .2s, transform .2s;
  box-shadow: 0 4px 20px #7f5af050;
}
.btn-primary:hover { opacity: .88; transform: translateY(-2px); }

/* ── Section title ── */
.section-title { margin: 2.5rem 0 1.25rem; }
.section-title h2 { font-size: 1.2rem; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }

.page-header { margin-bottom: 1.75rem; }
.page-header h1 { font-size: 2rem; }

/* ── Grid ── */
.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  contain: layout style;
}
@media (max-width: 1100px) { .grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px)  { .grid { grid-template-columns: repeat(2, 1fr); } }

/* ── Card ── */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .25s, box-shadow .25s;
  border: 1px solid #ffffff0a;
  display: block;
  contain: layout style;
}
.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 40px #7f5af028;
  border-color: #7f5af030;
  will-change: transform;
}

.thumb {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--surface2);
}
.iframe-thumb {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.iframe-thumb iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}
.thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .3s;
}
.card:hover .thumb img { transform: scale(1.04); }

.play-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  background: #00000055;
  opacity: 0;
  transition: opacity .25s;
}


.card-info { padding: .85rem 1rem; }
.card-info h3 {
  font-size: .95rem;
  margin-bottom: .3rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-info p { font-size: .78rem; color: var(--muted); }

/* ── Single ── */
.single-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}
.meta { color: var(--muted); font-size: .85rem; margin-bottom: 1.5rem; }
.back-btn { display: inline-block; color: var(--accent); font-size: .9rem; transition: opacity .2s; }
.back-btn:hover { opacity: .7; }

/* ── Pagination ── */
.pagination { display: flex; justify-content: center; gap: .5rem; margin-top: 3rem; flex-wrap: wrap; }
.pagination a, .pagination span {
  padding: .45rem .9rem;
  border-radius: 6px;
  background: var(--surface2);
  color: var(--muted);
  font-size: .85rem;
  transition: background .2s, color .2s;
}
.pagination a:hover, .pagination .active { background: var(--accent); color: #fff; }

/* ── Footer ── */
footer {
  text-align: center;
  padding: 2rem 1rem 1.5rem;
  color: var(--muted);
  font-size: .8rem;
  border-top: 1px solid #ffffff08;
  margin-top: auto;
}
.footer-icons { display: flex; justify-content: center; gap: 1.5rem; margin-bottom: 1rem; }
.footer-icons a { color: var(--muted); transition: color .2s; }
.footer-icons a:hover { color: var(--text); }

/* ── Responsive ── */
@media (max-width: 768px) {
  main { padding: 1.25rem; }
  .hero { padding: 3rem .5rem 2rem; }
}
@media (max-width: 480px) {
  header { padding: .75rem 1.25rem; }
  .grid { grid-template-columns: 1fr; }
}

/* ── Videos grid (single author) ── */
.video-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-bottom: 2rem;
  contain: layout style;
}
.video-num { color: var(--muted); font-size: .78rem; margin-bottom: .35rem; }
.player-wrap { border-radius: var(--radius); overflow: hidden; background: var(--surface2); }
.lazy-iframe { aspect-ratio: 16/9; background: var(--surface2); border-radius: var(--radius); }
.lazy-iframe iframe { width: 100%; aspect-ratio: 16/9; height: auto; border-radius: var(--radius); display: block; }

@media (max-width: 900px) { .video-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .video-grid { grid-template-columns: 1fr; } }
