@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=Inter:wght@300;400;500;600&display=swap');

/* ═══════════════════════════════════════════════════════════════
   KUPATALOVE — GLOBAL DESIGN SYSTEM
   ═══════════════════════════════════════════════════════════════ */

:root {
  /* Colors */
  --primary:        #ff3d6e;
  --primary-dark:   #e0254f;
  --primary-light:  #ff7096;
  --secondary:      #6c63ff;
  --secondary-dark: #5a52e0;
  --accent:         #ffd166;
  --gold:           #f5a623;
  --platinum:       #a78bfa;

  /* Neutrals */
  --bg:             #0d0d14;
  --bg-2:           #13131f;
  --bg-3:           #1a1a2e;
  --bg-card:        #1e1e30;
  --bg-glass:       rgba(255,255,255,0.06);
  --border:         rgba(255,255,255,0.08);
  --border-hover:   rgba(255,255,255,0.16);

  /* Text */
  --text-primary:   #f0f0f8;
  --text-secondary: #9090b0;
  --text-muted:     #5a5a78;
  --text-white:     #ffffff;

  /* Gradients */
  --grad-primary:   linear-gradient(135deg, #ff3d6e 0%, #ff7ab5 100%);
  --grad-love:      linear-gradient(135deg, #ff3d6e 0%, #ff6b35 100%);
  --grad-purple:    linear-gradient(135deg, #6c63ff 0%, #a78bfa 100%);
  --grad-gold:      linear-gradient(135deg, #f5a623 0%, #ffd166 100%);
  --grad-dark:      linear-gradient(180deg, #0d0d14 0%, #13131f 100%);
  --grad-card:      linear-gradient(145deg, #1e1e30, #151525);
  --grad-glass:     linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02));

  /* Shadows */
  --shadow-sm:      0 2px 8px rgba(0,0,0,0.3);
  --shadow-md:      0 8px 24px rgba(0,0,0,0.4);
  --shadow-lg:      0 20px 60px rgba(0,0,0,0.5);
  --shadow-primary: 0 8px 32px rgba(255, 61, 110, 0.35);
  --shadow-glow:    0 0 40px rgba(255, 61, 110, 0.2);

  /* Radius */
  --radius-sm:      8px;
  --radius-md:      16px;
  --radius-lg:      24px;
  --radius-xl:      32px;
  --radius-full:    9999px;

  /* Transitions */
  --transition-fast:   0.15s ease;
  --transition-normal: 0.25s ease;
  --transition-slow:   0.4s ease;
  --transition-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Typography */
  --font-heading: 'Outfit', sans-serif;
  --font-body:    'Inter', sans-serif;

  /* Z-index layers */
  --z-base:     1;
  --z-card:     10;
  --z-nav:      100;
  --z-modal:    1000;
  --z-toast:    2000;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  outline: none;
  border: none;
  background: none;
}

/* ─── Typography ─────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 { font-family: var(--font-heading); line-height: 1.2; }
h1 { font-size: clamp(2.2rem, 6vw, 4rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 4vw, 2.6rem); font-weight: 700; }
h3 { font-size: clamp(1.2rem, 3vw, 1.8rem); font-weight: 600; }

.gradient-text {
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ─── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  transition: all var(--transition-normal);
  cursor: pointer;
  border: none;
  position: relative;
  overflow: hidden;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0);
  transition: background var(--transition-fast);
  border-radius: inherit;
}
.btn:hover::before { background: rgba(255,255,255,0.08); }
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--grad-primary);
  color: #fff;
  box-shadow: var(--shadow-primary);
}
.btn-primary:hover { box-shadow: 0 12px 40px rgba(255,61,110,0.5); transform: translateY(-1px); }

.btn-secondary {
  background: var(--grad-purple);
  color: #fff;
}
.btn-secondary:hover { transform: translateY(-1px); }

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1.5px solid var(--border-hover);
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }

.btn-ghost {
  background: var(--bg-glass);
  color: var(--text-primary);
  backdrop-filter: blur(10px);
}

.btn-lg { padding: 16px 36px; font-size: 1.05rem; }
.btn-sm { padding: 8px 18px; font-size: 0.85rem; }
.btn-icon { padding: 12px; width: 48px; height: 48px; border-radius: var(--radius-full); }

/* ─── Cards ──────────────────────────────────────────────────── */
.card {
  background: var(--grad-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: all var(--transition-normal);
}
.card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.card-glass {
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

/* ─── Form Elements ──────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 8px; }
.form-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}
.form-control {
  background: var(--bg-3);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  color: var(--text-primary);
  font-size: 0.95rem;
  transition: border-color var(--transition-fast);
  width: 100%;
}
.form-control:focus { border-color: var(--primary); }
.form-control::placeholder { color: var(--text-muted); }

select.form-control { appearance: none; cursor: pointer; }

/* ─── Badges ─────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}
.badge-primary { background: rgba(255,61,110,0.2); color: var(--primary); }
.badge-gold { background: rgba(245,166,35,0.2); color: var(--gold); }
.badge-platinum { background: rgba(167,139,250,0.2); color: var(--platinum); }
.badge-online { background: #22c55e; color: #fff; width: 10px; height: 10px; padding: 0; border-radius: 50%; }

/* ─── Divider ─────────────────────────────────────────────────── */
.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
  font-size: 0.85rem;
}
.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ─── Spinner ─────────────────────────────────────────────────── */
.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Floating Particles ──────────────────────────────────────── */
.particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.particle {
  position: absolute;
  border-radius: 50%;
  animation: float-particle linear infinite;
  opacity: 0;
}
@keyframes float-particle {
  0%   { transform: translateY(100vh) scale(0); opacity: 0; }
  10%  { opacity: 0.6; }
  90%  { opacity: 0.2; }
  100% { transform: translateY(-100px) scale(1); opacity: 0; }
}

/* ─── Toast Notifications ─────────────────────────────────────── */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 380px;
}
.toast {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-lg);
  animation: slide-in-right 0.3s var(--transition-spring);
  backdrop-filter: blur(20px);
}
.toast.toast-success { border-color: rgba(34, 197, 94, 0.4); }
.toast.toast-error   { border-color: rgba(255, 61, 110, 0.4); }
.toast.toast-info    { border-color: rgba(108, 99, 255, 0.4); }
.toast-icon { font-size: 1.2rem; flex-shrink: 0; }
.toast-text { font-size: 0.9rem; line-height: 1.4; }
.toast-close { margin-left: auto; color: var(--text-muted); font-size: 1.1rem; cursor: pointer; flex-shrink: 0; }

@keyframes slide-in-right {
  from { transform: translateX(120%); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}
@keyframes slide-out-right {
  from { transform: translateX(0); opacity: 1; }
  to   { transform: translateX(120%); opacity: 0; }
}

/* ─── Modal ───────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  backdrop-filter: blur(8px);
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fade-in 0.2s ease;
}
.modal-overlay.hidden { display: none; }
.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 32px;
  max-width: 480px;
  width: 100%;
  position: relative;
  animation: scale-in 0.3s var(--transition-spring);
}
.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-glass);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.modal-close:hover { background: var(--border); color: var(--text-primary); }

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes scale-in {
  from { transform: scale(0.9); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

/* ─── Avatar ─────────────────────────────────────────────────── */
.avatar {
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg-3);
}
.avatar-sm  { width: 36px; height: 36px; }
.avatar-md  { width: 52px; height: 52px; }
.avatar-lg  { width: 80px; height: 80px; }
.avatar-xl  { width: 120px; height: 120px; }
.avatar-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--grad-primary);
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 700;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ─── Scroll ─────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-hover); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ─── Utility ─────────────────────────────────────────────────── */
.hidden { display: none !important; }
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }
.text-center { text-align: center; }
.w-full { width: 100%; }
.relative { position: relative; }
.overflow-hidden { overflow: hidden; }

/* ─── Match Celebration ───────────────────────────────────────── */
.match-celebration {
  position: fixed;
  inset: 0;
  z-index: calc(var(--z-modal) + 10);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at center, rgba(255,61,110,0.3) 0%, rgba(13,13,20,0.95) 70%);
  animation: fade-in 0.4s ease;
}
.match-celebration.hidden { display: none; }
.match-hearts {
  font-size: 5rem;
  animation: pulse-hearts 0.8s var(--transition-spring) infinite alternate;
}
@keyframes pulse-hearts {
  from { transform: scale(0.9); }
  to   { transform: scale(1.1); }
}
.confetti {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  animation: confetti-fall 3s ease-in forwards;
}
@keyframes confetti-fall {
  0%   { transform: translateY(-100px) rotate(0deg); opacity: 1; }
  100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

/* ─── Responsive ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  .btn-lg { padding: 14px 28px; }
  .card { padding: 18px; }
  .modal { padding: 24px; }
}
