:root {
  color-scheme: light dark;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.5;
  font-weight: 400;
  --wm-bg: #0f172a;
  --wm-surface: rgba(15, 23, 42, 0.75);
  --wm-text: #f8fafc;
  --wm-muted: rgba(148, 163, 184, 0.9);
  --wm-accent: #38bdf8;
  --wm-border: rgba(148, 163, 184, 0.2);
  background-color: var(--wm-bg);
  color: var(--wm-text);
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(120% 120% at 50% 0%, rgba(56, 189, 248, 0.15), transparent 70%),
    radial-gradient(100% 100% at 0% 100%, rgba(14, 116, 144, 0.25), transparent 60%),
    var(--wm-bg);
}

.wm-header {
  padding: 3rem 1.5rem 1rem;
  text-align: center;
}

.wm-header h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.wm-tagline {
  margin-top: 0.5rem;
  color: var(--wm-muted);
  font-size: 1rem;
}

.wm-container {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: minmax(0, 420px) minmax(0, 1fr);
  align-items: start;
  padding: 0 1.5rem 3rem;
  max-width: 1200px;
  margin: 0 auto;
}

@media (max-width: 960px) {
  .wm-container {
    grid-template-columns: minmax(0, 1fr);
  }
}

.wm-search {
  backdrop-filter: blur(12px);
  background: var(--wm-surface);
  border: 1px solid var(--wm-border);
  border-radius: 20px;
  padding: 1.75rem;
  position: sticky;
  top: 1.5rem;
}

.wm-search label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.wm-search-box {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid var(--wm-border);
  border-radius: 14px;
  padding: 0.5rem 0.75rem;
}

#search-input {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--wm-text);
  font-size: 1.05rem;
  outline: none;
}

#search-input::placeholder {
  color: rgba(148, 163, 184, 0.6);
}

#clear-search {
  background: rgba(148, 163, 184, 0.15);
  border: none;
  color: var(--wm-muted);
  font-size: 1.25rem;
  line-height: 1;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
}

#clear-search:hover,
#clear-search:focus-visible {
  background: rgba(56, 189, 248, 0.2);
  color: var(--wm-text);
}

.wm-feedback {
  min-height: 1.25rem;
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: var(--wm-muted);
}

.wm-search-results {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

.wm-search-result button {
  width: 100%;
  text-align: left;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 0.75rem 1rem;
  color: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
}

.wm-search-result button:hover,
.wm-search-result button:focus-visible {
  border-color: rgba(56, 189, 248, 0.5);
  background: rgba(56, 189, 248, 0.12);
}

.wm-details {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.wm-card {
  backdrop-filter: blur(16px);
  background: var(--wm-surface);
  border: 1px solid var(--wm-border);
  border-radius: 24px;
  padding: 1.75rem;
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.35);
}

.wm-hidden {
  display: none;
}

.wm-meta {
  margin: 0;
  color: var(--wm-muted);
  font-size: 0.95rem;
}

.wm-overview {
  margin-top: 1rem;
  color: rgba(248, 250, 252, 0.92);
  font-size: 1.05rem;
}

.wm-facts {
  margin: 1.5rem 0 0;
  display: grid;
  gap: 0.75rem;
}

.wm-facts dt {
  color: rgba(148, 163, 184, 0.75);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.wm-facts dd {
  margin: 0.25rem 0 0;
  font-weight: 500;
}

.wm-recommendations-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.wm-refresh {
  background: rgba(56, 189, 248, 0.18);
  color: var(--wm-text);
  border: 1px solid rgba(56, 189, 248, 0.5);
  border-radius: 999px;
  padding: 0.55rem 1.1rem;
  cursor: pointer;
  font-weight: 600;
  transition: transform 0.2s ease;
}

.wm-refresh:hover,
.wm-refresh:focus-visible {
  transform: translateY(-1px);
}

.wm-recommendation-list {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}

.wm-recommendation {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 18px;
  padding: 1rem 1.25rem;
  display: grid;
  gap: 0.5rem;
}

.wm-recommendation h4 {
  margin: 0;
  font-size: 1.1rem;
}

.wm-recommendation-tags {
  margin: 0;
  color: rgba(125, 211, 252, 0.9);
  font-size: 0.85rem;
}

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