
:root {
      --bg: #10161d;
      --bgDeep: #090d12;
      --card: #151b22;
      --card2: #1b222b;
      --text: #f4f6f8;
      --muted: #9aa4af;
      --muted2: #c7cdd4;
      --border: #2b343f;
      --accent: #6001d2;
      --accentHover: #7b2cff;
      --cyan: #2dd4ff;
      --accentSoft: rgba(96, 1, 210, 0.16);
      --accentSoftStrong: rgba(96, 1, 210, 0.26);
      --good: #00b386;
      --bad: #ff4d5f;
      --warning: #f7b500;
      --shadow: rgba(0, 0, 0, 0.38);
    }

    * { box-sizing: border-box; }

    html { font-family: "Rubik", Arial, sans-serif; }

    body {
      margin: 0;
      padding: 24px;
      font-family: inherit;
      color: var(--text);
      background: linear-gradient(180deg, #090d12 0%, #10161d 38%, #121820 100%);
    }

    .container {
      max-width: 1220px;
      margin: 0 auto;
    }

    .container::before {
      display: none;  
    }

    h1 {
      margin: 0 0 8px;
      font-size: 34px;
      letter-spacing: -0.5px;
      font-weight: 800;
    }

    h2 {
      margin: 0 0 12px;
      font-size: 22px;
      font-weight: 700;
    }

    .subtitle {
      color: var(--muted);
      margin: 0 0 28px;
      line-height: 1.5;
    }

    .module-switcher {
      display: flex;
      flex-wrap: wrap;
      gap: 12px;
      margin: -10px 0 28px;
    }

    .module-button {
      position: relative;
      width: auto;
      min-height: 44px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      padding: 11px 16px;
      border-radius: 999px;
      border: 1px solid var(--border);
      background: #151b22;
      color: var(--muted2);
      font-size: 14px;
      font-weight: 700;
      cursor: pointer;
      transition: 0.2s ease;
      box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
      text-decoration: none;
    }

    .module-button:hover {
      transform: translateY(-1px);
      border-color: rgba(0, 179, 134, 0.42);
      color: var(--text);
      background: #1a222b;
    }

    .module-button.active {
      background: rgba(0, 179, 134, 0.13);
      border-color: rgba(0, 179, 134, 0.46);
      color: var(--good);
    }
    .module-button,
    .module-button:hover,
    .module-button:focus,
    .module-button:visited {
      text-decoration: none;
}

    .info-dot {
      position: relative;
      width: 18px;
      height: 18px;
      border-radius: 999px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      background: rgba(45, 212, 255, 0.12);
      color: var(--cyan);
      border: 1px solid rgba(45, 212, 255, 0.35);
      font-size: 12px;
      font-weight: 800;
      line-height: 1;
    }

    .info-dot::after {
      content: attr(data-tooltip);
      position: absolute;
      left: 50%;
      bottom: calc(100% + 10px);
      transform: translateX(-50%) translateY(4px);
      width: max-content;
      max-width: 260px;
      padding: 9px 11px;
      border-radius: 10px;
      background: #0f151c;
      color: var(--text);
      border: 1px solid var(--border);
      box-shadow: 0 10px 26px rgba(0, 0, 0, 0.32);
      font-size: 12px;
      font-weight: 600;
      line-height: 1.35;
      opacity: 0;
      pointer-events: none;
      transition: 0.18s ease;
      z-index: 20;
      white-space: normal;
      text-align: left;
    }

    .info-dot:hover::after,
    .module-button:focus .info-dot::after {
      opacity: 1;
      transform: translateX(-50%) translateY(0);
    }

    .grid {
      display: grid;
      grid-template-columns: 0.85fr 1.15fr;
      gap: 20px;
      align-items: start;
    }

    .card {
      background: var(--card);
      border: 1px solid var(--border);
      border-radius: 18px;
      padding: 22px;
      box-shadow: 0 10px 28px var(--shadow);
    }

    input,
    select,
    button {
      font-family: inherit;
    }

    label {
      display: block;
      font-weight: 700;
      margin-bottom: 8px;
      margin-top: 16px;
    }

    input,
    select {
      width: 100%;
      padding: 12px;
      border-radius: 10px;
      border: 1px solid var(--border);
      background: #0f151c;
      color: var(--text);
      font-size: 16px;
    }

    input:focus,
    select:focus,
    button:focus {
      outline: 2px solid rgba(0, 179, 134, 0.28);
      border-color: var(--good);
      outline-offset: 3px;
    }

    input[type="number"]::-webkit-outer-spin-button,
    input[type="number"]::-webkit-inner-spin-button {
      -webkit-appearance: none;
      margin: 0;
    }

    input[type="number"] {
      -moz-appearance: textfield;
    }

    .two-cols {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 14px;
    }

    .stepper {
      display: grid;
      grid-template-columns: 46px 1fr 46px;
      gap: 10px;
      align-items: center;
    }

    .stepper-button {
      width: 46px;
      height: 46px;
      border-radius: 999px;
      border: 1px solid var(--border);
      background: #0f151c;
      color: var(--muted2);
      font-size: 24px;
      line-height: 1;
      font-weight: 800;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      transition: 0.2s ease;
      padding: 0;
    }

    .stepper-button:hover {
      transform: translateY(-1px);
      background: #1b222b;
      border-color: rgba(0, 179, 134, 0.35);
      color: var(--text);
    }

    .stepper-button.plus {
      background: linear-gradient(135deg, var(--accent), var(--accentHover));
      color: #fff;
      box-shadow: 0 8px 18px rgba(96, 1, 210, 0.28);
      border-color: rgba(123, 44, 255, 0.5);
    }

    .stepper-button.plus:hover {
      background: linear-gradient(135deg, #4f00b5, #6f24d7);
    }

    .stepper-value-box {
      min-height: 46px;
      border: 1px solid var(--border);
      border-radius: 10px;
      background: #0f151c;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 0 12px;
      gap: 8px;
    }

    .stepper-value-box.green-over {
      transition: 0.2s ease;
    }

    .stepper-value-box.green-over:hover,
    .stepper-value-box.green-over:focus-within,
    .stepper-value-box.green-over:focus-visible {
      outline: 2px solid rgba(0, 179, 134, 0.28);
      border-color: var(--good);
      outline-offset: 3px;
    }

    .stepper-value-box input {
      border: 0;
      outline: 0;
      background: transparent;
      padding: 0;
      text-align: center;
      font-weight: 700;
    }

    .stepper-unit {
      color: var(--muted);
      font-weight: 700;
      white-space: nowrap;
    }

    .stepper-display {
      width: 100%;
      text-align: center;
      font-weight: 700;
      user-select: none;
      color: var(--text);
    }

    .pill {
      display: inline-block;
      background: rgba(0, 179, 134, 0.14);
      color: var(--good);
      padding: 7px 11px;
      border-radius: 999px;
      font-size: 13px;
      font-weight: 700;
      margin-top: 18px;
      border: 1px solid rgba(0, 179, 134, 0.28);
    }

    .restore-values-button {
      display: block;
      width: 100%;
      margin-top: 14px;
      padding: 12px 16px;
      border-radius: 999px;
      border: 1px solid var(--accent);
      background: var(--accent);
      color: #fff;
      font-size: 14px;
      font-weight: 700;
      cursor: pointer;
      transition: 0.2s ease;
    }

    .restore-values-button:hover {
      background: var(--accentHover);
      transform: translateY(-1px);
    }

    .results {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 14px;
      margin-top: 18px;
    }

    .result-box {
      background: linear-gradient(180deg, #18202a, var(--card2));
      padding: 16px;
      border-radius: 14px;
      border: 1px solid var(--border);
    }

    .result-box span {
      display: block;
      color: var(--muted);
      font-size: 14px;
      margin-bottom: 8px;
    }

    .result-box strong {
      font-size: 22px;
      line-height: 1.2;
      font-weight: 800;
    }

    #finalValue,
    #totalInvested {
      color: var(--cyan);
    }

    .positive { color: var(--good); }
    .negative { color: var(--bad); }

    .chart-wrapper {
      margin-top: 24px;
      background: #0f151c;
      border: 1px solid var(--border);
      border-radius: 14px;
      padding: 14px;
    }

    svg {
      width: 100%;
      height: 280px;
      display: block;
    }

    .chart-legend {
      display: flex;
      flex-wrap: wrap;
      gap: 12px;
      margin-top: 12px;
      color: var(--muted2);
      font-size: 13px;
      font-weight: 700;
    }

    .legend-item {
      display: inline-flex;
      align-items: center;
      gap: 8px;
    }

    .legend-line {
      width: 26px;
      height: 3px;
      border-radius: 999px;
      background: var(--cyan);
    }

    .legend-line.model {
      background: var(--accent);
    }

    .model-selector-panel {
      display: grid;
      grid-template-columns: 260px 1fr;
      gap: 14px;
      align-items: stretch;
      margin-top: 16px;
      padding: 0;
      background: transparent;
      border: 0;
    }

    .model-selector-panel > div {
      background: #0f151c;
      border: 1px solid var(--border);
      border-radius: 14px;
      padding: 14px;
    }

    .model-selector-panel label {
      margin: 0 0 8px;
      color: var(--muted2);
      font-size: 14px;
    }

    .model-description {
      color: var(--muted2);
      font-size: 14px;
      line-height: 1.45;
    }

    .model-description strong {
      display: block;
      color: var(--text);
      font-size: 15px;
      margin-bottom: 5px;
    }

    .note {
      color: var(--muted);
      font-size: 14px;
      line-height: 1.5;
      margin-top: 16px;
    }

    @media (max-width: 900px) {
      .grid { grid-template-columns: 1fr; }
      .model-selector-panel { grid-template-columns: 1fr; }
    }

    @media (max-width: 700px) {
      body { padding: 16px; }
      h1 { font-size: 28px; }
      .two-cols, .results { grid-template-columns: 1fr; }
    }

    @media (max-width: 640px) {
      .module-switcher { display: grid; grid-template-columns: 1fr; }
      .module-button { width: 100%; }
      .info-dot::after { left: auto; right: 0; transform: translateY(4px); }
      .info-dot:hover::after,
      .module-button:focus .info-dot::after { transform: translateY(0); }
    }
.logo {
      display: flex;
      align-items: center;
      gap: 15px;
      background: transparent;
      font-family: "Montserrat", Arial, sans-serif;
      margin-bottom: 20px;
}

/* ICONO PRINCIPAL */
    .logo-icon {
      width: 130px;
      height: 90px;
      position: relative;
      border-radius: 24px;
      background: linear-gradient(135deg, #007c89 0%, #00a878 55%, #37d873 100%);
      box-shadow: 0 14px 30px rgba(0, 130, 110, 0.18);
      overflow: hidden;
}

/* Capa interior suave */
    .logo-icon::before {
      content: "";
      position: absolute;
      inset: 5px;
      border-radius: 18px;
      background: rgba(255, 255, 255, 0.08);
      border: 2px solid rgba(255, 255, 255, 0.22);
}

/* CONTENEDOR DE VELAS */
    .candles {
      position: absolute;
      inset: 12px 12px 2px 13px;
      z-index: 2;
}

/* VELAS */
    .candle {
      position: absolute;
      bottom: 16px;
      width: 12px;
      border-radius: 4px;
      background: rgba(255, 255, 255, 0.95);
}

/* Mechas de las velas */
    .candle::before,
    .candle::after {
      content: "";
      position: absolute;
      left: 50%;
      width: 3px;
      background: rgba(255, 255, 255, 0.95);
      border-radius: 4px;
      transform: translateX(-50%);
}

    .candle::before {
      top: -8px;
      height: 9px;
}

    .candle::after {
      bottom: -7px;
      height: 9px;
}

/* 6 velas siempre en ascenso */
    .candle-1 {
      left: 1px;
      height: 12px;
      opacity: 0.72;
}

    .candle-2 {
      left: 18px;
      height: 20px;
      opacity: 0.78;
}

    .candle-3 {
      left: 36px;
      height: 28px;
      opacity: 0.82;
}

    .candle-4 {
      left: 54px;
      height: 36px;
      opacity: 0.86;
}

    .candle-5 {
      left: 72px;
      height: 42px;
      opacity: 0.88;
}

    .candle-6 {
      left: 90px;
      height: 50px;
      opacity: 0.96;
}

/* TEXTO */
    .logo-text h1 {
      margin: 0;
      font-size: 32px;
      line-height: 1;
      font-weight: 800;
      letter-spacing: -1px;
}

    .logo-text .light {
      color: #A9CFC1;
}

    .logo-text .green {
      color: #00a86b;
}

    .logo-text p {
      margin: 3px 0 0;
      font-size: 12px;
      font-weight: 400;
      color: #A9CFC1;
      letter-spacing: 1px;
}
.site-footer {
  max-width: 1220px;
  margin: 34px auto 0;
  padding: 22px 0 6px;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}

.footer-brand {
  margin: 0;
  color: var(--muted2);
  font-size: 14px;
  font-weight: 700;
}

.footer-social {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted2);
  font-size: 14px;
  font-weight: 700;
}

.footer-email {
  color: #00a86b;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  transition: 0.2s ease;
}

.footer-email:hover {
  color: #00b386;
  text-decoration: none;
}

@media (max-width: 640px) {
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}
@media (max-width: 700px) {
  .site-footer {
    margin-left: 16px;
    margin-right: 16px;
  }
}