:root {
  --bg-1: #050816;
  --bg-2: #111a35;
  --bg-3: #1a1233;
  --panel: rgba(18, 21, 40, 0.86);
  --panel-border: rgba(255, 255, 255, 0.14);
  --text: #f8f7ff;
  --muted: #b8c1ee;
  --pink: #ff4fd8;
  --purple: #8f6dff;
  --cyan: #4ef2ff;
  --yellow: #ffd166;
  --green: #5af0a7;
  --shadow: rgba(2, 4, 12, 0.8);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  min-height: 100%;
  font-family: "Inter", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(255, 79, 216, 0.18), transparent 28%),
    radial-gradient(circle at bottom right, rgba(78, 242, 255, 0.12), transparent 26%),
    linear-gradient(135deg, var(--bg-1), var(--bg-2));
  color: var(--text);
}

body {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 18px;
  overflow-x: hidden;
  letter-spacing: 0.01em;
}

.backdrop-glow {
  position: fixed;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.6;
  pointer-events: none;
}

.glow-left {
  left: 3%;
  top: 7%;
  background: rgba(255, 79, 216, 0.52);
}

.glow-right {
  right: 4%;
  bottom: 6%;
  background: rgba(78, 242, 255, 0.5);
}

.app-shell {
  position: relative;
  width: min(1100px, 100%);
  background: linear-gradient(180deg, rgba(14, 17, 31, 0.88), rgba(10, 12, 24, 0.94));
  border: 1px solid var(--panel-border);
  border-radius: 30px;
  box-shadow: 0 32px 90px var(--shadow), 0 0 0 1px rgba(255,255,255,0.04);
  backdrop-filter: blur(12px);
  overflow: hidden;
}

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 30px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255,255,255,0.015);
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "Orbitron", sans-serif;
  letter-spacing: 0.12em;
}

.brand-mark {
  color: var(--pink);
  font-size: 1.5rem;
  font-weight: 800;
  text-shadow: 0 0 18px rgba(255, 79, 216, 0.7);
}

.brand-word {
  color: var(--text);
  font-size: 1rem;
  font-weight: 700;
  text-shadow: 0 0 10px rgba(255,255,255,0.15);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border: 1px solid rgba(78, 242, 255, 0.4);
  border-radius: 999px;
  background: rgba(78, 242, 255, 0.08);
  color: var(--cyan);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  box-shadow: inset 0 0 12px rgba(78, 242, 255, 0.12), 0 0 16px rgba(78, 242, 255, 0.08);
}

.selection-panel {
  padding: 28px 32px 34px;
  background: linear-gradient(180deg, rgba(12, 16, 31, 0.32), rgba(9, 12, 25, 0.12));
}

.intro-copy {
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--cyan);
  font-weight: 700;
  letter-spacing: 0.2em;
  font-size: 0.72rem;
}

h1 {
  margin: 0;
  font-family: "Orbitron", sans-serif;
  font-size: clamp(2.4rem, 3vw, 4rem);
  line-height: 1;
  text-shadow: 0 0 12px rgba(255,255,255,0.08);
}

.subtitle {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 1.08rem;
  max-width: 640px;
  font-weight: 600;
}

.character-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 22px;
}

.character-card {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 0;
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(24, 27, 47, 0.9), rgba(14, 17, 31, 0.95));
  color: var(--text);
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06), 0 10px 30px rgba(0,0,0,0.18);
}

.character-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(255,255,255,0.04),
    transparent 28%,
    transparent 70%,
    rgba(255,255,255,0.03)
  );
  pointer-events: none;
}

.character-card:hover {
  transform: translateY(-5px) scale(1.01);
  box-shadow: 0 18px 28px rgba(17, 20, 39, 0.42), 0 0 0 1px rgba(78, 242, 255, 0.2);
  border-color: rgba(78, 242, 255, 0.35);
}

.character-card.selected {
  border-color: rgba(255, 209, 102, 0.95);
  box-shadow: 0 0 0 2px rgba(255, 209, 102, 0.2), 0 16px 30px rgba(255, 209, 102, 0.12), 0 0 28px rgba(255, 209, 102, 0.18);
}

.card-art {
  position: relative;
  height: 236px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.card-art::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.18), transparent 40%, rgba(0,0,0,0.18));
}

.card-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    180deg,
    rgba(255,255,255,0.05),
    rgba(255,255,255,0.05) 2px,
    transparent 2px,
    transparent 6px
  );
  mix-blend-mode: screen;
  opacity: 0.7;
}

.character-image {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  filter: saturate(1.1) contrast(1.08);
}

.art-emo {
  background: linear-gradient(160deg, rgba(255, 79, 216, 0.9), rgba(143, 109, 255, 0.92));
}

.art-skatista {
  background: linear-gradient(160deg, rgba(75, 208, 167, 0.9), rgba(78, 242, 255, 0.82));
}

.art-psy {
  background: linear-gradient(160deg, rgba(23, 208, 255, 0.9), rgba(149, 92, 255, 0.9));
}

.avatar-silhouette {
  position: relative;
  width: 118px;
  height: 150px;
  z-index: 1;
}

.avatar-silhouette .head,
.avatar-silhouette .body,
.avatar-silhouette .arm,
.avatar-silhouette .guitar,
.avatar-silhouette .fringe,
.avatar-silhouette .shoe,
.avatar-silhouette .shine {
  position: absolute;
  display: block;
}

.avatar-silhouette .head {
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(39, 29, 26, 0.9);
  border: 2px solid rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,0.06);
}

.avatar-silhouette .body {
  top: 58px;
  left: 50%;
  transform: translateX(-50%);
  width: 72px;
  height: 74px;
  border-radius: 18px 18px 20px 20px;
  background: rgba(12, 14, 25, 0.9);
  border: 2px solid rgba(255,255,255,0.18);
}

.avatar-silhouette.emo .head {
  background: rgba(35, 29, 46, 0.96);
}

.avatar-silhouette.emo .fringe {
  top: 10px;
  left: 50%;
  width: 54px;
  height: 16px;
  transform: translateX(-50%);
  border-radius: 16px 16px 10px 10px;
  background: rgba(29, 18, 34, 0.95);
  box-shadow: 0 10px 0 rgba(29, 18, 34, 0.95);
}

.avatar-silhouette.emo .body {
  width: 78px;
  height: 82px;
  border-radius: 18px 18px 22px 22px;
  background: linear-gradient(180deg, #a059f7, #4d3aad);
}

.avatar-silhouette.emo .shoe {
  bottom: 4px;
  width: 18px;
  height: 10px;
  border-radius: 12px;
  background: rgba(24, 20, 38, 0.9);
}

.avatar-silhouette.emo .shoe.left { left: 28px; }
.avatar-silhouette.emo .shoe.right { right: 28px; }

.avatar-silhouette.skatista .cap {
  top: 2px;
  left: 50%;
  width: 56px;
  height: 16px;
  transform: translateX(-50%);
  border-radius: 10px 10px 4px 4px;
  background: rgba(38, 41, 59, 0.96);
}

.avatar-silhouette.skatista .head {
  top: 14px;
  background: rgba(88, 48, 30, 0.96);
}

.avatar-silhouette.skatista .body {
  top: 58px;
  width: 74px;
  height: 78px;
  border-radius: 18px 18px 16px 16px;
  background: linear-gradient(180deg, #f0d465, #5087ec);
}

.avatar-silhouette.skatista .arm {
  top: 74px;
  width: 14px;
  height: 52px;
  background: rgba(37, 27, 23, 0.96);
  border-radius: 10px;
}

.avatar-silhouette.skatista .arm-left {
  left: 22px;
  transform: rotate(32deg);
}

.avatar-silhouette.skatista .arm-right {
  right: 22px;
  transform: rotate(-32deg);
}

.avatar-silhouette.psy .head {
  background: rgba(52, 44, 78, 0.96);
}

.avatar-silhouette.psy .body {
  width: 74px;
  height: 86px;
  border-radius: 22px 22px 18px 18px;
  background: linear-gradient(180deg, #ef5da8, #8757ff);
}

.avatar-silhouette.psy .arm {
  top: 70px;
  width: 14px;
  height: 56px;
  background: rgba(32, 38, 62, 0.92);
  border-radius: 10px;
}

.avatar-silhouette.psy .arm-left {
  left: 20px;
  transform: rotate(26deg);
}

.avatar-silhouette.psy .arm-right {
  right: 20px;
  transform: rotate(-26deg);
}

.avatar-silhouette.psy .shine {
  top: 58px;
  left: 50%;
  width: 92px;
  height: 92px;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(255,255,255,0.42), transparent 60%);
  border-radius: 50%;
  filter: blur(8px);
}

.card-copy {
  padding: 16px 18px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 86px;
}

.card-copy h2 {
  margin: 0;
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-shadow: 0 0 16px rgba(255,255,255,0.18);
}

.selection-indicator {
  position: absolute;
  right: 18px;
  top: 18px;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: transparent;
  font-weight: 800;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.character-card.selected .selection-indicator {
  background: var(--yellow);
  border-color: var(--yellow);
  color: #1a1733;
}

.selection-summary-wrap {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

#selection-summary {
  margin: 0;
  color: var(--text);
  font-size: 0.96rem;
  letter-spacing: 0.04em;
  text-shadow: 0 0 12px rgba(255,255,255,0.08);
}

.action-row {
  display: flex;
  justify-content: center;
  margin-top: 28px;
}

.start-button {
  border: none;
  border-radius: 16px;
  padding: 16px 28px;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
  background: linear-gradient(135deg, rgba(95, 99, 116, 0.7), rgba(129, 133, 151, 0.52));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08);
  cursor: not-allowed;
  transition: transform 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.start-button:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.18), 0 18px 32px rgba(255, 79, 216, 0.32);
}

.start-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

.start-button:not(:disabled) {
  color: #120b1d;
  background: linear-gradient(135deg, var(--pink), var(--yellow));
  box-shadow: 0 0 0 1px rgba(255,255,255,0.16), 0 12px 30px rgba(255, 79, 216, 0.25);
  cursor: pointer;
}

@media (max-width: 860px) {
  .character-grid {
    grid-template-columns: 1fr;
  }

  .selection-panel {
    padding-left: 18px;
    padding-right: 18px;
  }

  .top-bar {
    padding-left: 20px;
    padding-right: 20px;
  }
}
