:root {
  --bg: #05080d;
  --bg-soft: #0b0f15;
  --panel: #111821;
  --panel-alt: #0d1219;
  --border: rgba(255,255,255,0.09);
  --text: #f3f6fb;
  --muted: #9ea7b3;
  --muted-strong: #c3ccd8;
  --pill: rgba(255,255,255,0.04);
  --accent: #f39a7a;
  --accent-strong: #ee6f3c;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.34);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }

.discover-page {
  min-height: 100vh;
  background: #03070d;
}

.discover-shell {
  display: flex;
  min-height: 100vh;
}

.side-panel {
  width: 220px;
  padding: 18px 14px 18px 16px;
  background: rgba(9, 12, 16, 0.95);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 2px 12px;
}

.brand-badge {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: linear-gradient(135deg, #ff70a7, #f39a7a);
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 800;
  color: white;
  box-shadow: 0 6px 18px rgba(243, 154, 122, 0.38);
}

.brand-name {
  flex: 1;
  font-weight: 700;
  font-size: 1.1rem;
}

.menu-button {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(255,255,255,0.03);
  color: var(--text);
  border: 1px solid var(--border);
  cursor: pointer;
}

.side-nav {
  display: grid;
  gap: 6px;
  margin-top: 6px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  color: var(--muted);
  font-size: 0.98rem;
}

.nav-link.active,
.nav-link:hover {
  background: rgba(255,255,255,0.04);
  color: var(--text);
}

.nav-link.promo span {
  margin-left: auto;
  display: inline-flex;
  min-width: 52px;
  justify-content: center;
  padding: 4px 6px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ffb16d, #e76144);
  color: white;
  font-size: 0.64rem;
  font-weight: 700;
}

.nav-link.promo.muted span {
  background: rgba(255,255,255,0.08);
}

.side-footer {
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.8rem;
}

.main-panel {
  flex: 1;
  padding: 16px 18px 24px 28px;
  position: relative;
}

.top-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.95rem;
  padding: 6px 0 10px;
}

.top-nav a {
  color: var(--muted-strong);
}

.top-nav span {
  color: var(--muted);
}

.hero-area {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-height: 290px;
  padding: 10px 0 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.00));
}

.hero-area::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 260px;
  background: linear-gradient(90deg, rgba(118, 48, 32, 0.85), rgba(181, 99, 74, 0.72) 30%, rgba(93, 45, 64, 0.78) 100%);
  border-radius: 0 0 28px 28px;
  filter: saturate(1.1);
}

.search-overlay {
  position: relative;
  z-index: 2;
  width: min(720px, 75%);
  margin-left: 8px;
  margin-top: 8px;
}

.search-input {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 42px;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(17, 18, 23, 0.78);
  color: var(--text);
  font-size: 1rem;
  box-shadow: 0 12px 24px rgba(0,0,0,0.18);
}

.search-input input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 1rem;
  outline: none;
}

.search-input input::placeholder {
  color: rgba(255,255,255,0.66);
}

.search-results {
  margin-top: 8px;
  width: min(540px, 100%);
  border-radius: 16px;
  background: rgba(18, 22, 28, 0.92);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: var(--shadow);
  padding: 12px 0;
}

.search-item {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 10px 16px;
  color: var(--muted-strong);
  font-size: 0.95rem;
  text-align: left;
  cursor: pointer;
}

.search-item:hover,
.search-item.active {
  color: #fff;
  background: rgba(255,255,255,0.03);
}

.promo-shell {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 10px;
  margin-right: 6px;
}

.promo-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, #ffbc7b, #ff7f4e 28%, #f45d47 100%);
  box-shadow: 0 10px 20px rgba(240, 104, 74, 0.42);
}

.time-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  padding: 8px 10px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
}

.lang-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  color: #fff;
  font-size: 0.72rem;
}

.character-list {
  display: grid;
  gap: 10px;
}

.empty-state {
  padding: 12px 0;
  color: var(--muted);
}

.promo-shell {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 10px;
  margin-right: 6px;
}

.promo-chip,
.time-chip,
.lang-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #fff;
}

.promo-chip {
  padding: 8px 12px;
  background: linear-gradient(135deg, #ffb16d, #ff6a3f);
}

.time-chip {
  padding: 8px 10px;
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--border);
}

.lang-chip {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--border);
}

.feature-strip {
  position: relative;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: -54px;
  margin-bottom: 18px;
  padding-right: 10px;
  z-index: 3;
}

.feature-card {
  width: 150px;
  height: 180px;
  border-radius: 16px 16px 0 0;
  box-shadow: 0 18px 28px rgba(0,0,0,0.22);
  border: 1px solid rgba(255,255,255,0.12);
  background-size: cover;
  background-position: center;
  transform: skewY(-1deg);
}

.feature-one { background-image: linear-gradient(180deg, rgba(0,0,0,0.1), rgba(0,0,0,0.42)), url('/application/assets/images/12538466/9463782468/usericon1.png'); }
.feature-two { background-image: linear-gradient(180deg, rgba(0,0,0,0.1), rgba(0,0,0,0.42)), url('/application/assets/images/12538466/9463782468/usericon2.png'); }
.feature-three { background-image: linear-gradient(180deg, rgba(0,0,0,0.1), rgba(0,0,0,0.42)), url('/application/assets/images/12538466/195453182/logo.png'); }
.feature-four { background-image: linear-gradient(180deg, rgba(0,0,0,0.1), rgba(0,0,0,0.42)), url('/application/assets/images/12538466/74622846/favorite.png'); }

.list-area {
  position: relative;
  z-index: 2;
  padding-top: 10px;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.8rem;
}

.chip.active {
  color: var(--text);
  background: rgba(255,255,255,0.08);
}

.character-list-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 12px 0 18px;
}

.thumb {
  width: 150px;
  height: 120px;
  border-radius: 14px;
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(255,255,255,0.08);
}

.thumb-1 { background-image: linear-gradient(180deg, rgba(0,0,0,0.12), rgba(0,0,0,0.4)), url('/application/assets/images/12538466/9463782468/usericon1.png'); }
.thumb-2 { background-image: linear-gradient(180deg, rgba(0,0,0,0.12), rgba(0,0,0,0.4)), url('/application/assets/images/12538466/9463782468/usericon2.png'); }
.thumb-3 { background-image: linear-gradient(180deg, rgba(0,0,0,0.12), rgba(0,0,0,0.4)), url('/application/assets/images/12538466/195453182/logo.png'); }
.thumb-4 { background-image: linear-gradient(180deg, rgba(0,0,0,0.12), rgba(0,0,0,0.4)), url('/application/assets/images/12538466/74622846/settings.png'); }

.item-copy {
  flex: 1;
  min-width: 0;
}

.item-copy h3 {
  margin: 0 0 6px;
  font-size: clamp(1.2rem, 2vw, 2rem);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.item-copy p {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.92rem;
  max-width: 960px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 6px;
}

.tag-list span {
  font-size: 0.74rem;
  color: var(--muted-strong);
}

.meta-row {
  color: var(--muted);
  font-size: 0.76rem;
}

@media (max-width: 980px) {
  .discover-shell { flex-direction: column; }
  .side-panel {
    width: 100%;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
  .side-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feature-strip { justify-content: flex-start; overflow-x: auto; }
}

@media (max-width: 720px) {
  .main-panel { padding: 12px 12px 18px; }
  .top-nav { font-size: 0.8rem; }
  .hero-area { min-height: 240px; }
  .search-overlay { width: 100%; }
  .promo-shell { display: none; }
  .feature-strip { display: none; }
  .character-list-item { flex-direction: column; }
  .thumb { width: 100%; max-width: 220px; }
}

.auth-shell,
.legal-shell {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 32px 16px;
  background: linear-gradient(180deg, var(--bg), var(--bg-soft));
}

.auth-panel,
.legal-card {
  width: min(560px, 100%);
  background: rgba(10, 14, 18, 0.8);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 32px;
}

.auth-panel h1,
.legal-card h1 {
  margin-bottom: 10px;
  font-size: clamp(2rem, 4vw, 2.8rem);
}

.auth-sub {
  color: var(--muted);
  margin-bottom: 22px;
}

.form-grid { display: grid; gap: 16px; }
.form-group { display: grid; gap: 8px; }
label {
  display: block;
  color: var(--muted);
  font-weight: 600;
}
input, textarea, select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: rgba(255,255,255,0.28);
  box-shadow: 0 0 0 3px rgba(255,255,255,0.04);
}
button[type="submit"], .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 12px;
  padding: 12px 16px;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}
.form-note, .legal-card p, .legal-card li { color: var(--muted); }
.inline-alert, #msg {
  min-height: 24px;
  margin-top: 14px;
  color: #ff8b8b;
  font-size: 0.95rem;
}

.legal-page {
  display: flex;
  justify-content: center;
  padding: 40px 16px;
}

.legal-card {
  width: min(900px, 100%);
  padding: 32px 28px 20px;
}

.legal-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text);
}

.legal-card h2 {
  margin-top: 24px;
  font-size: 1.1rem;
}

.legal-updated {
  margin: 8px 0 0;
  color: #f7c9ad;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.legal-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

