@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400;1,500&display=swap');

:root {
  --bg: #0a0e17;
  --bg-card: #111827;
  --accent: #14b8a6;
  --accent-hover: #0d9488;
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --border: #1e293b;
  --success: #22c55e;
  --warning: #eab308;
  --error: #ef4444;
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 32px rgba(20, 184, 166, 0.15);
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --radius: 12px;
  --radius-lg: 16px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(ellipse 120% 80% at 50% -20%, rgba(20, 184, 166, 0.06) 0%, transparent 50%);
}
/* Animated gradient background (subtle) */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: linear-gradient(125deg, transparent 0%, rgba(20, 184, 166, 0.03) 25%, transparent 50%, rgba(20, 184, 166, 0.02) 75%, transparent 100%);
  background-size: 400% 400%;
  animation: gradientShift 20s ease infinite;
  opacity: 0.8;
}
@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
body > * { position: relative; z-index: 1; }
body > #particles-js { z-index: 0; }
a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { text-decoration: underline; }

/* Content link underline animation */
.card a:not(.btn):not(.btn-primary):not(.btn-secondary),
.auth-card a:not(.btn),
.text-muted a,
footer a {
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) no-repeat 0 100% / 0 2px;
  transition: background-size 0.3s var(--ease-out), color 0.2s ease;
}
.card a:not(.btn):hover,
.auth-card a:not(.btn):hover,
.text-muted a:hover,
footer a:hover {
  background-size: 100% 2px;
  text-decoration: none;
}

.container { max-width: 480px; margin: 0 auto; padding: 24px; }
.card {
  background: linear-gradient(145deg, rgba(17, 24, 39, 0.95) 0%, rgba(17, 24, 39, 0.88) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-md), 0 0 0 1px rgba(255, 255, 255, 0.02) inset;
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s ease, border-color 0.35s ease;
  position: relative;
  overflow: hidden;
}
.card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.15) 0%, transparent 40%, transparent 60%, rgba(20, 184, 166, 0.08) 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}
.card:hover {
  box-shadow: var(--shadow-lg), 0 0 40px rgba(20, 184, 166, 0.06), 0 0 0 1px rgba(255, 255, 255, 0.03) inset;
  transform: translateY(-2px);
}
.card:hover::before { opacity: 1; }
/* Soft shadow animation on card hover */
.card.hover-lift:hover {
  animation: softShadow 0.5s ease forwards;
}
@keyframes softShadow {
  to { box-shadow: 0 24px 56px rgba(0, 0, 0, 0.35), 0 0 48px rgba(20, 184, 166, 0.08), 0 0 0 1px rgba(255, 255, 255, 0.04) inset; }
}
h1 { font-size: 1.75rem; margin-bottom: 8px; font-weight: 700; letter-spacing: -0.02em; }
h2 { font-weight: 700; letter-spacing: -0.02em; }
.subtitle { color: var(--text-muted); margin-bottom: 24px; font-size: 0.95rem; }

.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 6px; font-size: 0.9rem; font-weight: 500; color: var(--text-muted); }
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  transition: border-color var(--transition), box-shadow 0.35s ease, background 0.3s ease;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.2), 0 0 20px rgba(20, 184, 166, 0.08);
  background: rgba(10, 14, 23, 0.9);
}
.form-group input::placeholder,
.form-group textarea::placeholder {
  transition: opacity 0.25s ease;
}
.form-group input:focus::placeholder,
.form-group textarea:focus::placeholder { opacity: 0.6; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: 10px;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: transform 0.3s var(--ease-out), background 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
}
.btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
  transition: left 0.6s ease;
}
.btn:hover::after { left: 100%; }
.btn:active { transform: scale(0.98); }
/* Scale on hover */
.btn.hover-scale:hover,
.hover-scale:hover { transform: scale(1.03); }
.btn.hover-scale:hover,
.btn-primary.hover-scale:hover { transform: translateY(-2px) scale(1.02); }
/* Button ripple (for JS) */
.btn .ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  transform: scale(0);
  animation: ripple 0.6s ease-out;
  pointer-events: none;
}
@keyframes ripple {
  to { transform: scale(4); opacity: 0; }
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  width: 100%;
  box-shadow: 0 4px 20px rgba(20, 184, 166, 0.35), 0 0 0 0 rgba(20, 184, 166, 0.4);
  transition: transform 0.3s var(--ease-out), background 0.3s ease, box-shadow 0.4s ease;
}
.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 8px 32px rgba(20, 184, 166, 0.4), 0 0 30px rgba(20, 184, 166, 0.2);
  transform: translateY(-2px);
}
.btn-secondary { background: var(--border); color: var(--text); }
.btn-secondary:hover { background: #334155; transform: translateY(-1px); box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2); }
.btn-sm { padding: 8px 16px; font-size: 0.875rem; }
.btn-block { width: 100%; }

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 14px 24px;
  border-bottom: 1px solid transparent;
  background: rgba(17, 24, 39, 0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.nav-bar .brand {
  font-weight: 800;
  font-size: 1.35rem;
  color: #fff;
  letter-spacing: -0.03em;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color 0.2s ease, opacity 0.2s ease;
}
.nav-bar .brand:hover { color: #fff; opacity: 0.9; }
.nav-bar .brand::after {
  content: '';
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}
.nav-bar .links { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.nav-bar .links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 8px;
  transition: color 0.2s ease, background 0.2s ease;
}
.nav-bar .links a:hover {
  color: var(--accent);
  background: rgba(20, 184, 166, 0.1);
}
.nav-bar .links a:not(.btn-nav) { margin-right: 0; }
.nav-bar .btn-nav, .nav-bar .links .btn-nav {
  background: var(--accent);
  color: #0a0e17;
  padding: 10px 20px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9rem;
  margin-left: 4px;
  box-shadow: 0 4px 16px rgba(20, 184, 166, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.nav-bar .btn-nav:hover, .nav-bar .links .btn-nav:hover {
  color: #0a0e17;
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(20, 184, 166, 0.4);
}
/* Icon / link bounce on hover */
.nav-bar .links a:hover,
.icon-bounce:hover { animation: iconBounce 0.5s ease; }
@keyframes iconBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}
.nav-bar .links a { animation: none; }

.alert {
  padding: 12px 16px;
  border-radius: 10px;
  margin-bottom: 20px;
  font-size: 0.9rem;
  animation: alertSlide 0.4s var(--ease-out);
}
@keyframes alertSlide {
  from { opacity: 0; transform: translateY(-12px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.alert-error { background: rgba(239,68,68,0.15); border: 1px solid var(--error); color: #fca5a5; }
.alert-success { background: rgba(34,197,94,0.15); border: 1px solid var(--success); color: #86efac; }
.alert-warning { background: rgba(234,179,8,0.15); border: 1px solid var(--warning); color: #fde047; }

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.badge-pending { background: rgba(234,179,8,0.2); color: var(--warning); box-shadow: 0 0 12px rgba(234,179,8,0.1); }
.badge-confirmed { background: rgba(99,102,241,0.2); color: var(--accent); box-shadow: 0 0 12px rgba(20,184,166,0.1); }
.badge-delivered { background: rgba(34,197,94,0.2); color: var(--success); box-shadow: 0 0 12px rgba(34,197,94,0.1); }

.copy-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  margin: 12px 0;
  transition: border-color 0.35s ease, box-shadow 0.35s ease;
}
.copy-box:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(20, 184, 166, 0.15), 0 0 24px rgba(20, 184, 166, 0.08);
}
.copy-box code { flex: 1; word-break: break-all; font-size: 0.85rem; color: var(--text-muted); font-family: var(--font); }
.copy-box .btn { width: auto; }

.table-wrap { overflow-x: auto; border-radius: var(--radius); overflow: hidden; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px; border-bottom: 1px solid var(--border); transition: background 0.25s ease; }
th { color: var(--text-muted); font-weight: 600; font-size: 0.85rem; }
tr:hover { background: rgba(255, 255, 255, 0.03); }
tr:hover td:first-child { box-shadow: inset 3px 0 0 var(--accent); }

.page-center { min-height: 100vh; display: flex; flex-direction: column; }
.page-center .container { flex: 1; display: flex; flex-direction: column; justify-content: center; }

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mb-2 { margin-bottom: 16px; }
.text-muted { color: var(--text-muted); font-size: 0.9rem; }
.text-center { text-align: center; }

/* Auth & account cards */
.auth-card { max-width: 400px; margin: 0 auto; }
.auth-card .card {
  padding: 40px 32px;
  animation: cardReveal 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes cardReveal {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.auth-card h1 { font-size: 1.75rem; margin-bottom: 4px; }
.auth-card .subtitle { margin-bottom: 24px; }
.auth-card .btn { padding: 14px 24px; font-size: 1rem; }
.auth-card .form-group input { padding: 14px 16px; }
.auth-card .form-group label { font-weight: 500; color: var(--text); }
.auth-card a:not(.btn) { font-weight: 500; }
.auth-card .divider { margin: 20px 0; text-align: center; color: var(--text-muted); font-size: 0.9rem; }
.page-center .container { padding-top: 48px; padding-bottom: 48px; }
.nav-bar .brand { text-decoration: none; }
.nav-bar .brand:hover { text-decoration: none; color: #fff; }

/* Selection */
::selection { background: rgba(20, 184, 166, 0.3); color: #fff; }

/* Particles background */
#particles-js {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
#particles-js .particle {
  position: absolute;
  border-radius: 50%;
  background: rgba(20, 184, 166, 0.25);
  animation: particleFloat 15s ease-in-out infinite;
}
#particles-js .particle--small { width: 2px; height: 2px; }
#particles-js .particle--medium { width: 4px; height: 4px; background: rgba(20, 184, 166, 0.2); }
#particles-js .particle--large { width: 6px; height: 6px; background: rgba(20, 184, 166, 0.15); }
@keyframes particleFloat {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.6; }
  25% { transform: translate(10px, -30px) scale(1.1); opacity: 1; }
  50% { transform: translate(-15px, -60px) scale(0.9); opacity: 0.5; }
  75% { transform: translate(20px, -20px) scale(1.05); opacity: 0.9; }
}
body > nav { position: relative; z-index: 10; }
body > .container { position: relative; z-index: 1; }
body > header { position: relative; z-index: 2; }
body > section { position: relative; z-index: 1; }
body > footer { position: relative; z-index: 1; }
body > div:not(#particles-js) { position: relative; z-index: 1; }
.admin-page #particles-js { z-index: 0; }
.admin-page .admin-nav { position: relative; z-index: 10; }
.admin-page .admin-main { position: relative; z-index: 1; }
.admin-page .page-center { position: relative; z-index: 1; }

/* Scroll reveal */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out); }
.reveal.in-view { opacity: 1; transform: translateY(0); }
.reveal--delay-1 { transition-delay: 0.1s; }
.reveal--delay-2 { transition-delay: 0.2s; }
.reveal--delay-3 { transition-delay: 0.3s; }
.reveal--scale { transform: translateY(0) scale(0.96); }
.reveal--scale.in-view { transform: translateY(0) scale(1); }
/* Slide from left/right */
.reveal--left { transform: translateX(-32px); opacity: 0; }
.reveal--left.in-view { transform: translateX(0); opacity: 1; }
.reveal--right { transform: translateX(32px); opacity: 0; }
.reveal--right.in-view { transform: translateX(0); opacity: 1; }
.reveal--fade { transform: none; }
.reveal--fade.in-view { opacity: 1; }

/* Scroll progress bar */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), #0d9488);
  z-index: 9999;
  transition: width 0.15s ease-out;
  box-shadow: 0 0 12px var(--accent);
}

/* Sticky CTA */
#sticky-cta {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transition: transform 0.4s var(--ease-out), opacity 0.4s ease, visibility 0.4s;
}
#sticky-cta.is-visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  visibility: visible;
}
#sticky-cta .sticky-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  background: var(--accent);
  color: #0a0e17;
  font-family: var(--font);
  font-weight: 700;
  font-size: 1rem;
  border-radius: 12px;
  text-decoration: none;
  box-shadow: 0 8px 32px rgba(20, 184, 166, 0.4);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
#sticky-cta .sticky-cta-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 12px 40px rgba(20, 184, 166, 0.5), 0 0 30px rgba(20, 184, 166, 0.25);
}

/* Glassmorphism */
.glass {
  background: rgba(17, 24, 39, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

/* 3D Tilt (for JS) */
.tilt-card { transform-style: preserve-3d; transition: transform 0.2s ease; will-change: transform; }

/* Glow hover */
.glow-hover:hover { box-shadow: 0 0 30px rgba(20, 184, 166, 0.25), 0 0 60px rgba(20, 184, 166, 0.1); }

/* Highlight keywords */
.highlight-keyword { color: var(--accent); font-weight: 600; text-shadow: 0 0 20px rgba(20, 184, 166, 0.3); }

/* Typing cursor */
.typing-cursor::after { content: '|'; animation: typingBlink 1s step-end infinite; color: var(--accent); margin-left: 2px; }
@keyframes typingBlink { 50% { opacity: 0; } }
