:root {
  --brand-400: #38bdf8;
  --brand-500: #0ea5e9;
  --brand-600: #0284c7;
  --brand-700: #0369a1;
  --gray-50: #fafafa;
  --gray-100: #f4f4f5;
  --gray-200: #e4e4e7;
  --gray-300: #d4d4d8;
  --gray-400: #a1a1aa;
  --gray-500: #71717a;
  --gray-600: #52525b;
  --gray-700: #3f3f46;
  --gray-800: #27272a;
  --gray-900: #18181b;
}

* { box-sizing: border-box; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--gray-100);
  color: var(--gray-800);
  -webkit-font-smoothing: antialiased;
  margin: 0;
}

.glass {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--gray-200);
}

.glass-card {
  background: white;
  border: 1px solid var(--gray-200);
  box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
}

.status-alive { color: #059669; }
.status-dying { color: #d97706; }
.status-dead { color: #dc2626; }
.status-refreshing { color: #2563eb; }

.pulse-dot { animation: pulse 2s infinite; }
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .5; transform: scale(1.2); }
}

.fade-in { animation: fadeIn 0.3s ease-out; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand-600), var(--brand-500));
  padding: 0.5rem 1.25rem;
  color: white;
  border-radius: 0.5rem;
  transition: all 0.2s ease;
  font-size: 0.8125rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(2, 132, 199, 0.3);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.35);
}

.btn-secondary {
  padding: 0.5rem 1rem;
  background: white;
  color: var(--gray-700);
  border-radius: 0.5rem;
  transition: all 0.15s ease;
  font-size: 0.8125rem;
  font-weight: 500;
  border: 1px solid var(--gray-300);
  cursor: pointer;
}
.btn-secondary:hover { background: var(--gray-50); border-color: var(--gray-400); }

.tab-btn {
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 500;
  transition: all 0.2s ease;
  border: none;
  background: transparent;
  color: var(--gray-500);
  cursor: pointer;
  position: relative;
}
.tab-btn:hover { color: var(--gray-800); background: var(--gray-100); }
.tab-btn.active {
  background: var(--brand-600);
  color: white;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.3);
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--gray-400); }

.code-block {
  background: var(--gray-900);
  color: #e4e4e7;
  padding: 1rem;
  border-radius: 0.75rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.75rem;
  line-height: 1.625;
  border: 1px solid var(--gray-800);
  overflow-x: auto;
}

.tag {
  display: inline-block;
  padding: 0.125rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.025em;
}
.tag-blue { background: #dbeafe; color: #1d4ed8; }
.tag-green { background: #d1fae5; color: #047857; }
.tag-amber { background: #fef3c7; color: #b45309; }
.tag-red { background: #fee2e2; color: #b91c1c; }

/* Table overrides for light theme */
table { border-collapse: collapse; }
thead tr { background: var(--gray-50); }
th { color: var(--gray-500) !important; }
td { color: var(--gray-700); }
tr:hover { background: var(--gray-50); }

/* Modal backdrop */
.modal-backdrop {
  background: rgba(0,0,0,0.3);
  backdrop-filter: blur(4px);
}

/* Input for light theme */
input, select, textarea {
  background: var(--gray-50) !important;
  border: 1px solid var(--gray-200) !important;
  color: var(--gray-800) !important;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--brand-500) !important;
  outline: none;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}
