/* ============================================
   SHARED DESIGN SYSTEM — NIGI AI / JualOnline
   ============================================ */

/* ---- Google Fonts imported via HTML link tags ---- */

/* ============================================
   VARIABLES & TOKENS
   ============================================ */
:root {
  --primary: #af25f4;
  --primary-rgb: 175, 37, 244;
  --primary-glow: rgba(175, 37, 244, 0.4);
  --primary-dim: rgba(175, 37, 244, 0.15);
  --accent-cyan: #00e5ff;
  --accent-cyan-rgb: 0, 229, 255;
  --accent-green: #00e676;
  --accent-green-rgb: 0, 230, 118;
  --accent-orange: #ff9100;
  --accent-orange-rgb: 255, 145, 0;
  --bg-dark: #0d0a12;
  --bg-surface: #161222;
  --bg-card: rgba(30, 22, 42, 0.65);
  --bg-card-hover: rgba(40, 30, 55, 0.75);
  --border-glass: rgba(175, 37, 244, 0.18);
  --border-glass-active: rgba(175, 37, 244, 0.5);
  --text-primary: #f0ecf5;
  --text-secondary: #9a8fad;
  --text-muted: #6b5f80;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;
  --shadow-glow: 0 0 20px rgba(175, 37, 244, 0.25), 0 0 60px rgba(175, 37, 244, 0.1);
  --shadow-card: 0 4px 24px rgba(0,0,0,0.3), 0 0 1px rgba(175, 37, 244, 0.15);
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --transition-spring: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after {
  margin: 0; padding: 0; box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  background: var(--bg-dark);
  color: var(--text-primary);
  min-height: 100dvh;
  overflow-x: hidden;
  position: relative;
}

a { color: var(--primary); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: #d050ff; }

/* Ambient background glows */
body::before {
  content: '';
  position: fixed; top: -40%; left: -20%; width: 80%; height: 80%;
  background: radial-gradient(ellipse, rgba(var(--primary-rgb), 0.08) 0%, transparent 70%);
  pointer-events: none; z-index: 0;
}
body::after {
  content: '';
  position: fixed; bottom: -30%; right: -20%; width: 60%; height: 60%;
  background: radial-gradient(ellipse, rgba(var(--accent-cyan-rgb), 0.04) 0%, transparent 70%);
  pointer-events: none; z-index: 0;
}

/* ============================================
   GLASSMORPHISM CARD
   ============================================ */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  box-shadow: var(--shadow-card);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}
.glass-card:hover { border-color: var(--border-glass-active); }

/* ============================================
   SCROLLBAR
   ============================================ */
.hide-scrollbar::-webkit-scrollbar { display: none; }
.hide-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: rgba(var(--primary-rgb), 0.3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(var(--primary-rgb), 0.5); }

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 20px rgba(var(--primary-rgb), 0.3), 0 4px 20px rgba(0,0,0,0.3); }
  50% { box-shadow: 0 0 35px rgba(var(--primary-rgb), 0.5), 0 4px 30px rgba(0,0,0,0.4); }
}
@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes floatIcon {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@keyframes borderGlow {
  0%, 100% { border-color: rgba(var(--primary-rgb), 0.2); }
  50% { border-color: rgba(var(--primary-rgb), 0.5); }
}
@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.anim-step {
  opacity: 0; transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.anim-step.visible { opacity: 1; transform: translateY(0); }
.anim-step:nth-child(2) { transition-delay: 0.1s; }
.anim-step:nth-child(3) { transition-delay: 0.2s; }
.anim-step:nth-child(4) { transition-delay: 0.3s; }

/* ============================================
   SHARED HEADER
   ============================================ */
.app-header {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 24px;
  background: rgba(13, 10, 18, 0.85);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-glass);
}
.logo-group { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.logo-icon {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--primary), #7b1fa2);
  border-radius: var(--radius-sm);
  box-shadow: 0 0 12px rgba(var(--primary-rgb), 0.4);
}
.logo-icon .material-symbols-outlined { font-size: 22px; color: white; }
.logo-text {
  font-size: 1.25rem; font-weight: 700;
  letter-spacing: -0.02em; text-transform: uppercase; color: white;
}
.logo-text span { color: var(--primary); }

/* ============================================
   SHARED BUTTONS
   ============================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 28px; border-radius: var(--radius-lg); border: none;
  font-family: inherit; font-size: 0.9rem; font-weight: 700;
  cursor: pointer; transition: all var(--transition-fast);
  text-transform: uppercase; letter-spacing: 0.04em;
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary), #8b15d4);
  color: white; box-shadow: 0 0 20px rgba(var(--primary-rgb), 0.3);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 0 30px rgba(var(--primary-rgb), 0.5); }
.btn-primary:active { transform: scale(0.97); }

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-glass-active);
}
.btn-outline:hover { background: rgba(var(--primary-rgb), 0.1); border-color: var(--primary); }

.btn-google {
  background: #fff; color: #333; font-weight: 600;
  border: 1px solid #ddd; box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.btn-google:hover { background: #f5f5f5; box-shadow: 0 4px 16px rgba(0,0,0,0.2); }
.btn-google svg { width: 20px; height: 20px; }

.btn-icon {
  width: 40px; height: 40px; padding: 0;
  display: flex; align-items: center; justify-content: center;
  border: none; background: transparent;
  color: var(--text-secondary); border-radius: var(--radius-full);
  cursor: pointer; transition: background var(--transition-fast), color var(--transition-fast);
}
.btn-icon:hover { background: var(--primary-dim); color: var(--primary); }

/* Ripple */
.ripple { position: relative; overflow: hidden; }
.ripple::after {
  content: ''; position: absolute; width: 100%; height: 100%; top: 0; left: 0;
  pointer-events: none;
  background-image: radial-gradient(circle, rgba(255,255,255,0.15) 10%, transparent 10.01%);
  background-repeat: no-repeat; background-position: 50%;
  transform: scale(10,10); opacity: 0;
  transition: transform 0.4s, opacity 0.6s;
}
.ripple:active::after { transform: scale(0,0); opacity: 0.3; transition: 0s; }

/* ============================================
   SHARED FORM ELEMENTS
   ============================================ */
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label {
  font-size: 0.7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--primary);
}
.form-input {
  padding: 12px 16px; border-radius: var(--radius-md);
  border: 1px solid var(--border-glass);
  background: rgba(var(--primary-rgb), 0.05);
  color: var(--text-primary); font-family: inherit; font-size: 0.9rem;
  outline: none; transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.form-input::placeholder { color: var(--text-muted); }
.form-input:focus { border-color: var(--primary); box-shadow: 0 0 12px rgba(var(--primary-rgb), 0.2); }

/* ============================================
   TOAST
   ============================================ */
.toast {
  position: fixed; top: 70px; left: 50%; transform: translateX(-50%);
  padding: 12px 20px; border-radius: 12px; z-index: 999;
  font-size: 0.8rem; font-weight: 600; max-width: 340px; text-align: center;
  animation: fadeIn 0.3s ease;
}
.toast-info { background: rgba(175,37,244,0.9); color: white; }
.toast-success { background: rgba(40,200,80,0.9); color: white; }
.toast-error { background: rgba(255,50,50,0.9); color: white; }

/* ============================================
   UTILITY
   ============================================ */
.text-center { text-align: center; }
.text-gradient {
  background: linear-gradient(135deg, var(--primary), var(--accent-cyan));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.section-container {
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
}
