/* FireFlow CSS Design System */
:root {
  --bg: #070e17;
  --card-bg: #0d1929;
  --card-hover: #15263d;
  --border: #1a3150;
  --border-focus: #38bdf8;
  --primary: #0284c7;
  --primary-hover: #0369a1;
  --primary-light: #38bdf8;
  --accent: #10b981;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --text-main: #f0f9ff;
  --text-muted: #8ba2b8;
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg);
  color: var(--text-main);
  font-family: var(--font);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header & Navbar */
.navbar {
  background: rgba(13, 25, 41, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 10px 0;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #fff;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.5px;
}

.logo-icon { font-size: 22px; }
.logo strong { color: var(--primary-light); }

.nav-links-suite {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  padding: 4px 0;
  scrollbar-width: none;
}
.nav-links-suite::-webkit-scrollbar { display: none; }

.nav-tool-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 6px;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid transparent;
  transition: all 0.2s;
}

.nav-tool-link:hover, .nav-tool-link.active {
  color: #fff;
  background: rgba(56, 189, 248, 0.15);
  border-color: rgba(56, 189, 248, 0.3);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Main Container & Hero */
.main-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 20px 60px;
  flex: 1;
}

.hero-section {
  text-align: center;
  margin-bottom: 28px;
}

.hero-section h1 {
  font-size: 28px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}

.hero-section p {
  color: var(--text-muted);
  font-size: 14px;
  max-width: 680px;
  margin: 0 auto;
}

/* Calculator Grid */
.calc-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 24px;
  margin-bottom: 32px;
}

@media (max-width: 860px) {
  .calc-grid { grid-template-columns: 1fr; }
}

.calc-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.card-header h2 {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}

.fee-badge {
  background: rgba(56, 189, 248, 0.15);
  color: #7dd3fc;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
}

/* Forms & Inputs */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}

@media (max-width: 580px) {
  .form-row { grid-template-columns: 1fr; }
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 12px;
  font-weight: 600;
  color: #bae6fd;
}

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

.currency-prefix {
  position: absolute;
  left: 12px;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 13px;
}

.suffix {
  position: absolute;
  right: 12px;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 12px;
}

input, select, textarea {
  width: 100%;
  background: #070e17;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px 10px 26px;
  color: #fff;
  font-size: 14px;
  font-family: var(--font);
  font-weight: 600;
  outline: none;
  transition: border-color 0.2s;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--border-focus);
}

/* Results Output Card */
.profit-highlight {
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.15) 0%, rgba(16, 185, 129, 0.15) 100%);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  margin-bottom: 18px;
}

.profit-label {
  font-size: 12px;
  font-weight: 700;
  color: #7dd3fc;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.profit-amount {
  font-size: 34px;
  font-weight: 800;
  color: #fff;
  margin: 6px 0 12px;
}

.profit-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 12px;
}

.metric .m-label {
  font-size: 11px;
  color: var(--text-muted);
  display: block;
}

.metric .m-val {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}

.summary-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.summary-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--text-muted);
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.summary-item strong { color: #fff; }
.text-danger { color: var(--danger) !important; }
.text-success { color: var(--success) !important; }

/* Action Buttons */
.action-btn, .share-calc-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.share-calc-btn {
  background: rgba(56, 189, 248, 0.15);
  border-color: rgba(56, 189, 248, 0.3);
  color: #7dd3fc;
}
.share-calc-btn:hover { background: var(--primary); color: #fff; }

/* Perks & Rewards Section */
.perks-rewards-section {
  background: #0d1929;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px;
  margin-bottom: 32px;
}

.perks-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.perks-header h3 {
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.perks-badge {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
}

.perks-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

@media (max-width: 768px) {
  .perks-grid { grid-template-columns: 1fr; }
}

.perk-card {
  background: #070e17;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
}

.perk-top {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.perk-icon-box {
  font-size: 22px;
  background: rgba(255, 255, 255, 0.05);
  padding: 8px;
  border-radius: 8px;
}

.perk-title {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}

.perk-desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
}

.perk-action-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 10px;
}

.perk-code-tag {
  font-size: 11px;
  font-weight: 700;
  color: #7dd3fc;
  background: rgba(56, 189, 248, 0.1);
  padding: 3px 8px;
  border-radius: 4px;
}

.perk-btn {
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 6px;
  text-decoration: none;
  transition: opacity 0.2s;
}
.perk-btn.green { background: var(--success); }
.perk-btn:hover { opacity: 0.9; }

/* FAQ Accordion Section */
.faq-section {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 32px;
}

.faq-header { margin-bottom: 18px; }
.faq-header h3 { font-size: 16px; font-weight: 800; color: #fff; }
.faq-header p { font-size: 12px; color: var(--text-muted); }

.faq-grid { display: flex; flex-direction: column; gap: 10px; }

.faq-accordion {
  background: #070e17;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.faq-question {
  padding: 14px 16px;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-question::-webkit-details-marker { display: none; }
.faq-question::after { content: '+'; font-size: 16px; color: var(--text-muted); }
.faq-accordion[open] .faq-question::after { content: '−'; }

.faq-answer {
  padding: 0 16px 14px;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  padding: 24px 0;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: auto;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #10b981;
  color: #fff;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1000;
}
.toast.show { transform: translateY(0); opacity: 1; }
