/* ============================================ */
/* COMPOUND INTEREST CALCULATOR STYLES */
/* ============================================ */

.ci-hero {
  padding: 60px 0 40px;
  text-align: center;
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
}

.ci-hero h1 {
  font-size: 2.5rem;
  margin-bottom: 16px;
  color: var(--text);
}

.ci-hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 720px;
  margin: 0 auto 24px;
  line-height: 1.6;
}

.ci-hero-badge {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.ci-calculator-section {
  padding: 60px 0;
}

.ci-calculator-wrapper {
  max-width: 1200px;
  margin: 0 auto;
}

.ci-calculator-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-bottom: 48px;
}

.ci-form-card,
.ci-result-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}

.ci-form-title,
.ci-result-title {
  font-size: 1.3rem;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border);
  color: var(--text);
}

.ci-field {
  margin-bottom: 20px;
}

.ci-field label {
  display: block;
  font-weight: 600;
  font-size: 0.92rem;
  margin-bottom: 8px;
  color: var(--text);
}

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

.ci-input-wrap input,
.ci-input-wrap select {
  width: 100%;
  padding: 12px 16px;
  font-size: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  transition: border-color 0.15s ease;
}

.ci-input-wrap input:focus,
.ci-input-wrap select:focus {
  outline: none;
  border-color: var(--accent);
}

.ci-input-prefix,
.ci-input-suffix {
  position: absolute;
  font-size: 0.95rem;
  color: var(--text-secondary);
  pointer-events: none;
}

.ci-input-prefix {
  left: 16px;
  font-weight: 600;
}

.ci-input-wrap:has(.ci-input-prefix) input {
  padding-left: 32px;
}

.ci-input-suffix {
  right: 16px;
  font-weight: 600;
}

.ci-input-wrap:has(.ci-input-suffix) input {
  padding-right: 60px;
}

.ci-btn-group {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.ci-btn {
  padding: 12px 24px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
  flex: 1;
}

.ci-btn.primary {
  background: var(--accent);
  color: white;
}

.ci-btn.primary:hover {
  background: var(--accent-dark, #1d4ed8);
  transform: translateY(-1px);
}

.ci-btn.secondary {
  background: var(--bg-secondary);
  color: var(--text);
  border: 1px solid var(--border);
}

.ci-btn.secondary:hover {
  background: var(--bg);
  border-color: var(--accent);
}

.ci-highlight-box {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark, #1d4ed8) 100%);
  color: white;
  padding: 24px;
  border-radius: var(--radius);
  text-align: center;
  margin-bottom: 24px;
}

.ci-result-label {
  font-size: 0.9rem;
  opacity: 0.9;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ci-result-value {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 8px;
}

.ci-result-subtext {
  font-size: 0.85rem;
  opacity: 0.85;
}

.ci-breakdown-list {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
}

.ci-breakdown-item {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}

.ci-breakdown-item:last-child {
  border-bottom: none;
}

.ci-breakdown-label {
  color: var(--text-secondary);
}

.ci-breakdown-value {
  font-weight: 700;
  color: var(--text);
}

.ci-breakdown-value.positive {
  color: #16a34a;
}

.ci-formula-box {
  background: var(--bg-secondary);
  padding: 14px 16px;
  border-radius: var(--radius);
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
  border-left: 3px solid var(--accent);
}

.ci-formula-box code {
  display: block;
  margin-top: 6px;
  font-family: 'Courier New', monospace;
  font-size: 0.92rem;
  color: var(--text);
  font-weight: 600;
}

.ci-copy-bar {
  text-align: center;
}

.ci-copy-btn {
  padding: 10px 20px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  transition: all 0.15s ease;
}

.ci-copy-btn:hover {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.ci-breakdown-section {
  margin-top: 40px;
}

.ci-breakdown-title {
  font-size: 1.4rem;
  margin-bottom: 20px;
  color: var(--text);
}

.ci-table-wrap {
  overflow-x: auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.ci-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.ci-table th {
  background: var(--bg-secondary);
  padding: 14px 16px;
  text-align: left;
  font-weight: 700;
  color: var(--text);
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}

.ci-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
}

.ci-table tbody tr:hover {
  background: var(--bg-secondary);
}

.ci-table tbody tr.highlight-row {
  background: var(--accent-light, #dbeafe);
  font-weight: 600;
}

.ci-table tbody tr.highlight-row td {
  color: var(--text);
}

.ci-formula-section {
  padding: 60px 0;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.ci-formula-section h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 40px;
}

.ci-formula-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 40px;
}

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

.ci-formula-card h3 {
  font-size: 1.15rem;
  margin-bottom: 16px;
  color: var(--text);
}

.ci-formula-box-large {
  background: var(--bg-secondary);
  padding: 20px;
  border-radius: var(--radius);
  text-align: center;
  margin-bottom: 16px;
  border: 1px solid var(--border);
}

.ci-formula-box-large code {
  font-family: 'Courier New', monospace;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--accent);
}

.ci-legend {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.ci-legend li {
  padding: 6px 0;
  line-height: 1.5;
}

.ci-legend strong {
  color: var(--text);
  font-family: 'Courier New', monospace;
}

.ci-example-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 24px;
  margin-top: 24px;
}

.ci-example-card h3 {
  font-size: 1.15rem;
  margin-bottom: 12px;
}

.ci-example-card ul {
  margin-left: 20px;
  color: var(--text-secondary);
  line-height: 1.8;
}

.ci-compare-section {
  padding: 60px 0;
}

.ci-compare-section h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 16px;
}

.ci-compare-desc {
  text-align: center;
  color: var(--text-secondary);
  max-width: 700px;
  margin: 0 auto 32px;
}

.ci-compare-note {
  margin-top: 24px;
  padding: 16px 20px;
  background: var(--bg-secondary);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  font-size: 0.95rem;
}

.ci-content-article {
  padding: 60px 0;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
}

.ci-content-article h2 {
  font-size: 2rem;
  margin-bottom: 20px;
}

.ci-content-article h3 {
  font-size: 1.4rem;
  margin: 32px 0 16px;
  color: var(--text);
}

.ci-content-article p {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 16px;
}

.ci-content-article ul,
.ci-content-article ol {
  margin-left: 24px;
  color: var(--text-secondary);
  line-height: 1.9;
}

.ci-internal-links {
  margin-top: 40px;
  padding: 24px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.ci-internal-links h3 {
  margin-top: 0;
}

.ci-internal-links ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ci-internal-links li {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.ci-internal-links li:last-child {
  border-bottom: none;
}

.ci-internal-links a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.ci-internal-links a:hover {
  text-decoration: underline;
}

.ci-faq {
  padding: 60px 0;
}

.ci-faq h2 {
  text-align: center;
  margin-bottom: 40px;
}

@media (max-width: 900px) {
  .ci-calculator-grid,
  .ci-formula-grid {
    grid-template-columns: 1fr;
  }

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

  .ci-result-value {
    font-size: 1.8rem;
  }
}

@media (max-width: 640px) {
  .ci-hero {
    padding: 40px 0 30px;
  }

  .ci-hero h1 {
    font-size: 1.75rem;
  }

  .ci-btn-group {
    flex-direction: column;
  }

  .ci-form-card,
  .ci-result-card {
    padding: 20px;
  }

  .ci-table th,
  .ci-table td {
    padding: 10px 12px;
    font-size: 0.85rem;
  }
}