/* SkyNote Visualizer Gallery — dark theme */
:root {
  --bg: #0c0e14;
  --bg-card: #161922;
  --bg-card-hover: #1d2130;
  --border: #252a3a;
  --text: #e6e8ee;
  --text-dim: #9aa0b0;
  --accent: #6da7ff;
  --gold: #ffcb47;
  --silver: #c4cad6;
  --bronze: #d68b5c;
  --code-bg: #0a0c12;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans",
    "Yu Gothic", Meiryo, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 32px 24px 96px;
}

header {
  border-bottom: 1px solid var(--border);
  padding-bottom: 24px;
  margin-bottom: 32px;
}

header h1 {
  font-size: 1.75rem;
  margin: 0 0 8px;
  letter-spacing: 0.01em;
}

header p {
  color: var(--text-dim);
  margin: 0;
  font-size: 0.95rem;
}

section {
  margin-bottom: 48px;
}

section > details {
  background: transparent;
}

section > details > summary {
  font-size: 1.25rem;
  font-weight: 600;
  cursor: pointer;
  padding: 12px 0;
  list-style: none;
  user-select: none;
}

section > details > summary::-webkit-details-marker { display: none; }

section > details > summary::before {
  content: "▶ ";
  display: inline-block;
  margin-right: 8px;
  transition: transform 0.15s ease;
}

section > details[open] > summary::before {
  transform: rotate(90deg);
}

.grid {
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr;
  margin-top: 16px;
}

@media (min-width: 900px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.card:hover {
  background: var(--bg-card-hover);
  border-color: #313749;
}

.card-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.score {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 12px;
  font-size: 1.5rem;
  font-weight: 700;
  color: #14171f;
}

.score.gold   { background: var(--gold); }
.score.silver { background: var(--silver); }
.score.bronze { background: var(--bronze); }

.card-title {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 4px;
}

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

.thumb {
  width: 100%;
  max-width: 600px;
  border-radius: 8px;
  border: 1px solid var(--border);
  display: block;
  margin: 12px auto;
  cursor: zoom-in;
  background: #000;
}

.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.btn {
  display: inline-block;
  background: #232838;
  color: var(--text);
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.85rem;
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
}

.btn:hover { background: #2c3245; border-color: var(--accent); }

.btn-primary {
  background: #1f3a66;
  border-color: #2d5391;
  color: #cfe1ff;
}

.btn-primary:hover { background: #284a82; }

details.video-block,
details.config-block {
  margin-top: 12px;
}

details.video-block > summary,
details.config-block > summary {
  display: none;
}

details.video-block[open] > summary,
details.config-block[open] > summary {
  display: block;
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-bottom: 8px;
  cursor: pointer;
}

details.video-block video {
  width: 100%;
  max-width: 600px;
  border-radius: 8px;
  background: #000;
  display: block;
  margin: 0 auto;
}

pre.config {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  font-size: 0.78rem;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  overflow-x: auto;
  margin: 0;
  color: #cdd2dd;
  line-height: 1.5;
  max-height: 400px;
  overflow-y: auto;
}

footer {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  margin-top: 48px;
  color: var(--text-dim);
  font-size: 0.85rem;
  text-align: center;
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
  padding: 24px;
}

.lightbox.active { display: flex; }

.lightbox img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 8px;
}
