.content {
    padding: 30px;
    background-color: #fff;
    width: 100%;
}

.indicator-title {
    margin-bottom: 10px;
}

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

.filter-container {
    background-color: #ffffff;
    padding: 12px 16px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    font-family: "Noto Sans JP", sans-serif;
}

.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;
}

button {
    padding: 10px 20px;
    font-size: 16px;
    border: none;
    border-radius: 8px;
    background-color: #4f46e5;
    color: white;
    cursor: pointer;
}

button:hover {
    background-color: #4338ca;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backdrop-filter: blur(4px);
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background-color: white;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    min-width: 400px;
    width: 75%;
    max-height: 80vh;
    overflow: hidden;
    position: relative;
}

.close {
    position: absolute;
    top: 16px;
    right: 16px;
    font-size: 24px;
    cursor: pointer;
}

.confirm {
    margin-top: 20px;
    width: 100%;
}

.scroll-container {
    max-height: 60vh;
    overflow-y: auto;
    margin-top: 10px;
    padding-right: 8px; /* スクロールバーとテキストの重なり防止 */
}

.scroll-container::-webkit-scrollbar {
    width: 6px;
}

.scroll-container::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.secondary {
    background-color: #e5e7eb;
    color: #111827;
    border: none;
    padding: 8px 12px;
    margin-bottom: 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
}

.secondary:hover {
    background-color: #d1d5db;
}
.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;
}

/* 年月の単位表示 */
.unit-label {
    margin-right: 8px;
    font-size: 14px;
    color: #555;
}

/* 年月セレクトボックスをまとめる */
.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;
}

/* ラベル補足説明 */
.note {
    font-size: 12px;
    color: #888;
    margin-left: 4px;
}

/* 共通のページスタイル */
.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;
}

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

.table-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;
}

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

.compact-select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background-color: white;
    font-size: 14px;
    min-width: 150px;
    transition: border-color 0.2s;
}

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

.table-container {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    background: white;
}

.compact-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    background: white;
}

.compact-table th {
    background: #f8f9fa;
    color: #2c3e50;
    font-weight: 600;
    padding: 12px 10px;
    text-align: left;
    border-bottom: 2px solid #3498db;
    position: sticky;
    top: 0;
    z-index: 10;
}

.compact-table td {
    padding: 10px;
    border-bottom: 1px solid #eee;
    color: #555;
}

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

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

.compact-table tr:nth-child(even):hover {
    background: #f0f8ff;
}

/* 列幅の設定 */
.date-col { width: 20%; }
.category-col { width: 25%; }
.statistics-col { width: 25%; }
.value-col { width: 15%; text-align: right; }
.unit-col { width: 10%; }

/* テーブル内のセルスタイル */
.date-cell { font-weight: 500; }
.category-cell { color: #2c3e50; font-weight: 500; }
.statistics-cell { color: #1976d2; font-weight: 500; }
.value-cell { font-weight: 600; color: #2c3e50; }
.unit-cell { font-size: 12px; color: #888; }

/* データ活用ガイド */
.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;
}

.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;
}

/* 関連指標リンク */
.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;
}

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

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

@media screen and (max-width: 768px) {
  .content {
    padding: 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%;
  }

  .indicator-title {
    white-space: nowrap;
    font-size: 1.2rem;
  }

  .chart-container {
    height: 80vh;
  }

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

  .table-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .compact-select {
    min-width: auto;
    width: 100%;
  }

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

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

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

  /* モバイルでは列幅を調整 */
  .date-col { width: 20%; }
  .category-col { width: 15%; }
  .statistics-col { width: 20%; }
  .value-col { width: 15%; }
  .unit-col { width: 30%; }
}