@import url('https://fonts.googleapis.com/css2?family=Comfortaa:wght@600;700&family=Jura:wght@700&family=Poppins:wght@400;500;600;700&display=swap');

:root {
  --bg: #18181b;
  --surface: #27272a;
  --surface-2: #2c2c30;
  --surface-3: #232326;
  --surface-hover: #323232;
  --text: #f4f4f5;
  --muted: #a1a1aa;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.12);
  --accent: #cc1c39;
  --accent-hover: #a51935;
  --accent-glow: #5f0625;
  --accent-soft: rgba(204, 28, 57, 0.18);
  --accent-ring: rgba(204, 28, 57, 0.45);
  --rose: #fecdd3;
  --rose-strong: #fca5a5;
  --max: 1080px;
  --radius: 14px;
  --radius-sm: 10px;
  --radius-xs: 8px;
  --space-page: 2rem;
  --font-display: 'Comfortaa', sans-serif;
  --font-eyebrow: 'Jura', sans-serif;
  --font-body: 'Poppins', sans-serif;
  --card-bg: linear-gradient(160deg, #2c2c30 0%, #27272a 55%, #232326 100%);
  color-scheme: dark;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  font-weight: 400;
  color: var(--text);
  background: var(--bg);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

html,
body,
#root {
  min-height: 100%;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
}

vsc-controller,
.vsc-controller {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  width: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
}

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

button,
input {
  font: inherit;
}

.app-shell {
  position: relative;
  z-index: 1;
  min-height: 100%;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.app-main {
  flex: 1;
}

.page-wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.75rem;
}

.page {
  padding-top: var(--space-page);
  padding-bottom: 3rem;
}

.page__head {
  margin-bottom: 1.35rem;
}

.page__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 3.2vw, 2rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.2;
}

.page__lead {
  margin: 0.55rem 0 0;
  color: var(--muted);
  max-width: 48ch;
  font-size: 0.95rem;
}

.search {
  display: flex;
  gap: 0.65rem;
  margin-bottom: 1.5rem;
}

.search__field {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    color 0.2s ease;
}

.search__field:focus-within {
  border-color: var(--accent-ring);
  background: rgba(204, 28, 57, 0.06);
  color: var(--rose);
}

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

.section {
  margin-top: 2.35rem;
}

.section:first-of-type {
  margin-top: 0;
}

.section__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.section__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.4vw, 1.55rem);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.section__link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.42rem 0.85rem 0.42rem 0.95rem;
  border: 1px solid rgba(204, 28, 57, 0.5);
  border-radius: 999px;
  background: transparent;
  color: #fff;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
  box-shadow: none;
  transition:
    color 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}

.section__link::after {
  content: '';
  width: 0.38rem;
  height: 0.38rem;
  border-right: 1.7px solid currentColor;
  border-top: 1.7px solid currentColor;
  transform: rotate(45deg);
  opacity: 0.9;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.section__link:hover {
  color: #fff;
  text-decoration: none;
  border-color: rgba(204, 28, 57, 0.85);
  background: rgba(204, 28, 57, 0.1);
  box-shadow: none;
  transform: translateY(-1px);
}

.section__link:hover::after {
  transform: rotate(45deg) translate(1px, -1px);
  opacity: 1;
}

.section__link:active {
  transform: translateY(0);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.55rem 1rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font: inherit;
  font-weight: 600;
  font-size: 0.84rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 0.22s ease,
    background 0.22s ease,
    border-color 0.22s ease,
    box-shadow 0.22s ease,
    color 0.22s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn--primary {
  background: rgba(204, 28, 57, 0.22);
  border-color: rgba(204, 28, 57, 0.35);
  color: #fff;
  box-shadow: 0 6px 18px rgba(204, 28, 57, 0.16);
}

.btn--primary:hover {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 8px 22px rgba(204, 28, 57, 0.3);
}

.btn--ghost {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--line);
  color: var(--text);
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--line-strong);
}

.btn--soft {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--line);
  color: var(--muted);
}

.btn--soft:hover,
.btn--soft.is-on {
  color: #fff;
  border-color: var(--accent-ring);
  background: rgba(204, 28, 57, 0.16);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  padding: 0.35rem 0.7rem;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    color 0.2s ease;
}

.chip:hover {
  border-color: var(--accent-ring);
  background: rgba(204, 28, 57, 0.1);
}

.chip.is-active {
  border-color: rgba(204, 28, 57, 0.55);
  background: rgba(204, 28, 57, 0.22);
  color: #fff;
}

.chip__meta {
  color: var(--muted);
  font-size: 0.72rem;
}

.chip.is-active .chip__meta {
  color: rgba(255, 255, 255, 0.72);
}

.state-msg {
  color: var(--muted);
  padding: 2rem 0;
}

.state-msg--error {
  color: var(--rose-strong);
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 640px) {
  .search {
    flex-direction: column;
  }

  .search__input {
    min-height: 2.75rem;
    font-size: 16px; /* avoid iOS zoom on focus */
  }

  .search .btn {
    min-height: 2.75rem;
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
