/* ===================================
   Theme: Modern — ミニマル・フラット
   =================================== */

html[data-theme="modern"] {
  /* Colors — GitHub Dark inspired, blue accent */
  --color-bg: #0d1117;
  --color-bg-light: #161b22;
  --color-surface: #21262d;
  --color-surface-light: rgba(33, 38, 45, 0.92);
  --color-primary: #58a6ff;
  --color-primary-hover: #79c0ff;
  --color-secondary: #3fb950;
  --color-secondary-hover: #56d364;
  --color-text: #f0f6fc;
  --color-text-dim: #8b949e;
  --color-text-dark: #c9d1d9;
  --color-accent-gold: #58a6ff;
  --color-border: rgba(88, 166, 255, 0.15);
  --color-success: #3fb950;
  --color-warning: #d29922;
  --color-danger: #f85149;

  /* Typography — clean sans-serif */
  --font-main: 'Segoe UI', 'Noto Sans JP', -apple-system, sans-serif;
  --font-title: 'Segoe UI', 'Noto Sans JP', -apple-system, sans-serif;

  /* Spacing — slightly more breathing room */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;

  /* Shadows — subtle */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 3px 8px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 6px 20px rgba(0, 0, 0, 0.35);
}

/* --- Title Screen --- */
html[data-theme="modern"] .title-slideshow::after {
  background: radial-gradient(ellipse at center, rgba(13, 17, 23, 0.5) 0%, rgba(13, 17, 23, 0.85) 100%);
}

html[data-theme="modern"] .game-title {
  font-weight: 300;
  letter-spacing: 0.1em;
  text-shadow: none;
  font-size: 2.8rem;
}

html[data-theme="modern"] .game-subtitle {
  letter-spacing: 0.15em;
  font-size: 0.95rem;
}

/* --- Buttons — flat, no border glow --- */
html[data-theme="modern"] .btn {
  border: none;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: background 0.15s ease, transform 0.1s ease;
}

html[data-theme="modern"] .btn:active {
  transform: scale(0.97);
}

html[data-theme="modern"] .btn-primary {
  background: var(--color-primary);
  color: #0d1117;
}

html[data-theme="modern"] .btn-primary:hover:not(:disabled) {
  background: var(--color-primary-hover);
}

html[data-theme="modern"] .btn-secondary {
  background: rgba(88, 166, 255, 0.12);
  color: var(--color-primary);
  border: 1px solid rgba(88, 166, 255, 0.25);
}

html[data-theme="modern"] .btn-secondary:hover {
  background: rgba(88, 166, 255, 0.2);
}

html[data-theme="modern"] .btn-back {
  border: 1px solid var(--color-border);
}

/* --- Panels — clean glass-like --- */
html[data-theme="modern"] .panel {
  background: rgba(33, 38, 45, 0.85);
  border: 1px solid rgba(88, 166, 255, 0.1);
  backdrop-filter: blur(12px);
}

html[data-theme="modern"] .panel h2 {
  font-weight: 300;
  letter-spacing: 0.08em;
  font-size: 1.6rem;
}

/* --- Filter buttons — pill style --- */
html[data-theme="modern"] .filter-btn {
  border-radius: 20px;
  border: 1px solid rgba(88, 166, 255, 0.15);
  font-size: 0.78rem;
}

html[data-theme="modern"] .filter-btn.active {
  background: var(--color-primary);
  color: #0d1117;
  border-color: var(--color-primary);
}

/* --- Scenario cards --- */
html[data-theme="modern"] .scenario-item {
  border: 1px solid rgba(88, 166, 255, 0.08);
  transition: border-color 0.15s, background 0.15s;
}

html[data-theme="modern"] .scenario-item:hover {
  border-color: rgba(88, 166, 255, 0.3);
  background: rgba(88, 166, 255, 0.04);
}

html[data-theme="modern"] .scenario-item.selected {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 1px var(--color-primary);
}

/* --- Dialogue — rounder bubbles --- */
html[data-theme="modern"] .dialogue-bubble .bubble-content {
  border-radius: 16px;
  border: 1px solid rgba(88, 166, 255, 0.08);
}

html[data-theme="modern"] .dialogue-bubble.player .bubble-content {
  background: rgba(88, 166, 255, 0.12);
  border-color: rgba(88, 166, 255, 0.2);
  border-radius: 16px 16px 4px 16px;
}

html[data-theme="modern"] .dialogue-bubble.gm .bubble-content {
  background: rgba(88, 166, 255, 0.05);
  border-left: 2px solid rgba(88, 166, 255, 0.3);
  border-radius: 0;
}

html[data-theme="modern"] .dialogue-bubble.npc .bubble-content {
  background: rgba(63, 185, 80, 0.08);
  border-color: rgba(63, 185, 80, 0.2);
}

/* --- Turn separator — minimal --- */
html[data-theme="modern"] .turn-separator {
  color: var(--color-text-dim);
  font-size: 0.75rem;
}

html[data-theme="modern"] .turn-separator::before,
html[data-theme="modern"] .turn-separator::after {
  background: linear-gradient(to right, transparent, rgba(88, 166, 255, 0.15), transparent);
}

/* --- Progress bar --- */
html[data-theme="modern"] .progress-fill {
  background: var(--color-primary);
  border-radius: 3px;
}

/* --- Objective widget --- */
html[data-theme="modern"] .objective-widget {
  border: 1px solid rgba(88, 166, 255, 0.1);
  backdrop-filter: blur(8px);
}

/* --- Character cards --- */
html[data-theme="modern"] .character-card {
  border: 1px solid rgba(88, 166, 255, 0.08);
  transition: transform 0.15s;
}

html[data-theme="modern"] .character-card:hover {
  transform: translateY(-2px);
}

/* --- Modal --- */
html[data-theme="modern"] .modal-content {
  backdrop-filter: blur(16px);
  border: 1px solid rgba(88, 166, 255, 0.1);
}

/* --- Chat input --- */
html[data-theme="modern"] .chat-input-area input {
  border: 1px solid rgba(88, 166, 255, 0.15);
  border-radius: 8px;
}

html[data-theme="modern"] .chat-input-area input:focus {
  border-color: var(--color-primary);
  outline: none;
  box-shadow: 0 0 0 2px rgba(88, 166, 255, 0.15);
}

html[data-theme="modern"] .btn-send {
  background: var(--color-primary);
  color: #0d1117;
  border-radius: 8px;
}

/* --- Choice panel --- */
html[data-theme="modern"] .choice-btn {
  border: 1px solid rgba(88, 166, 255, 0.1);
  border-radius: 8px;
  transition: all 0.12s;
}

html[data-theme="modern"] .choice-btn:hover {
  border-color: var(--color-primary);
  background: rgba(88, 166, 255, 0.08);
}

/* --- Ending screen --- */
html[data-theme="modern"] .ending-title {
  font-weight: 200;
  letter-spacing: 0.12em;
  text-shadow: none;
}
