.investment-simulation {
  max-width: 1200px;
  margin: 20px auto;
  padding: 20px;
  background: #fff;
  box-shadow: 0 1px 0 0 rgba(0,0,0,0.1);
  border-radius: 8px;
  border: 1px solid #ddd;
}

.simulation-header {
  margin-bottom: 30px;
}

.simulation-header h2 {
  color: #333;
  margin-bottom: 10px;
  font-size: 24px;
  font-weight: bold;
}

.simulation-header h2 i {
  margin-right: 10px;
  color: #10bdc2;
}

.simulation-description {
  color: #666;
  line-height: 1.6;
  margin-bottom: 20px;
}

.simulation-tabs {
  display: flex;
  border-bottom: 3px solid #10bdc2;
  margin-bottom: 20px;
}

.tab-button {
  background: #f5f5f5;
  border: none;
  padding: 12px 24px;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  border-radius: 8px 8px 0 0;
  margin-right: 5px;
  transition: background-color 0.3s;
}

.tab-button.active {
  background: #10bdc2;
  color: white;
}

.tab-button:hover {
  background: #108d92;
  color: white;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.tab-description {
  margin-bottom: 20px;
  color: #666;
  line-height: 1.6;
}

.simulation-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.simulation-form {
  margin-bottom: 20px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.form-group {
  margin-bottom: 15px;
}

.form-label {
  display: block;
  font-weight: bold;
  margin-bottom: 5px;
  color: #333;
}

.note {
  font-size: 0.8em;
  color: #999;
  font-weight: normal;
}

.input-group {
  display: flex;
  border: 1px solid #ddd;
  border-radius: 4px;
  overflow: hidden;
  width: 100%;
  max-width: 180px;
  min-width: 120px;
}

.input-group-fixed {
  display: flex;
  border: 1px solid #ddd;
  border-radius: 4px;
  overflow: hidden;
  width: 100%;
  max-width: 160px;
  min-width: 100px;
}

.input-group input,
.input-group-fixed input {
  flex: 1;
  padding: 12px;
  border: none;
  font-size: 16px;
  text-align: right;
  outline: none;
}

.input-group input:focus,
.input-group-fixed input:focus {
  box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.2);
}

.input-suffix {
  background: #10bdc2;
  color: white;
  padding: 12px 15px;
  font-weight: bold;
  min-width: 55px;
  text-align: center;
  white-space: nowrap;
}

.input-fixed-width {
  width: 100%;
  max-width: 120px;
  min-width: 80px;
  padding: 12px;
  border: none;
  font-size: 16px;
  text-align: right;
  outline: none;
}

.input-fixed-width:focus {
  box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.2);
}

.error-message {
  color: #e74c3c;
  font-size: 12px;
  margin-top: 5px;
  min-height: 16px;
  display: block;
}

.form-group.has-error .input-group,
.form-group.has-error .input-group-fixed {
  border-color: #e74c3c;
}

.form-group.has-error .input-group input,
.form-group.has-error .input-group-fixed input,
.form-group.has-error .input-fixed-width {
  border-color: #e74c3c;
}

.form-group.has-error .input-group input:focus,
.form-group.has-error .input-group-fixed input:focus,
.form-group.has-error .input-fixed-width:focus {
  box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.2);
}

.result-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><text y="90" font-size="60">📊</text></svg>') right bottom no-repeat;
  background-size: 80px auto;
  min-height: 200px;
  padding: 20px;
}

.result-box {
  background: #ff6b35;
  color: white;
  padding: 20px 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 15px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.result-number {
  font-size: 32px;
  font-weight: bold;
  margin-right: 5px;
}

.result-unit {
  font-size: 20px;
  font-weight: bold;
}

.result-text {
  text-align: center;
  font-weight: bold;
  font-size: 18px;
  color: #333;
}

.result-text-container {
  text-align: center;
  font-weight: bold;
  font-size: 18px;
  color: #333;
}

.result-amount {
  display: inline-block;
  background: #ff6b35;
  color: white;
  padding: 15px 30px;
  margin: 10px;
  border-radius: 8px;
  font-size: 20px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.recommend-text {
  margin-top: 15px;
  font-size: 16px;
}

.recommend-link {
  color: #10bdc2;
  text-decoration: none;
  font-weight: bold;
}

.recommend-link:hover {
  text-decoration: underline;
}

/* チャートセクション */
.chart-section {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 20px;
}

.chart-container {
  position: relative;
  height: 400px;
  width: 100%;
}

.chart-container canvas {
  width: 100% !important;
  height: 100% !important;
}

/* 数値入力フィールドのスピンボタンを非表示 */
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;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
  .simulation-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .chart-container {
    height: 300px;
  }

  .result-section {
    min-height: 150px;
    background-size: 60px auto;
  }

  .result-box {
    padding: 15px 20px;
  }

  .result-number {
    font-size: 24px;
  }

  .result-unit {
    font-size: 16px;
  }
}

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

  .input-group,
  .input-group-fixed {
    max-width: none;
    min-width: auto;
  }

  .input-fixed-width {
    max-width: none;
    min-width: auto;
  }

  .form-group {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }

  .form-label {
    margin-bottom: 8px;
  }
}

/* 記事コンテンツセクション */
.simulation-content-section {
  max-width: 1200px;
  margin: 40px auto 20px;
}

.simulation-article {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 30px;
  box-shadow: 0 1px 0 0 rgba(0,0,0,0.1);
}

.simulation-article-title {
  color: #333;
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #10bdc2;
}

.simulation-article-content {
  line-height: 1.8;
  color: #333;
}

.simulation-article-content h2 {
  color: #333;
  font-size: 20px;
  font-weight: bold;
  margin: 10px 0 15px;
  padding-left: 10px;
  border-left: 4px solid #10bdc2;
}

.simulation-article-content h3 {
  color: #333;
  font-size: 18px;
  font-weight: bold;
  margin: 25px 0 12px;
  border-left: 4px solid #10bdc2;
}

.simulation-article-content p {
  margin-bottom: 15px;
}

.simulation-article-content ul,
.simulation-article-content ol {
  margin: 15px 0;
  padding-left: 25px;
}

.simulation-article-content li {
  margin-bottom: 8px;
}

.simulation-article-content a {
  color: #10bdc2;
  text-decoration: none;
}

.simulation-article-content a:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {
  .simulation-content-section {
    margin: 30px auto 20px;
    padding: 0 15px;
  }

  .simulation-article {
    padding: 20px;
  }

  .simulation-article-title {
    font-size: 20px;
  }

  .simulation-article-content h2 {
    font-size: 18px;
  }

  .simulation-article-content h3 {
    font-size: 16px;
  }
}