:root {
  color-scheme: dark;
  --bg: #050505;
  --surface: #121212;
  --surface-strong: #1f1f1f;
  --text: #f4f4f4;
  --muted: #b8b8b8;
  --red: #e63946;
  --shadow: rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: radial-gradient(circle at top, #1a1a1a 0%, #050505 55%);
  color: var(--text);
}

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

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

.site-header {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(8, 10, 18, 0.88);
  backdrop-filter: blur(20px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  position: sticky;
  top: 0;
  z-index: 50;
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: nowrap;
  width: 100%;
  max-width: 1440px;
}

.site-brand {
  display: flex;
  align-items: center;
  min-width: 220px;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
  color: inherit;
}

.brand-logo,
.auth-logo {
  width: 6rem;
  height: 6rem;
  min-width: 6rem;
  min-height: 6rem;
  object-fit: contain;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.1);
}

.auth-logo {
  width: 5rem;
  height: 5rem;
  min-width: 5rem;
  min-height: 5rem;
}

.brand-copy {
  display: flex;
  flex-direction: column;
}

.brand-name {
  margin: 0;
  font-size: clamp(1rem, 1.2vw, 1.35rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.brand-tagline {
  margin: 0.15rem 0 0;
  font-size: 0.85rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.nav-menu {
  flex: 1 1 auto;
  display: flex;
  justify-content: center;
  min-width: 0;
}

.nav-list {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 1.25rem;
  list-style: none;
  padding: 0;
  margin: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.nav-list::-webkit-scrollbar {
  height: 0;
}

.nav-link {
  color: var(--text);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  position: relative;
  padding: 0.15rem 0;
  transition: color 180ms ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -0.2rem;
  width: 0;
  height: 2px;
  background: var(--red);
  transition: width 180ms ease;
}

.nav-link:hover,
.nav-link:focus-visible {
  color: #fff;
}

.nav-link:hover::after,
.nav-link:focus-visible::after {
  width: 100%;
}

.nav-menu-toggle {
  display: none;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0.5rem;
  min-width: 3rem;
}

.nav-menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 4px 0;
  background: var(--text);
  border-radius: 999px;
  transition: transform 180ms ease, opacity 180ms ease;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: nowrap;
  flex-shrink: 0;
}

.button {
  justify-content: center;
  width: auto;
  padding: 0.85rem 1.25rem;
  border-radius: 999px;
  background: rgba(230, 57, 70, 0.95);
  color: #fff;
  text-decoration: none;
}

.button.outline {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.nav-login-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.nav-login-toggle:hover,
.nav-login-toggle:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.22);
  transform: translateY(-1px);
}

.login-icon {
  font-size: 1.15rem;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  background: var(--red);
  border-radius: 50%;
  font-size: 1.5rem;
  color: white;
}

.brand h1 {
  margin: 0 0 0.35rem;
  font-size: clamp(1.8rem, 2.5vw, 2.5rem);
  letter-spacing: -0.04em;
}

.brand p {
  margin: 0;
  color: var(--muted);
}

.page-shell {
  padding: 2rem 1.5rem 4rem;
  max-width: 1280px;
  margin: 0 auto;
}

.intro-panel {
  margin-bottom: 2rem;
  padding: 1.75rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.02);
}

.intro-panel h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.5rem, 2vw, 2rem);
}

.intro-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.content-panel {
  margin-bottom: 2rem;
}

.content-card {
  padding: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.015);
  box-shadow: none;
  text-align: left;
}

.content-card h3 {
  margin-top: 0;
  margin-bottom: 0.75rem;
  font-size: clamp(1.1rem, 1.5vw, 1.25rem);
  font-weight: 500;
}

.content-card p {
  margin: 0 0 1rem;
  color: var(--muted);
  line-height: 1.7;
  font-weight: 400;
}

.content-card a {
  color: var(--red);
  text-decoration: underline;
  font-weight: 500;
}

.page-title {
  margin: 0 0 1rem;
  font-size: clamp(1.5rem, 2vw, 2rem);
  font-weight: 600;
}

.content-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.video-grid {
  display: grid;
  gap: 1.75rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 0.5rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 28px;
  box-shadow: 0 18px 45px var(--shadow);
}

.video-card {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  min-height: 190px;
  background: var(--surface);
}

.video-preview {
  width: 100%;
  height: 100%;
  border: 0;
  background-size: cover;
  background-position: center;
  cursor: pointer;
  position: relative;
  z-index: 2;
}

.video-preview::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.12), rgba(0,0,0,0.75));
}

/* allow pointer to reach the button and not be blocked by overlays */
.video-preview::before,
.play-icon {
  pointer-events: none;
}

.play-icon {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  background: rgba(230, 57, 70, 0.95);
  box-shadow: 0 16px 40px rgba(230, 57, 70, 0.25);
}

.play-icon::after {
  content: '';
  position: absolute;
  left: 42%;
  top: 32%;
  width: 0;
  height: 0;
  border-left: 1rem solid white;
  border-top: 0.65rem solid transparent;
  border-bottom: 0.65rem solid transparent;
}

.video-frame {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.card-body {
  padding: 0 0.25rem;
}

.video-controls {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
  align-items: center;
}

.like-btn, .comment-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.6rem;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.04);
  color: var(--text);
  border-radius: 999px;
  cursor: pointer;
}

.like-btn.liked {
  background: rgba(230,57,70,0.12);
  border-color: rgba(230,57,70,0.28);
  color: var(--red);
}

.comments {
  margin-top: 0.75rem;
}

.comment-list { list-style: none; padding: 0; margin: 0 0 0.5rem 0; max-height: 160px; overflow: auto; }
.comment-item { padding: 0.35rem 0; border-bottom: 1px solid rgba(255,255,255,0.03); }
.comment-form textarea { width: 100%; padding: 0.5rem; border-radius: 8px; border: 1px solid rgba(255,255,255,0.06); background: transparent; color: var(--text); }
.comment-form { display: flex; gap: 0.5rem; align-items: flex-start; }
.comment-submit { padding: 0.45rem 0.8rem; border-radius: 8px; background: var(--red); color: white; border: none; cursor: pointer; }

.badge {
  display: inline-block;
  margin-bottom: 0.75rem;
  padding: 0.4rem 0.85rem;
  background: rgba(230, 57, 70, 0.15);
  color: var(--red);
  font-size: 0.8rem;
  border-radius: 999px;
}

.card h3 {
  margin: 0 0 0.55rem;
  font-size: 1.15rem;
  line-height: 1.35;
}

.meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 2rem;
  text-align: center;
  border: 1px dashed rgba(255,255,255,0.15);
  border-radius: 24px;
  color: var(--muted);
}

.footer-bar {
  padding: 1.5rem;
  text-align: center;
  color: var(--muted);
  border-top: 1px solid rgba(255,255,255,0.08);
}

@media (max-width: 1024px) {
  .nav-list {
    gap: 1rem;
  }
}

@media (max-width: 860px) {
  .site-header {
    padding: 1rem 1rem;
    align-items: flex-start;
  }

  .nav-menu {
    width: 100%;
    order: 3;
    display: none;
    justify-content: center;
    margin-top: 1rem;
  }

  .nav-menu.open {
    display: flex;
  }

  .nav-list {
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
    align-items: stretch;
    padding: 1rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin: 0;
  }

  .nav-link {
    padding: 0.7rem 0.5rem;
  }

  .nav-menu-toggle {
    display: inline-flex;
    order: 2;
  }

  .header-actions {
    width: 100%;
    justify-content: flex-end;
    order: 4;
    margin-top: 0.75rem;
  }

  .site-brand {
    width: 100%;
    justify-content: space-between;
    align-items: center;
  }
}

@media (max-width: 640px) {
  .site-header {
    padding: 0.9rem 0.95rem;
  }

  .nav-link {
    text-align: center;
  }

  .header-actions {
    gap: 0.7rem;
  }

  .brand-name {
    font-size: 1rem;
  }

  .brand-tagline {
    font-size: 0.75rem;
  }

  .brand-logo,
  .auth-logo {
    width: 5rem;
    height: 5rem;
    min-width: 5rem;
    min-height: 5rem;
  }

  .nav-menu-toggle {
    margin-left: auto;
  }
}

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  background: radial-gradient(circle at top, rgba(255, 255, 255, 0.04), transparent 30%),
    radial-gradient(circle at bottom right, rgba(230, 57, 70, 0.16), transparent 28%),
    var(--bg);
}

.auth-shell {
  width: min(100%, 480px);
}

.auth-panel {
  position: relative;
  overflow: hidden;
  padding: 3rem 2.5rem;
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 25px 75px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(18px);
  animation: fadeIn 0.8s ease;
}

.auth-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top left, rgba(230, 57, 70, 0.12), transparent 32%),
    radial-gradient(circle at bottom right, rgba(255, 255, 255, 0.08), transparent 35%);
  pointer-events: none;
}

.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1.75rem;
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.auth-brand span:first-child {
  display: inline-flex;
  width: 2.6rem;
  height: 2.6rem;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  background: var(--red);
  box-shadow: 0 18px 35px rgba(230, 57, 70, 0.22);
}

.auth-panel h1 {
  margin: 0 0 0.65rem;
  font-size: clamp(2rem, 2.5vw, 2.5rem);
}

.auth-panel p {
  margin: 0 0 2rem;
  color: var(--muted);
  line-height: 1.8;
}

.auth-field {
  display: grid;
  gap: 0.55rem;
  margin-bottom: 1rem;
}

.auth-field label {
  color: var(--muted);
  font-size: 0.95rem;
}

.auth-input {
  width: 100%;
  padding: 1rem 1rem;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  outline: none;
  transition: border-color 0.2s, transform 0.2s;
}

.auth-input:focus {
  border-color: rgba(230, 57, 70, 0.9);
  transform: translateY(-1px);
}

.auth-button,
.oauth-button,
.button {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-radius: 18px;
  border: none;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

.auth-button {
  background: linear-gradient(135deg, rgba(230, 57, 70, 0.96), rgba(224, 54, 66, 0.78));
  color: #fff;
  box-shadow: 0 18px 35px rgba(230, 57, 70, 0.28);
}

.auth-button:hover,
.button:hover {
  transform: translateY(-2px);
}

.oauth-button {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
}

.oauth-button:hover {
  background: rgba(255, 255, 255, 0.1);
}

.oauth-button img {
  width: 20px;
  height: 20px;
}

.divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--muted);
  margin: 1.5rem 0;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
}

.auth-note {
  text-align: center;
  color: var(--muted);
  margin-top: 1rem;
}

.auth-note a {
  color: var(--red);
  text-decoration: none;
}

.alert {
  padding: 1rem 1.25rem;
  border-radius: 16px;
  background: rgba(230, 57, 70, 0.12);
  color: #fff;
  margin-bottom: 1rem;
  border: 1px solid rgba(230, 57, 70, 0.2);
}

.button {
  justify-content: center;
  width: auto;
  padding: 0.85rem 1.25rem;
  border-radius: 999px;
  background: rgba(230, 57, 70, 0.95);
  color: #fff;
  text-decoration: none;
}

.button.outline {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.header-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

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

/* Navbar login dropdown */
.nav-login-toggle {
  position: relative;
}

.login-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: 320px;
  padding: 1rem;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.02));
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 18px 40px rgba(0,0,0,0.6);
  backdrop-filter: blur(12px) saturate(120%);
  transform-origin: top right;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px) scaleY(0.96);
  transition: opacity 180ms ease, transform 180ms ease, visibility 180ms;
  z-index: 40;
}

.login-dropdown.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scaleY(1);
}

.login-dropdown .nav-field {
  margin-bottom: 0.75rem;
}

.nav-input {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.02);
  color: var(--text);
}

.nav-submit {
  padding: 0.7rem 0.9rem;
  border-radius: 12px;
}

.nav-oauth {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.8rem;
  border-radius: 12px;
}

@media (max-width: 800px) {
  .login-dropdown { right: 0; left: 0; width: auto; }
}

/* Persistent login panel shown on homepage */
.login-panel {
  margin-left: 1rem;
  width: 340px;
  padding: 0.85rem;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
  border: 1px solid rgba(255,255,255,0.06);
  box-shadow: 0 16px 36px rgba(0,0,0,0.55);
  display: block;
}

@media (max-width: 980px) {
  .login-panel { display: none; }
  .header-actions a.button, .header-actions a.button.outline { display: inline-flex; }
}
