/* ========================================
   Make_Assets — スニペット展示用スタイル
   一覧ページ（index.html）の色はここで管理
   アニメの色は css/loader-theme.css で管理
   ======================================== */

:root {
  --color-bg: #1a1a1a;
  --color-surface: #2a2a2a;
  --color-text: #e8e8e8;
  --color-text-muted: #888;
  --color-accent: #6b9bd1;
  --slider-accent: hsl(210, 65%, 62%);
  --gap: 1.5rem;
  --card-min-w: 200px;
  --card-max-w: 320px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.5;
}

/* ヘッダー */
.header {
  padding: 1.5rem var(--gap);
  background: var(--color-surface);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.header h1 {
  margin: 0 0 0.25rem;
  font-size: 1.5rem;
  font-weight: 600;
}

.header-desc {
  margin: 0;
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

/* メイン */
.main {
  padding: var(--gap);
}

/* アニメ色相スライダー（グリッドより上） */
.loader-theme {
  margin-bottom: var(--gap);
  padding: 0.75rem 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
}

.loader-theme__label {
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.loader-theme__value {
  display: inline-block;
  width: 3ch;
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--color-text);
}

.loader-theme__slider {
  width: 160px;
  max-width: 100%;
  height: 4px;
  padding: 8px 0;
  margin: -8px 0;
  box-sizing: content-box;
  accent-color: var(--slider-accent, var(--color-accent));
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
}

.loader-theme__slider::-webkit-slider-runnable-track {
  height: 2px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 1px;
}

.loader-theme__slider::-moz-range-track {
  height: 2px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 1px;
}

.loader-theme__slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  margin-top: -5px;
  background: var(--slider-accent, var(--color-accent));
  border-radius: 50%;
  cursor: pointer;
  border: none;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2);
}

.loader-theme__slider::-moz-range-thumb {
  width: 12px;
  height: 12px;
  background: var(--slider-accent, var(--color-accent));
  border-radius: 50%;
  cursor: pointer;
  border: none;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2);
}

.snippet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(var(--card-min-w), var(--card-max-w)));
  gap: var(--gap);
  list-style: none;
  margin: 0;
  padding: 0;
}

.snippet-card {
  background: var(--color-surface);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.snippet-preview {
  aspect-ratio: 16 / 10;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg);
  padding: 1rem;
}

.snippet-preview iframe,
.snippet-preview object {
  width: 100%;
  height: 100%;
  border: none;
}

.snippet-preview__img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.snippet-name {
  margin: 0;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  color: var(--color-text-muted);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* プレースホルダー */
.snippet-card--placeholder .snippet-preview {
  color: var(--color-text-muted);
  font-size: 0.875rem;
  text-align: center;
}

.snippet-card--placeholder .snippet-name {
  font-style: italic;
}

/* フッター */
.footer {
  padding: 1rem var(--gap);
  text-align: center;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
