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

:root {
  --bg-primary:    #0d0d0f;
  --bg-secondary:  #141418;
  --bg-card:       #1a1a20;
  --bg-card-hover: #1f1f28;
  --border:        #2a2a35;
  --border-light:  #353545;
  --text-primary:  #e8e8f0;
  --text-secondary:#9898b0;
  --text-muted:    #5a5a72;
  --accent:        #7c6ef5;
  --accent-hover:  #9285f7;
  --accent-glow:   rgba(124, 110, 245, 0.25);
  --warn:          #f5a623;
  --warn-bg:       rgba(245, 166, 35, 0.12);
  --danger:        #f55a5a;
  --danger-bg:     rgba(245, 90, 90, 0.12);
  --success:       #4caf7d;
  --success-bg:    rgba(76, 175, 125, 0.15);
  --vrc-color:     #5865f2;
  --vrm-color:     #06b6d4;
  --cluster-color: #22c55e;
  --shader-color:  #a855f7;
  --general-color: #f59e0b;
  --radius:        10px;
  --radius-lg:     16px;
  --shadow:        0 4px 24px rgba(0,0,0,0.5);
  --transition:    0.2s ease;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: 'Noto Sans JP', 'Inter', sans-serif;
  font-size: 15px;
  line-height: 1.7;
  min-height: 100vh;
}

code {
  background: rgba(124, 110, 245, 0.15);
  color: #b0a0ff;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.88em;
  font-family: 'Courier New', monospace;
}

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

/* ============================
   Layout
============================ */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 72px 0;
}

.section-alt {
  background: var(--bg-secondary);
}

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

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1rem;
  color: var(--accent);
}

.logo i {
  font-size: 1.3rem;
}

.header-nav {
  display: flex;
  gap: 8px;
}

.header-nav a {
  color: var(--text-secondary);
  font-size: 0.88rem;
  padding: 6px 14px;
  border-radius: 6px;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
}

.header-nav a:hover {
  color: var(--text-primary);
  background: var(--bg-card);
}

/* ============================
   Hero
============================ */
.hero {
  position: relative;
  padding: 100px 24px 80px;
  text-align: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(124,110,245,0.18) 0%, transparent 70%),
    radial-gradient(ellipse 60% 40% at 80% 80%, rgba(168,85,247,0.1) 0%, transparent 60%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  line-height: 1.3;
  background: linear-gradient(135deg, #e0d8ff 0%, #a898f8 50%, #c084fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 16px;
}

.hero-sub {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 28px;
  line-height: 1.8;
}

.hero-badges {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.badge {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 16px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.badge i { color: var(--accent); }

/* ============================
   Section Title
============================ */
.section-title {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-primary);
}

.section-title i {
  color: var(--accent);
}

.section-desc {
  color: var(--text-secondary);
  margin-bottom: 32px;
  font-size: 0.95rem;
}

/* ============================
   How To
============================ */
.howto-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.howto-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  position: relative;
}

.howto-card h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.howto-card p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.step-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent-glow);
  border: 2px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  color: var(--accent);
  margin-bottom: 14px;
}

.notice-box {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: rgba(124, 110, 245, 0.08);
  border: 1px solid rgba(124, 110, 245, 0.3);
  border-radius: var(--radius);
  padding: 16px 20px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.notice-box i {
  color: var(--accent);
  margin-top: 2px;
  flex-shrink: 0;
}

/* ============================
   Download Block
============================ */
.dl-block {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}

.dl-info {
  display: flex;
  align-items: center;
  gap: 16px;
}

.dl-info > i {
  color: var(--accent);
}

.dl-filename {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.dl-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.btn-download {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 12px 24px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-download:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px var(--accent-glow);
}

/* ============================
   Category & Table
============================ */
.category {
  margin-bottom: 40px;
}

.category-title {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-primary);
}

.cat-badge {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.cat-badge.vrc     { background: rgba(88,101,242,0.2); color: #7a88f7; border: 1px solid rgba(88,101,242,0.4); }
.cat-badge.vrm     { background: rgba(6,182,212,0.15); color: #22d3ee; border: 1px solid rgba(6,182,212,0.3); }
.cat-badge.cluster { background: rgba(34,197,94,0.15); color: #4ade80; border: 1px solid rgba(34,197,94,0.3); }
.cat-badge.shader  { background: rgba(168,85,247,0.15); color: #c084fc; border: 1px solid rgba(168,85,247,0.3); }
.cat-badge.general { background: rgba(245,158,11,0.15); color: #fbbf24; border: 1px solid rgba(245,158,11,0.3); }

.table-wrap {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

thead th {
  background: var(--bg-card);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

tbody tr {
  background: var(--bg-primary);
  transition: background var(--transition);
}

tbody tr:nth-child(even) {
  background: rgba(26, 26, 32, 0.6);
}

tbody tr:hover {
  background: var(--bg-card-hover);
}

tbody td {
  padding: 11px 16px;
  border-bottom: 1px solid rgba(42, 42, 53, 0.6);
  color: var(--text-primary);
  vertical-align: top;
  line-height: 1.6;
}

tbody tr:last-child td {
  border-bottom: none;
}

.more-row {
  text-align: center;
  color: var(--text-muted);
  font-style: italic;
  font-size: 0.88rem;
  background: var(--bg-card) !important;
}

/* ============================
   Shader Warning
============================ */
.shader-warning {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--warn-bg);
  border: 1px solid rgba(245, 166, 35, 0.4);
  border-radius: var(--radius);
  padding: 16px 20px;
  font-size: 0.9rem;
  color: #f5c842;
  margin-bottom: 28px;
}

.shader-warning i {
  color: var(--warn);
  margin-top: 2px;
  flex-shrink: 0;
}

/* ============================
   Modal
============================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeIn 0.2s ease;
}

.modal-overlay.hidden {
  display: none;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 80px rgba(0,0,0,0.7);
  animation: slideUp 0.25s ease;
}

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

.modal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px 28px 18px;
  border-bottom: 1px solid var(--border);
}

.modal-header i {
  font-size: 1.5rem;
  color: var(--warn);
}

.modal-header h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.modal-body {
  padding: 20px 28px;
}

.warning-box {
  background: var(--danger-bg);
  border: 1px solid rgba(245, 90, 90, 0.35);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 20px;
}

.warning-box h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #f88;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.warning-box ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.warning-box li {
  font-size: 0.88rem;
  color: var(--text-secondary);
  padding-left: 18px;
  position: relative;
  line-height: 1.6;
}

.warning-box li::before {
  content: '•';
  position: absolute;
  left: 4px;
  color: var(--danger);
}

.warning-box strong {
  color: #ffaaaa;
}

.agree-check {
  margin-top: 8px;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  user-select: none;
}

.checkbox-label input[type="checkbox"] {
  display: none;
}

.checkmark {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-light);
  border-radius: 5px;
  background: var(--bg-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
  transition: var(--transition);
}

.checkbox-label input:checked + .checkmark {
  background: var(--accent);
  border-color: var(--accent);
}

.checkbox-label input:checked + .checkmark::after {
  content: '✓';
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 28px 24px;
  border-top: 1px solid var(--border);
}

.btn-cancel {
  background: transparent;
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  border-radius: 8px;
  padding: 10px 20px;
  font-size: 0.92rem;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-cancel:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.btn-agree {
  background: var(--accent);
  border: none;
  color: #fff;
  border-radius: 8px;
  padding: 10px 24px;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-agree:hover:not(:disabled) {
  background: var(--accent-hover);
  box-shadow: 0 4px 16px var(--accent-glow);
}

.btn-agree:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ============================
   Footer
============================ */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 32px 0;
  text-align: center;
}

.site-footer p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.site-footer p i {
  color: var(--warn);
  flex-shrink: 0;
}

.footer-copy {
  font-size: 0.78rem !important;
  color: var(--text-muted) !important;
  margin-top: 8px;
}

/* ============================
   Responsive
============================ */
@media (max-width: 768px) {
  .header-nav a span { display: none; }
  .header-nav a { padding: 6px 10px; }

  .hero { padding: 60px 16px 50px; }

  .dl-block {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .btn-download {
    width: 100%;
    justify-content: center;
  }

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

  .modal-header, .modal-body, .modal-footer {
    padding-left: 20px;
    padding-right: 20px;
  }

  table { font-size: 0.82rem; }
  thead th, tbody td { padding: 10px 12px; }
}

@media (max-width: 480px) {
  .howto-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 1.5rem; }
  .modal-footer { flex-direction: column; }
  .btn-cancel, .btn-agree { width: 100%; justify-content: center; }
}

/* ============================
   Scrollbar
============================ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }