:root {
  --bg: #050816;
  --bg-card: #0b1022;
  --accent: #22d3ee;
  --accent-soft: rgba(34, 211, 238, 0.15);
  --text: #f9fafb;
  --muted: #9ca3af;
  --border: #1f2937;
  --danger: #f97373;
  --radius-lg: 18px;
  --radius-md: 10px;
  --shadow-soft: 0 18px 45px rgba(0, 0, 0, 0.55);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #0b1022 0, #050816 55%, #020617 100%);
  color: var(--text);
}

/* HEADER */

.app-header {
  padding: 14px 18px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(16px);
  background: linear-gradient(to right, rgba(15, 23, 42, 0.85), rgba(15, 23, 42, 0.6));
  position: sticky;
  top: 0;
  z-index: 10;
}

.app-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-dot {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 20%, #e0f2fe, #22d3ee 45%, #0ea5e9 70%, #020617 100%);
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.7);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-title {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #e5e7eb;
}

.brand-subtitle {
  font-size: 13px;
  color: var(--muted);
}

/* MAIN */

.app-main {
  max-width: 960px;
  margin: 24px auto 32px;
  padding: 0 16px;
}

.card {
  background: rgba(15, 23, 42, 0.96);
  border-radius: var(--radius-lg);
  padding: 22px 18px 24px;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(31, 41, 55, 0.9);
}

.card h1 {
  font-size: 22px;
  margin-top: 0;
  margin-bottom: 10px;
}

.hint {
  margin-top: 0;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 14px;
}

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

@media (min-width: 720px) {
  .grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* PANELS */

.panel {
  background: rgba(15, 23, 42, 0.9);
  border-radius: var(--radius-md);
  padding: 16px 14px 16px;
  border: 1px solid rgba(55, 65, 81, 0.9);
}

.panel h2 {
  font-size: 16px;
  margin-top: 0;
  margin-bottom: 10px;
}

label {
  display: block;
  font-size: 14px;
  margin-bottom: 6px;
  color: #e5e7eb;
}

input {
  width: 100%;
  padding: 10px 11px;
  border-radius: 8px;
  border: 1px solid rgba(55, 65, 81, 0.9);
  background: #020617;
  color: var(--text);
  font-size: 15px;
  outline: none;
}

input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.55);
}

button {
  width: 100%;
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 999px;
  border: none;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  background: linear-gradient(to right, #22d3ee, #0ea5e9);
  color: #020617;
  box-shadow: 0 10px 25px rgba(59, 130, 246, 0.4);
  transition: transform 0.08s ease-out, box-shadow 0.08s ease-out, opacity 0.1s;
}

button:active {
  transform: translateY(1px);
  box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
  opacity: 0.9;
}

.result {
  margin-top: 10px;
  font-size: 18px;
  font-weight: 600;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--accent-soft);
}

.result.error {
  color: #fecaca;
  background: rgba(248, 113, 113, 0.14);
}

.note {
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
}

/* FOOTER */

.app-footer {
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  padding: 10px 12px 20px;
  opacity: 0.8;
}
