/* === Reset & Base === */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #0f0f0f;
  --bg-card: #1a1a1a;
  --bg-hover: #242424;
  --border: #2a2a2a;
  --text: #e0e0e0;
  --text-muted: #888;
  --accent: #e84393;
  --accent-hover: #fd79a8;
  --max-width: 960px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Noto Sans JP", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.8;
  min-height: 100vh;
}

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

img {
  max-width: 100%;
  height: auto;
}

/* === Layout === */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* === Header === */
.site-header {
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
  position: sticky;
  top: 0;
  background: rgba(15, 15, 15, 0.95);
  backdrop-filter: blur(8px);
  z-index: 100;
}

.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
}
.site-logo:hover {
  color: var(--accent);
}

.site-nav {
  display: flex;
  gap: 20px;
  align-items: center;
}

.site-nav a {
  color: var(--text-muted);
  font-size: 0.875rem;
}
.site-nav a:hover {
  color: var(--text);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.5rem;
  cursor: pointer;
}

/* === Main === */
main {
  padding: 40px 0 80px;
}

/* === Article List (Top Page) === */
.page-title {
  font-size: 1.5rem;
  margin-bottom: 32px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--accent);
  display: inline-block;
}

.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.article-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.2s, border-color 0.2s;
}
.article-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}

.article-card a {
  color: inherit;
  display: block;
}

.card-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--bg-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.card-body {
  padding: 16px;
}

.card-category {
  display: inline-block;
  font-size: 0.75rem;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 4px;
  padding: 2px 8px;
  margin-bottom: 8px;
}

.card-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 8px;
  line-height: 1.5;
}

.card-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
}

/* === Rating === */
.rating {
  display: inline-flex;
  gap: 2px;
}
.rating .star {
  color: #ffd700;
}
.rating .star.empty {
  color: var(--border);
}

/* === Article Detail === */
.article-header {
  margin-bottom: 32px;
}

.article-header .card-category {
  margin-bottom: 12px;
}

.article-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 12px;
  line-height: 1.4;
}

.article-meta {
  font-size: 0.875rem;
  color: var(--text-muted);
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.article-thumbnail {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--bg-card);
  border-radius: 8px;
  margin-bottom: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.article-body h2 {
  font-size: 1.25rem;
  margin: 32px 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.article-body h3 {
  font-size: 1.1rem;
  margin: 24px 0 12px;
}

.article-body p {
  margin-bottom: 16px;
}

.article-body ul, .article-body ol {
  margin: 0 0 16px 24px;
}

.article-body li {
  margin-bottom: 4px;
}

/* Info Box */
.info-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px;
  margin: 24px 0;
}

.info-box h3 {
  margin-top: 0;
}

.info-box table {
  width: 100%;
  border-collapse: collapse;
}

.info-box th,
.info-box td {
  text-align: left;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.info-box th {
  color: var(--text-muted);
  width: 30%;
  white-space: nowrap;
}

/* CTA Button */
.cta-button {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 14px 40px;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  transition: background 0.2s;
  margin: 24px 0;
}
.cta-button:hover {
  background: var(--accent-hover);
  color: #fff;
}

.cta-wrapper {
  text-align: center;
}

/* === Static Pages (Privacy, Contact) === */
.static-page h1 {
  font-size: 1.5rem;
  margin-bottom: 32px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--accent);
  display: inline-block;
}

.static-page h2 {
  font-size: 1.15rem;
  margin: 28px 0 12px;
}

.static-page p, .static-page ul {
  margin-bottom: 16px;
}

.static-page ul {
  margin-left: 24px;
}

/* === Contact Form === */
.contact-form {
  max-width: 600px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  margin-bottom: 6px;
  color: var(--text-muted);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 0.9rem;
  font-family: inherit;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--accent);
}

.form-group textarea {
  min-height: 160px;
  resize: vertical;
}

.submit-button {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 12px 32px;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.submit-button:hover {
  background: var(--accent-hover);
}

/* === Footer === */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 24px 0;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 12px;
}

.footer-links a {
  color: var(--text-muted);
}
.footer-links a:hover {
  color: var(--text);
}

/* === Responsive === */
@media (max-width: 640px) {
  .nav-toggle {
    display: block;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 16px 20px;
    gap: 12px;
  }

  .site-nav.open {
    display: flex;
  }

  .article-grid {
    grid-template-columns: 1fr;
  }

  .article-title {
    font-size: 1.35rem;
  }

  .info-box th {
    width: 35%;
  }
}
