/* hentai-finder.jp 共通スタイル */

:root {
  --bg: #0f0f10;
  --bg-alt: #18181b;
  --text: #e5e5e5;
  --text-mute: #9ca3af;
  --accent: #ff4d6d;
  --accent-hover: #ff7793;
  --border: #2d2d33;
  --max-width: 720px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.75;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s;
}

a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

/* Header */
header {
  border-bottom: 1px solid var(--border);
  padding: 1.5rem 1rem;
}

header .inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

header .logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.02em;
}

header .logo:hover {
  text-decoration: none;
  color: var(--accent);
}

header nav {
  display: flex;
  gap: 1.25rem;
  font-size: 0.9rem;
}

header nav a {
  color: var(--text-mute);
}

header nav a:hover {
  color: var(--text);
}

/* Main */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem 1rem;
  width: 100%;
  flex: 1;
}

main h1 {
  font-size: 1.75rem;
  margin-bottom: 1rem;
  line-height: 1.4;
}

main h2 {
  font-size: 1.25rem;
  margin: 2rem 0 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

main h3 {
  font-size: 1.05rem;
  margin: 1.5rem 0 0.5rem;
  color: var(--accent);
}

main p {
  margin-bottom: 1rem;
}

main ul, main ol {
  margin: 0 0 1rem 1.5rem;
}

main li {
  margin-bottom: 0.4rem;
}

main hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

/* Article meta */
.meta {
  color: var(--text-mute);
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0;
}

.tags span {
  background: var(--bg-alt);
  color: var(--text-mute);
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.8rem;
}

/* PR notice */
.pr-notice {
  background: var(--bg-alt);
  border-left: 3px solid var(--accent);
  padding: 0.75rem 1rem;
  margin: 1.5rem 0;
  font-size: 0.85rem;
  color: var(--text-mute);
}

/* Article card list */
.article-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.article-list li {
  border-bottom: 1px solid var(--border);
  padding: 1.25rem 0;
  margin: 0;
}

.article-list li:last-child {
  border-bottom: none;
}

.article-list a {
  display: block;
}

.article-list .title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.3rem;
}

.article-list .excerpt {
  color: var(--text-mute);
  font-size: 0.9rem;
}

.article-list a:hover .title {
  color: var(--accent);
}

/* CTA Button (used in sample articles) */
.cta {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  margin: 1rem 0;
  font-weight: 600;
  transition: background 0.15s;
}

.cta:hover {
  background: var(--accent-hover);
  color: #fff;
  text-decoration: none;
}

/* Footer */
footer {
  border-top: 1px solid var(--border);
  padding: 2rem 1rem;
  color: var(--text-mute);
  font-size: 0.85rem;
  text-align: center;
}

footer .inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

footer nav {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

footer nav a {
  color: var(--text-mute);
}

footer .copyright {
  margin-top: 1rem;
}

/* Age gate notice */
.age-notice {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  margin: 2rem 0;
  text-align: center;
}

.age-notice strong {
  color: var(--accent);
  display: block;
  margin-bottom: 0.5rem;
}

/* Navigation dropdown (using <details>) */
header nav details {
  position: relative;
  display: inline-block;
}

header nav details summary {
  list-style: none;
  cursor: pointer;
  color: var(--text-mute);
  user-select: none;
}

header nav details summary::-webkit-details-marker {
  display: none;
}

header nav details summary::after {
  content: " ▾";
  font-size: 0.75em;
  color: var(--text-mute);
}

header nav details[open] summary {
  color: var(--text);
}

header nav details summary:hover {
  color: var(--text);
}

header nav details .dropdown-menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.5rem 0;
  min-width: 200px;
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

header nav details .dropdown-menu a {
  display: block;
  padding: 0.5rem 1rem;
  color: var(--text-mute);
  font-size: 0.9rem;
  white-space: nowrap;
}

header nav details .dropdown-menu a:hover {
  color: var(--text);
  background: rgba(255, 77, 109, 0.08);
  text-decoration: none;
}

header nav details .dropdown-menu .menu-section-title {
  padding: 0.4rem 1rem 0.2rem;
  font-size: 0.75rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

header nav details .dropdown-menu hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0.4rem 0;
}

/* Category page hero */
.category-hero {
  background: linear-gradient(135deg, var(--bg-alt) 0%, var(--bg) 100%);
  padding: 2.5rem 1.5rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  margin-bottom: 2rem;
}

.category-hero h1 {
  border-bottom: none;
  margin-bottom: 0.75rem;
}

.category-hero .lead {
  color: var(--text-mute);
  font-size: 1rem;
  line-height: 1.8;
}

.category-hero .stats {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-mute);
}

.category-hero .stats strong {
  color: var(--accent);
}

/* Placeholder (記事ゼロ時) */
.placeholder-notice {
  background: var(--bg-alt);
  border: 1px dashed var(--border);
  border-radius: 8px;
  padding: 2rem 1.5rem;
  text-align: center;
  color: var(--text-mute);
  margin: 2rem 0;
}

.placeholder-notice .icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  opacity: 0.5;
}

.placeholder-notice .title {
  color: var(--text);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

/* Sub-category list */
.subcategory-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.75rem;
  margin: 1.5rem 0;
}

.subcategory-list a {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.75rem 1rem;
  color: var(--text);
  font-size: 0.9rem;
  transition: border-color 0.15s, color 0.15s;
}

.subcategory-list a:hover {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}

/* Article layout with sidebar */
.article-layout {
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: 2rem;
}

@media (max-width: 900px) {
  .article-layout {
    grid-template-columns: 1fr;
  }
}

.article-content {
  min-width: 0;
}

/* Sidebar */
.sidebar {
  font-size: 0.85rem;
}

.sidebar-section {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1rem;
  margin-bottom: 1rem;
}

.sidebar-section h3 {
  font-size: 0.8rem;
  color: var(--text-mute);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 0.75rem 0;
  border: none;
  padding: 0;
}

.sidebar-section .banner {
  display: block;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.75rem;
  color: var(--text);
  margin-bottom: 0.5rem;
  transition: border-color 0.15s;
}

.sidebar-section .banner:hover {
  border-color: var(--accent);
  text-decoration: none;
}

.sidebar-section .banner .label {
  display: block;
  font-size: 0.7rem;
  color: var(--text-mute);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.sidebar-section .banner .title {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
}

.sidebar-section .banner.placeholder {
  opacity: 0.5;
  border-style: dashed;
  cursor: default;
}

.sidebar-section .banner.placeholder:hover {
  border-color: var(--border);
}

/* Footer extended nav (with categories) */
footer .nav-extended {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem 2rem;
  text-align: left;
  margin-bottom: 1.5rem;
}

footer .nav-extended .col-title {
  font-size: 0.75rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

footer .nav-extended a {
  display: block;
  padding: 0.2rem 0;
  color: var(--text-mute);
  font-size: 0.85rem;
}

footer .nav-extended a:hover {
  color: var(--text);
  text-decoration: none;
}

/* Responsive */
@media (max-width: 640px) {
  main h1 { font-size: 1.5rem; }
  main h2 { font-size: 1.1rem; }
  header nav { font-size: 0.85rem; gap: 0.85rem; }

  /* Mobile: dropdown menu adjusts */
  header nav details .dropdown-menu {
    right: -1rem;
    min-width: 180px;
  }

  .subcategory-list {
    grid-template-columns: 1fr 1fr;
  }
}
