/* ================================================================
   simulator.css — BitTradeBlog シミュレーターページ
================================================================ */

.simulator-page { padding-top: 0 !important; padding-bottom: 0 !important; }
.simulator-page * { box-sizing: border-box; }

/* ── HERO ── */
.sim-hero {
  background: linear-gradient(160deg, var(--gray-900) 0%, var(--blue-800) 60%, var(--blue-700) 100%);
  padding: 52px 0 44px;
  position: relative;
  overflow: hidden;
  text-align: center;
}
.sim-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(0,217,255,.08) 1.5px, transparent 1.5px);
  background-size: 28px 28px;
  pointer-events: none;
}
.sim-hero__inner { position: relative; z-index: 1; }
.sim-hero__eyebrow {
  font-size: 11px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
  color: var(--color-primary); margin-bottom: 12px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.sim-hero__eyebrow::before, .sim-hero__eyebrow::after {
  content: ''; display: inline-block; width: 24px; height: 1px;
  background: var(--color-primary); opacity: .5;
}
.sim-hero__title {
  font-family: var(--font-serif);
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 700; color: #fff; line-height: 1.3; margin: 0 0 10px;
}
.sim-hero__title span { color: var(--color-primary); }
.sim-hero__desc { font-size: var(--text-sm); color: rgba(255,255,255,.55); margin: 0 auto; max-width: 480px; }

/* ── BODY ── */
.sim-body { background: var(--color-bg); padding: var(--sp-10) 0 var(--sp-20); }

/* ── シミュレーター本体（既存CSSを上書きせずスコープ限定） ── */
#crypto-simulator-wrapper {
  font-family: var(--font-sans);
  color: #333;
  line-height: 1.6;
  max-width: 860px;
  margin: 0 auto;
}
#crypto-simulator-wrapper * { box-sizing: border-box; }

#crypto-simulator-wrapper .crypto-sim-header {
  background: linear-gradient(135deg, #1191E5, #3AAFF5);
  color: white;
  padding: 32px 24px;
  text-align: center;
  border-radius: 16px 16px 0 0;
}
#crypto-simulator-wrapper .crypto-sim-header h2 {
  font-size: 1.6em;
  font-weight: 700;
  margin: 0 0 8px;
  color: white;
  line-height: 1.3;
  font-family: var(--font-serif);
}
#crypto-simulator-wrapper .crypto-sim-header .subtitle {
  font-size: .95em; opacity: .9; font-weight: 400; margin: 0;
}

#crypto-simulator-wrapper .crypto-sim-container {
  background: white;
  border-radius: 0 0 16px 16px;
  box-shadow: 0 4px 24px rgba(0,0,0,.08);
  overflow: hidden;
}

#crypto-simulator-wrapper .crypto-sim-symbol-selector {
  padding: 20px;
  background: #f8fafc;
  border-bottom: 1px solid #e5e7eb;
}
#crypto-simulator-wrapper .crypto-sim-selector-label {
  font-size: .9em; font-weight: 600; color: #374151; margin-bottom: 8px; display: block;
}
#crypto-simulator-wrapper .crypto-sim-symbol-select {
  width: 100%; padding: 12px 44px 12px 16px;
  border: 2px solid #d1d5db; border-radius: 8px;
  font-size: 1em; font-weight: 600; background: white;
  cursor: pointer; transition: border-color .2s;
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 18px;
  font-family: inherit;
}
#crypto-simulator-wrapper .crypto-sim-symbol-select:focus {
  outline: none; border-color: #1191E5; box-shadow: 0 0 0 3px rgba(17,145,229,.12);
}

#crypto-simulator-wrapper .crypto-sim-tab-container {
  display: flex; background: #f1f5f9; border-bottom: 1px solid #e5e7eb;
}
#crypto-simulator-wrapper .crypto-sim-tab-button {
  flex: 1; padding: 14px; background: none; border: none;
  font-size: 1em; font-weight: 600; color: #64748b;
  cursor: pointer; transition: all .2s; border-bottom: 3px solid transparent;
  font-family: inherit;
}
#crypto-simulator-wrapper .crypto-sim-tab-button.active {
  color: #1191E5; background: white; border-bottom-color: #1191E5;
}
#crypto-simulator-wrapper .crypto-sim-tab-button:not(.active):hover { background: #e2e8f0; }

#crypto-simulator-wrapper .crypto-sim-tab-content { display: none; }
#crypto-simulator-wrapper .crypto-sim-tab-content.active { display: block; }

#crypto-simulator-wrapper .crypto-sim-form-section {
  padding: 28px 24px; border-bottom: 1px solid #e5e7eb;
}
#crypto-simulator-wrapper .crypto-sim-form-title {
  font-size: 1.1em; font-weight: 600; color: #111827;
  margin: 0 0 20px; text-align: center;
}
#crypto-simulator-wrapper .crypto-sim-form-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px;
}
#crypto-simulator-wrapper .crypto-sim-input-group { display: flex; flex-direction: column; }
#crypto-simulator-wrapper .crypto-sim-input-group label {
  font-size: .9em; font-weight: 600; color: #374151; margin-bottom: 6px;
}
#crypto-simulator-wrapper .crypto-sim-input-group input,
#crypto-simulator-wrapper .crypto-sim-input-group select {
  padding: 10px 12px; border: 2px solid #d1d5db; border-radius: 8px;
  font-size: .95em; background: white; font-family: inherit;
  width: 100%; height: 44px; transition: border-color .2s;
}
#crypto-simulator-wrapper .crypto-sim-input-group select {
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 16px; padding-right: 40px;
}
#crypto-simulator-wrapper .crypto-sim-input-group input:focus,
#crypto-simulator-wrapper .crypto-sim-input-group select:focus {
  outline: none; border-color: #1191E5; box-shadow: 0 0 0 3px rgba(17,145,229,.12);
}
#crypto-simulator-wrapper .crypto-sim-custom-days-group { display: none; }

#crypto-simulator-wrapper .crypto-sim-calculate-btn {
  width: 100%; padding: 14px;
  background: #1191E5; color: white;
  border: none; border-radius: 8px;
  font-size: 1em; font-weight: 700; cursor: pointer;
  transition: background .2s, transform .2s; font-family: inherit;
}
#crypto-simulator-wrapper .crypto-sim-calculate-btn:hover {
  background: #0d7acc; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(17,145,229,.3);
}

#crypto-simulator-wrapper .crypto-sim-result-section {
  padding: 28px 24px; background: #f8fafc; display: none;
}
#crypto-simulator-wrapper .crypto-sim-result-header { text-align: center; margin-bottom: 20px; }
#crypto-simulator-wrapper .crypto-sim-result-title { font-size: 1em; color: #6b7280; margin-bottom: 6px; }
#crypto-simulator-wrapper .crypto-sim-result-amount {
  font-size: 2.2em; font-weight: 700; color: #111827; margin-bottom: 8px; line-height: 1.2;
}
#crypto-simulator-wrapper .crypto-sim-result-profit { font-size: 1.1em; font-weight: 600; }
#crypto-simulator-wrapper .crypto-sim-profit-positive { color: #059669; }
#crypto-simulator-wrapper .crypto-sim-profit-negative { color: #dc2626; }

#crypto-simulator-wrapper .crypto-sim-result-details {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-top: 16px;
}
#crypto-simulator-wrapper .crypto-sim-detail-card {
  background: white; padding: 14px; border-radius: 10px; border: 1px solid #e5e7eb; text-align: center;
}
#crypto-simulator-wrapper .crypto-sim-detail-label { font-size: .8em; color: #6b7280; margin-bottom: 4px; font-weight: 500; }
#crypto-simulator-wrapper .crypto-sim-detail-value { font-size: .95em; font-weight: 700; color: #111827; }

#crypto-simulator-wrapper .crypto-sim-dca-summary {
  background: white; padding: 16px; border-radius: 12px; border: 2px solid #1191E5; margin: 16px 0;
}
#crypto-simulator-wrapper .crypto-sim-dca-summary h4 { color: #1191E5; margin: 0 0 10px; font-size: .95em; }
#crypto-simulator-wrapper .crypto-sim-dca-stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px;
}
#crypto-simulator-wrapper .crypto-sim-dca-stat { text-align: center; }
#crypto-simulator-wrapper .crypto-sim-dca-stat-label { font-size: .75em; color: #6b7280; margin-bottom: 3px; }
#crypto-simulator-wrapper .crypto-sim-dca-stat-value { font-weight: 600; color: #111827; font-size: .9em; }

#crypto-simulator-wrapper .crypto-sim-chart-section {
  padding: 24px; border-top: 1px solid #e5e7eb; display: none;
}
#crypto-simulator-wrapper .crypto-sim-chart-title {
  font-size: 1em; font-weight: 600; color: #111827; margin: 0 0 14px; text-align: center;
}
#crypto-simulator-wrapper .crypto-sim-chart-container {
  height: 300px; background: white; border-radius: 8px; border: 1px solid #e5e7eb; min-height: 300px; position: relative;
}

#crypto-simulator-wrapper .crypto-sim-loading {
  text-align: center; padding: 28px; color: #6b7280; background: #f8fafc;
}
#crypto-simulator-wrapper .crypto-sim-loading-spinner {
  width: 28px; height: 28px; border: 3px solid #e5e7eb; border-top: 3px solid #1191E5;
  border-radius: 50%; animation: cryptoSimSpin 1s linear infinite; margin: 0 auto 10px;
}
@keyframes cryptoSimSpin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

#crypto-simulator-wrapper .crypto-sim-error {
  background: #fef2f2; color: #dc2626; padding: 14px; border-radius: 8px;
  margin: 20px; text-align: center; border: 1px solid #fecaca; font-size: .9em;
}

#crypto-simulator-wrapper .crypto-sim-cta-section {
  background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
  padding: 40px 24px; text-align: center; border-top: 1px solid #e5e7eb;
}
#crypto-simulator-wrapper .crypto-sim-cta-content { max-width: 560px; margin: 0 auto; }
#crypto-simulator-wrapper .crypto-sim-cta-title {
  font-size: 1.4em; font-weight: 700; color: #1191E5;
  margin: 0 0 12px; line-height: 1.4; font-family: var(--font-serif);
}
#crypto-simulator-wrapper .crypto-sim-cta-description {
  font-size: 1em; color: #374151; margin-bottom: 20px; line-height: 1.6;
}
#crypto-simulator-wrapper .crypto-sim-cta-highlight { font-weight: 700; color: #1191E5; }
#crypto-simulator-wrapper .crypto-sim-cta-button {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 16px 36px;
  background: #1191E5; color: white;
  text-decoration: none; border-radius: 999px;
  font-size: 1.05em; font-weight: 700; transition: all .3s;
  box-shadow: 0 4px 15px rgba(17,145,229,.3);
}
#crypto-simulator-wrapper .crypto-sim-cta-button:hover {
  background: #0d7acc; transform: translateY(-2px); box-shadow: 0 6px 20px rgba(17,145,229,.4);
}
#crypto-simulator-wrapper .crypto-sim-cta-note {
  font-size: .85em; color: #6b7280; margin-top: 12px; margin-bottom: 0;
}

#crypto-simulator-wrapper .crypto-sim-notice {
  background: #fffbeb; color: #92400e; padding: 14px; border-radius: 8px;
  margin: 20px; font-size: .85em; border: 1px solid #fed7aa;
}

@media (max-width: 640px) {
  .sim-hero { padding: 36px 0 28px; }
  .sim-body { padding: var(--sp-6) 0 var(--sp-12); }
  #crypto-simulator-wrapper .crypto-sim-form-grid { grid-template-columns: 1fr; gap: 12px; }
  #crypto-simulator-wrapper .crypto-sim-header { padding: 24px 16px; }
  #crypto-simulator-wrapper .crypto-sim-header h2 { font-size: 1.3em; }
  #crypto-simulator-wrapper .crypto-sim-form-section { padding: 20px 16px; }
  #crypto-simulator-wrapper .crypto-sim-result-section { padding: 20px 16px; }
  #crypto-simulator-wrapper .crypto-sim-result-amount { font-size: 1.8em; }
  #crypto-simulator-wrapper .crypto-sim-chart-section { padding: 16px; }
  #crypto-simulator-wrapper .crypto-sim-chart-container { height: 260px; min-height: 260px; }
  #crypto-simulator-wrapper .crypto-sim-cta-section { padding: 28px 16px; }
}
