/* Project Gorl — dark red aesthetic */
:root {
  color-scheme: dark;
  --bg: #050505;
  --bg-elevated: rgba(18, 18, 20, 0.85);
  --border: rgba(255, 255, 255, 0.08);
  --text: #f5f5f5;
  --muted: #8a8a8a;
  --accent: #e63946;
  --accent-glow: rgba(230, 57, 70, 0.45);
  --accent-dark: #b82d38;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "DM Sans", system-ui, sans-serif;
  --radius: 14px;
  --nav-h: 72px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}

.ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.ambient-a {
  background: radial-gradient(ellipse 80% 50% at 50% -10%, var(--accent-glow), transparent 60%);
}
.ambient-b {
  background: radial-gradient(ellipse 60% 40% at 80% 100%, rgba(230, 57, 70, 0.12), transparent 50%);
}
.light-streak {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(135deg, transparent 40%, rgba(230, 57, 70, 0.08) 50%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: var(--nav-h);
  padding: 0 2rem;
  background: rgba(5, 5, 5, 0.75);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--text);
}
.brand-text {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}
.brand-accent { color: var(--accent); }

.nav-links { display: flex; gap: 1.75rem; }
.nav-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-link:hover { color: var(--text); }
.nav-link-disabled {
  color: rgba(138, 138, 138, 0.55);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: not-allowed;
  user-select: none;
  position: relative;
}
.nav-link-disabled::after {
  content: "Soon";
  margin-left: 0.35rem;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent);
  opacity: 0.7;
}
.nav-feature-live { color: var(--text); }
.nav-actions { display: flex; align-items: center; gap: 0.75rem; }

.user-chip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.75rem 0.35rem 0.35rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  font-size: 0.85rem;
  font-weight: 500;
  max-width: 180px;
}
.user-chip-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}
#nav-username {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  border-radius: 10px;
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.2s, background 0.2s;
}
.btn:active { transform: scale(0.98); }
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 24px var(--accent-glow);
}
.btn-primary:hover {
  background: #f04552;
  box-shadow: 0 6px 32px var(--accent-glow);
}
.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-outline:hover { border-color: rgba(255,255,255,0.2); background: rgba(255,255,255,0.04); }
.btn-ghost { background: transparent; color: var(--muted); border: none; }
.btn-ghost:hover { color: var(--text); }
.btn-lg { padding: 0.85rem 1.75rem; font-size: 0.95rem; }
.btn-block { width: 100%; }
.btn-icon { opacity: 0.9; }
.btn-google { background: #fff; color: #333; border: 1px solid #ddd; }
.btn-google:hover { background: #f8f8f8; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.btn-sm { padding: 0.45rem 0.9rem; font-size: 0.82rem; }
.btn-google.is-disabled {
  opacity: 0.45;
  pointer-events: none;
  cursor: not-allowed;
}

main {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
}

.hero { text-align: center; padding: 4rem 0 3rem; }
.hero-title {
  font-family: var(--serif);
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 1.25rem;
  letter-spacing: -0.02em;
}
.hero-highlight { font-style: italic; color: var(--accent); }
.hero-sub {
  max-width: 540px;
  margin: 0 auto 2rem;
  color: var(--muted);
  font-size: 1.05rem;
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 1rem;
}
.hero-note { font-size: 0.8rem; color: rgba(138, 138, 138, 0.7); }

.features { padding: 2rem 0 3rem; }
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}
.feature-card {
  position: relative;
  padding: 1.75rem;
  border-radius: var(--radius);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  backdrop-filter: blur(12px);
}
.feature-active {
  border-color: rgba(230, 57, 70, 0.35);
  box-shadow: 0 0 40px rgba(230, 57, 70, 0.08);
}
.feature-disabled { opacity: 0.65; pointer-events: none; }
.feature-card h3 { margin: 0.5rem 0 0.75rem; font-size: 1.1rem; font-weight: 600; }
.feature-card p { margin: 0; color: var(--muted); font-size: 0.9rem; }
.feature-badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: rgba(230, 57, 70, 0.2);
  color: var(--accent);
}
.feature-stamp {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  border: 1px dashed rgba(255,255,255,0.15);
  transform: rotate(-3deg);
}
.feature-link {
  margin-top: 1.25rem;
  background: none;
  border: none;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  padding: 0;
}
.feature-link:hover { text-decoration: underline; }

.features-footer {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}
.feature-stat {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.85rem;
  color: var(--muted);
}
.feature-stat strong { color: var(--text); font-size: 0.95rem; }
.feature-stat .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  margin-bottom: 0.35rem;
}

.panel {
  margin-top: 2rem;
  padding: 2rem;
  border-radius: calc(var(--radius) + 4px);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  backdrop-filter: blur(16px);
}
.panel-header h2 {
  margin: 0 0 0.35rem;
  font-family: var(--serif);
  font-size: 1.75rem;
  font-weight: 600;
}
.muted { color: var(--muted); }

.waitlist-panel { text-align: center; }
.waitlist-inner { max-width: 480px; margin: 0 auto; padding: 2rem 0; }
.waitlist-icon { font-size: 3rem; margin-bottom: 1rem; }
.waitlist-panel h2 { font-family: var(--serif); font-size: 2rem; margin: 0 0 1rem; }
.waitlist-user {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
}
.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
}

.upload-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
@media (max-width: 640px) {
  .upload-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
}

.upload-card { cursor: pointer; }
.upload-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 160px;
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 2px dashed rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.3);
  transition: border-color 0.2s, background 0.2s;
}
.upload-card:hover .upload-inner,
.upload-inner.has-file {
  border-color: rgba(230, 57, 70, 0.5);
  background: rgba(230, 57, 70, 0.06);
}
.upload-icon { font-size: 2rem; }
.upload-title { font-weight: 600; }
.upload-hint { font-size: 0.8rem; color: var(--muted); }
.upload-filename {
  font-size: 0.8rem;
  color: var(--accent);
  margin-top: 0.5rem;
  word-break: break-all;
  text-align: center;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
}
.field span { font-weight: 500; font-size: 0.9rem; }
.field input {
  padding: 0.75rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(0,0,0,0.4);
  color: var(--text);
  font-family: var(--sans);
  font-size: 0.95rem;
}
.field input:focus {
  outline: none;
  border-color: rgba(230, 57, 70, 0.5);
}

.progress-panel { text-align: center; padding: 2.5rem 1rem; }
.loader-ring {
  position: relative;
  width: 88px;
  height: 88px;
  margin: 0 auto 1.5rem;
}
.loader-orbit {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(230, 57, 70, 0.15);
  border-top-color: var(--accent);
  animation: spin 1.2s linear infinite;
}
.loader-core {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--accent);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.08); }
}

.progress-status { font-size: 1.05rem; font-weight: 500; margin: 0 0 1.25rem; }
.progress-bar-wrap {
  height: 6px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  overflow: hidden;
  max-width: 400px;
  margin: 0 auto;
}
.progress-bar {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent-dark), var(--accent));
  transition: width 0.6s ease;
  box-shadow: 0 0 12px var(--accent-glow);
}
.progress-meta { margin-top: 0.75rem; font-size: 0.85rem; color: var(--muted); }

.result-panel h3 { font-family: var(--serif); font-size: 1.5rem; margin: 0 0 1rem; }
.result-panel video {
  width: 100%;
  max-height: 480px;
  border-radius: var(--radius);
  background: #000;
  border: 1px solid var(--border);
}
.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.error-banner {
  margin-top: 1rem;
  padding: 1rem 1.25rem;
  border-radius: 10px;
  background: rgba(230, 57, 70, 0.12);
  border: 1px solid rgba(230, 57, 70, 0.35);
  color: #ffb4b4;
  font-size: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.error-banner p { margin: 0; flex: 1; min-width: 200px; }

.revoked-panel { text-align: center; }
.admin-user-cell {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.admin-user-cell .avatar { width: 32px; height: 32px; }

.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 300;
  padding: 0.75rem 1.25rem;
  border-radius: 10px;
  background: rgba(18, 18, 20, 0.95);
  border: 1px solid rgba(230, 57, 70, 0.4);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  animation: toast-in 0.25s ease;
}
@keyframes toast-in {
  from { opacity: 0; transform: translateX(-50%) translateY(8px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

body.modal-open { overflow: hidden; }

.admin-table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.admin-table th,
.admin-table td {
  padding: 0.85rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.admin-table th {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.status-pill {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: capitalize;
}
.status-approved { background: rgba(76, 175, 80, 0.2); color: #81c784; }
.status-waitlisted { background: rgba(255, 193, 7, 0.15); color: #ffd54f; }
.status-revoked { background: rgba(244, 67, 54, 0.15); color: #ef5350; }
.admin-actions { display: flex; gap: 0.5rem; }
.admin-actions button {
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  cursor: pointer;
}
.admin-actions button:hover { background: rgba(255,255,255,0.08); }
.admin-actions .btn-approve { border-color: rgba(76,175,80,0.4); color: #81c784; }
.admin-actions .btn-revoke { border-color: rgba(244,67,54,0.4); color: #ef5350; }

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
}
.modal {
  position: relative;
  width: 100%;
  max-width: 420px;
  padding: 2rem;
  border-radius: calc(var(--radius) + 2px);
  background: #121214;
  border: 1px solid var(--border);
  box-shadow: 0 24px 80px rgba(0,0,0,0.6);
}
.modal h2 { font-family: var(--serif); font-size: 1.75rem; margin: 0 0 0.5rem; }
.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 32px;
  height: 32px;
  border: none;
  background: rgba(255,255,255,0.06);
  color: var(--muted);
  font-size: 1.25rem;
  border-radius: 8px;
  cursor: pointer;
  line-height: 1;
}
.modal-close:hover { color: var(--text); background: rgba(255,255,255,0.1); }

.divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem 0;
  color: var(--muted);
  font-size: 0.8rem;
}
.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.form-error { color: #ffb4b4; font-size: 0.85rem; margin: 0 0 0.75rem; }

.footer {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 2rem;
  font-size: 0.8rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
  max-width: 1100px;
  margin: 0 auto;
}

.hidden { display: none !important; }
