/* ============================================================
   Oncor Concert Streaming — Global Styles
   Palette: Black + the blue/purple from the Oncor logo
   ============================================================ */

:root {
  --bg:           #000000;
  --bg-elev:      #0a0a0f;
  --bg-elev-2:    #14141d;
  --text:         #ffffff;
  --text-dim:     #b8b8c4;
  --text-muted:   #6e6e7c;

  /* Brand blue/purple sampled from the logo */
  --brand:        #4B30E8;   /* deep blue/purple */
  --brand-hover:  #6B53FF;
  --brand-soft:   #8B7FE8;   /* lighter lavender from the wave bars */
  --brand-glow:   rgba(75, 48, 232, 0.55);

  --radius:       6px;
  --radius-lg:    10px;

  --header-h:     104px;

  --font:         'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: 0.01em;
}

a { color: var(--text); text-decoration: none; }
a:hover { color: var(--brand-soft); }

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

/* ---------- Header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  padding: 0 48px;
  background: linear-gradient(180deg, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.65) 100%);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(75, 48, 232, 0.18);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand img {
  height: 76px;
  width: auto;
  /* The logo art is on a black square; trim the black padding around it
     so the wordmark sits flush in the header. */
  margin: -10px 0;
}

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 14px;
}

.nav a {
  color: var(--text-dim);
  font-weight: 500;
  transition: color 0.15s;
}

.nav a:hover, .nav a.active { color: var(--text); }

/* Genre dropdown */
.dropdown { position: relative; }

.dropdown-toggle {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.18);
  color: var(--text);
  padding: 8px 16px;
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: border-color 0.15s, background 0.15s;
}

.dropdown-toggle:hover {
  border-color: var(--brand);
  background: rgba(75, 48, 232, 0.12);
}

.dropdown-toggle::after {
  content: '';
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform 0.2s;
}

.dropdown.open .dropdown-toggle::after {
  transform: rotate(-135deg) translate(-2px, -2px);
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  background: var(--bg-elev);
  border: 1px solid rgba(75, 48, 232, 0.35);
  border-radius: var(--radius-lg);
  padding: 8px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.6), 0 0 0 1px rgba(75,48,232,0.1);
  display: none;
}

.dropdown.open .dropdown-menu { display: block; }

.dropdown-menu a {
  display: block;
  padding: 10px 14px;
  border-radius: var(--radius);
  color: var(--text-dim);
  font-size: 14px;
}

.dropdown-menu a:hover {
  background: rgba(75, 48, 232, 0.18);
  color: var(--text);
}

/* Search */
.search {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.18);
  color: var(--text);
  padding: 8px 14px;
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 14px;
  width: 220px;
  transition: border-color 0.15s, width 0.2s;
}
.search:focus {
  outline: none;
  border-color: var(--brand);
  width: 280px;
}
.search::placeholder { color: var(--text-muted); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  height: 78vh;
  min-height: 520px;
  display: flex;
  align-items: flex-end;
  padding: 0 48px 80px;
  overflow: hidden;
  margin-top: calc(-1 * var(--header-h));
  padding-top: var(--header-h);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  z-index: -2;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.85) 80%, #000 100%),
    linear-gradient(90deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.35) 60%, transparent 100%);
  z-index: -1;
}

.hero-content { max-width: 620px; }

.hero h1 {
  font-size: 56px;
  font-weight: 700;
  margin: 0 0 16px;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.hero .meta {
  display: flex;
  gap: 14px;
  align-items: center;
  font-size: 14px;
  color: var(--text-dim);
  margin-bottom: 16px;
}

.tag {
  display: inline-block;
  padding: 4px 10px;
  border: 1px solid var(--brand);
  border-radius: 999px;
  font-size: 12px;
  color: var(--brand-soft);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero p {
  font-size: 17px;
  line-height: 1.55;
  color: var(--text-dim);
  margin: 0 0 24px;
}

.btn-row { display: flex; gap: 12px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: transform 0.1s, background 0.15s, box-shadow 0.15s;
}
.btn:active { transform: scale(0.98); }

.btn-primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 6px 20px var(--brand-glow);
}
.btn-primary:hover { background: var(--brand-hover); }

.btn-ghost {
  background: rgba(255,255,255,0.1);
  color: #fff;
  backdrop-filter: blur(4px);
}
.btn-ghost:hover { background: rgba(255,255,255,0.2); }

/* ---------- Rows ---------- */
.row {
  padding: 36px 48px 12px;
}

.row h2 {
  font-size: 22px;
  font-weight: 600;
  margin: 0 0 16px;
  letter-spacing: -0.01em;
}

.row-scroller {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(280px, 1fr);
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 16px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: var(--brand) transparent;
}

.row-scroller::-webkit-scrollbar { height: 6px; }
.row-scroller::-webkit-scrollbar-thumb { background: var(--brand); border-radius: 3px; }

@media (min-width: 1100px) {
  .row-scroller { grid-auto-columns: minmax(320px, 1fr); }
}

/* ---------- Concert card ---------- */
.card {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-elev);
  cursor: pointer;
  scroll-snap-align: start;
  border: 1px solid rgba(255,255,255,0.06);
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}

.card:hover {
  transform: translateY(-4px) scale(1.02);
  border-color: var(--brand);
  box-shadow: 0 18px 40px rgba(75, 48, 232, 0.35);
  z-index: 2;
}

.card .thumb {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

.card .thumb-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1a1230 0%, #000 60%);
  color: var(--brand-soft);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.card .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,0.9) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 14px 16px;
}

.card .title {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
}

.card .sub {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 4px;
  letter-spacing: 0.02em;
}

.card .badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--brand);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 4px 8px;
  border-radius: 4px;
  text-transform: uppercase;
}

/* ---------- Grid (genre page) ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
  padding: 24px 48px 80px;
}

.page-title {
  padding: 32px 48px 8px;
}
.page-title h1 {
  font-size: 36px;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.01em;
}
.page-title p {
  color: var(--text-dim);
  margin: 8px 0 0;
}

/* ---------- Watch page ---------- */
.watch-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 48px 80px;
}

.player-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #000;
  border: 1px solid rgba(75, 48, 232, 0.3);
  box-shadow: 0 0 60px rgba(75, 48, 232, 0.15);
}

.player-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.watch-meta { margin-top: 28px; }
.watch-meta h1 {
  font-size: 34px;
  font-weight: 700;
  margin: 0 0 10px;
  letter-spacing: -0.01em;
}
.watch-meta .meta-row {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-dim);
  font-size: 14px;
  margin-bottom: 18px;
}
.watch-meta p {
  color: var(--text-dim);
  font-size: 16px;
  line-height: 1.6;
  max-width: 800px;
}

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid rgba(255,255,255,0.08);
  color: var(--text-muted);
  font-size: 13px;
  padding: 32px 48px;
  text-align: center;
}

.footer .accent { color: var(--brand-soft); }

/* ---------- Empty state ---------- */
.empty {
  margin: 80px auto;
  max-width: 640px;
  text-align: center;
  padding: 0 24px;
}
.empty h2 {
  font-size: 28px;
  margin: 0 0 12px;
  font-weight: 600;
}
.empty p {
  color: var(--text-dim);
  font-size: 16px;
  line-height: 1.6;
  margin: 0 0 24px;
}

/* Welcome hero when no concerts are loaded yet */
.hero-empty .hero-content { max-width: 720px; }

/* ---------- Admin page ---------- */
.admin-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 48px 80px;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 36px;
}

@media (max-width: 920px) {
  .admin-wrap { grid-template-columns: 1fr; padding: 20px; }
}

.panel {
  background: var(--bg-elev);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.panel h2 {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 600;
}
.panel .hint {
  color: var(--text-muted);
  font-size: 13px;
  margin: 0 0 18px;
}

.field { margin-bottom: 14px; }
.field label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}
.field input,
.field textarea,
.field select {
  width: 100%;
  background: var(--bg);
  border: 1px solid rgba(255,255,255,0.18);
  color: var(--text);
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 14px;
  padding: 10px 12px;
  transition: border-color 0.15s, background 0.15s;
}
.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--brand);
  background: rgba(75, 48, 232, 0.06);
}
.field textarea { resize: vertical; min-height: 88px; }

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-dim);
  cursor: pointer;
}
.checkbox input { width: auto; }

.btn-row-end {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 8px;
}

.btn-secondary {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.18);
  color: var(--text);
}
.btn-secondary:hover {
  border-color: var(--brand-soft);
  color: var(--brand-soft);
}

.btn-danger {
  background: transparent;
  border: 1px solid rgba(255, 100, 100, 0.4);
  color: #ff8a8a;
}
.btn-danger:hover { background: rgba(255, 100, 100, 0.12); }

.concert-list { display: flex; flex-direction: column; gap: 10px; }

.concert-item {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
  padding: 12px 14px;
  transition: border-color 0.15s;
}
.concert-item:hover { border-color: var(--brand); }
.concert-item .info { flex: 1; min-width: 0; }
.concert-item .info .t {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.concert-item .info .s {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.concert-item .actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
.icon-btn {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--text-dim);
  border-radius: var(--radius);
  padding: 6px 10px;
  font-size: 12px;
  cursor: pointer;
  font-family: var(--font);
}
.icon-btn:hover { color: var(--text); border-color: var(--brand); }
.icon-btn.danger:hover { color: #ff8a8a; border-color: rgba(255, 100, 100, 0.5); }

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.status {
  font-size: 13px;
  color: var(--brand-soft);
  margin-left: auto;
  opacity: 0;
  transition: opacity 0.2s;
}
.status.show { opacity: 1; }

.kbd {
  display: inline-block;
  padding: 2px 6px;
  background: rgba(255,255,255,0.08);
  border-radius: 4px;
  font-size: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--text-dim);
}

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  .header { padding: 0 20px; }
  .nav { gap: 14px; }
  .search { display: none; }
  .hero { padding: 0 20px 60px; }
  .hero h1 { font-size: 36px; }
  .row, .grid, .page-title, .watch-wrap, .footer { padding-left: 20px; padding-right: 20px; }
}
