:root {
  color-scheme: dark;
  --bg: #08090c;
  --ink: #f7f7f4;
  --muted: #b4bac4;
  --panel: rgba(18, 20, 27, 0.82);
  --panel-solid: #12141b;
  --line: rgba(255, 255, 255, 0.14);
  --line-strong: rgba(255, 255, 255, 0.25);
  --red: #ff234a;
  --red-dark: #8e1027;
  --cyan: #00d9ff;
  --gold: #ffb000;
  --green: #14d97b;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.46);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 6%, rgba(255, 35, 74, 0.32), transparent 28%),
    radial-gradient(circle at 88% 18%, rgba(0, 217, 255, 0.18), transparent 26%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 21%),
    #08090c;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: linear-gradient(to bottom, black, transparent 78%);
}

button,
input {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.ut-shell {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 54px;
}

.ut-hero {
  min-height: 430px;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  align-items: end;
  gap: 22px;
  margin-bottom: 24px;
  padding: clamp(28px, 5vw, 56px);
  overflow: hidden;
  position: relative;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(100deg, rgba(8, 9, 12, 0.96) 0%, rgba(8, 9, 12, 0.72) 58%, rgba(142, 16, 39, 0.42) 100%),
    radial-gradient(circle at 70% 20%, rgba(255, 176, 0, 0.22), transparent 22%),
    linear-gradient(135deg, #15171d, #08090c);
  box-shadow: var(--shadow);
}

.ut-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent, rgba(255, 35, 74, 0.34), transparent),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.12) 0 2px, transparent 2px 22px);
  opacity: 0.25;
}

.ut-hero.compact {
  min-height: 300px;
}

.hero-copy,
.auth-card {
  position: relative;
  z-index: 1;
}

.brand-logo {
  width: min(380px, 70vw);
  display: block;
  margin: 0 0 12px;
  filter: drop-shadow(0 18px 34px rgba(0, 0, 0, 0.62));
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--cyan);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  max-width: 850px;
  margin: 0;
  overflow-wrap: normal;
  word-break: normal;
  font-size: clamp(44px, 6.9vw, 92px);
  line-height: 0.9;
  text-transform: uppercase;
  text-shadow: 0 8px 0 rgba(255, 35, 74, 0.24), 0 24px 60px rgba(0, 0, 0, 0.72);
}

h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 42px);
  line-height: 1;
}

h3 {
  margin: 0;
  font-size: 24px;
  line-height: 1.02;
  text-transform: uppercase;
}

.hero-lead {
  max-width: 660px;
  margin: 22px 0 0;
  color: #d8dce3;
  font-size: clamp(16px, 2vw, 21px);
  line-height: 1.45;
}

.auth-card,
.ranking-panel,
.rules-panel,
.admin-panel,
.signup-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(23, 26, 35, 0.92), rgba(12, 14, 19, 0.92));
  box-shadow: var(--shadow);
}

.auth-card {
  display: grid;
  gap: 14px;
  padding: 20px;
}

.auth-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.auth-card strong {
  color: var(--gold);
  font-size: 13px;
  text-transform: uppercase;
}

.status-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 7px rgba(255, 176, 0, 0.12);
}

.status-dot.is-ready {
  background: var(--green);
  box-shadow: 0 0 0 7px rgba(20, 217, 123, 0.13);
}

.primary-button,
.secondary-button,
.ghost-button,
.vote-button {
  min-height: 46px;
  border-radius: 8px;
  padding: 0 18px;
  color: white;
  font-weight: 900;
  text-transform: uppercase;
}

.primary-button,
.vote-button {
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  box-shadow: 0 16px 34px rgba(255, 35, 74, 0.24);
}

.primary-button.is-signed-in {
  background: #222631;
  box-shadow: none;
  border: 1px solid var(--line);
}

.secondary-button {
  color: #061015;
  background: var(--cyan);
}

.ghost-button {
  background: #252936;
  border: 1px solid var(--line);
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 22px;
  align-items: start;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin: 10px 0 16px;
}

.bands-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.band-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(18, 20, 27, 0.9);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.32);
}

.band-card.is-selected {
  border-color: rgba(20, 217, 123, 0.85);
}

.band-art {
  min-height: 150px;
  display: grid;
  place-items: center;
  padding: 20px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.16), transparent 28%),
    linear-gradient(145deg, var(--art-a), var(--art-b));
}

.band-art::before {
  content: "UNDERTALENT";
  color: rgba(255, 255, 255, 0.2);
  font-weight: 950;
  font-size: 30px;
  letter-spacing: 0;
}

.band-art:has(.band-image:not([hidden]))::before {
  display: none;
}

.band-art.image-failed::after {
  content: "Imagen no disponible";
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  font-weight: 800;
}

.band-image {
  width: 100%;
  height: 132px;
  object-fit: contain;
}

.band-image[hidden] {
  display: none;
}

.band-content {
  padding: 18px;
}

.band-meta,
.ranking-country {
  margin: 0;
  color: var(--cyan);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.band-description {
  margin: 10px 0 16px;
  color: var(--muted);
  line-height: 1.45;
}

.band-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.band-buttons {
  display: flex;
  gap: 8px;
  flex: 0 0 auto;
}

.share-button {
  min-height: 42px;
  border-radius: 8px;
  padding: 0 12px;
  color: #071013;
  background: var(--cyan);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.vote-count {
  color: var(--muted);
  font-weight: 800;
}

.vote-button:disabled {
  cursor: not-allowed;
  color: #09130f;
  background: var(--green);
  box-shadow: none;
}

.ranking-panel {
  position: sticky;
  top: 18px;
  padding: 20px;
}

.total-votes {
  margin: 10px 0 18px;
  color: var(--muted);
  font-weight: 800;
}

.audit-note {
  margin: 0 0 16px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 176, 0, 0.34);
  border-radius: 8px;
  color: var(--gold);
  background: rgba(255, 176, 0, 0.08);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.top-three {
  margin: 0 0 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(255, 35, 74, 0.16), rgba(0, 217, 255, 0.06));
}

.top-three ol {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.top-three li {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
}

.top-three span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #07090c;
  background: var(--gold);
  font-weight: 950;
}

.top-three strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.top-three em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.ranking-list {
  display: grid;
  gap: 13px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ranking-item {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.ranking-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-weight: 900;
}

.ranking-bar {
  height: 9px;
  overflow: hidden;
  margin-top: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.ranking-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--red), var(--gold), var(--cyan));
}

.rules-panel {
  margin-top: 22px;
  padding: clamp(22px, 4vw, 36px);
}

.rules-copy {
  columns: 2 320px;
  column-gap: 34px;
  margin: 18px 0;
}

.rules-copy p {
  margin: 0 0 14px;
  color: #d5dae2;
  line-height: 1.58;
}

.rules-panel strong {
  display: block;
  color: var(--gold);
  font-size: 18px;
}

.signup-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  margin-top: 22px;
  padding: clamp(22px, 4vw, 36px);
}

.signup-panel p {
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.signup-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.signup-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.signup-form input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 13px;
  color: var(--ink);
  background: #191c24;
}

.signup-form button,
.form-status {
  grid-column: 1 / -1;
}

.form-status {
  color: var(--gold);
  font-size: 12px;
  text-transform: uppercase;
}

.plain-link {
  color: var(--cyan);
  font-weight: 900;
  text-decoration: none;
  text-transform: uppercase;
}

.admin-panel {
  display: grid;
  gap: 18px;
  padding: 22px;
}

.admin-panel[hidden] {
  display: none;
}

.admin-panel label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-panel input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 13px;
  color: var(--ink);
  background: #191c24;
}

.admin-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.bands-editor {
  display: grid;
  gap: 12px;
}

.band-editor-row {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.7fr) minmax(0, 1.25fr) 98px auto auto;
  gap: 12px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.image-preview {
  width: 98px;
  height: 48px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #090b0f;
  font-size: 11px;
  font-weight: 900;
  text-align: center;
}

.image-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.image-preview.has-error {
  color: white;
  background: rgba(255, 35, 74, 0.22);
  border-color: rgba(255, 35, 74, 0.62);
}

.publish-button {
  width: fit-content;
}

.submissions-list {
  display: grid;
  gap: 12px;
}

.submission-card {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.submission-card div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.submission-card strong {
  font-size: 18px;
  text-transform: uppercase;
}

.submission-card span,
.submission-card p,
.empty-state {
  margin: 0;
  color: var(--muted);
}

@media (max-width: 960px) {
  .ut-hero,
  .content-grid,
  .signup-panel {
    grid-template-columns: 1fr;
  }

  .ranking-panel {
    position: static;
  }
}

@media (max-width: 700px) {
  .ut-shell {
    width: min(100% - 24px, 520px);
    padding-top: 18px;
  }

  .ut-hero {
    min-height: 0;
    padding: 24px;
  }

  .bands-grid,
  .band-editor-row {
    grid-template-columns: 1fr;
  }

  .section-head,
  .admin-list-head,
  .band-actions,
  .band-buttons {
    align-items: stretch;
    flex-direction: column;
  }

  .signup-form {
    grid-template-columns: 1fr;
  }

  .primary-button,
  .secondary-button,
  .ghost-button,
  .vote-button,
  .publish-button {
    width: 100%;
  }
}
