:root {
  --bg-dark: #0f1113;
  --sidebar-bg: #1a1c20;
  --accent-main: #00faac; 
  --accent-blue: #00d1ff;
  --accent-gradient: linear-gradient(135deg, #00faac 0%, #00d1ff 100%);
  --text-main: #e0e0e0;
  --text-dim: #999;
  --card-bg: #25282c;
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  overflow: hidden;
}

.app-container {
  display: flex;
  height: 100vh;
}

/* --- Sidebar --- */
.sidebar {
  width: 260px;
  background-color: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  border-right: 1px solid #333;
  z-index: 1100 !important;
}

.sidebar-header {
  padding: 20px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, #008f68 0%, #01eea3e5 100%);
}

.logo-icon {
  font-size: 1.8rem;
  color: var(--accent-main);
}

.sidebar-header h2 {
  font-size: 1.2rem;
  letter-spacing: 1px;
  font-weight: bold;
  /*
  background: var(--accent-gradient);
  -webkit-text-fill-color: transparent;
  
  background: none; 
  -webkit-text-fill-color: initial; 
  color: #008f68; 
  */
  /* 濃いグリーンから、少し明るいグリーンへのグラデーション */
  /*background: linear-gradient(135deg, #008f68 0%, #00faac 100%);*/

  /* 文字で背景を切り抜く設定 */
  -webkit-background-clip: text;
  background-clip: text;
  
  /* 文字自体の色を透明にする（これで背景のグラデーションが見えるようになります） */
  /*-webkit-text-fill-color: transparent;*/
  color: #e4fcf9; /* フォールバック用 */
  
  /* 視認性をさらに上げるためのドロップシャドウ（必要に応じて） */
  /*filter: drop-shadow(0px 2px 2px rgba(0, 0, 0, 0.3));*/
}

#nav-menu ul {
  list-style: none;
  margin-bottom: 20px;
}

#nav-menu li a {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px 25px;
  color: var(--accent-main);
  text-decoration: none;
  transition: var(--transition);
  font-weight: 500;
}

#nav-menu li.active a,
#nav-menu li a:hover {
  background: rgba(0, 250, 172, 0.1);
  color: var(--accent-blue);
  border-left: 4px solid var(--accent-main);
}

/* --- Hot Spots List (Sidebar scroll area) --- */
#hot-spots-list {
  max-height: 400px;
  overflow-y: auto;
  overflow-x: hidden;
  list-style: none;
}

#hot-spots-list::-webkit-scrollbar {
  width: 6px;
}

#hot-spots-list::-webkit-scrollbar-thumb {
  background: var(--accent-main);
  border-radius: 10px;
}

/* --- Main Content --- */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.top-bar {
  height: 70px;
  background: var(--sidebar-bg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 30px;
  border-bottom: 1px solid #333;
}

#menu-toggle {
  background: none;
  border: none;
  color: var(--accent-main);
  font-size: 1.2rem;
  cursor: pointer;
  display: none;
}

#page-title {
  font-size: 1.5rem;
  font-weight: 600;
}

#content-area {
  flex: 1;
  padding: 20px;
}

/* Responsive */
@media (max-width: 768px) {
  .sidebar { position: fixed; left: -260px; }
  .sidebar.active { left: 0; }
  #menu-toggle { display: block; }
}

/* Dashboard専用追加スタイル (2.0のデザインを継承) */
.loading-overlay {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    color: var(--accent-main);
    font-family: 'Courier New', monospace;
}

#val-potential, #val-demand {
    font-family: 'Share Tech Mono', monospace;
    text-shadow: 0 0 8px rgba(0, 250, 172, 0.6);
}

/* --- Welcome Card Styling --- */
.welcome-card {
    background: linear-gradient(135deg, #25282c 0%, #1a1c20 100%);
    padding: 40px;
    border-radius: 12px;
    border: 1px solid #333;
    
    /* 下の要素（stats-gridなど）との間隔を設定 */
    margin-bottom: 40px; 
    
    /* カード内の要素（h2とボタン）の配置調整 */
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
}

.welcome-card h2 {
    font-size: 1.8rem;
    color: var(--text-main);
    margin: 0;
}

/* Update Data ボタンのデザイン微調整（2.0トーン） */
.refresh-btn {
    padding: 10px 20px;
    background: transparent;
    border: 1px solid var(--accent-main);
    color: var(--accent-main);
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.refresh-btn i {
    font-size: 0.9rem;
}

.refresh-btn:hover {
    background: rgba(0, 250, 172, 0.1);
    color: var(--accent-blue);
    border-color: var(--accent-blue);
    box-shadow: 0 0 15px rgba(0, 250, 172, 0.2);
}

/* ドロップダウンの外枠（矢印アイコンなどの制御用） */
.select-wrapper {
    position: relative;
    width: 100%;
}

/* ドロップダウン本体のスタイル */
.unit-price-select {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid #444;
    color: var(--accent-main);
    font-family: 'Share Tech Mono', monospace;
    font-size: 1.8rem;
    font-weight: bold;
    padding: 10px;
    border-radius: 8px;
    appearance: none; /* ブラウザ標準の矢印を消す */
    cursor: pointer;
    transition: var(--transition);
    text-shadow: 0 0 8px rgba(0, 250, 172, 0.6);
}

.unit-price-select:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 15px rgba(0, 209, 255, 0.2);
}

/* カスタム矢印の追加 */
.select-wrapper::after {
    content: '\f0d7'; /* FontAwesomeの矢印 */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--accent-main);
    pointer-events: none;
}

/* 選択肢（プルダウンの中身）のスタイル */
.unit-price-select option {
    background-color: var(--card-bg);
    color: var(--text-main);
    font-size: 1.2rem;
}

/* --- User Guide Section --- */
.guide-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

.logic-card {
    background: rgba(255, 255, 255, 0.03);
    border-left: 4px solid var(--accent-blue);
    padding: 25px;
    margin-bottom: 25px;
    border-radius: 0 8px 8px 0;
    transition: var(--transition);
}
.logic-card ul {
    list-style: none;
    padding-left: 0;
    margin: 15px 0 0 0;
}

.logic-card li {
    position: relative;
    padding-left: 20px;
    color: var(--text-main);
    font-size: 0.95rem;
    margin-bottom: 8px;
}

.logic-card li::before {
    content: '▶';
    position: absolute;
    left: 0;
    color: var(--accent-main);
    font-size: 0.7rem;
    top: 50%;
    transform: translateY(-50%);
}
.logic-card:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateX(5px);
}

.logic-card h4 {
    color: var(--accent-main);
    margin-top: 0;
    font-size: 1.2rem;
}

/* Formula Box */
.formula-box, .formula-box-highlight {
    background: #111;
    padding: 15px;
    border-radius: 6px;
    font-family: 'Share Tech Mono', monospace;
    margin: 15px 0;
    border: 1px dashed #444;
    text-align: center;
}

.formula-box-highlight {
    border: 1px solid var(--accent-main);
    color: var(--accent-main);
    box-shadow: 0 0 10px rgba(0, 250, 172, 0.1);
    font-size: 1.1rem;
}

.disclaimer-card {
    border-left-color: #ff4b2b; /* 警告色 */
}

.map-instruction-card {
    background: rgba(255, 255, 255, 0.03);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #333;
    margin-bottom: 20px;
    line-height: 1.6;
}

.map-disclaimer {
    color: #ece2e2;
    margin-top: 10px;
    border-top: 1px solid #444;
    padding-top: 10px;
}

#map-container {
    width: 100%;
    height: 600px;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--accent-main);
    box-shadow: 0 0 20px rgba(0, 250, 172, 0.1);
}

#osm-map {
    width: 100%;
    height: 100%;
}

/* 地図を少しダークにするフィルタ（お好みで） */
.map-tiles {
    filter: brightness(0.8) contrast(1.2) saturate(0.8) invert(0.05);
}

/* オーバーレイの基本状態（隠しておく） */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5); /* 画面を少し暗くする */
    z-index: 998; /* サイドバー(999)のすぐ下、コンテンツより上 */
    display: none; /* 通常は非表示 */
    backdrop-filter: blur(2px); /* 2.0らしく少しぼかすとお洒落です */
}

/* サイドバーがアクティブな時だけオーバーレイを表示 */
#sidebar.active ~ .menu-overlay {
    display: block;
}

/* スマホサイズ以外ではオーバーレイを強制非表示 */
@media (min-width: 769px) {
    .menu-overlay {
        display: none !important;
    }
}

/* stats-gridがdisplay: gridであることを想定 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

/* 予測結果カードを強調する */
.results-wide-card {
    grid-column: span 2; /* 2つのカード分の幅を持たせる */
    min-height: 200px;
    background-color: #171b1f;
    border-left: 5px solid #007bff;
}

#sales-results-display table {
    width: 100%;
    font-size: 0.9rem;
}



/* 1. 売上予測結果（サマリー部分）の背景調整 */
.result-summary {
    background-color: #221e1e; /* 背景をグレーに */
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #463f3f;
    margin-top: 10px;
}

/* ラベルの文字をよりはっきりさせる */
.result-summary .label {
    color: #b9b3b3 !important;
}

/* 2. 町丁目別リスト（テーブル）の背景とスタイル調整 */
.dashboard-table {
    background-color: #332c2c; /* テーブル自体は白 */
    border-radius: 8px;
    overflow: hidden;
}

.dashboard-table thead tr {
    background-color: #2b2f33 !important; /* ヘッダー（No, District Name等）を濃い目のグレーに */
    color: #cdd1d4;
}

.dashboard-table tbody tr {
    background-color: #2b2525; /* 各行の基本を薄いグレーに */
}

/* 1行おきに背景色を変えて、さらに見やすくする場合（縞々模様） */
.dashboard-table tbody tr:nth-child(even) {
    background-color: #241f1f; 
}

/* ホバーした時に少し明るくして、どこを見ているか分かりやすくする */
.dashboard-table tbody tr:hover {
    background-color: #292c30;
}