:root {
  color-scheme: dark;
}

body {
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji",
    "Segoe UI Emoji";
}

/* Background helpers */
.app-bg {
  background:
    radial-gradient(900px 450px at 10% 10%, rgba(99, 102, 241, 0.18), transparent 60%),
    radial-gradient(800px 520px at 90% 20%, rgba(236, 72, 153, 0.12), transparent 55%),
    radial-gradient(700px 420px at 50% 100%, rgba(34, 211, 238, 0.10), transparent 60%),
    linear-gradient(180deg, rgba(2, 6, 23, 1), rgba(2, 6, 23, 1));
}

.glow {
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(600px 220px at 20% 0%, rgba(99, 102, 241, 0.25), transparent 60%),
    radial-gradient(500px 220px at 80% 0%, rgba(236, 72, 153, 0.18), transparent 60%);
  opacity: 0.9;
  filter: blur(18px);
}

/* Slightly more "app" look on top of Tailwind */

a, button {
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease, transform 120ms ease;
}

button:active {
  transform: translateY(1px);
}

/* Inputs */
input[type="text"],
input[type="password"],
input[type="search"],
input[type="number"],
input:not([type]) {
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.65);
}

/* Cards */
.panel-card {
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(51, 65, 85, 0.55);
  backdrop-filter: blur(10px);
  box-shadow:
    0 0 0 1px rgba(2, 6, 23, 0.35) inset,
    0 18px 60px rgba(0, 0, 0, 0.35);
}

/* Tabs */
.tabs-bar {
  display: flex;
  gap: 0.5rem;
  padding: 0.35rem;
  border-radius: 1.1rem;
  border: 1px solid rgba(51, 65, 85, 0.55);
  background: rgba(2, 6, 23, 0.35);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.tab-btn {
  white-space: nowrap;
  padding: 0.6rem 0.85rem;
  border-radius: 0.9rem;
  border: 1px solid transparent;
  color: rgba(226, 232, 240, 0.85);
  font-weight: 600;
}

.tab-btn:hover {
  background: rgba(30, 41, 59, 0.5);
}

.tab-btn.is-active {
  background: rgba(79, 70, 229, 0.2);
  border-color: rgba(99, 102, 241, 0.6);
  color: #e0e7ff;
}

.tab-enter {
  animation: tabEnter 160ms ease-out;
}

@keyframes tabEnter {
  from {
    opacity: 0.0;
    transform: translateY(4px);
  }
  to {
    opacity: 1.0;
    transform: translateY(0px);
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 0.85rem;
  padding: 0.75rem 1rem;
  font-weight: 600;
  border: 1px solid rgba(51, 65, 85, 0.65);
  background: rgba(2, 6, 23, 0.35);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.04) inset,
    0 18px 50px rgba(0, 0, 0, 0.25);
}

.btn:hover {
  border-color: rgba(99, 102, 241, 0.65);
  background: rgba(30, 27, 75, 0.35);
}

.btn-primary {
  background: rgba(79, 70, 229, 0.95);
  border-color: rgba(99, 102, 241, 0.75);
}

.btn-primary:hover {
  background: rgba(99, 102, 241, 0.95);
}

.btn:focus {
  outline: none;
  box-shadow:
    0 0 0 3px rgba(99, 102, 241, 0.22),
    0 18px 50px rgba(0, 0, 0, 0.25);
}

/* Page transitions */
.fade-in {
  animation: fadeIn 220ms ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .fade-in,
  .tab-enter {
    animation: none !important;
  }
  a, button {
    transition: none !important;
  }
}

.btn-danger:hover {
  border-color: rgba(239, 68, 68, 0.7);
  background: rgba(127, 29, 29, 0.3);
}
