/* Shared styles for AIおとやさん downloader pages
   Extracted from index.html to keep design consistent across pages. */
:root {
  color-scheme: light;
  --bg-start: #f8fafc;
  --bg-end: #eef2ff;
  --surface: #ffffff;
  --surface-muted: #f1f5f9;
  --border: #d0d7de;
  --text: #0f172a;
  --accent: #2563eb;
  --accent-strong: #1d4ed8;
}
html, body {
  margin: 0;
  padding: 0;
}
body {
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  background: radial-gradient(circle at top, var(--bg-start) 0%, var(--bg-end) 55%, #e0e7ff 100%);
  color: var(--text);
}
header {
  padding: 16px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.3);
  position: sticky;
  top: 0;
  background: rgba(248, 250, 252, 0.9);
  backdrop-filter: blur(10px);
  color: var(--text);
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.05);
}
.container { max-width: 1100px; margin: 0 auto; padding: 16px; }
.toolbar { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.brand { display: flex; align-items: center; gap: 12px; margin-right: auto; }
.logo {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: linear-gradient(135deg, #4338ca, #2563eb);
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.02em;
}
.tagline { display: block; font-size: 12px; color: rgba(15,23,42,0.6); margin-top:2px; }
input[type="search"], select {
  min-width: 220px; padding: 10px 12px; font-size: 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text); box-shadow: 0 4px 16px rgba(15,23,42,0.06);
}
input[type="search"]:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 6px 22px rgba(37,99,235,0.15); }
.nav-link { text-decoration: none; color: var(--accent); font-weight: 600; font-size: 13px; padding: 6px 10px; border-radius: 999px; background: rgba(37,99,235,0.08); }
.nav-link:hover { background: rgba(37,99,235,0.15); }
.hero { margin-top: 12px; margin-bottom: 8px; border-radius: 20px; padding: 28px 24px; background: linear-gradient(135deg, rgba(59,130,246,0.14), rgba(79,70,229,0.12)); box-shadow: 0 20px 36px rgba(37,99,235,0.12); }
h1 { font-size: 20px; margin: 0; }
h2 { font-size: 16px; margin-top: 24px; }
p { line-height: 1.8; }
ul { padding-left: 20px; line-height: 1.8; }
a { color: var(--accent); text-decoration: none; }
.box { background: var(--surface); border: 1px solid rgba(229,229,229,0.8); border-radius: 12px; padding: 18px; box-shadow: 0 12px 20px rgba(15,23,42,0.06); }

/* Cards/grid used on index page */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; margin-top: 16px; }
.card { border: 1px solid rgba(148, 163, 184, 0.2); border-radius: 18px; overflow: hidden; background: var(--surface); display: flex; flex-direction: column; color: var(--text); box-shadow: 0 18px 28px rgba(15, 23, 42, 0.08); transition: transform 0.25s ease, box-shadow 0.25s ease; }
.card:hover { transform: translateY(-4px); box-shadow: 0 25px 45px rgba(15, 23, 42, 0.14); }
.thumb { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--surface-muted); cursor: pointer; }
.meta { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.title { font-size: 16px; font-weight: 600; line-height: 1.4; color: var(--text); letter-spacing: -0.01em; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
button { cursor: pointer; border: 1px solid rgba(37, 99, 235, 0.1); background: var(--surface); padding: 10px 14px; border-radius: 999px; font-size: 14px; color: var(--text); font-weight: 600; box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.2); transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease; }
button:hover { transform: translateY(-1px); box-shadow: 0 10px 20px rgba(37, 99, 235, 0.15); }
button.primary { background: linear-gradient(135deg, var(--accent), var(--accent-strong)); color: #fff; border: none; box-shadow: 0 15px 30px rgba(37, 99, 235, 0.35); }
button.primary:hover { box-shadow: 0 20px 35px rgba(37, 99, 235, 0.45); }
button:disabled { opacity: 0.6; cursor: not-allowed; box-shadow: none; }
.preview { aspect-ratio: 16 / 9; width: 100%; border-radius: 16px; box-shadow: 0 12px 20px rgba(15, 23, 42, 0.1); }
.empty { padding: 60px; text-align: center; color: rgba(15, 23, 42, 0.6); background: var(--surface); border-radius: 16px; box-shadow: 0 20px 35px rgba(15, 23, 42, 0.08); }
.pager { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 24px 0; }
.pager button { min-width: 40px; }
.controls { display: flex; gap: 10px; align-items: center; margin-top: 12px; flex-wrap: wrap; }

/* modal/ad related */
.modal-backdrop { position: fixed; inset: 0; background: rgba(15,23,42,0.55); display: flex; align-items: center; justify-content: center; z-index: 1000; }
.modal { width: min(560px, 94vw); background: var(--surface); border-radius: 20px; overflow: hidden; box-shadow: 0 35px 60px rgba(15, 23, 42, 0.25); color: var(--text); }
.modal header { position: static; border-bottom: 1px solid rgba(148, 163, 184, 0.2); background: var(--surface); padding: 16px 20px; }
.modal .content { padding: 20px; }
.ad-box { width: 100%; height: 220px; background: repeating-linear-gradient(45deg, rgba(148, 163, 184, 0.15), rgba(148, 163, 184, 0.15) 10px, rgba(148, 163, 184, 0.1) 10px, rgba(148, 163, 184, 0.1) 20px); border: 1px dashed rgba(148, 163, 184, 0.45); border-radius: 16px; display: flex; align-items: center; justify-content: center; color: rgba(15, 23, 42, 0.55); font-weight: 600; letter-spacing: 0.04em; }
.modal footer { display: flex; justify-content: flex-end; gap: 10px; border-top: 1px solid rgba(148, 163, 184, 0.2); padding: 16px 20px; }

/* simple responsive tweaks */
@media (max-width: 640px) {
  .container { padding: 12px; }
  input[type="search"], select { min-width: 140px; }
  .hero { padding: 20px; }
}
