:root {
  --primary: #ffcc00;
  --primary-hover: #e6b800;
  --bg-dark: #121212;
  --card-bg: #1e1e1e;
  --card-border: #2c2c2c;
  --text-main: #f0f0f0;
  --text-sub: #a0a0a0;
  --accent-blue: #4ea8de;
}

* {
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg-dark);
  color: var(--text-main);
  margin: 0;
  padding: 16px;
  line-height: 1.6;
}

header {
  text-align: center;
  padding: 24px 0 10px;
}

.header-inner {
  max-width: 700px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.refresh-btn {
  position: absolute;
  right: 0;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-sub);
  border: 1px solid #444;
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.refresh-btn:hover {
  background: #333;
  color: var(--primary);
  border-color: var(--primary);
}

.refresh-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  border-color: #333;
  color: #777;
  background: rgba(255, 255, 255, 0.02);
}

h1 {
  color: var(--primary);
  margin: 0 0 6px;
  font-size: 1.8rem;
  letter-spacing: 0.5px;
}

.subtitle {
  color: var(--text-sub);
  font-size: 0.95rem;
  margin: 0;
}

/* 日付ナビゲーションバー */
.date-nav-container {
  max-width: 700px;
  margin: 20px auto 14px;
  background: #1a1a1a;
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 12px 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.nav-buttons-left,
.nav-buttons-right {
  display: flex;
  gap: 8px;
  align-items: center;
}

.nav-btn {
  background: #282828;
  color: #fff;
  border: 1px solid #3e3e3e;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  user-select: none;
}

.nav-btn:hover {
  background: #353535;
  border-color: var(--primary);
  color: var(--primary);
}

.nav-btn.today-btn {
  background: var(--primary);
  color: #121212;
  font-weight: bold;
  border-color: var(--primary);
}

.nav-btn.today-btn:hover {
  background: var(--primary-hover);
}

.date-center {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
}

.date-picker-input {
  background: #242424;
  color: #fff;
  border: 1px solid #444;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  color-scheme: dark;
  cursor: pointer;
}

.date-picker-input:hover,
.date-picker-input:focus {
  border-color: var(--primary);
  outline: none;
}

.today-tag {
  background: rgba(255, 204, 0, 0.15);
  color: var(--primary);
  border: 1px solid rgba(255, 204, 0, 0.4);
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: bold;
}

.day-badge {
  font-size: 0.9rem;
  font-weight: bold;
  padding: 2px 6px;
  border-radius: 4px;
}

.day-sat { color: #5dade2; }
.day-sun { color: #f1948a; }

/* 検索 & フィルターバー */
.filter-container {
  max-width: 700px;
  margin: 0 auto 20px;
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.search-box {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
}

.search-box input {
  width: 100%;
  background: #1a1a1a;
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 10px 38px 10px 14px;
  color: #fff;
  font-size: 0.92rem;
  font-family: inherit;
  transition: border-color 0.2s, background 0.2s;
}

.search-box input:focus {
  border-color: var(--primary);
  background: #202020;
  outline: none;
}

.search-box input::placeholder {
  color: #777;
}

.clear-btn {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  color: var(--text-sub);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 4px 6px;
  line-height: 1;
}

.clear-btn:hover {
  color: #fff;
}

/* 会場ドロップダウン */
.venue-select-container {
  min-width: 200px;
  position: relative;
  display: flex;
  align-items: center;
}

.venue-dropdown {
  width: 100%;
  background: #1a1a1a;
  color: #fff;
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 10px 36px 10px 14px;
  font-size: 0.9rem;
  font-family: inherit;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffcc00' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 14px;
  transition: border-color 0.2s, background-color 0.2s;
}

.venue-dropdown:hover,
.venue-dropdown:focus {
  border-color: var(--primary);
  background-color: #222222;
  outline: none;
}

.venue-dropdown option {
  background: #1e1e1e;
  color: #fff;
  padding: 10px;
}

/* ライブ一覧 */
#list {
  max-width: 700px;
  margin: 0 auto 40px;
}

.count-info {
  color: var(--text-sub);
  font-size: 0.85rem;
  margin-bottom: 12px;
  text-align: right;
}

.live-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-left: 5px solid var(--primary);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.live-card:hover {
  transform: translateY(-2px);
  border-color: #444;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.card-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.card-date-badge {
  background: var(--primary);
  color: #121212;
  font-weight: 700;
  font-size: 0.8rem;
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: 0.3px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.search-banner {
  max-width: 700px;
  margin: 0 auto 12px;
  background: rgba(255, 204, 0, 0.1);
  border: 1px solid rgba(255, 204, 0, 0.3);
  border-radius: 10px;
  padding: 8px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.88rem;
  color: var(--primary);
}

.exit-search-btn {
  background: #2a2a2a;
  color: #f0f0f0;
  border: 1px solid #444;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.exit-search-btn:hover {
  background: #383838;
  border-color: var(--primary);
  color: var(--primary);
}

.venue {
  color: var(--primary);
  font-weight: bold;
  font-size: 1rem;
  margin: 0;
}

.time-badge {
  background: #2a2a2a;
  color: #e0e0e0;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.5px;
}

.time-badge-tba {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-sub);
  font-size: 0.8rem;
  border: 1px dashed rgba(255, 255, 255, 0.15);
}

.live-title {
  font-size: 1.25rem;
  margin: 6px 0 12px;
  color: #ffffff;
  line-height: 1.4;
}

.artist-box {
  background: #171717;
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 14px;
  font-size: 0.92rem;
  color: #ddd;
}

.artist-label {
  color: var(--text-sub);
  font-size: 0.78rem;
  display: block;
  margin-bottom: 2px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.card-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-top: 10px;
}

.ticket-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #242f3d;
  color: var(--accent-blue);
  border: 1px solid #33475b;
  padding: 8px 16px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  transition: all 0.2s ease;
}

.ticket-btn:hover {
  background: #2d3d52;
  border-color: var(--accent-blue);
  color: #fff;
}

/* サーキットフェス専用スタイル */
.circuit-notice {
  background: linear-gradient(135deg, rgba(30, 48, 80, 0.6) 0%, rgba(20, 32, 55, 0.8) 100%);
  border: 1px solid rgba(78, 168, 222, 0.4);
  border-left: 4px solid var(--accent-blue);
  border-radius: 8px;
  padding: 10px 14px;
  margin: 10px 0 12px;
}

.circuit-notice-content {
  width: 100%;
}

.circuit-badge {
  display: inline-block;
  background: rgba(78, 168, 222, 0.25);
  color: #70c4f8;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: 4px;
  letter-spacing: 0.5px;
}

.circuit-text {
  color: #c8d8ea;
  font-size: 0.84rem;
  line-height: 1.5;
  margin: 0;
}

.ticket-btn.circuit-btn {
  background: linear-gradient(135deg, #24466b 0%, #1a324d 100%);
  border-color: #4ea8de;
  color: #9fe0ff;
  font-weight: bold;
}

.ticket-btn.circuit-btn:hover {
  background: #315e91;
  border-color: #70c4f8;
  color: #fff;
  box-shadow: 0 2px 10px rgba(78, 168, 222, 0.3);
}

.message {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-sub);
  font-size: 1rem;
}

.empty-state {
  text-align: center;
  padding: 50px 20px;
  background: #181818;
  border-radius: 12px;
  border: 1px dashed #333;
}

.empty-title {
  font-size: 1.1rem;
  font-weight: bold;
  color: #ccc;
  margin: 0 0 6px;
}

.empty-desc {
  color: var(--text-sub);
  font-size: 0.88rem;
  margin: 0;
}

/* エリア選択タブバー */
.area-tab-container {
  max-width: 700px;
  margin: 0 auto 16px;
  display: flex;
  gap: 8px;
  justify-content: center;
  padding: 4px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--card-border);
  border-radius: 12px;
}

.area-tab {
  flex: 1;
  max-width: 220px;
  background: transparent;
  color: var(--text-sub);
  border: none;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.area-tab:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.area-tab.active {
  background: var(--primary);
  color: #121212;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

@media (max-width: 600px) {
  .area-tab-container {
    gap: 4px;
    padding: 3px;
  }
  .area-tab {
    font-size: 0.8rem;
    padding: 6px 8px;
  }
  .filter-container {
    flex-direction: column;
  }
  .venue-select-container {
    width: 100%;
  }
  .date-nav-container {
    justify-content: center;
  }
  .card-header {
    flex-direction: column;
    gap: 6px;
  }
  .time-badge {
    align-self: flex-start;
  }
}

/* ==========================================================================
   広告枠 (Google AdSense / スポンサーリンク) スタイル
   ========================================================================== */
.promo-container,
.ad-container {
  max-width: 700px;
  margin: 16px auto 20px;
  text-align: center;
  padding: 0 10px;
}

.promo-label,
.ad-label {
  font-size: 0.72rem;
  color: var(--text-sub);
  letter-spacing: 0.8px;
  margin-bottom: 6px;
  text-transform: uppercase;
  opacity: 0.8;
}

.promo-slot,
.ad-slot {
  width: 100%;
  min-height: 80px;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* トップバナー枠 */
.top-promo-container,
.top-ad-container {
  margin: 12px auto 20px;
  padding: 12px 14px;
  background: #181c22;
  border: 1px dashed rgba(255, 255, 255, 0.2);
  border-radius: 10px;
}

/* インフィード広告カード (ライブカード一覧の途中に挿入) */
.infeed-promo-card,
.infeed-ad-card {
  background: linear-gradient(145deg, #181c22 0%, #13161a 100%);
  border: 1px dashed rgba(78, 168, 222, 0.35);
  border-radius: 12px;
  padding: 18px 20px;
  margin-bottom: 20px;
  position: relative;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.infeed-promo-card .promo-label,
.infeed-ad-card .ad-label {
  display: inline-block;
  background: rgba(78, 168, 222, 0.15);
  color: #70c4f8;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 4px;
  margin-bottom: 12px;
}

/* プレースホルダー表示 (AdSense配信前) */
.promo-placeholder,
.ad-placeholder {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 16px 12px;
  color: var(--text-sub);
}

.promo-placeholder-title,
.ad-placeholder-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: #90cdf4;
}

.promo-placeholder-desc,
.ad-placeholder-desc {
  font-size: 0.78rem;
  color: #a0aec0;
  line-height: 1.4;
}

/* ==========================================================================
   フッター & プライバシーポリシーモーダル
   ========================================================================== */
.site-footer {
  max-width: 700px;
  margin: 40px auto 20px;
  padding: 24px 16px 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.footer-link-btn {
  background: none;
  border: none;
  color: var(--text-sub);
  font-size: 0.82rem;
  cursor: pointer;
  text-decoration: underline;
  transition: color 0.2s;
  padding: 4px 8px;
}

.footer-link-btn:hover {
  color: var(--primary);
}

.copyright {
  font-size: 0.78rem;
  color: #555;
  margin: 0;
}

/* モーダル */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 16px;
}

.modal-content {
  background: #1c2026;
  border: 1px solid var(--card-border);
  border-radius: 14px;
  max-width: 640px;
  width: 100%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-header h3 {
  margin: 0;
  font-size: 1.1rem;
  color: #fff;
}

.modal-close-btn {
  background: none;
  border: none;
  color: var(--text-sub);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}

.modal-close-btn:hover {
  color: #fff;
}

.modal-body {
  padding: 20px;
  overflow-y: auto;
  font-size: 0.86rem;
  line-height: 1.7;
  color: #c0c6cf;
}

.modal-body h4 {
  color: #fff;
  margin: 16px 0 6px;
  font-size: 0.96rem;
}

.modal-body h4:first-child {
  margin-top: 0;
}

.modal-body p {
  margin: 0 0 10px;
}

.modal-body ul {
  padding-left: 20px;
  margin: 0 0 12px;
}

.contact-form-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #2b6cb0 0%, #1a4971 100%);
  color: #fff;
  border: 1px solid #4ea8de;
  padding: 10px 22px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.2s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.contact-form-btn:hover {
  background: linear-gradient(135deg, #3182ce 0%, #2b6cb0 100%);
  border-color: #63b3ed;
  color: #fff;
  transform: translateY(-1px);
}
