/* ============================================================
   Currefy.com — Premium Dark Glassmorphism Design System
   ============================================================ */

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

/* ---- CSS Custom Properties ---- */
:root {
  /* Color Palette */
  --bg-primary:    #07070f;
  --bg-secondary:  #0d0d1a;
  --bg-card:       rgba(255,255,255,0.04);
  --bg-card-hover: rgba(255,255,255,0.07);
  --bg-input:      rgba(255,255,255,0.06);
  --border:        rgba(255,255,255,0.08);
  --border-focus:  rgba(139,92,246,0.5);

  /* Accent */
  --accent-1: #8b5cf6;   /* purple */
  --accent-2: #3b82f6;   /* blue */
  --accent-3: #06b6d4;   /* cyan */
  --accent-4: #10b981;   /* green */
  --accent-5: #f59e0b;   /* amber */

  /* Gradient */
  --grad-1: linear-gradient(135deg, #8b5cf6, #3b82f6);
  --grad-2: linear-gradient(135deg, #3b82f6, #06b6d4);
  --grad-3: linear-gradient(135deg, #8b5cf6, #ec4899);
  --grad-hero: linear-gradient(135deg, #0d0d2a 0%, #07070f 100%);

  /* Text */
  --text-primary:   #f0f0ff;
  --text-secondary: #8888aa;
  --text-muted:     #55556a;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;

  /* Border Radius */
  --radius-sm:  0.5rem;
  --radius-md:  0.875rem;
  --radius-lg:  1.25rem;
  --radius-xl:  1.75rem;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm:  0 2px 8px rgba(0,0,0,0.4);
  --shadow-md:  0 8px 32px rgba(0,0,0,0.5);
  --shadow-lg:  0 20px 60px rgba(0,0,0,0.6);
  --glow-purple: 0 0 40px rgba(139,92,246,0.15);
  --glow-blue:   0 0 40px rgba(59,130,246,0.15);

  /* Typography */
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Transitions */
  --trans-fast:   0.15s ease;
  --trans-normal: 0.25s ease;
  --trans-slow:   0.4s ease;

  /* Nav height */
  --nav-height: 68px;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-main);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  background-image:
    radial-gradient(ellipse 80% 60% at 20% -10%, rgba(139,92,246,0.12) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 110%, rgba(59,130,246,0.08) 0%, transparent 60%);
  background-attachment: fixed;
}

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

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: rgba(139,92,246,0.4); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: rgba(139,92,246,0.7); }

/* ---- Utility Classes ---- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.flex-1 { flex: 1; }

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

/* ---- Glass Cards ---- */
.glass-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--shadow-md), var(--glow-purple);
  transition: transform var(--trans-normal), box-shadow var(--trans-normal), border-color var(--trans-normal);
}
.glass-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg), var(--glow-purple);
  border-color: rgba(139,92,246,0.2);
}

.glass-card-sm {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: var(--space-lg);
  transition: transform var(--trans-fast), border-color var(--trans-fast);
}
.glass-card-sm:hover {
  transform: translateY(-2px);
  border-color: rgba(139,92,246,0.25);
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-full);
  font-size: 0.95rem;
  font-weight: 600;
  transition: all var(--trans-normal);
  cursor: pointer;
  border: none;
  text-decoration: none;
}

.btn-primary {
  background: var(--grad-1);
  color: #fff;
  box-shadow: 0 4px 20px rgba(139,92,246,0.35);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(139,92,246,0.5);
  filter: brightness(1.1);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-outline:hover {
  background: var(--bg-card);
  border-color: rgba(139,92,246,0.4);
  transform: translateY(-2px);
}

/* ---- Navigation ---- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-height);
  background: rgba(7,7,15,0.85);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
  transition: background var(--trans-normal);
}

.nav-container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
  height: 100%;
  display: flex;
  align-items: center;
  gap: var(--space-xl);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  flex-shrink: 0;
  text-decoration: none;
}
.nav-logo .logo-img { width: 1.6rem; height: 1.6rem; object-fit: contain; flex: 0 0 1.6rem; }
.logo-text { background: var(--grad-1); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

.nav-menu {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  flex: 1;
  justify-content: flex-end;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--trans-fast);
  background: none;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
}
.nav-link:hover, .nav-link.active {
  color: var(--text-primary);
  background: rgba(139,92,246,0.12);
}
.nav-link.active { color: #a78bfa; }
.nav-icon { font-size: 0.9rem; }

/* Dropdown */
.nav-dropdown { position: relative; }
.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 180px;
  background: rgba(13,13,26,0.95);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  backdrop-filter: blur(20px);
  padding: var(--space-sm) 0;
  box-shadow: var(--shadow-lg);
  z-index: 100;
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu { display: block; }
.nav-dropdown-menu li { padding: 0 var(--space-sm); }
.nav-dropdown-menu .nav-link { width: 100%; padding: 0.5rem 0.75rem; border-radius: var(--radius-sm); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  background: none;
  border: none;
  cursor: pointer;
  margin-left: auto;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--trans-fast);
}

/* ---- Main Content ---- */
.main-content {
  padding-top: var(--nav-height);
  min-height: 100vh;
}

/* ---- Hero Section ---- */
.hero {
  position: relative;
  min-height: calc(100vh - var(--nav-height));
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  padding: var(--space-3xl) var(--space-lg);
}

.hero-bg-orbs {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35;
  animation: orbFloat 8s ease-in-out infinite;
}
.orb-1 { width: 600px; height: 600px; background: radial-gradient(circle, #8b5cf6, transparent); top: -200px; left: -200px; animation-delay: 0s; }
.orb-2 { width: 500px; height: 500px; background: radial-gradient(circle, #3b82f6, transparent); bottom: -150px; right: -150px; animation-delay: 3s; }
.orb-3 { width: 350px; height: 350px; background: radial-gradient(circle, #06b6d4, transparent); top: 50%; left: 50%; transform: translate(-50%,-50%); animation-delay: 6s; }

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%       { transform: translate(20px, -20px) scale(1.05); }
  66%       { transform: translate(-15px, 15px) scale(0.97); }
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 780px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  background: rgba(139,92,246,0.12);
  border: 1px solid rgba(139,92,246,0.25);
  border-radius: var(--radius-full);
  padding: 0.4rem 1rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: #c4b5fd;
  margin-bottom: var(--space-xl);
  letter-spacing: 0.02em;
}

.badge-dot {
  width: 6px; height: 6px;
  background: #10b981;
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

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

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.1;
  color: var(--text-primary);
  margin-bottom: var(--space-lg);
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-secondary);
  max-width: 580px;
  margin: 0 auto var(--space-2xl);
  line-height: 1.7;
}

.hero-cta {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: var(--space-xl);
}

.hero-update-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.update-dot {
  width: 6px; height: 6px;
  background: var(--accent-4);
  border-radius: 50%;
}

/* ---- Quick Convert Section ---- */
.quick-convert-section {
  padding: var(--space-2xl) 0;
  background: linear-gradient(180deg, transparent, rgba(139,92,246,0.03) 50%, transparent);
}

.quick-card {
  padding: var(--space-2xl);
}

.quick-card-header {
  margin-bottom: var(--space-xl);
  text-align: center;
}
.quick-card-header h2 { font-size: 1.35rem; font-weight: 700; margin-bottom: 0.3rem; }
.quick-card-header p  { color: var(--text-secondary); font-size: 0.875rem; }

.quick-convert-form { display: flex; flex-direction: column; gap: var(--space-lg); }

.form-row {
  display: flex;
  align-items: flex-end;
  gap: var(--space-md);
  flex-wrap: wrap;
}

/* ---- Form Elements ---- */
.input-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.input-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.form-input, .form-select {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-weight: 500;
  transition: border-color var(--trans-fast), box-shadow var(--trans-fast), background var(--trans-fast);
  outline: none;
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
}

.form-input:focus, .form-select:focus {
  border-color: var(--accent-1);
  box-shadow: 0 0 0 3px rgba(139,92,246,0.15);
  background: rgba(255,255,255,0.08);
}

.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238888aa' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}
.form-select option { background: #0d0d1a; color: var(--text-primary); }

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button { opacity: 0.3; }

input[type="datetime-local"]::-webkit-calendar-picker-indicator {
  filter: invert(0.7) hue-rotate(240deg);
  cursor: pointer;
}

/* Swap Button */
.swap-btn-container { display: flex; align-items: flex-end; padding-bottom: 0.1rem; }

.swap-btn {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: rgba(139,92,246,0.15);
  border: 1px solid rgba(139,92,246,0.3);
  color: #a78bfa;
  font-size: 1.1rem;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--trans-fast);
  cursor: pointer;
  flex-shrink: 0;
}
.swap-btn:hover {
  background: rgba(139,92,246,0.3);
  transform: rotate(180deg) scale(1.1);
}

.swap-btn-large {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--grad-1);
  color: white;
  font-size: 1.3rem;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(139,92,246,0.4);
  transition: all var(--trans-normal);
  cursor: pointer;
  border: none;
}
.swap-btn-large:hover {
  transform: rotate(180deg) scale(1.1);
  box-shadow: 0 8px 24px rgba(139,92,246,0.6);
}

/* ---- Submit Container ---- */
.form-submit-container {
  margin-top: 1.5rem;
  margin-bottom: 1rem;
  text-align: center;
}
.form-submit-container .btn {
  width: 100%;
  justify-content: center;
}

/* ---- Timezone Result ---- */
.tz-val-from { font-size: 1.05rem; font-weight: 700; color: var(--text-primary); }
.tz-val-eq { color: var(--text-muted); margin: 0 0.4rem; }
.tz-val-to {
  font-size: 1.3rem;
  font-weight: 800;
  background: var(--grad-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.tz-offset-info {
  margin-top: 0.6rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}


/* ---- Result Display ---- */
.result-display {
  background: rgba(139,92,246,0.06);
  border: 1px solid rgba(139,92,246,0.15);
  border-radius: var(--radius-md);
  padding: var(--space-lg) var(--space-xl);
  min-height: 72px;
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  gap: 0.3rem;
  transition: background var(--trans-fast);
}

.result-placeholder { color: var(--text-muted); font-size: 0.9rem; }
.result-amount { font-size: 0.9rem; color: var(--text-secondary); }
.result-value { font-size: 1.6rem; font-weight: 700; background: var(--grad-1); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.result-rate { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.2rem; }
.result-error { color: #f87171; font-size: 0.9rem; }
.result-loading { color: var(--text-muted); font-size: 1rem; }

/* ---- Converters Grid (Home) ---- */
.converters-section { padding: var(--space-3xl) 0; }
.section-header { text-align: center; margin-bottom: var(--space-2xl); }
.section-title { font-size: clamp(1.8rem, 4vw, 2.5rem); font-weight: 800; letter-spacing: -0.03em; margin-bottom: 0.5rem; }
.section-subtitle { color: var(--text-secondary); font-size: 1rem; }

.converters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--space-lg);
}

.converter-card {
  display: block;
  padding: var(--space-xl);
  text-decoration: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.converter-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--grad-1);
  opacity: 0;
  transition: opacity var(--trans-normal);
}
.converter-card:hover::before { opacity: 1; }

.card-icon-wrap {
  font-size: 2rem;
  margin-bottom: var(--space-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px; height: 56px;
  border-radius: var(--radius-md);
  background: rgba(139,92,246,0.12);
  border: 1px solid rgba(139,92,246,0.2);
  transition: transform var(--trans-normal);
}
.converter-card:hover .card-icon-wrap { transform: scale(1.1) rotate(-5deg); }

.converter-card h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 0.4rem; }
.converter-card p  { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.5; margin-bottom: var(--space-md); }

.card-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  background: rgba(139,92,246,0.15);
  color: #a78bfa;
  border: 1px solid rgba(139,92,246,0.25);
  margin-bottom: var(--space-md);
}

.card-arrow {
  position: absolute;
  bottom: var(--space-lg);
  right: var(--space-lg);
  color: var(--text-muted);
  font-size: 1.1rem;
  transition: all var(--trans-fast);
}
.converter-card:hover .card-arrow { color: #a78bfa; transform: translateX(4px); }

/* Icon colors */
.currency-icon { background: rgba(16,185,129,0.12); border-color: rgba(16,185,129,0.2); }
.weight-icon   { background: rgba(59,130,246,0.12); border-color: rgba(59,130,246,0.2); }
.temp-icon     { background: rgba(239,68,68,0.12);  border-color: rgba(239,68,68,0.2); }
.length-icon   { background: rgba(245,158,11,0.12); border-color: rgba(245,158,11,0.2); }
.area-icon     { background: rgba(139,92,246,0.12); border-color: rgba(139,92,246,0.2); }
.speed-icon    { background: rgba(6,182,212,0.12);  border-color: rgba(6,182,212,0.2); }
.data-icon     { background: rgba(99,102,241,0.12); border-color: rgba(99,102,241,0.2); }
.tz-icon       { background: rgba(16,185,129,0.12); border-color: rgba(16,185,129,0.2); }

/* ---- Features Section ---- */
.features-section { padding: var(--space-3xl) 0; }
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--space-lg);
}
.feature-item { text-align: center; padding: var(--space-xl); }
.feature-icon { font-size: 2rem; margin-bottom: var(--space-md); display: block; }
.feature-item h3 { font-size: 1rem; font-weight: 700; margin-bottom: 0.5rem; }
.feature-item p  { font-size: 0.875rem; color: var(--text-secondary); line-height: 1.6; }

/* ---- Converter Page Layout ---- */
.converter-page { padding: var(--space-2xl) 0 var(--space-3xl); }

.page-header {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  margin-bottom: var(--space-2xl);
}
.page-icon-wrap {
  font-size: 2rem;
  width: 64px; height: 64px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.page-title    { font-size: clamp(1.6rem, 4vw, 2.2rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.2; }
.page-subtitle { color: var(--text-secondary); font-size: 0.95rem; margin-top: 0.25rem; }

/* ---- Rate Status Bar ---- */
.rate-status-bar {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: 0.6rem 1rem;
  background: rgba(16,185,129,0.07);
  border: 1px solid rgba(16,185,129,0.15);
  border-radius: var(--radius-md);
  font-size: 0.825rem;
  margin-bottom: var(--space-xl);
  color: var(--text-secondary);
}
.rate-status-bar strong { color: #34d399; }
.rate-dot { width: 8px; height: 8px; background: #10b981; border-radius: 50%; animation: pulse 2s infinite; flex-shrink: 0; }
.rate-dot.loading { background: var(--accent-5); }
.rate-source { margin-left: auto; color: var(--text-muted); font-size: 0.775rem; }

/* ---- Main Converter Card ---- */
.converter-card-main {
  padding: var(--space-2xl);
  margin-bottom: var(--space-2xl);
}

/* ---- Online Seller Calculator ---- */
.seller-calculator-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: var(--space-xl);
  align-items: start;
}

.seller-input-card,
.seller-result-card { padding: var(--space-2xl); }

.seller-card-heading {
  display: flex;
  justify-content: space-between;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.seller-card-heading h2 { margin: 0 0 0.3rem; font-size: 1.25rem; }
.seller-card-heading p { margin: 0; color: var(--text-muted); font-size: 0.875rem; }
.seller-heading-mark {
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}
.seller-heading-mark-accent { color: #34d399; }

.seller-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-lg);
}

.seller-currency-field { grid-column: 1 / -1; }
.seller-platform-field { grid-column: 1 / -1; }
.seller-number-input { font-variant-numeric: tabular-nums; }
.seller-form-note { margin: var(--space-xl) 0 0; color: var(--text-muted); font-size: 0.8rem; }
.seller-field-note { display: block; margin-top: 0.4rem; color: var(--text-muted); font-size: 0.75rem; }
.seller-extra-heading { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-md); margin: var(--space-2xl) 0 var(--space-lg); padding-top: var(--space-xl); border-top: 1px solid var(--border); }
.seller-extra-heading h3 { margin: 0; font-size: 1rem; }
.seller-extra-heading span { color: var(--text-muted); font-size: 0.75rem; }

.seller-profit-panel {
  padding: var(--space-xl);
  border: 1px solid rgba(16,185,129,0.25);
  border-radius: var(--radius-lg);
  background: rgba(16,185,129,0.08);
  margin-bottom: var(--space-lg);
}
.seller-profit-panel.seller-loss {
  border-color: rgba(248,113,113,0.3);
  background: rgba(248,113,113,0.08);
}
.seller-result-label { display: block; color: var(--text-secondary); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; }
.seller-profit-panel strong { display: block; margin: 0.35rem 0; color: #34d399; font-size: clamp(1.8rem, 4vw, 2.5rem); line-height: 1.1; }
.seller-loss strong { color: #f87171; }
.seller-profit-status { color: var(--text-secondary); font-size: 0.85rem; }

.seller-stats-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; }
.seller-stat { padding: var(--space-md); background: rgba(255,255,255,0.025); }
.seller-stat span { display: block; color: var(--text-muted); font-size: 0.75rem; margin-bottom: 0.35rem; }
.seller-stat strong { color: var(--text-primary); font-size: 0.95rem; font-variant-numeric: tabular-nums; }
.seller-summary { margin-top: var(--space-lg); color: var(--text-secondary); font-size: 0.875rem; line-height: 1.55; }
.seller-breakdown { margin-top: var(--space-xl); padding-top: var(--space-lg); border-top: 1px solid var(--border); }
.seller-breakdown h3 { margin: 0 0 var(--space-md); font-size: 0.95rem; }
.seller-breakdown-row { display: flex; justify-content: space-between; gap: var(--space-md); padding: 0.45rem 0; color: var(--text-muted); font-size: 0.8rem; }
.seller-breakdown-row strong { color: var(--text-secondary); font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---- Currency Converter ---- */
.converter-form {
  display: flex;
  align-items: flex-end;
  gap: var(--space-lg);
  flex-wrap: wrap;
}

.currency-input-group {
  flex: 1;
  min-width: 220px;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.currency-input-wrap {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.currency-amount-input {
  font-size: 1.4rem;
  font-weight: 700;
  padding: 1rem;
}

.currency-select, .currency-result-input {
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
}

.currency-result-input {
  min-height: 50px;
  display: flex;
  align-items: center;
  cursor: default;
}

.converter-swap { display: flex; align-items: center; padding-bottom: 1.5rem; }

.result-field {
  background: rgba(139,92,246,0.06);
  border-color: rgba(139,92,246,0.15);
  flex-direction: row;
  justify-content: flex-start;
}

.result-value-text {
  font-size: 1.2rem;
  font-weight: 700;
  background: var(--grad-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.rate-display {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: var(--space-lg);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
  gap: var(--space-md);
}

.rate-info { font-size: 0.875rem; color: var(--text-secondary); }

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0.4rem 0.9rem;
  background: rgba(139,92,246,0.12);
  border: 1px solid rgba(139,92,246,0.25);
  border-radius: var(--radius-full);
  color: #a78bfa;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--trans-fast);
}
.copy-btn:hover { background: rgba(139,92,246,0.25); transform: scale(1.03); }

/* ---- Popular Conversions ---- */
.popular-section { margin-bottom: var(--space-2xl); }
.sub-title { font-size: 1.3rem; font-weight: 700; margin-bottom: var(--space-lg); letter-spacing: -0.02em; }

.popular-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: var(--space-md);
}
.popular-item { cursor: default; }
.pop-pair { font-size: 0.8rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 0.3rem; }
.pop-rate { font-size: 0.9rem; color: var(--text-secondary); }
.pop-rate strong { color: var(--text-primary); font-size: 1rem; }

/* ---- Rates Table ---- */
.rates-table-section { margin-top: var(--space-2xl); }
.table-search-wrap { margin-bottom: var(--space-md); }
.table-search { max-width: 360px; }

.table-wrap {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
}
.rates-table { width: 100%; border-collapse: collapse; }
.rates-table thead { background: rgba(139,92,246,0.08); }
.rates-table th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
}
.rates-table td {
  padding: 0.65rem 1rem;
  font-size: 0.875rem;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  transition: background var(--trans-fast);
}
.rates-table tbody tr:hover td { background: rgba(139,92,246,0.05); }
.rates-table tbody tr:last-child td { border-bottom: none; }
.rate-code  { color: var(--text-primary); font-weight: 700; font-family: var(--font-mono); }
.rate-name  { color: var(--text-secondary); }
.rate-value { color: var(--accent-4); font-family: var(--font-mono); font-weight: 600; }
.rate-usd   { color: var(--text-secondary); font-family: var(--font-mono); }

/* ---- Unit Converter Form ---- */
.unit-converter-form { display: flex; flex-direction: column; gap: var(--space-xl); }

.unit-row {
  display: flex;
  align-items: flex-end;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.unit-result-display {
  background: rgba(139,92,246,0.06);
  border: 1px solid rgba(139,92,246,0.15);
  border-radius: var(--radius-md);
  padding: var(--space-xl);
  min-height: 80px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-sm);
  animation: fadeIn var(--trans-normal);
}

@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

.result-from-val {
  font-size: 1.1rem;
  color: var(--text-secondary);
  font-weight: 600;
}
.result-eq { font-size: 1.1rem; color: var(--text-muted); margin: 0 4px; }
.result-to-val {
  font-size: 1.6rem;
  font-weight: 800;
  background: var(--grad-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.conversion-formula {
  font-size: 0.825rem;
  color: var(--text-muted);
  margin-top: 4px;
  width: 100%;
  font-family: var(--font-mono);
}

/* ---- Reference Section ---- */
.reference-section { margin-top: var(--space-2xl); }
.ref-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--space-md);
}
.ref-card { padding: var(--space-lg); }
.ref-title { font-size: 0.9rem; font-weight: 700; color: var(--text-primary); margin-bottom: var(--space-sm); }
.ref-values { display: flex; flex-direction: column; gap: 0.3rem; }
.ref-values span { font-size: 0.825rem; color: var(--text-secondary); font-family: var(--font-mono); }

/* ---- Timezone ---- */
.tz-row { align-items: flex-end; }
.tz-result-display { flex-direction: column; align-items: flex-start; }

.world-clock-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: var(--space-md);
}
.clock-card { padding: var(--space-lg); text-align: center; }
.clock-city { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-secondary); margin-bottom: 0.4rem; }
.clock-time { font-size: 1.8rem; font-weight: 800; letter-spacing: -0.03em; background: var(--grad-1); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; line-height: 1; margin-bottom: 0.3rem; }
.clock-date { font-size: 0.75rem; color: var(--text-secondary); }
.clock-tz   { font-size: 0.7rem; color: var(--text-muted); margin-top: 0.2rem; font-family: var(--font-mono); }

/* ---- Footer ---- */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: var(--space-2xl) 0;
  margin-top: var(--space-3xl);
}
.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-lg);
  text-align: center;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 1.1rem;
  font-weight: 700;
}
.footer-brand .logo-img { width: 1.2rem; height: 1.2rem; }
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  justify-content: center;
}
.footer-links a {
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--trans-fast);
}
.footer-links a:hover { color: #a78bfa; }
.footer-info { display: flex; flex-direction: column; gap: 0.4rem; }
.footer-updated { font-size: 0.825rem; color: var(--text-secondary); }
.footer-updated strong { color: var(--accent-4); }
.footer-copy { font-size: 0.775rem; color: var(--text-muted); }

/* ---- Admin Analytics ---- */
.admin-page { background: var(--bg-primary); }
.admin-login-wrap { min-height: 100vh; display: grid; place-items: center; padding: var(--space-xl); }
.admin-login-card { width: min(100%, 420px); padding: var(--space-2xl); }
.admin-login-card h1, .admin-dashboard-heading h1 { margin: 0 0 0.35rem; }
.admin-eyebrow { margin: 0 0 0.5rem; color: var(--accent-4); font-size: 0.7rem; font-weight: 800; letter-spacing: 0.14em; }
.admin-muted { color: var(--text-muted); }
.admin-form { display: grid; gap: 0.55rem; margin-top: var(--space-xl); }
.admin-form .btn { margin-top: var(--space-md); }
.admin-alert { margin-top: var(--space-lg); padding: 0.75rem 1rem; border: 1px solid rgba(248,113,113,0.35); border-radius: var(--radius-md); background: rgba(248,113,113,0.1); color: #fca5a5; }
.admin-back-link { display: inline-block; margin-top: var(--space-xl); color: var(--accent-4); font-size: 0.85rem; }
.admin-topbar { display: flex; justify-content: space-between; align-items: center; gap: var(--space-lg); padding: var(--space-lg) max(1.25rem, calc((100% - 1200px) / 2)); border-bottom: 1px solid var(--border); background: rgba(7,7,15,0.86); }
.admin-topbar strong, .admin-topbar span { display: block; }
.admin-topbar span { color: var(--text-muted); font-size: 0.8rem; }
.admin-topbar-actions { display: flex; align-items: center; gap: var(--space-md); }
.admin-dashboard { padding-top: var(--space-2xl); padding-bottom: var(--space-2xl); }
.admin-filter-bar { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-sm); padding: var(--space-lg); margin-bottom: var(--space-xl); }
.admin-filter-bar label { color: var(--text-muted); font-size: 0.8rem; font-weight: 600; }
.admin-filter-bar .form-select, .admin-filter-bar .form-input { width: auto; min-width: 145px; padding: 0.55rem 0.7rem; }
.admin-dashboard-heading { display: flex; justify-content: space-between; align-items: end; gap: var(--space-lg); margin-bottom: var(--space-xl); }
.admin-stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-lg); margin-bottom: var(--space-xl); }
.admin-stat { padding: var(--space-xl); }
.admin-stat span { display: block; color: var(--text-muted); font-size: 0.8rem; }
.admin-stat strong { display: block; margin-top: 0.35rem; color: var(--text-primary); font-size: 1.7rem; }
.admin-panel { padding: var(--space-xl); margin-bottom: var(--space-xl); }
.admin-panel-heading { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-md); margin-bottom: var(--space-lg); }
.admin-panel-heading h2 { margin: 0; font-size: 1.15rem; }
.admin-panel-heading span { color: var(--text-muted); font-size: 0.8rem; }
.admin-table-wrap { overflow-x: auto; }
.admin-table-wrap table { width: 100%; color: var(--text-secondary); font-size: 0.82rem; }
.admin-table-wrap table small { display: block; color: var(--text-muted); }
.admin-table-wrap .dt-container { color: var(--text-secondary); }
.admin-table-wrap .dt-search input, .admin-table-wrap .dt-length select { border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-secondary); color: var(--text-primary); padding: 0.35rem 0.5rem; }
.admin-table-wrap .dt-paging button { color: var(--text-secondary) !important; }

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .admin-topbar, .admin-dashboard-heading { align-items: flex-start; flex-direction: column; }
  .admin-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .nav-menu {
    display: none;
    position: fixed;
    top: var(--nav-height);
    left: 0; right: 0;
    background: rgba(7,7,15,0.97);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: var(--space-lg);
    gap: var(--space-sm);
    border-bottom: 1px solid var(--border);
    z-index: 999;
  }
  .nav-menu.open { display: flex; }
  .nav-toggle { display: flex; }
  .nav-dropdown-menu {
    position: static;
    box-shadow: none;
    border: none;
    background: rgba(139,92,246,0.05);
    border-radius: var(--radius-md);
    display: block;
    margin-top: var(--space-xs);
  }

  .form-row { flex-direction: column; }
  .converter-form { flex-direction: column; }
  .seller-calculator-layout { grid-template-columns: 1fr; }
  .seller-input-card, .seller-result-card { padding: var(--space-xl); }
  .converter-swap { padding: 0; align-self: center; transform: rotate(90deg); }
  .unit-row { flex-direction: column; }
  .swap-btn-container { align-self: center; padding: 0; }

  .converters-grid { grid-template-columns: 1fr 1fr; }
  .world-clock-grid { grid-template-columns: repeat(2, 1fr); }

  .rates-table th:nth-child(4),
  .rates-table td:nth-child(4) { display: none; }
}

@media (max-width: 480px) {
  .admin-stats-grid { grid-template-columns: 1fr; }
  .seller-form-grid { grid-template-columns: 1fr; }
  .seller-currency-field { grid-column: auto; }
  .converters-grid { grid-template-columns: 1fr; }
  .popular-grid { grid-template-columns: 1fr 1fr; }
  .hero-title { font-size: 2rem; }
  .hero-cta { flex-direction: column; align-items: center; }
  .world-clock-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---- Animations ---- */
.converter-card-main,
.converter-card,
.glass-card {
  animation: slideUp 0.4s ease both;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Stagger cards */
.converters-grid .converter-card:nth-child(1) { animation-delay: 0.05s; }
.converters-grid .converter-card:nth-child(2) { animation-delay: 0.10s; }
.converters-grid .converter-card:nth-child(3) { animation-delay: 0.15s; }
.converters-grid .converter-card:nth-child(4) { animation-delay: 0.20s; }
.converters-grid .converter-card:nth-child(5) { animation-delay: 0.25s; }
.converters-grid .converter-card:nth-child(6) { animation-delay: 0.30s; }
.converters-grid .converter-card:nth-child(7) { animation-delay: 0.35s; }
.converters-grid .converter-card:nth-child(8) { animation-delay: 0.40s; }

/* ---- Loading Spinner (for rate fetching) ---- */
.spinner {
  display: inline-block;
  width: 18px; height: 18px;
  border: 2px solid rgba(139,92,246,0.2);
  border-top-color: #8b5cf6;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Utilities */
.d-none { display: none !important; }
.highlight-row { background: rgba(139,92,246,0.15) !important; }
