:root {
  --bg: #0e1117;
  --card: #161b22;
  --accent: #00ffa3;
  --text: #e6edf3;
  --muted: #8b949e;
}

* {
  box-sizing: border-box;
  font-family: "Inter", system-ui, sans-serif;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

.app-header {
  padding: 1rem;
  text-align: center;
  border-bottom: 1px solid #222;
}

.global-settings {
  padding-top: 0.5rem;
  display: flex;
  justify-content: center;
}

.global-settings input {
  margin-left: 0.5rem;
  width: 70px;
}

.tabs {
  display: flex;
  justify-content: space-around;
  border-bottom: 1px solid #222;
}

.tab {
  flex: 1;
  padding: 0.5rem;
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
}

.tab.active {
  color: var(--accent);
  border-bottom: 2px solid var(--accent);
}

.calculator {
  display: none;
  padding: 1rem;
}

.calculator.active {
  display: block;
}

.card {
  background: var(--card);
  padding: 1.5rem;
  border-radius: 12px;
  max-width: 500px;
  margin: auto;
}

.card h2 {
  margin-bottom: 1rem;
}

input {
  width: 100%;
  padding: 0.75rem;
  margin-bottom: 0.75rem;
  background: #0d1117;
  border: 1px solid #30363d;
  border-radius: 8px;
  color: var(--text);
}

.note {
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

.clear-btn {
  margin-top: 10px;
  width: 100%;
  padding: 0.75rem;
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
  border-radius: 8px;
  cursor: pointer;
}
.dcaAddRow {
  margin-top: 10px;
  width: 100%;
  padding: 0.75rem;
  background: var(--text);
  /* border: 1px solid var(--accent); */
  color: var(--bg);
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
}

.actions {
  display: flex;
  gap: 0.5rem;
}

.actions button {
  flex: 1;
}

.dca-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

/* Toggle */
.toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.switch {
  position: relative;
  width: 40px;
  height: 20px;
}

.switch input {
  opacity: 0;
}

.slider {
  position: absolute;
  inset: 0;
  background: #30363d;
  border-radius: 20px;
}

.slider::before {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  left: 2px;
  top: 2px;
  background: white;
  border-radius: 50%;
  transition: 0.3s;
}

.switch input:checked + .slider::before {
  transform: translateX(20px);
}

select {
  width: 100%;
  padding: 0.75rem;
  margin-bottom: 0.75rem;
  background: #0d1117;
  border: 1px solid #30363d;
  border-radius: 8px;
  color: var(--text);
}

/* Responsive */
@media (max-width: 500px) {
  .dca-row {
    grid-template-columns: 1fr;
  }
}


/* ===== PnL Results Styling ===== */

.pnl-summary {
  margin-top: 1rem;
  text-align: center;
}

.pnl-profit {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.pnl-profit::before {
  content: "Profit / Loss";
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 0.25rem;
}

.pnl-profit-percent {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.pnl-final {
  font-size: 0.95rem;
  color: var(--text);
}

.pnl-divider {
  height: 1px;
  background: #30363d;
  margin: 1rem 0;
}

.pnl-fees {
  font-size: 0.8rem;
  color: var(--muted);
  display: grid;
  gap: 0.4rem;
}

.pnl-fees div {
  display: flex;
  justify-content: space-between;
}


/* ===== DCA Styling ===== */

.dca-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: 0.5rem;
  align-items: center;
}

.dca-row input[readonly] {
  opacity: 0.6;
  border-style: dashed;
}

.dca-remove {
  background: none;
  border: none;
  color: #ff4d4d;
  font-size: 1.1rem;
  cursor: pointer;
}

.dca-results {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #30363d;
}

.dca-results .avg {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent);
}


.seo-content {
  max-width: 800px;
  margin: 3rem auto 2rem;
  padding: 0 1rem;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

.seo-content h1 {
  font-size: 1.6rem;
  color: var(--text);
  margin-bottom: 1rem;
}

.seo-content h2 {
  font-size: 1.1rem;
  margin-top: 1.5rem;
  color: var(--text);
}

.seo-content ul {
  padding-left: 1.2rem;
}
