
.content {
  padding: 30px;
  background-color: #fafafa;
  min-height: calc(100vh - 200px);
}

/* 指標説明セクション */
.indicator-explanation {
  background: white;
  border-radius: 12px;
  padding: 30px;
  margin-bottom: 30px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.indicator-title {
  color: #2c3e50;
  font-size: 1.8em;
  font-weight: 600;
  margin-bottom: 20px;
  border-bottom: 3px solid #3498db;
  padding-bottom: 10px;
}

.explanation-summary {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 8px;
  border-left: 4px solid #3498db;
  margin-bottom: 25px;
}

.explanation-summary p {
  color: #555;
  font-size: 1.1em;
  line-height: 1.7;
  margin: 0;
}

.explanation-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.detail-item {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 8px;
  border: 2px solid transparent;
  transition: all 0.3s ease;
}

.detail-item:hover {
  background: #e3f2fd;
  border-color: #3498db;
  transform: translateY(-2px);
}

.detail-item h3 {
  color: #2c3e50;
  font-size: 1.1em;
  font-weight: 600;
  margin: 0 0 10px 0;
}

.detail-item p {
  color: #666;
  line-height: 1.6;
  margin: 0;
}

/* チャートセクション */
.chart-section {
  background: white;
  border-radius: 12px;
  padding: 30px;
  margin-bottom: 30px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.chart-container {
  width: 100%;
  height: 700px;
  max-height: 1000px;
}

/* データ活用ガイド */
.usage-guide {
  background: white;
  border-radius: 12px;
  padding: 30px;
  margin-bottom: 30px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.usage-guide h2 {
  color: #2c3e50;
  font-size: 1.5em;
  font-weight: 600;
  text-align: center;
  margin-bottom: 25px;
  border-bottom: 3px solid #3498db;
  padding-bottom: 10px;
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.guide-item {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 8px;
  border: 2px solid transparent;
  transition: all 0.3s ease;
}

.guide-item:hover {
  background: #e3f2fd;
  border-color: #3498db;
  transform: translateY(-2px);
}

.guide-item h3 {
  color: #2c3e50;
  font-size: 1.1em;
  font-weight: 600;
  margin: 0 0 10px 0;
}

.guide-item p {
  color: #666;
  line-height: 1.6;
  margin: 0;
}

/* 関連指標リンク */
.related-indicators {
  background: white;
  border-radius: 12px;
  padding: 30px;
  margin-bottom: 30px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.related-indicators h2 {
  color: #2c3e50;
  font-size: 1.5em;
  font-weight: 600;
  text-align: center;
  margin-bottom: 25px;
  border-bottom: 3px solid #3498db;
  padding-bottom: 10px;
}

.indicator-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 15px;
}

.indicator-link {
  display: block;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 8px;
  text-decoration: none;
  border: 2px solid transparent;
  transition: all 0.3s ease;
}

.indicator-link:hover {
  background: #e3f2fd;
  border-color: #3498db;
  transform: translateY(-2px);
}

.link-title {
  display: block;
  font-weight: 600;
  color: #2c3e50;
  font-size: 1.1em;
  margin-bottom: 5px;
}

.link-desc {
  display: block;
  color: #666;
  font-size: 0.9em;
  line-height: 1.4;
}

/* データソースセクション */
.data-source-section {
  background: white;
  border-radius: 12px;
  padding: 30px;
  margin-bottom: 30px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.data-source-section h2 {
  color: #2c3e50;
  font-size: 1.5em;
  font-weight: 600;
  text-align: center;
  margin-bottom: 25px;
  border-bottom: 3px solid #3498db;
  padding-bottom: 10px;
}

.data-source-info {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 8px;
  border-left: 4px solid #3498db;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.source-detail {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.source-label {
  font-weight: 600;
  color: #2c3e50;
  font-size: 0.95em;
  min-width: 80px;
}

.source-value {
  color: #555;
  font-size: 0.95em;
}

.source-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #3498db;
  text-decoration: none;
  font-size: 0.95em;
  font-weight: 500;
  padding: 8px 12px;
  background: white;
  border-radius: 6px;
  border: 1px solid #3498db;
  transition: all 0.3s ease;
}

.source-link:hover {
  background: #3498db;
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(52, 152, 219, 0.3);
}

.external-link-icon {
  transition: transform 0.3s ease;
}

.source-link:hover .external-link-icon {
  transform: translateX(2px) translateY(-2px);
}

.notation {
  text-align: center;
  padding: 20px;
  background: white;
  border-radius: 8px;
  margin-top: 20px;
}

.notation p {
  color: #666;
  font-size: 0.9em;
  margin: 0;
}


.filter-container label {
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.filter-container input[type="date"] {
    padding: 6px 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    background-color: #f9fcff;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s;
}

.filter-container input[type="date"]:focus {
    outline: none;
    border-color: #4a90e2;
}

.filter-container button {
    background-color: #4a90e2;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 6px 14px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.filter-container button:hover {
    background-color: #357ab8;
}

.date-range-group {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background-color: #f0f4ff; /* 薄い青で強調 */
    border-radius: 8px;
}

.date-range-group label {
    font-weight: bold;
    color: #333;
    margin-right: 6px;
}

.date-range-group select,
.date-range-group button {
    padding: 4px 8px;
    font-size: 14px;
    border-radius: 6px;
}

.date-range-group span {
    font-weight: bold;
    margin: 0 6px;
}

/* 年月セレクトボックスをまとめる */
.date-select-block {
    display: flex;
    align-items: center;
    gap: 4px;
}

.select-highlight {
    background-color: #f9fcff;
    border: 1px solid #bbb;
    padding: 6px;
    border-radius: 6px;
    transition: border-color 0.2s ease;
}

.select-highlight:hover,
.select-highlight:focus {
    border-color: #4a90e2;
}

@media screen and (max-width: 768px) {
  .content {
    padding: 15px;
  }

  .indicator-explanation,
  .chart-section,
  .usage-guide,
  .related-indicators,
  .data-source-section {
    padding: 20px;
    margin-bottom: 20px;
  }

  .indicator-title {
    font-size: 1.4em;
  }

  .explanation-details,
  .guide-grid,
  .indicator-links {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .filter-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 1em;
  }

  .date-range-group {
    flex-wrap: wrap;
    justify-content: flex-start;
    width: 100%;
  }

  .select-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .select-wrapper label {
    margin-top: 8px;
  }

  .select-wrapper select {
    width: 100%;
  }

  .chart-container {
    height: 60vh;
  }
}

/* コンパクトテーブルセクション */
.table-section {
  background: white;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 30px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.table-section h2 {
  color: #2c3e50;
  font-size: 1.3em;
  font-weight: 600;
  margin-bottom: 15px;
  border-bottom: 2px solid #3498db;
  padding-bottom: 8px;
}

.table-controls {
  margin-bottom: 15px;
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.compact-select {
  padding: 6px 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: white;
  color: #333;
  font-size: 13px;
  min-width: 140px;
  transition: border-color 0.2s ease;
}

.compact-select:focus {
  border-color: #3498db;
  outline: none;
  box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.1);
}

.table-container {
  overflow-x: auto;
  border: 1px solid #e1e5e9;
  border-radius: 4px;
  max-height: 500px;
  overflow-y: auto;
}

.compact-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  font-size: 13px;
  line-height: 1.4;
}

.compact-table thead {
  background: #f8f9fa;
  color: #495057;
  position: sticky;
  top: 0;
  z-index: 10;
}

.compact-table th {
  padding: 8px 12px;
  text-align: left;
  font-weight: 600;
  font-size: 12px;
  border-bottom: 2px solid #dee2e6;
  border-right: 1px solid #dee2e6;
}

.compact-table th:last-child {
  border-right: none;
}

.year-col { width: 80px; }
.category-col { width: auto; }
.value-col { 
  width: 100px; 
  text-align: right;
}
.rate-col { 
  width: 90px; 
  text-align: right;
}

.compact-table tbody tr {
  border-bottom: 1px solid #f1f3f4;
  transition: background-color 0.15s ease;
}

.compact-table tbody tr:hover {
  background-color: #f8f9fa;
}

.compact-table tbody tr:nth-child(even) {
  background-color: #fdfdfd;
}

.compact-table td {
  padding: 6px 12px;
  color: #333;
  border-right: 1px solid #f1f3f4;
  vertical-align: middle;
}

.compact-table td:last-child {
  border-right: none;
}

.year-cell {
  font-weight: 500;
  color: #495057;
  text-align: center;
}

.category-cell {
  color: #333;
  font-size: 12px;
}

.value-cell {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  color: #2c3e50;
}

.rate-cell {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-size: 12px;
}

.rate-value {
  font-weight: 500;
  padding: 2px 6px;
  border-radius: 3px;
  display: inline-block;
  min-width: 40px;
}

.rate-value.positive {
  color: #27ae60;
  background: rgba(39, 174, 96, 0.1);
}

.rate-value.negative {
  color: #e74c3c;
  background: rgba(231, 76, 60, 0.1);
}

.rate-na {
  color: #95a5a6;
  font-style: italic;
}

/* フィルタ適用時の非表示行 */
.compact-table tbody tr.hidden {
  display: none;
}

@media screen and (max-width: 480px) {
  .content {
    padding: 10px;
  }

  .indicator-explanation,
  .usage-guide,
  .chart-section,
  .related-indicators,
  .table-section,
  .data-source-section {
    padding: 15px;
  }

  .source-detail {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .source-label {
    min-width: auto;
    font-size: 0.9em;
  }

  .source-value {
    font-size: 0.9em;
  }

  .source-link {
    font-size: 0.9em;
    padding: 6px 10px;
  }

  .indicator-title {
    font-size: 1.2em;
  }

  .explanation-summary {
    padding: 15px;
  }

  .detail-item,
  .guide-item {
    padding: 15px;
  }

  .chart-container {
    height: 50vh;
  }

  .table-filters {
    flex-direction: column;
    align-items: stretch;
    gap: 15px;
  }

  .table-filters label {
    flex-direction: column;
  }

  .table-filters select {
    min-width: 100%;
  }

  .data-table {
    font-size: 12px;
  }

  .data-table th,
  .data-table td {
    padding: 8px 6px;
  }

  .data-table th {
    font-size: 12px;
  }
}

/* データ更新日時スタイル */
.data-timestamp {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 12px;
  padding: 15px 20px;
  margin-bottom: 25px;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
  position: relative;
  overflow: hidden;
}

.data-timestamp::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, rgba(255,255,255,0.1) 0%, transparent 50%);
  pointer-events: none;
}

.timestamp-content {
  display: flex;
  align-items: center;
  gap: 10px;
  color: white;
  font-weight: 500;
  position: relative;
  z-index: 1;
}

.timestamp-icon {
  font-size: 1.2em;
  margin-right: 5px;
}

.timestamp-label {
  font-size: 0.95em;
  opacity: 0.9;
}

.timestamp-value {
  font-size: 1.05em;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.15);
  padding: 4px 12px;
  border-radius: 20px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

@media screen and (max-width: 768px) {
  .data-timestamp {
    padding: 12px 15px;
    margin-bottom: 20px;
  }
  
  .timestamp-content {
    gap: 8px;
    font-size: 0.9em;
  }
  
  .timestamp-icon {
    font-size: 1.1em;
  }
  
  .timestamp-value {
    font-size: 0.95em;
    padding: 3px 10px;
  }
}
