/* ==========================================================================
   MFX — Multi-Currency Exchange & Market Trends
   Design System & Refined Dark Fintech Styling
   ========================================================================== */

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

:root {
  /* Core Brand Colors */
  --color-electronic-blue: #2563EB;
  --color-electronic-blue-light: #60A5FA;
  --color-lavender: #818CF8;
  --color-pale-purple: #A78BFA;
  --color-orange: #F97316;
  --color-orange-glow: rgba(249, 115, 22, 0.2);
  --color-chocolate-brown: #381A08;

  /* Gradients */
  --grad-primary: linear-gradient(135deg, #2563EB 0%, #818CF8 50%, #A78BFA 100%);
  --grad-warm: linear-gradient(135deg, #F97316 0%, #78350F 100%);
  --grad-brand: linear-gradient(135deg, #2563EB 0%, #818CF8 35%, #F97316 70%, #78350F 100%);

  /* Dark Theme Tokens */
  --bg-app: #080B11;
  --bg-app-rgb: 8, 11, 17;
  --bg-surface-glass: rgba(15, 20, 31, 0.72);
  --bg-surface-hover: rgba(23, 30, 47, 0.85);
  --bg-input: rgba(11, 15, 24, 0.9);
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-glass-focus: rgba(37, 99, 235, 0.6);
  --border-glass-hover: rgba(129, 140, 248, 0.35);

  --text-primary: #F8FAFC;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
  --text-inverse: #080B11;

  --accent-blue: #2563EB;
  --accent-lavender: #818CF8;
  --accent-orange: #F97316;
  --color-success: #10B981;
  --color-danger: #EF4444;

  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 20px 45px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 24px rgba(37, 99, 235, 0.18);

  --blur-amount: 18px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;

  --font-heading: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --transition-fast: 0.18s ease;
  --transition-normal: 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-slow: 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

body {
  font-family: var(--font-body);
  background-color: var(--bg-app);
  background-image: 
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(37, 99, 235, 0.12), transparent),
    radial-gradient(ellipse 60% 40% at 85% 60%, rgba(129, 140, 248, 0.05), transparent),
    radial-gradient(ellipse 50% 30% at 15% 85%, rgba(249, 115, 22, 0.04), transparent);
  background-attachment: fixed;
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* Layout Utilities */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 1;
}

.section {
  padding: 5.5rem 0;
  position: relative;
}

.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: rgba(37, 99, 235, 0.12);
  color: var(--color-electronic-blue-light);
  border: 1px solid rgba(37, 99, 235, 0.28);
  margin-bottom: 1rem;
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.85rem;
  letter-spacing: -0.02em;
}

.section-desc {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 620px;
  margin: 0 auto;
}

/* Typography Gradient Utilities */
.gradient-text-primary {
  background: var(--grad-primary);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

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

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

/* Glassmorphism Panel */
.glass-panel {
  background: var(--bg-surface-glass);
  backdrop-filter: blur(var(--blur-amount));
  -webkit-backdrop-filter: blur(var(--blur-amount));
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-normal), border-color var(--transition-normal), box-shadow var(--transition-normal), background var(--transition-normal);
}

.glass-panel:hover {
  border-color: var(--border-glass-hover);
}

/* ==========================================================================
   Navigation Bar (Floating Glassmorphism)
   ========================================================================== */
.header-nav {
  position: fixed;
  top: 1.25rem;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  justify-content: center;
  padding: 0 1.25rem;
  pointer-events: none;
}

.nav-container {
  pointer-events: auto;
  width: 100%;
  max-width: 1060px;
  background: var(--bg-surface-glass);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-full);
  padding: 0.65rem 1.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-md), var(--shadow-glow);
  transition: all var(--transition-normal);
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}

.brand-icon-box {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--grad-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.1rem;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

.brand-name {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  background: var(--grad-primary);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  list-style: none;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  transition: color var(--transition-fast);
  position: relative;
  padding: 0.4rem 0.2rem;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-primary);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--grad-primary);
  transition: width var(--transition-normal);
  border-radius: 2px;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.btn-nav-action {
  background: rgba(37, 99, 235, 0.15);
  border: 1px solid rgba(37, 99, 235, 0.35);
  color: var(--color-electronic-blue-light);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.45rem 1rem;
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
}

.btn-nav-action:hover {
  background: var(--color-electronic-blue);
  color: white;
  border-color: var(--color-electronic-blue);
}

.mobile-menu-toggle {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
  color: var(--text-primary);
}

.hamburger-line {
  display: block;
  width: 22px;
  height: 2px;
  margin: 4px 0;
  background-color: currentColor;
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* Mobile Drawer */
.mobile-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  z-index: 1100;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

.mobile-menu-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-menu-drawer {
  position: fixed;
  top: 0;
  right: -320px;
  width: 290px;
  height: 100vh;
  background: var(--bg-surface-glass);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border-left: 1px solid var(--border-glass);
  z-index: 1200;
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-lg);
  transition: right var(--transition-slow);
}

.mobile-menu-drawer.open {
  right: 0;
}

.mobile-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2.5rem;
}

.mobile-nav-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.mobile-nav-link {
  color: var(--text-primary);
  text-decoration: none;
  font-size: 1.15rem;
  font-weight: 600;
  font-family: var(--font-heading);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-glass);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-section {
  padding-top: 8.5rem;
  padding-bottom: 4rem;
  text-align: center;
}

.hero-badge-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.live-indicator-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-full);
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--color-success);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--color-success);
  box-shadow: 0 0 8px var(--color-success);
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0% { transform: scale(0.9); opacity: 0.7; }
  50% { transform: scale(1.2); opacity: 1; box-shadow: 0 0 12px var(--color-success); }
  100% { transform: scale(0.9); opacity: 0.7; }
}

.hero-market-clock {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-family: var(--font-heading);
  font-weight: 500;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 5.5vw, 4.25rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
}

.hero-subtitle {
  font-size: clamp(1.05rem, 1.8vw, 1.25rem);
  color: var(--text-secondary);
  max-width: 680px;
  margin: 0 auto 2.25rem;
}

.hero-cta-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.75rem 1.6rem;
  border-radius: var(--radius-full);
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition-fast);
  border: none;
  outline: none;
}

.btn-primary {
  background: var(--grad-primary);
  color: #FFFFFF;
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 26px rgba(37, 99, 235, 0.55);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  border: 1px solid var(--border-glass);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--accent-blue);
  transform: translateY(-2px);
}

/* Hero Stats Bar */
.hero-stats-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.2rem;
  max-width: 900px;
  margin: 0 auto;
}

.hero-stat-item {
  padding: 1.1rem 1.2rem;
  text-align: center;
}

.hero-stat-val {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
}

.hero-stat-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ==========================================================================
   Developers Section (Near Top)
   ========================================================================== */
.developers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  max-width: 860px;
  margin: 0 auto;
}

.dev-card {
  padding: 2.25rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.dev-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--grad-brand);
}

.dev-avatar-wrapper {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  margin: 0 auto 1.25rem;
  background: var(--grad-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: white;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.35);
  overflow: hidden;
  position: relative;
  border: 3px solid rgba(255, 255, 255, 0.15);
}

.dev-avatar-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  border-radius: 50%;
}

.dev-avatar-wrapper .avatar-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 700;
  color: white;
}

.dev-name {
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.dev-role {
  font-size: 0.88rem;
  color: var(--accent-lavender);
  font-weight: 600;
  margin-bottom: 1rem;
}

.dev-bio {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
}

.dev-badges {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.dev-badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
}

/* ==========================================================================
   Converter Section
   ========================================================================== */
.converter-card {
  max-width: 860px;
  margin: 0 auto;
  padding: 2.2rem;
  position: relative;
  overflow: visible;
}

.converter-loader-overlay {
  position: absolute;
  inset: 0;
  background: rgba(var(--bg-app-rgb), 0.75);
  backdrop-filter: blur(4px);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
  transition: opacity var(--transition-fast);
}

.converter-loader-overlay.hidden {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

.spinner {
  width: 38px;
  height: 38px;
  border: 3px solid rgba(37, 99, 235, 0.2);
  border-top-color: var(--color-electronic-blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.converter-form-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr auto 1fr;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 1.8rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  position: relative;
}

.form-label {
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.form-input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.1rem;
  color: var(--text-primary);
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 600;
  transition: all var(--transition-fast);
  outline: none;
}

.form-input:focus {
  border-color: var(--border-glass-focus);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}

/* Custom Searchable Currency Dropdown */
.currency-selector-trigger {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  color: var(--text-primary);
  transition: all var(--transition-fast);
}

.currency-selector-trigger:hover {
  border-color: var(--border-glass-hover);
  background: var(--bg-surface-hover);
}

.trigger-content {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.currency-flag-icon {
  font-size: 1.4rem;
  line-height: 1;
}

.currency-code-text {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
}

.currency-name-truncate {
  font-size: 0.82rem;
  color: var(--text-secondary);
  max-width: 110px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.trigger-chevron {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Dropdown Modal / Popover */
.currency-dropdown-modal {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 320px;
  background: rgba(15, 20, 31, 0.95);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  z-index: 100;
  padding: 0.85rem;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: all var(--transition-fast);
}

.currency-dropdown-modal.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.dropdown-search-wrapper {
  position: relative;
  margin-bottom: 0.65rem;
}

.dropdown-search-input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.85rem;
  font-size: 0.9rem;
  color: var(--text-primary);
  outline: none;
}

.dropdown-search-input:focus {
  border-color: var(--accent-blue);
}

.currency-options-list {
  max-height: 240px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding-right: 0.25rem;
}

.currency-options-list::-webkit-scrollbar {
  width: 5px;
}
.currency-options-list::-webkit-scrollbar-thumb {
  background: var(--border-glass);
  border-radius: 4px;
}

.currency-option-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-sm);
  background: transparent;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  text-align: left;
  transition: background var(--transition-fast);
}

.currency-option-item:hover,
.currency-option-item.active {
  background: rgba(37, 99, 235, 0.15);
}

.option-left {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.option-flag {
  font-size: 1.25rem;
}

.option-details {
  display: flex;
  flex-direction: column;
}

.option-code {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
}

.option-name {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.option-symbol {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-lavender);
}

.currency-search-empty {
  padding: 1.2rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Swap Button */
.swap-btn-container {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2px;
}

.btn-swap {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--grad-primary);
  border: none;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.35);
  transition: all var(--transition-fast);
}

.btn-swap:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5);
}

.btn-swap.spinning svg {
  animation: swapSpin 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes swapSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(180deg); }
}

/* Preset Amount Chips */
.preset-amounts-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.preset-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-right: 0.2rem;
}

.preset-amount-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-full);
  padding: 0.25rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.preset-amount-btn:hover {
  background: rgba(37, 99, 235, 0.15);
  color: var(--color-electronic-blue-light);
  border-color: var(--accent-blue);
}

/* Result Box */
.converter-result-box {
  background: var(--bg-input);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 1.5rem 1.8rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.result-main-area {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.result-tagline {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.result-value-display {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  background: var(--grad-primary);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.rate-info-line {
  font-size: 0.9rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.rate-subtext {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.result-actions-area {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.action-icon-btn {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.action-icon-btn:hover {
  background: rgba(37, 99, 235, 0.15);
  color: var(--color-electronic-blue-light);
  border-color: var(--accent-blue);
}

.action-icon-btn.active {
  color: #FBBF24;
  border-color: #FBBF24;
  background: rgba(251, 191, 36, 0.12);
}

/* ==========================================================================
   Quick Pairs & Favorites
   ========================================================================== */
.quick-pairs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
}

.quick-pair-card {
  padding: 1.25rem 1.4rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.85rem;
}

.quick-pair-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-glass-focus);
  box-shadow: var(--shadow-glow);
}

.pair-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pair-flags {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 1.25rem;
}

.flag-arrow {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.pair-badge {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.88rem;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  background: rgba(37, 99, 235, 0.15);
  color: var(--color-electronic-blue-light);
}

.pair-rate-val {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 600;
}

.rate-number {
  color: var(--color-electronic-blue-light);
  font-weight: 700;
}

.pair-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-glass);
  padding-top: 0.65rem;
}

.pair-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.pair-apply-btn {
  background: transparent;
  border: none;
  color: var(--color-electronic-blue-light);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* Favorites Section UI */
.favorites-row-container {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.favorite-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-full);
  cursor: pointer;
}

.favorite-chip:hover {
  border-color: var(--accent-lavender);
}

.fav-chip-content {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.fav-pair-text {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.85rem;
}

.fav-remove-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  padding: 0 0.2rem;
}

.fav-remove-btn:hover {
  color: var(--color-danger);
}

/* ==========================================================================
   Historical Trends & Chart.js Section
   ========================================================================== */
.chart-card {
  padding: 2rem;
  position: relative;
}

.chart-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.chart-header-titles h3 {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
}

.chart-header-titles p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.timeframe-tabs-group {
  display: flex;
  align-items: center;
  background: var(--bg-input);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-full);
  padding: 0.25rem;
}

.timeframe-tab-btn {
  background: transparent;
  border: none;
  border-radius: var(--radius-full);
  padding: 0.45rem 1rem;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.timeframe-tab-btn:hover {
  color: var(--text-primary);
}

.timeframe-tab-btn.active {
  background: var(--grad-primary);
  color: white;
  box-shadow: 0 2px 10px rgba(37, 99, 235, 0.35);
}

.chart-canvas-container {
  width: 100%;
  height: 380px;
  position: relative;
  margin-bottom: 1.75rem;
}

/* Statistics Grid */
.chart-statistics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-glass);
}

.stat-box {
  padding: 1rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-glass);
}

.stat-box-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.35rem;
}

.stat-box-value {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
}

.trend-up {
  color: var(--color-success);
}

.trend-down {
  color: var(--color-danger);
}

/* ==========================================================================
   Popular Currencies Section
   ========================================================================== */
.popular-currencies-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

.popular-currency-card {
  padding: 1.35rem;
  cursor: pointer;
}

.popular-currency-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-lavender);
}

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

.pop-flag-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.pop-flag {
  font-size: 1.75rem;
}

.pop-code {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
}

.pop-name {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.pop-symbol-pill {
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-sm);
  background: rgba(129, 140, 248, 0.15);
  color: var(--accent-lavender);
  font-weight: 700;
  font-size: 0.85rem;
}

.pop-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-glass);
  padding-top: 0.85rem;
}

.pop-rate-line {
  display: flex;
  flex-direction: column;
}

.pop-label {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.pop-value {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--color-electronic-blue-light);
}

.pop-trade-btn {
  background: transparent;
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-full);
  padding: 0.35rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.pop-trade-btn:hover {
  background: var(--accent-blue);
  color: white;
  border-color: var(--accent-blue);
}

/* ==========================================================================
   About Section
   ========================================================================== */
.about-features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

.about-feature-card {
  padding: 2rem;
}

.feature-icon-box {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.step-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.65rem;
}

.step-desc {
  font-size: 0.92rem;
  color: var(--text-secondary);
}

/* ==========================================================================
   Final MFX Branding Section
   ========================================================================== */
.final-branding-section {
  padding: 6.5rem 0 4.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.final-mfx-logo {
  font-family: var(--font-heading);
  font-size: clamp(4.5rem, 12vw, 8.5rem);
  font-weight: bolder;
  line-height: 0.95;
  letter-spacing: -0.04em;
  background: var(--grad-brand);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.85rem;
  text-transform: uppercase;
  filter: drop-shadow(0 15px 30px rgba(37, 99, 235, 0.25));
}

.final-tagline {
  font-family: var(--font-heading);
  font-size: clamp(1.2rem, 2.5vw, 1.8rem);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
}

.final-developed-by {
  font-size: 1.05rem;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-full);
  background: var(--bg-surface-glass);
  border: 1px solid var(--border-glass);
}

.final-developed-by strong {
  color: var(--text-primary);
  background: var(--grad-primary);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  border-top: 1px solid var(--border-glass);
  padding: 3rem 0 2rem;
  background: rgba(var(--bg-app-rgb), 0.9);
  font-size: 0.88rem;
  color: var(--text-muted);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
}

.footer-link {
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer-link:hover {
  color: var(--text-primary);
}

.scroll-to-top-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-surface-glass);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 900;
  opacity: 0;
  pointer-events: none;
  transform: translateY(15px);
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-md);
}

.scroll-to-top-btn.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.scroll-to-top-btn:hover {
  background: var(--accent-blue);
  color: white;
  border-color: var(--accent-blue);
}

/* Toast Notification Styles */
.toast-container {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  z-index: 9999;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  min-width: 280px;
  max-width: 420px;
  background: rgba(15, 20, 31, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-full);
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  transition: all var(--transition-normal);
}

.toast.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.toast.hide {
  opacity: 0;
  transform: translateY(-15px) scale(0.95);
}

.toast-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  flex-shrink: 0;
}

.toast-success .toast-icon {
  background: rgba(16, 185, 129, 0.2);
  color: var(--color-success);
}

.toast-error .toast-icon {
  background: rgba(239, 68, 68, 0.2);
  color: var(--color-danger);
}

.toast-info .toast-icon {
  background: rgba(37, 99, 235, 0.2);
  color: var(--color-electronic-blue-light);
}

.toast-message {
  font-size: 0.88rem;
  color: var(--text-primary);
  flex-grow: 1;
}

.toast-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
}
