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

/* ===== CSS CUSTOM PROPERTIES ===== */
:root {
  /* Primary Palette */
  --bg-primary: #0a0e1a;
  --bg-secondary: #111827;
  --bg-card: rgba(17, 24, 39, 0.7);
  --bg-glass: rgba(255, 255, 255, 0.03);
  --bg-glass-hover: rgba(255, 255, 255, 0.06);

  /* Accent Colors */
  --accent-primary: #6366f1;
  --accent-secondary: #8b5cf6;
  --accent-teal: #14b8a6;
  --accent-gold: #f59e0b;
  --accent-rose: #f43f5e;
  --accent-emerald: #10b981;
  --accent-sky: #0ea5e9;

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #6366f1, #8b5cf6, #a78bfa);
  --gradient-gold: linear-gradient(135deg, #f59e0b, #d97706);
  --gradient-teal: linear-gradient(135deg, #14b8a6, #0d9488);
  --gradient-rose: linear-gradient(135deg, #f43f5e, #e11d48);
  --gradient-hero: linear-gradient(135deg, #0a0e1a 0%, #1a1040 30%, #0f172a 60%, #0a1628 100%);
  --gradient-mesh: radial-gradient(ellipse at 20% 50%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
                   radial-gradient(ellipse at 80% 20%, rgba(139, 92, 246, 0.1) 0%, transparent 50%),
                   radial-gradient(ellipse at 60% 80%, rgba(20, 184, 166, 0.08) 0%, transparent 50%);

  /* Text */
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-accent: #a78bfa;

  /* Borders */
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-accent: rgba(99, 102, 241, 0.3);

  /* Shadows */
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.4);
  --shadow-glow-primary: 0 0 40px rgba(99, 102, 241, 0.15);
  --shadow-glow-gold: 0 0 40px rgba(245, 158, 11, 0.15);
  --shadow-glow-teal: 0 0 40px rgba(20, 184, 166, 0.15);

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

  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: var(--gradient-mesh);
  pointer-events: none;
  z-index: 0;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--accent-primary);
  border-radius: var(--radius-full);
}

/* ===== NAVBAR ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1rem 2rem;
  background: rgba(10, 14, 26, 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  transition: var(--transition-smooth);
}

.navbar.scrolled {
  padding: 0.6rem 2rem;
  background: rgba(10, 14, 26, 0.95);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.navbar-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.navbar-logo {
  width: 40px;
  height: 40px;
  background: var(--gradient-primary);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 800;
  color: white;
  box-shadow: var(--shadow-glow-primary);
}

.navbar-title {
  font-size: 1.25rem;
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.navbar-links {
  display: flex;
  gap: 0.5rem;
  list-style: none;
}

.navbar-links a {
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 500;
  transition: var(--transition-fast);
}

.navbar-links a:hover,
.navbar-links a.active {
  color: var(--text-primary);
  background: var(--bg-glass-hover);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
}

/* ===== HERO SECTION ===== */
.hero {
  position: relative;
  min-height: 50vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8rem 2rem 4rem;
  background: var(--gradient-hero);
  overflow: hidden;
}

.hero-particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero-particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--accent-primary);
  border-radius: 50%;
  opacity: 0.3;
  animation: float-particle 15s infinite ease-in-out;
}

.hero-particle:nth-child(1) { left: 10%; top: 20%; animation-delay: 0s; animation-duration: 12s; }
.hero-particle:nth-child(2) { left: 30%; top: 60%; animation-delay: 2s; animation-duration: 18s; }
.hero-particle:nth-child(3) { left: 50%; top: 30%; animation-delay: 4s; animation-duration: 14s; }
.hero-particle:nth-child(4) { left: 70%; top: 70%; animation-delay: 1s; animation-duration: 16s; }
.hero-particle:nth-child(5) { left: 90%; top: 40%; animation-delay: 3s; animation-duration: 20s; }
.hero-particle:nth-child(6) { left: 20%; top: 80%; animation-delay: 5s; animation-duration: 13s; }
.hero-particle:nth-child(7) { left: 60%; top: 15%; animation-delay: 2.5s; animation-duration: 17s; }
.hero-particle:nth-child(8) { left: 80%; top: 55%; animation-delay: 1.5s; animation-duration: 15s; }

@keyframes float-particle {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.2; }
  25% { transform: translate(30px, -40px) scale(1.5); opacity: 0.5; }
  50% { transform: translate(-20px, -80px) scale(1); opacity: 0.3; }
  75% { transform: translate(40px, -30px) scale(1.8); opacity: 0.4; }
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
  animation: pulse-orb 8s ease-in-out infinite alternate;
}

.hero-orb-1 {
  width: 400px;
  height: 400px;
  background: var(--accent-primary);
  top: -100px;
  right: -100px;
  opacity: 0.15;
}

.hero-orb-2 {
  width: 300px;
  height: 300px;
  background: var(--accent-teal);
  bottom: -50px;
  left: -50px;
  opacity: 0.1;
  animation-delay: 4s;
}

@keyframes pulse-orb {
  0% { transform: scale(1); opacity: 0.1; }
  100% { transform: scale(1.3); opacity: 0.2; }
}

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

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent-primary);
  margin-bottom: 1.5rem;
  animation: fadeInUp 0.8s ease-out;
}

.hero-badge .badge-dot {
  width: 6px;
  height: 6px;
  background: var(--accent-emerald);
  border-radius: 50%;
  animation: blink 2s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 1rem;
  animation: fadeInUp 0.8s ease-out 0.1s both;
}

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

.hero p {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 2rem;
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeInUp 0.8s ease-out 0.3s both;
}

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

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-full);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: var(--shadow-glow-primary);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 60px rgba(99, 102, 241, 0.3);
}

.btn-secondary {
  background: var(--bg-glass);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: var(--bg-glass-hover);
  border-color: var(--border-accent);
  transform: translateY(-2px);
}

.btn-gold {
  background: var(--gradient-gold);
  color: #1a1a2e;
  box-shadow: var(--shadow-glow-gold);
}

.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 60px rgba(245, 158, 11, 0.3);
}

/* ===== CONTAINER ===== */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ===== SECTIONS ===== */
.section {
  padding: 5rem 0;
  position: relative;
  z-index: 1;
}

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

.section-header .section-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 1rem;
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.15);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-primary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}

.section-header h2 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 800;
  margin-bottom: 0.75rem;
}

.section-header p {
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
  font-size: 1rem;
}

/* ===== CALCULATOR SECTION ===== */
.calculator-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

.calc-form-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 2rem;
  backdrop-filter: blur(20px);
  position: relative;
  overflow: hidden;
}

.calc-form-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-primary);
}

.calc-result-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 2rem;
  backdrop-filter: blur(20px);
  position: sticky;
  top: 100px;
}

.calc-result-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-gold);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-group label .label-icon {
  margin-right: 0.4rem;
}

.input-wrapper {
  position: relative;
}

.input-wrapper .input-prefix,
.input-wrapper .input-suffix {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  pointer-events: none;
}

.input-wrapper .input-prefix {
  left: 1rem;
}

.input-wrapper .input-suffix {
  right: 1rem;
}

.form-input {
  width: 100%;
  padding: 0.85rem 1rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 500;
  transition: var(--transition-fast);
  outline: none;
}

.form-input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
  background: rgba(255, 255, 255, 0.06);
}

.form-input.has-prefix {
  padding-left: 2.5rem;
}

.form-input.has-suffix {
  padding-right: 2.5rem;
}

.form-select {
  width: 100%;
  padding: 0.85rem 1rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 500;
  transition: var(--transition-fast);
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 8.825L.35 3.175l.7-.7L6 7.425l4.95-4.95.7.7z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
}

.form-select:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-select option {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

/* Interest Type Cards */
.interest-type-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.interest-type-card {
  position: relative;
  cursor: pointer;
}

.interest-type-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.interest-type-card .type-card-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  padding: 1rem 0.75rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: var(--transition-smooth);
  text-align: center;
}

.interest-type-card .type-icon {
  font-size: 1.5rem;
}

.interest-type-card .type-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.interest-type-card .type-desc {
  font-size: 0.65rem;
  color: var(--text-muted);
  line-height: 1.3;
}

.interest-type-card input:checked + .type-card-inner {
  background: rgba(99, 102, 241, 0.1);
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-glow-primary);
}

.interest-type-card input:checked + .type-card-inner .type-name {
  color: var(--accent-primary);
}

.interest-type-card .type-card-inner:hover {
  border-color: rgba(99, 102, 241, 0.3);
  background: rgba(99, 102, 241, 0.05);
}

/* Term Inline */
.form-inline {
  display: flex;
  gap: 0.75rem;
}

.form-inline .form-input {
  flex: 1;
}

.form-inline .form-select {
  width: 130px;
  flex-shrink: 0;
}

/* Checkbox Custom */
.form-check {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-fast);
}

.form-check:hover {
  background: rgba(255, 255, 255, 0.05);
}

.form-check input[type="checkbox"] {
  appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid var(--text-muted);
  border-radius: 4px;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  transition: var(--transition-fast);
}

.form-check input[type="checkbox"]:checked {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
}

.form-check input[type="checkbox"]:checked::after {
  content: '✓';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: white;
  font-weight: 700;
}

.form-check-label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.form-check-label small {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 400;
  margin-top: 2px;
}

/* Compound period - shown only for compound */
.compound-options {
  display: none;
}

.compound-options.visible {
  display: block;
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== RESULT SECTION ===== */
.result-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-subtle);
}

.result-header-icon {
  width: 44px;
  height: 44px;
  background: var(--gradient-gold);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.result-header h3 {
  font-size: 1.15rem;
  font-weight: 700;
}

.result-header p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Result Stats */
.result-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.result-stat {
  padding: 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  text-align: center;
  transition: var(--transition-smooth);
}

.result-stat:hover {
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-2px);
}

.result-stat.highlight {
  grid-column: 1 / -1;
  background: rgba(99, 102, 241, 0.08);
  border-color: rgba(99, 102, 241, 0.2);
}

.result-stat .stat-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.3rem;
}

.result-stat .stat-value {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-primary);
}

.result-stat.highlight .stat-value {
  font-size: 1.6rem;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.result-stat .stat-value.gold { color: var(--accent-gold); }
.result-stat .stat-value.teal { color: var(--accent-teal); }
.result-stat .stat-value.rose { color: var(--accent-rose); }
.result-stat .stat-value.emerald { color: var(--accent-emerald); }

/* Chart Container */
.chart-container {
  margin-top: 1.5rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.chart-container h4 {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

.chart-container canvas {
  width: 100% !important;
  height: 250px !important;
}

/* ===== AMORT TABLE ===== */
.amort-section {
  margin-top: 1.5rem;
}

.amort-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
}

.amort-toggle:hover {
  background: rgba(255, 255, 255, 0.05);
}

.amort-toggle .toggle-arrow {
  transition: var(--transition-smooth);
}

.amort-toggle.open .toggle-arrow {
  transform: rotate(180deg);
}

.amort-table-wrapper {
  display: none;
  margin-top: 0.75rem;
  max-height: 400px;
  overflow-y: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.amort-table-wrapper.visible {
  display: block;
  animation: slideDown 0.3s ease-out;
}

.amort-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.amort-table thead {
  position: sticky;
  top: 0;
  z-index: 1;
}

.amort-table th {
  background: rgba(99, 102, 241, 0.1);
  color: var(--text-primary);
  font-weight: 600;
  padding: 0.65rem 0.75rem;
  text-align: right;
  white-space: nowrap;
}

.amort-table th:first-child {
  text-align: center;
}

.amort-table td {
  padding: 0.55rem 0.75rem;
  text-align: right;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-subtle);
}

.amort-table td:first-child {
  text-align: center;
  font-weight: 600;
  color: var(--text-primary);
}

.amort-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

/* ===== QUICK RATES SECTION ===== */
.quick-rates {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.rate-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  backdrop-filter: blur(10px);
  transition: var(--transition-smooth);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.rate-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  transition: var(--transition-smooth);
}

.rate-card:nth-child(1)::before { background: var(--gradient-primary); }
.rate-card:nth-child(2)::before { background: var(--gradient-gold); }
.rate-card:nth-child(3)::before { background: var(--gradient-teal); }
.rate-card:nth-child(4)::before { background: var(--gradient-rose); }

.rate-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-accent);
  box-shadow: var(--shadow-lg);
}

.rate-card-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.rate-card h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}

.rate-card .rate-value {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 0.3rem;
}

.rate-card:nth-child(1) .rate-value { color: var(--accent-primary); }
.rate-card:nth-child(2) .rate-value { color: var(--accent-gold); }
.rate-card:nth-child(3) .rate-value { color: var(--accent-teal); }
.rate-card:nth-child(4) .rate-value { color: var(--accent-rose); }

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

/* ===== FINANCIAL GUIDE SECTION ===== */
.guide-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scrollbar-width: none;
}

.guide-tabs::-webkit-scrollbar { display: none; }

.guide-tab {
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition-fast);
}

.guide-tab:hover {
  background: rgba(99, 102, 241, 0.05);
  color: var(--text-primary);
}

.guide-tab.active {
  background: rgba(99, 102, 241, 0.15);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.guide-panel {
  display: none;
}

.guide-panel.active {
  display: block;
  animation: fadeInUp 0.4s ease-out;
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.25rem;
}

.guide-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  backdrop-filter: blur(10px);
  transition: var(--transition-smooth);
}

.guide-card:hover {
  border-color: var(--border-accent);
  transform: translateY(-2px);
}

.guide-card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 1rem;
}

.guide-card-icon.purple { background: rgba(99, 102, 241, 0.15); }
.guide-card-icon.gold { background: rgba(245, 158, 11, 0.15); }
.guide-card-icon.teal { background: rgba(20, 184, 166, 0.15); }
.guide-card-icon.rose { background: rgba(244, 63, 94, 0.15); }
.guide-card-icon.emerald { background: rgba(16, 185, 129, 0.15); }
.guide-card-icon.sky { background: rgba(14, 165, 233, 0.15); }

.guide-card h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.guide-card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.guide-card ul {
  list-style: none;
  margin-top: 0.75rem;
}

.guide-card ul li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
  padding: 0.3rem 0;
}

.guide-card ul li::before {
  content: '›';
  color: var(--accent-primary);
  font-weight: 700;
  flex-shrink: 0;
}

/* Comparison Table */
.comparison-table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  min-width: 700px;
}

.comparison-table thead th {
  background: rgba(99, 102, 241, 0.1);
  color: var(--text-primary);
  font-weight: 600;
  padding: 0.85rem 1rem;
  text-align: left;
  white-space: nowrap;
}

.comparison-table tbody td {
  padding: 0.75rem 1rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-subtle);
}

.comparison-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

.comparison-table .tool-name {
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.risk-badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 600;
}

.risk-badge.low {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
}

.risk-badge.medium {
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-gold);
}

.risk-badge.high {
  background: rgba(244, 63, 94, 0.15);
  color: var(--accent-rose);
}

/* ===== FOOTER ===== */
.footer {
  position: relative;
  z-index: 1;
  padding: 3rem 0 1.5rem;
  border-top: 1px solid var(--border-subtle);
  text-align: center;
}

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

.footer .footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.footer .footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.8rem;
  transition: var(--transition-fast);
}

.footer .footer-links a:hover {
  color: var(--accent-primary);
}

/* ===== TOAST NOTIFICATION ===== */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  padding: 1rem 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-md);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
  z-index: 9999;
  transform: translateX(120%);
  transition: var(--transition-bounce);
}

.toast.show {
  transform: translateX(0);
}

.toast-icon {
  font-size: 1.3rem;
}

/* ===== ANIMATIONS ===== */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Number count-up animation */
.count-up {
  transition: none;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .calculator-wrapper {
    grid-template-columns: 1fr;
  }
  .calc-result-card {
    position: static;
  }
}

@media (max-width: 768px) {
  .navbar-links {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: rgba(10, 14, 26, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 1rem;
    border-bottom: 1px solid var(--border-subtle);
  }

  .navbar-links.open {
    display: flex;
  }

  .mobile-menu-btn {
    display: block;
  }

  .hero {
    padding: 7rem 1.5rem 3rem;
    min-height: auto;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .section {
    padding: 3rem 0;
  }

  .container {
    padding: 0 1rem;
  }

  .interest-type-grid {
    grid-template-columns: 1fr;
  }

  .result-stats {
    grid-template-columns: 1fr;
  }

  .form-inline {
    flex-direction: column;
  }

  .form-inline .form-select {
    width: 100%;
  }

  .guide-grid {
    grid-template-columns: 1fr;
  }

  .quick-rates {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 480px) {
  .quick-rates {
    grid-template-columns: 1fr;
  }

  .hero-cta {
    flex-direction: column;
    align-items: center;
  }

  .hero-cta .btn {
    width: 100%;
    justify-content: center;
  }
}

/* ===== LOADING SKELETON ===== */
.skeleton {
  background: linear-gradient(90deg, rgba(255,255,255,0.03) 25%, rgba(255,255,255,0.06) 50%, rgba(255,255,255,0.03) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ===== PULSE GLOW ON CALC BUTTON ===== */
.btn-calc-pulse {
  animation: calcPulse 2s infinite;
}

@keyframes calcPulse {
  0%, 100% { box-shadow: var(--shadow-glow-primary); }
  50% { box-shadow: 0 0 50px rgba(99, 102, 241, 0.4); }
}

/* ===== INFLATION INPUT ===== */
.inflation-options {
  display: none;
}

.inflation-options.visible {
  display: block;
  animation: slideDown 0.3s ease-out;
}
