:root {
  --bg: #0b0b0f;
  --card: #14141b;
  --text: #e9e9ef;
  --muted: #aaaaaf;
  --accent: #7dd3fc;
  --accent-2: #a78bfa;
  --danger: #fca5a5;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: radial-gradient(1200px 600px at 10% -10%, rgba(125,211,252,0.08), transparent),
              radial-gradient(900px 500px at 110% 10%, rgba(167,139,250,0.08), transparent),
              var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif;
  line-height: 1.5;
  min-height: 100vh;
  display: grid;
  place-items: center;
}

.container {
  width: min(680px, 92vw);
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.015));
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

h1 {
  margin-top: 0;
  font-weight: 700;
  letter-spacing: 0.3px;
}

form {
  display: grid;
  gap: 14px;
  margin-top: 10px;
}

label {
  display: block;
  color: var(--muted);
  font-size: 0.92rem;
  margin-bottom: 6px;
}

select, input, button {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.08);
  background: var(--card);
  color: var(--text);
  outline: none;
}

select:focus, input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(125,211,252,0.15);
}

.row {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr 1fr;
}

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

button {
  cursor: pointer;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  color: #0b1020;
  font-weight: 700;
  border: none;
  transition: transform 0.05s ease, filter 0.2s ease;
}

button:hover { filter: brightness(1.05); }
button:active { transform: translateY(1px); }

.result {
  margin-top: 8px;
  min-height: 24px;
  color: var(--muted);
  word-break: break-word;
}

.result a {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}

.result a:hover {
  text-decoration: underline;
}

/* Dropdown styles */
.dropdown-container {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--card);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  border-top-left-radius: 4px;
  border-top-right-radius: 4px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  max-height: 240px;
  overflow-y: auto;
  display: none;
  margin-top: 2px;
}

.dropdown-menu.show {
  display: block;
}

.dropdown-item {
  padding: 10px 12px;
  cursor: pointer;
  transition: background-color 0.15s ease;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.dropdown-item:last-child {
  border-bottom: none;
}

.dropdown-item:hover,
.dropdown-item.highlighted {
  background: rgba(125,211,252,0.1);
}

.dropdown-item[data-id] {
  cursor: pointer;
}

.dropdown-item:not([data-id]) {
  color: var(--muted);
  cursor: default;
  font-style: italic;
}

.dropdown-item:not([data-id]):hover {
  background: transparent;
}

/* Custom scrollbar for dropdown */
.dropdown-menu::-webkit-scrollbar {
  width: 6px;
}

.dropdown-menu::-webkit-scrollbar-track {
  background: transparent;
}

.dropdown-menu::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.2);
  border-radius: 3px;
}

.dropdown-menu::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,0.3);
}