/* ── Pump'd External Portal — Design System ── */
/* Bold palette: coral, gold, purple, maroon on dark */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  /* Core palette from design reference */
  --coral: #E85D5D;
  --coral-dim: rgba(232, 93, 93, 0.15);
  --coral-glow: rgba(232, 93, 93, 0.4);
  --gold: #E8A838;
  --gold-dim: rgba(232, 168, 56, 0.15);
  --gold-glow: rgba(232, 168, 56, 0.4);
  --purple: #5B2D6E;
  --purple-bright: #8B5CF6;
  --purple-dim: rgba(91, 45, 110, 0.3);
  --maroon: #4A1A35;
  --green: #34D399;
  --green-dim: rgba(52, 211, 153, 0.15);

  /* Backgrounds */
  --bg: #1A1A2E;
  --surface: #2D2D44;
  --surface-hover: #353550;
  --surface-raised: #3A3A55;
  --border: rgba(255, 255, 255, 0.08);
  --border-subtle: rgba(255, 255, 255, 0.04);

  /* Text */
  --text-primary: #F0F0F5;
  --text-secondary: #A0A0B8;
  --text-dim: #6B6B80;

  /* Fonts */
  --font-sans: 'Space Grotesk', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Radii */
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 24px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text-primary);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ── Buttons ── */
.btn {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.7rem 1.4rem;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none;
}

.btn-coral {
  background: var(--coral);
  color: #fff;
  border-color: var(--coral);
}
.btn-coral:hover { background: #d04a4a; border-color: #d04a4a; transform: translateY(-1px); }

.btn-gold {
  background: var(--gold);
  color: #1A1A2E;
  border-color: var(--gold);
}
.btn-gold:hover { background: #d49530; border-color: #d49530; transform: translateY(-1px); }

.btn-purple {
  background: var(--purple);
  color: #fff;
  border-color: var(--purple);
}
.btn-purple:hover { background: #4a2460; border-color: #4a2460; }

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--border);
}
.btn-ghost:hover { color: var(--coral); border-color: var(--coral); }

.btn-sm {
  font-size: 0.78rem;
  padding: 0.4rem 0.8rem;
  min-height: 36px;
}

.btn-danger {
  background: transparent;
  color: var(--coral);
  border-color: var(--coral-dim);
}
.btn-danger:hover { background: var(--coral-dim); border-color: var(--coral); }

/* ── Inputs ── */
input, select, textarea {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  padding: 0.7rem 1rem;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s;
  min-height: 48px;
  width: 100%;
}
input:focus, select:focus, textarea:focus { border-color: var(--gold); }
input::placeholder, textarea::placeholder { color: var(--text-dim); }

/* ── Cards ── */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.5rem;
  border: 1px solid var(--border);
  transition: transform 0.15s, box-shadow 0.15s;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(0,0,0,0.3); }

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.card-title {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-primary);
}

.card-meta {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-dim);
}

/* ── Tags ── */
.tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
}
.tag-coral { background: var(--coral-dim); color: var(--coral); }
.tag-gold { background: var(--gold-dim); color: var(--gold); }
.tag-purple { background: var(--purple-dim); color: var(--purple-bright); }
.tag-green { background: var(--green-dim); color: var(--green); }

/* ── Utility ── */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.gap-sm { gap: 0.5rem; }
.gap-md { gap: 1rem; }
.gap-lg { gap: 1.5rem; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-1 { flex: 1; }
.text-center { text-align: center; }
.text-dim { color: var(--text-dim); }
.text-secondary { color: var(--text-secondary); }
.text-coral { color: var(--coral); }
.text-gold { color: var(--gold); }
.mono { font-family: var(--font-mono); }
.font-sm { font-size: 0.8rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }

/* ── Wavy divider (SVG data URI) ── */
.wavy-divider {
  height: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 40'%3E%3Cpath d='M0 20 Q150 0 300 20 T600 20 T900 20 T1200 20 V40 H0Z' fill='%234A1A35'/%3E%3C/svg%3E");
  background-size: cover;
  background-repeat: no-repeat;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--surface-raised); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-dim); }

/* ── Animations ── */
@keyframes fade-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.animate-in { animation: fade-in 0.4s ease both; }

/* ── Empty state ── */
.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--text-dim);
}
.empty-state svg { margin-bottom: 1rem; opacity: 0.4; }
.empty-state h3 { color: var(--text-secondary); margin-bottom: 0.5rem; }

/* ── Loading ── */
.loading-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--coral);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 2rem auto;
}

/* ── Toast ── */
.toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  padding: 0.8rem 1.2rem;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  color: var(--text-primary);
  z-index: 1000;
  animation: fade-in 0.3s ease;
  max-width: 360px;
}
.toast.error { border-color: var(--coral); color: var(--coral); }
.toast.success { border-color: var(--green); color: var(--green); }

/* ── Mobile ── */
@media (max-width: 640px) {
  .card { padding: 1.2rem; }
  .btn { font-size: 0.85rem; padding: 0.6rem 1rem; }
}
