/* ===== Scrollbar ===== */
html { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.15) transparent; scroll-behavior: smooth; }
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.3); }

/* ===== Reset & Base ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", sans-serif;
  background: #0a0e1a;
  color: #ccc;
  line-height: 1.8;
  overflow-x: hidden;
}
a { color: #6ec6ff; text-decoration: none; transition: color 0.3s; }
a:hover { color: #aedcff; }
img { max-width: 100%; height: auto; display: block; border: 0; }

/* ===== Language Hide ===== */
[data-lang="ja"] [lang="en"] { display: none !important; }
[data-lang="en"] [lang="ja"] { display: none !important; }

/* ===== Navigation ===== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(10,14,26,0.55);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: background 0.3s;
}
.nav-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; height: 40px;
}
.nav-title {
  font-size: 14px; letter-spacing: 4px; color: #fff;
  font-weight: 700; text-transform: uppercase;
}
.nav-links { display: flex; gap: 28px; list-style: none; }
.nav-links a {
  font-size: 11px; letter-spacing: 3px; color: #888;
  text-transform: uppercase; font-weight: 500;
  transition: color 0.3s;
}
.nav-links a:hover { color: #fff; }
.nav-right { display: flex; align-items: center; gap: 12px; }
.lang-toggle {
  font-size: 10px; letter-spacing: 2px; color: #888;
  background: none; border: 1px solid rgba(255,255,255,0.15);
  border-radius: 3px; padding: 3px 8px; cursor: pointer;
  transition: color 0.3s, border-color 0.3s;
}
.lang-toggle:hover { color: #fff; border-color: rgba(255,255,255,0.4); }
.share-buttons { display: flex; gap: 8px; }
.share-btn {
  font-size: 10px; letter-spacing: 1px; color: #888;
  background: none; border: 1px solid rgba(255,255,255,0.15);
  border-radius: 3px; padding: 3px 8px; cursor: pointer;
  text-decoration: none;
  transition: color 0.3s, border-color 0.3s;
}
.share-btn:hover { color: #fff; border-color: rgba(255,255,255,0.4); }
.hamburger {
  display: none; flex-direction: column; gap: 5px; cursor: pointer;
  background: none; border: none; padding: 8px;
}
.hamburger span { display: block; width: 22px; height: 2px; background: #fff; transition: 0.3s; }

/* ===== Hero ===== */
.hero {
  position: relative;
  height: 100vh; min-height: 600px;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  text-align: center;
  background: #0a0e1a;
  overflow: visible;
}
.hero-bg {
  position: absolute; top: -15vw; left: 0; right: 0; height: 135vw;
  background-size: 100% auto; background-position: top center; background-repeat: no-repeat;
  filter: brightness(0.7);
  transition: filter 0.5s;
}
.hero-content { position: absolute; top: 10vh; left: 0; right: 0; z-index: 2; padding: 0 24px; text-align: center; }
.hero-label {
  font-size: 11px; letter-spacing: 8px; color: #fff;
  text-transform: uppercase; margin-bottom: 24px; margin-top: 23vh;
}
.hero-title {
  margin-bottom: 8px;
}
.hero-logo {
  display: inline-block;
  width: clamp(320px, 55vw, 900px);
  height: auto;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.6));
}
.hero-tagline {
  font-family: "游明朝", "Yu Mincho", "Hiragino Mincho ProN", "Noto Serif JP", serif;
  font-size: clamp(13px, 1.8vw, 24px);
  color: #fff;
  font-weight: 400; letter-spacing: 3px;
  margin-top: 20px; margin-bottom: 48px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.9), 0 4px 20px rgba(0,0,0,0.7), 0 0 40px rgba(0,0,0,0.5);
}
.hero-scroll {
  position: relative; z-index: 2;
  margin-top: auto; margin-bottom: 40px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.hero-scroll span { font-size: 10px; letter-spacing: 3px; color: #ccc; }
.hero-scroll::after {
  content: ''; width: 1px; height: 40px;
  background: linear-gradient(to bottom, #445, transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}
@keyframes scrollPulse { 0%,100% { opacity: 0.3; } 50% { opacity: 1; } }

/* ===== Section Common ===== */
.section {
  position: relative; z-index: 2;
  padding: 60px 24px;
  max-width: 1100px; margin: 0 auto;
}
.section-header {
  text-align: center; margin-bottom: 40px;
}
.section-label {
  font-size: 11px; letter-spacing: 6px; color: #445;
  text-transform: uppercase; margin-bottom: 12px;
}
.section-title {
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 700; color: #fff;
  letter-spacing: 4px;
}
.section-divider {
  width: 40px; height: 1px; background: #334; margin: 20px auto 0;
}

/* ===== Story ===== */
.story-section {
  position: relative; z-index: 2;
}
.story-text {
  max-width: 760px; margin: 0 auto;
  font-size: 15px; color: #999; line-height: 2.4;
  text-align: center;
}

/* ===== Features ===== */
.features-section {
  position: relative; z-index: 2;
}
.features-text {
  text-align: center; color: #999; font-size: 15px;
  margin-bottom: 40px;
}
.screenshots {
  display: flex; justify-content: center; gap: 8px; flex-wrap: wrap;
}
.screenshots img {
  width: 300px; height: 225px; object-fit: cover;
  border-radius: 4px; filter: brightness(1);
}

/* ===== Video ===== */
.video-section {
  position: relative; z-index: 2;
}
.video-wrapper {
  text-align: center; max-width: 960px; margin: 0 auto;
}
.video-wrapper iframe {
  width: 100%; aspect-ratio: 16/9; border: 0; border-radius: 4px;
}

/* ===== Info Box ===== */
.info-section {
  background: linear-gradient(180deg, #0a0e1a 0%, #0c0e18 50%, #0a0e1a 100%);
}
.info-card {
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 4px;
  padding: 40px;
  position: relative; overflow: hidden;
  background: rgba(0,100,180,0.06);
  max-width: 900px; margin: 0 auto 32px;
}
.info-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, #00a3e4, transparent);
}
.info-grid {
  display: flex; gap: 32px; flex-wrap: wrap; align-items: center;
}
.info-text { flex: 1; min-width: 280px; }
.info-text h3 {
  font-size: 18px; color: #fff; letter-spacing: 2px;
  margin-bottom: 16px; font-weight: 600;
}
.info-text p, .info-text span {
  font-size: 14px; color: #999; line-height: 2;
}
.info-image img { max-width: 320px; margin: 0 auto; }
.store-links {
  display: flex; flex-direction: column; gap: 6px; margin-top: 12px;
}
.store-links a { display: inline-block; transition: filter 0.3s; }
.store-links img { width: 200px; height: 40px; display: inline; filter: brightness(0.7); transition: filter 0.3s; border-radius: 6px; }
.store-links a:hover img { filter: brightness(1); }


/* ===== Characters ===== */
.char-section { position: relative; z-index: 2; padding: 60px 0; }
.char-section .section-header { padding: 0 24px; }
.char-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  max-width: 1100px; margin: 0 auto;
  padding: 0 24px;
}
.char-card {
  position: relative; overflow: hidden;
  cursor: pointer;
  aspect-ratio: 2/3;
  background: #0a0e1a;
}
.char-card img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: top center;
  transform-origin: top center;
  transition: transform 0.5s, filter 0.5s;
  filter: brightness(0.75);
}
.char-card:hover img { transform: scale(1.05); filter: brightness(1); }
.char-info {
  position: absolute; bottom: 0; left: 0; right: 0; z-index: 2;
  padding: 24px 16px 36px;
  background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 100%);
  transform: translateY(20px);
  transition: transform 0.4s;
}
.char-card:hover .char-info { transform: translateY(0); }
.char-name {
  font-size: 15px; color: #fff; font-weight: 700;
  letter-spacing: 2px; margin-bottom: 2px;
  text-shadow: 0 1px 4px rgba(0,0,0,0.9), 0 0 12px rgba(0,0,0,0.7);
}
.char-name-en {
  font-size: 10px; color: #667; letter-spacing: 2px;
  text-transform: uppercase;
  text-shadow: 0 1px 4px rgba(0,0,0,0.9), 0 0 12px rgba(0,0,0,0.7);
}
.char-role {
  font-size: 11px; color: #8ab4f0; letter-spacing: 1px; margin-top: 6px;
  text-shadow: 0 1px 4px rgba(0,0,0,0.9), 0 0 12px rgba(0,0,0,0.7);
}
.char-info { display: flex; flex-direction: column; }
[data-lang="en"] .char-card .char-name {
  font-size: 10px; color: #667; letter-spacing: 2px; font-weight: 400; margin-bottom: 0; order: 2;
}
[data-lang="en"] .char-card .char-name-en {
  font-size: 15px; color: #fff; font-weight: 700; letter-spacing: 2px; margin-bottom: 2px; order: 1;
}
[data-lang="en"] .char-card .char-role { order: 3; }

/* ===== Character Modal ===== */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  display: flex;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(4px);
  align-items: center; justify-content: center;
  gap: 12px; padding: 24px;
  opacity: 0; visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal-content {
  background: #12121a;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 4px;
  max-width: 800px; width: 100%;
  position: relative; overflow: hidden;
  max-height: 90vh; min-height: 420px;
  opacity: 0; transition: opacity 0.4s ease;
}
.modal-overlay.active .modal-content { opacity: 1; }
.modal-image {
  position: absolute; top: 0; right: -30px; bottom: 0;
  width: 450px; overflow: hidden; opacity: 0.7;
  display: flex; justify-content: center; align-items: flex-start;
}
.modal-image::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to right, #12121a 0%, transparent 50%);
  z-index: 1;
}
.modal-image img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.modal-body {
  position: relative; z-index: 2;
  padding: 40px 36px; overflow-y: auto;
  max-width: 520px;
}
.modal-body .char-name { font-size: 22px; margin-bottom: 4px; }
.modal-body .char-name-en { font-size: 11px; margin-bottom: 12px; display: block; }
.modal-body .char-role {
  font-size: 12px; margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
[data-lang="en"] .modal-body .char-name { font-size: 11px; color: #667; font-weight: 400; margin-bottom: 0; }
[data-lang="en"] .modal-body .char-name-en { font-size: 22px; color: #fff; font-weight: 700; margin-bottom: 4px; order: -1; }
.modal-desc {
  font-size: 14px; color: #999; line-height: 2;
  margin-bottom: 24px;
  text-shadow: 0 1px 4px rgba(0,0,0,0.9), 0 0 12px rgba(0,0,0,0.7);
}
.modal-close {
  position: absolute; top: 20px; right: 24px;
  font-size: 24px; color: #555; cursor: pointer;
  background: none; border: none;
  transition: color 0.3s; z-index: 10;
}
.modal-close:hover { color: #fff; }
.modal-nav {
  background: none; border: none;
  color: #555; font-size: 52px;
  cursor: pointer; z-index: 10;
  padding: 12px; flex-shrink: 0;
  transition: color 0.3s;
}
.modal-nav:hover { color: #ccc; }

/* ===== Gallery ===== */
.gallery-section {
  position: relative; z-index: 2;
  padding: 60px 0;
  background: linear-gradient(180deg, #0a0e1a 0%, #0e0e18 50%, #0a0e1a 100%);
}
.gallery-section .section-header { padding: 0 24px; }
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  max-width: 1000px; margin: 0 auto;
  padding: 0 24px;
}
.gallery-item {
  position: relative; overflow: hidden;
  cursor: pointer; aspect-ratio: 4/3;
  background: #111;
}
.gallery-item img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.5s, filter 0.3s;
  filter: brightness(0.7);
}
.gallery-item:hover img { transform: scale(1.05); filter: brightness(1); }

/* Gallery Modal */
.gallery-modal {
  position: fixed; inset: 0; z-index: 300;
  display: flex;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  align-items: center; justify-content: center;
  gap: 12px; padding: 24px;
  opacity: 0; visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}
.gallery-modal.active { opacity: 1; visibility: visible; }
.gallery-modal img#galleryModalImg {
  max-width: 70vw; max-height: 75vh;
  object-fit: contain; border-radius: 4px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.gallery-modal-inner {
  display: flex; flex-direction: column; align-items: center;
}
.gallery-modal-caption {
  text-align: center; color: #888; font-size: 13px;
  letter-spacing: 1px; margin-top: 12px;
}
.gallery-nav {
  background: none; border: none;
  color: #555; font-size: 52px;
  cursor: pointer; z-index: 10;
  padding: 12px; flex-shrink: 0;
  transition: color 0.3s;
}
.gallery-nav:hover { color: #ccc; }

/* ===== Related ===== */
.related-section {
  background: linear-gradient(180deg, #0a0e1a 0%, #0e1018 50%, #0a0e1a 100%);
}
.related-card {
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 4px;
  overflow: hidden;
  max-width: 900px; margin: 0 auto 32px;
  display: flex; gap: 0;
}
.related-card > .related-img { flex-shrink: 0; }
.related-card > .related-img img {
  width: 300px; height: 100%; object-fit: contain;
  filter: brightness(1);
}
.related-card > .related-body {
  padding: 32px; flex: 1;
}
.related-card h3 {
  font-size: 16px; color: #fff; letter-spacing: 2px;
  margin-bottom: 16px; font-weight: 600;
}
.related-card p {
  font-size: 13px; color: #888; line-height: 2;
}
.related-card .store-links { margin-top: 16px; }
.related-label {
  font-size: 11px; letter-spacing: 4px; text-transform: uppercase;
  color: #00a3e4; margin-bottom: 8px;
}

/* ===== Manga ===== */
.manga-section {
  background: linear-gradient(180deg, #0a0e1a 0%, #0e1018 50%, #0a0e1a 100%);
}
.manga-grid {
  display: flex; justify-content: center; gap: 16px; flex-wrap: wrap;
  max-width: 1000px; margin: 0 auto;
}
.manga-grid img {
  width: 300px; border-radius: 4px;
  filter: brightness(1);
}

/* ===== Fan Works ===== */
.fanworks-section {
  background: linear-gradient(180deg, #0a0e1a 0%, #0c0e18 50%, #0a0e1a 100%);
}
.fanworks-text {
  max-width: 700px; margin: 0 auto;
  font-size: 14px; color: #888; line-height: 2.2;
}
.fanworks-text p + p { margin-top: 16px; }

/* ===== Footer ===== */
.footer {
  position: relative; z-index: 2;
  text-align: center;
  padding: 40px 24px;
  border-top: 1px solid rgba(255,255,255,0.05);
}
.footer-links {
  display: flex; justify-content: center; gap: 32px;
  margin-bottom: 24px; list-style: none;
}
.footer-links a {
  font-size: 11px; letter-spacing: 3px; color: #555;
  text-transform: uppercase;
}
.footer-links a:hover { color: #fff; }
.footer-logo { margin: 0 auto 16px; opacity: 0.5; transition: opacity 0.3s; }
.footer-logo:hover { opacity: 0.8; }
.footer-copy { font-size: 11px; color: #333; letter-spacing: 2px; }


/* ===== Responsive ===== */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .nav-links.open {
    display: flex; flex-direction: column;
    position: absolute; top: 40px; left: 0; right: 0;
    background: rgba(10,14,26,0.97);
    padding: 24px; gap: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }
  .hero { height: 130vw; min-height: unset; }
  .hero-bg { height: 140vw; }
  .hero-content { top: 8vw; }
  .hero-logo { width: clamp(200px, 70vw, 400px); }
  .hero-scroll { display: none; }
  .char-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 4px; padding: 0 8px;
  }
  .screenshots img { width: 100%; max-width: 300px; height: auto; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-item img { filter: brightness(0.85); }
  .gallery-modal { gap: 4px; padding: 8px; }
  .gallery-nav { font-size: 32px; padding: 4px; }
  .gallery-modal img#galleryModalImg { max-width: calc(100vw - 90px); max-height: 65vh; }
  .info-grid { flex-direction: column; align-items: center; }
  .info-image img { max-width: 250px; }
  .related-card { flex-direction: column; }
  .related-card > .related-img img { width: 100%; height: auto; }
  .modal-overlay { gap: 0; padding: 8px; max-width: 100vw; overflow: hidden; }
  .modal-nav { font-size: 28px; padding: 4px; min-width: 28px; flex-shrink: 0; }
  .modal-content { display: flex; flex-direction: column; max-width: calc(100vw - 80px); max-height: 85vh; overflow: hidden; }
  .modal-image { width: 100%; min-height: 300px; max-height: none; }
  .modal-desc { color: #fff; }
  .modal-body { min-height: 500px; display: flex; flex-direction: column; padding-top: 20px; }
  .modal-body .char-role { border-bottom: none; padding-bottom: 0; }
  .modal-desc { margin-top: auto; }
  .footer-links { gap: 16px; flex-wrap: wrap; }
  .manga-grid img { max-width: 90vw; }
}
@media (max-width: 480px) {
  .char-grid { grid-template-columns: repeat(2, 1fr); gap: 4px; padding: 0 4px; }
}
