:root {
  --bg-main: #050816;
  --bg-elevated: #0b1020;
  --bg-elevated-softer: #101628;
  --accent: #4f82ff;
  --accent-soft: rgba(79, 130, 255, 0.25);
  --accent-strong: #86a9ff;
  --text-main: #f5f7ff;
  --text-muted: #a0a7c2;
  --border-soft: rgba(255, 255, 255, 0.04);
  --error: #ff6b81;
  --warning: #ffd369;
  --success: #4fd1c5;
  --shadow-soft: 0 24px 70px rgba(0, 0, 0, 0.7);
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-pill: 999px;
}

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

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #111b3f 0, #050816 35%, #02030a 100%);
  color: var(--text-main);
}

.page {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 24px;
  background:
    radial-gradient(circle at 10% 0%, rgba(79, 130, 255, 0.22) 0, transparent 55%),
    radial-gradient(circle at 90% 20%, rgba(150, 90, 255, 0.16) 0, transparent 55%);
}

@media (min-width: 768px) {
  .page {
    padding: 40px 56px;
  }
}

.header {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 32px;
}

.logo-mark {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: radial-gradient(circle at 0 0, #86a9ff 0, #4f82ff 30%, #1c2d63 75%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 14px;
  color: #030410;
  box-shadow:
    0 15px 35px rgba(0, 0, 0, 0.7),
    0 0 0 1px rgba(255, 255, 255, 0.08);
}

.header-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.title {
  margin: 0;
  font-size: 1.5rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.title-next {
  color: var(--text-main);
}

.title-pick {
  color: var(--accent-strong);
}

.subtitle {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.main {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 0 32px;
  width: 100%;
}

.hero-shell {
  position: relative;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
}

.hero-background {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
  opacity: 0.5;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hero-row {
  display: flex;
  gap: 16px;
  width: 200%;
  justify-content: space-around;
  transform: translate3d(0, 0, 0);
  will-change: transform;
}

.hero-cover {
  flex: 0 0 18vw;
  height: 26vw;
  min-width: 120px;
  max-width: 220px;
  max-height: 320px;
  border-radius: 14px;
  background-size: cover;
  background-position: center;
  box-shadow:
    0 14px 35px rgba(0, 0, 0, 0.8),
    0 0 0 1px rgba(255, 255, 255, 0.04);
  opacity: 0.22;
}

.hero-row--slow {
  animation: hero-scroll-left 48s linear infinite;
}

.hero-row--medium {
  animation: hero-scroll-right 36s linear infinite;
}

.hero-row--fast {
  animation: hero-scroll-left 28s linear infinite;
}

.card {
  width: 100%;
  max-width: 640px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.02), transparent),
    radial-gradient(circle at top left, rgba(79, 130, 255, 0.18), transparent 50%),
    var(--bg-elevated);
  border-radius: 24px;
  padding: 26px 22px 22px;
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(22px);
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: relative;
  z-index: 1;
}

@media (min-width: 640px) {
  .card {
    padding: 32px 30px 28px;
  }
}

.card-title {
  margin: 0;
  font-size: 1.4rem;
}

.card-copy {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.form {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.input {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(1, 4, 15, 0.9);
  border-radius: var(--radius-md);
  padding: 11px 12px;
  color: var(--text-main);
  font-size: 0.95rem;
  outline: none;
  transition:
    border-color 120ms ease,
    box-shadow 120ms ease,
    background 120ms ease,
    transform 80ms ease;
}

.input::placeholder {
  color: rgba(160, 167, 194, 0.6);
}

.input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(79, 130, 255, 0.4);
  background: #050816;
  transform: translateY(-1px);
}

.button {
  margin-top: 4px;
  position: relative;
  border: none;
  cursor: pointer;
  border-radius: var(--radius-pill);
  padding: 10px 18px;
  background: radial-gradient(circle at 0 0, #86a9ff 0, #4f82ff 35%, #2940a8 85%);
  color: #050816;
  font-weight: 600;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow:
    0 18px 35px rgba(21, 40, 105, 0.7),
    0 0 0 1px rgba(17, 34, 84, 0.7);
  overflow: hidden;
  transition:
    transform 140ms ease,
    box-shadow 140ms ease,
    filter 160ms ease;
}

.button-glow {
  position: absolute;
  inset: -40%;
  background:
    radial-gradient(circle at 0 0, rgba(255, 255, 255, 0.7) 0, transparent 55%),
    radial-gradient(circle at 100% 100%, rgba(255, 255, 255, 0.3) 0, transparent 55%);
  opacity: 0;
  mix-blend-mode: soft-light;
  filter: blur(5px);
  transition: opacity 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
  box-shadow:
    0 20px 40px rgba(18, 35, 90, 0.9),
    0 0 0 1px rgba(38, 76, 175, 0.8);
  filter: brightness(1.03);
}

.button:hover .button-glow {
  opacity: 1;
}

.button:active {
  transform: translateY(0);
  box-shadow:
    0 12px 25px rgba(5, 9, 24, 0.9),
    0 0 0 1px rgba(19, 38, 92, 0.9);
  filter: brightness(0.98);
}

.status {
  min-height: 1.25em;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.status[data-tone="info"] {
  color: var(--accent-strong);
}

.status[data-tone="error"] {
  color: var(--error);
}

.status[data-tone="warning"] {
  color: var(--warning);
}

.status[data-tone="success"] {
  color: var(--success);
}

.results {
  margin-top: 4px;
}

.recommendation-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 4px;
}

.skeleton-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 4px;
}

.skeleton-card {
  border-radius: 18px;
  background: linear-gradient(
    110deg,
    rgba(255, 255, 255, 0.06) 8%,
    rgba(255, 255, 255, 0.18) 18%,
    rgba(255, 255, 255, 0.06) 33%
  );
  background-size: 200% 100%;
  animation: shimmer 1.2s linear infinite;
  height: 110px;
}

.result-card {
  background: var(--bg-elevated-softer);
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.03);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

.result-card-inner {
  display: flex;
  gap: 14px;
  padding: 10px 12px;
}

.result-cover {
  position: relative;
  flex: 0 0 80px;
  height: 110px;
  border-radius: 12px;
  overflow: hidden;
  background: radial-gradient(circle at 30% 0%, rgba(79, 130, 255, 0.4), transparent 65%),
    #050816;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
}

.result-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.result-cover-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(245, 247, 255, 0.8);
  font-weight: 600;
  font-size: 1.4rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.result-cover--placeholder .result-cover-img {
  display: none;
}

.result-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.result-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.result-author {
  margin: 0;
  font-size: 0.85rem;
  color: var(--accent-strong);
}

.result-meta {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.result-reason {
  margin: 2px 0 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

@media (max-width: 480px) {
  .result-card-inner {
    gap: 10px;
  }

  .result-cover {
    flex-basis: 68px;
    height: 96px;
  }

  .result-title {
    font-size: 0.95rem;
  }

  .result-reason {
    font-size: 0.78rem;
  }
}

@keyframes shimmer {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: -100% 0;
  }
}

.footer {
  position: relative;
  z-index: 1;
  margin-top: auto;
  padding-top: 24px;
  display: flex;
  justify-content: center;
}

.footer-text {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.accent {
  color: var(--accent-strong);
}

@keyframes hero-scroll-left {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

@keyframes hero-scroll-right {
  0% {
    transform: translateX(-50%);
  }
  100% {
    transform: translateX(0);
  }
}

@media (max-width: 640px) {
  .hero-shell {
    min-height: 260px;
  }

  .hero-background {
    inset: -12px;
    opacity: 0.35;
  }

  .hero-cover {
    flex-basis: 70px;
    height: 110px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-row--slow,
  .hero-row--medium,
  .hero-row--fast {
    animation-duration: 120s;
  }
}

