/* ============================================
   競馬AI予想 スタイルシート
   ============================================
   このファイルを編集してデザインを変更できます
*/

/* --------------------------------------------
   CSS変数（config.yamlの値を反映）
   -------------------------------------------- */
:root {
  --primary: #2563eb;
  --secondary: #059669;
  --accent: #f59e0b;
  --background: #f8fafc;
  --card-bg: #ffffff;
  --text: #1e293b;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --shadow: 0 1px 3px rgba(0,0,0,0.1);
  --shadow-lg: 0 4px 6px rgba(0,0,0,0.1);
  --radius: 12px;
}

/* --------------------------------------------
   ベーススタイル
   -------------------------------------------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Hiragino Sans', sans-serif;
  background: var(--background);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* --------------------------------------------
   ヘッダー
   -------------------------------------------- */
header {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
  margin-bottom: 30px;
}

header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 15px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.5em;
  font-weight: 700;
  color: var(--text);
}

.logo-icon {
  font-size: 1.3em;
}

/* --------------------------------------------
   ナビゲーション
   -------------------------------------------- */
nav {
  display: flex;
  gap: 5px;
}

nav a {
  padding: 8px 20px;
  border-radius: 25px;
  font-weight: 500;
  transition: all 0.2s;
  color: var(--text-muted);
}

nav a:hover {
  background: var(--background);
  color: var(--primary);
  text-decoration: none;
}

nav a.active {
  background: var(--primary);
  color: white;
}

/* --------------------------------------------
   お知らせ
   -------------------------------------------- */
.notices {
  background: linear-gradient(135deg, #eff6ff 0%, #f0fdf4 100%);
  border: 1px solid #bfdbfe;
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 25px;
}

.notices h2 {
  font-size: 1em;
  color: var(--primary);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.notice-item {
  display: flex;
  gap: 15px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--border);
}

.notice-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.notice-date {
  color: var(--text-muted);
  font-size: 0.85em;
  white-space: nowrap;
}

.notice-text {
  font-size: 0.95em;
}

/* --------------------------------------------
   カード
   -------------------------------------------- */
.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 25px;
  margin-bottom: 25px;
  border: 1px solid var(--border);
}

.card h2 {
  font-size: 1.25em;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.card h3 {
  font-size: 1.1em;
  color: var(--text);
  margin: 20px 0 10px;
}

/* --------------------------------------------
   テーブル
   -------------------------------------------- */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 15px 0;
}

th, td {
  padding: 12px 10px;
  text-align: left;
}

th {
  background: var(--background);
  font-weight: 600;
  font-size: 0.85em;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

td {
  border-bottom: 1px solid var(--border);
}

tr:hover td {
  background: #f8fafc;
}

/* --------------------------------------------
   予想の印
   -------------------------------------------- */
.mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-weight: bold;
  font-size: 1.1em;
}

.mark-1 { background: #fef2f2; color: #e74c3c; }
.mark-2 { background: #fff7ed; color: #e67e22; }
.mark-3 { background: #f0fdf4; color: #27ae60; }
.mark-4 { background: #eff6ff; color: #3498db; }
.mark-5 { background: #faf5ff; color: #9b59b6; }

/* --------------------------------------------
   スコアバッジ
   -------------------------------------------- */
.score {
  display: inline-block;
  background: linear-gradient(135deg, var(--primary), #3b82f6);
  color: white;
  padding: 4px 12px;
  border-radius: 15px;
  font-size: 0.85em;
  font-weight: 600;
}

/* --------------------------------------------
   買い目ボックス
   -------------------------------------------- */
.buy-suggestion {
  background: #fffbeb;
  border: 1px solid #fcd34d;
  border-radius: 8px;
  padding: 15px 20px;
  margin-top: 20px;
}

.buy-suggestion h4 {
  color: var(--accent);
  font-size: 0.95em;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.buy-suggestion p {
  font-size: 0.95em;
  color: var(--text);
}

/* --------------------------------------------
   的中バッジ
   -------------------------------------------- */
.hit-badge {
  display: inline-block;
  background: var(--secondary);
  color: white;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 0.8em;
  font-weight: 600;
}

.hit-list {
  list-style: none;
}

.hit-list li {
  padding: 15px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.hit-list li:last-child {
  border-bottom: none;
}

.hit-race {
  font-weight: 500;
}

.hit-date {
  color: var(--text-muted);
  font-size: 0.9em;
}

/* --------------------------------------------
   日付リスト
   -------------------------------------------- */
.date-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 15px 0;
}

.date-list a {
  padding: 10px 18px;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.2s;
}

.date-list a:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  text-decoration: none;
}

/* --------------------------------------------
   フッター
   -------------------------------------------- */
footer {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
  font-size: 0.9em;
  border-top: 1px solid var(--border);
  margin-top: 40px;
}

footer p {
  margin: 5px 0;
}

/* --------------------------------------------
   レスポンシブ
   -------------------------------------------- */
@media (max-width: 600px) {
  header .container {
    flex-direction: column;
    text-align: center;
  }
  
  nav {
    width: 100%;
    justify-content: center;
  }
  
  .card {
    padding: 20px 15px;
  }
  
  table {
    font-size: 0.9em;
  }
  
  th, td {
    padding: 10px 6px;
  }
  
  .notice-item {
    flex-direction: column;
    gap: 5px;
  }
  
  .hit-list li {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* --------------------------------------------
   空の状態
   -------------------------------------------- */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}

.empty-state p {
  margin: 10px 0;
}
