﻿:root {
  --px-bg: #f6f6f6;
  --px-surface: #ffffff;
  --px-surface-2: #f0f0f0;
  --px-text: #1f1f1f;
  --px-muted: #757575;
  --px-border: #e5e5e5;
  --px-accent: #0096fa;
  --px-accent-hover: #0077c8;
  --px-accent-soft: rgba(0, 150, 250, 0.12);
  --px-tag: #eef7ff;
  --px-tag-text: #0077c8;
  --px-danger: #ff4060;
  --px-header: rgba(255, 255, 255, 0.92);
  --px-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  --px-card-radius: 12px;
  --px-input-bg: #f0f0f0;
  color-scheme: light;
}

html.dark {
  --px-bg: #121212;
  --px-surface: #1e1e1e;
  --px-surface-2: #2a2a2a;
  --px-text: #f5f5f5;
  --px-muted: #a0a0a0;
  --px-border: #333333;
  --px-accent: #0096fa;
  --px-accent-hover: #3db4ff;
  --px-accent-soft: rgba(0, 150, 250, 0.18);
  --px-tag: #153247;
  --px-tag-text: #6cc8ff;
  --px-danger: #ff5c75;
  --px-header: rgba(18, 18, 18, 0.9);
  --px-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
  --px-input-bg: #2a2a2a;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body, #app { height: 100%; margin: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic UI", Meiryo, sans-serif;
  background: var(--px-bg);
  color: var(--px-text);
  line-height: 1.4;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }
::selection { background: var(--px-accent-soft); }

.container { width: min(100%, 1800px); max-width: 100%; margin: 0 auto; padding: 0 20px; }
@media (min-width: 1800px) { .container { width: min(100%, 2400px); padding: 0 28px; } }
@media (min-width: 2400px) { .container { width: 100%; padding: 0 32px; } }
.muted { color: var(--px-muted); }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: var(--px-tag); color: var(--px-tag-text); font-size: 13px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: 999px; padding: 8px 14px;
  background: var(--px-surface-2); color: var(--px-text);
  transition: background .15s, border-color .15s, color .15s, transform .05s;
}
.btn:hover { background: var(--px-border); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--px-accent); color: #fff; }
.btn.primary:hover { background: var(--px-accent-hover); }
.btn.ghost { background: transparent; border-color: var(--px-border); }
.btn.icon { width: 36px; height: 36px; padding: 0; border-radius: 50%; }
.input, .select {
  width: 100%; border: 1px solid transparent; background: var(--px-input-bg);
  color: var(--px-text); border-radius: 999px; padding: 9px 14px; outline: none;
}
.input:focus, .select:focus { border-color: var(--px-accent); background: var(--px-surface); }
.select { border-radius: 10px; }
.card { background: var(--px-surface); border: 1px solid var(--px-border); border-radius: var(--px-card-radius); box-shadow: var(--px-shadow); }

/* Shared themed frame for every image surface: grid thumbs, collection covers,
   and the full-size preview window. Keeps one consistent border/radius/glow. */
.media-frame {
  border: 1px solid var(--px-border);
  border-radius: var(--px-card-radius);
  background: var(--px-surface-2);
  box-shadow: var(--px-shadow), inset 0 0 0 1px rgba(255, 255, 255, .02);
  overflow: hidden;
  transition: border-color .15s ease, box-shadow .15s ease;
}
html.dark .media-frame {
  box-shadow: 0 8px 22px rgba(0, 0, 0, .34), inset 0 0 0 1px rgba(255, 255, 255, .02);
}
.section-title { font-size: 20px; font-weight: 700; margin: 0 0 12px; display: flex; align-items: center; gap: 10px; }
.section-title::before { content: ""; width: 4px; height: 18px; border-radius: 2px; background: var(--px-accent); display: inline-block; }
@media (max-width: 720px) {
  .container { padding: 0 12px; }
}

/* Blur mode: NSFW thumbnails are softened everywhere, full-size views are not. */
html.blur-nsfw .thumb.nsfw-thumb > img,
html.blur-nsfw .thumb.nsfw-thumb > video,
html.blur-nsfw .group-thumb-btn.nsfw-thumb img,
html.blur-nsfw .art-picker-thumb.nsfw-thumb img,
html.blur-nsfw .art-item.nsfw-thumb img,
html.blur-nsfw .cover.nsfw-thumb img,
html.blur-nsfw .cover.nsfw-thumb video,
html.blur-nsfw .doujin-cover.nsfw-thumb img,
html.blur-nsfw .doujin-thumb.nsfw-thumb img,
html.blur-nsfw .cover.blur-thumb img,
html.blur-nsfw .cover.blur-thumb video,
html.blur-nsfw .edit-cover-preview.nsfw-thumb img,
html.blur-nsfw .edit-cover-preview.blur-thumb img {
  filter: blur(18px) !important;
  transform: scale(1.12) !important;
  transform-origin: center !important;
}
