:root {
  /* Colors - Modern Dark Theme with Historical Accents */
  --bg-dark: #050505;
  --bg-gradient-start: #0f1219;
  --bg-gradient-end: #000000;

  --card-bg: rgba(22, 25, 35, 0.6); /* Glassmorphism base */
  --card-border: rgba(255, 255, 255, 0.08);
  --card-hover-border: rgba(199, 166, 102, 0.4); /* Gold accent */

  --text-main: #f0f2f5;
  --text-muted: #9ca3af;

  --accent-gold: #c7a666; /* Historical Gold */
  --accent-red: #bd3131; /* Blood/War Red */
  --accent-glow: rgba(199, 166, 102, 0.2);

  /* Spacing */
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 32px;
  --spacing-xl: 64px;

  /* Typography */
  --font-base: "Noto Sans JP", sans-serif;
  --font-serif: "Shippori Mincho", serif;
}

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

body {
  margin: 0;
  font-family: var(--font-base);
  background: var(--bg-dark);
  background-image:
    radial-gradient(
      circle at 15% 50%,
      rgba(189, 49, 49, 0.08),
      transparent 25%
    ),
    radial-gradient(
      circle at 85% 30%,
      rgba(199, 166, 102, 0.05),
      transparent 25%
    );
  color: var(--text-main);
  line-height: 1.8;
  overflow-x: hidden;
}

a {
  color: var(--accent-gold);
  text-decoration: none;
  transition: all 0.3s ease;
}

a:hover {
  color: #fff;
  text-shadow: 0 0 8px var(--accent-gold);
}

/* Layout */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Navigation - Floating Glass */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 30px;
  margin: 20px 0 40px;
  background: rgba(10, 10, 10, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--card-border);
  border-radius: 99px;
  position: sticky;
  top: 20px;
  z-index: 100;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.brand {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.4rem;
  letter-spacing: 1px;
}

.brand a {
  color: #fff;
}

.links {
  display: flex;
  gap: 24px;
}

.links a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
}

.links a:hover {
  color: var(--accent-gold);
}

/* Typography elements */
h1,
h2,
h3 {
  font-family: var(--font-serif);
  line-height: 1.4;
  margin: 0 0 20px;
  color: #fff;
}

h1 {
  font-size: 3rem;
  letter-spacing: -1px;
}
h2 {
  font-size: 2rem;
  border-bottom: 2px solid var(--accent-gold);
  display: inline-block;
  padding-bottom: 4px;
  margin-bottom: 30px;
}
h3 {
  font-size: 1.4rem;
  color: var(--accent-gold);
}

p {
  margin-bottom: 1.5em;
  opacity: 0.9;
}
small,
.muted {
  color: var(--text-muted);
  font-size: 0.9em;
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 40px 20px 32px;
  margin-bottom: 0;
}

/* Section Header */
.section-header {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin: 16px 0 24px;
}

.section-header h2 {
  margin-bottom: 0;
}

/* Cards - Modern Glassmorphism */
.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 40px;
  margin-bottom: 30px;
  transition:
    transform 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
}

.card:hover {
  border-color: var(--card-hover-border);
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

/* Subtle glow effect on hover */
.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(
    800px circle at var(--mouse-x) var(--mouse-y),
    rgba(255, 255, 255, 0.06),
    transparent 40%
  );
  opacity: 0;
  transition: opacity 0.5s;
  pointer-events: none;
}
.card:hover::before {
  opacity: 1;
}

/* Inga Hero Section (Specific) */
.game-hero {
  position: relative;
  text-align: center;
  padding: 100px 20px;
  background:
    linear-gradient(to bottom, rgba(5, 5, 5, 0.3), #050505),
    url("../img/games/inga/page_background_1438x810.png");
  background-size: cover;
  background-position: center;
  border-radius: 24px;
  margin-bottom: 60px;
  border: 1px solid var(--card-border);
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

/* Darken overlay for text readability */
.game-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, transparent 40%, #050505 100%);
  pointer-events: none;
}

.game-hero-content {
  position: relative;
  z-index: 2;
}

.game-logo {
  max-width: 860px;
  width: 95%;
  margin: 0 auto 30px;
  display: block;
  /* Filter for placeholder text if image missing */
  text-shadow: 0 0 20px rgba(189, 49, 49, 0.6);
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* Character Display Section (New) */
.char-section {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin: 60px 0;
  flex-wrap: wrap;
}

.char-card {
  text-align: center;
  position: relative;
}

.char-img {
  max-height: 400px;
  filter: drop-shadow(0 0 15px rgba(0, 0, 0, 0.8));
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.char-card:hover .char-img {
  transform: scale(1.05) rotate(2deg);
}

/* Grid Layout */
.grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.grid .card {
  margin-bottom: 0;
  height: 100%;
  padding: 30px;
}

/* Buttons / CTA */
.cta,
button.cta {
  display: inline-block;
  background: linear-gradient(135deg, var(--accent-gold), #a38343);
  color: #000;
  padding: 14px 32px;
  border-radius: 8px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  border: 0;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(199, 166, 102, 0.3);
  transition: all 0.2s ease;
}

.cta:hover,
button.cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(199, 166, 102, 0.5);
  filter: brightness(1.1);
  color: #000;
  text-decoration: none;
}

button.cta[disabled] {
  background: #333;
  color: #666;
  box-shadow: none;
  cursor: not-allowed;
}

/* Badges */
.badges {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.badge {
  font-size: 0.75rem;
  color: var(--accent-gold);
  border: 1px solid rgba(199, 166, 102, 0.3);
  padding: 4px 12px;
  border-radius: 4px;
  background: rgba(199, 166, 102, 0.05);
  font-family: var(--font-base);
  letter-spacing: 0.5px;
}

/* Specs Table */
.specs-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

.specs-table th,
.specs-table td {
  padding: 16px;
  border-bottom: 1px solid var(--card-border);
  text-align: left;
}

.specs-table th {
  width: 30%;
  color: var(--text-muted);
  font-weight: normal;
  font-family: var(--font-serif);
}

/* Screenshots */
.screenshot-slider {
  position: relative;
  margin: 20px 0 12px;
}

.screenshot-track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 4px 44px;
}

.screenshot-track::-webkit-scrollbar {
  display: none;
}

.screenshot-slide {
  flex: 0 0 min(860px, calc(100% - 12px));
  scroll-snap-align: center;
  aspect-ratio: 16 / 9;
  background: #151515;
  border: 1px solid var(--card-border);
  border-radius: 12px;
  overflow: hidden;
}

.screenshot-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.screenshot-nav {
  position: absolute;
  top: calc(50% - 14px);
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid rgba(199, 166, 102, 0.4);
  background: rgba(10, 10, 10, 0.8);
  color: var(--accent-gold);
  cursor: pointer;
  z-index: 3;
  font-size: 1.4rem;
  line-height: 1;
}

.screenshot-nav.prev {
  left: 0;
}

.screenshot-nav.next {
  right: 0;
}

.screenshot-nav:hover {
  border-color: var(--accent-gold);
  color: #fff;
}

.screenshot-dots {
  margin-top: 12px;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.screenshot-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  border: 0;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
}

.screenshot-dot.active {
  background: var(--accent-gold);
}

/* Form */
.form .field {
  margin-bottom: 24px;
}

.form label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.95rem;
  color: var(--text-main);
  font-weight: 700;
}

.form input[type="text"],
.form input[type="email"],
.form textarea {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  color: var(--text-main);
  font-family: var(--font-base);
  font-size: 1rem;
  line-height: 1.6;
  transition:
    border-color 0.3s ease,
    box-shadow 0.3s ease;
}

.form input[type="text"]:focus,
.form input[type="email"]:focus,
.form textarea:focus {
  outline: none;
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 3px rgba(199, 166, 102, 0.15);
}

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

.form-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 24px;
}

.alert {
  padding: 16px 20px;
  border-radius: 8px;
  margin-bottom: 24px;
  font-size: 0.9rem;
}

.alert-error {
  background: rgba(189, 49, 49, 0.15);
  border: 1px solid rgba(189, 49, 49, 0.4);
  color: #f0a0a0;
}

/* Footer */
.footer {
  margin-top: auto;
  border-top: 1px solid var(--card-border);
  padding: 40px 0;
  color: var(--text-muted);
  font-size: 0.85rem;
  text-align: center;
  font-family: var(--font-base);
}

/* Utilities */
.hp {
  position: absolute;
  left: -9999px;
}

/* ===== Responsive ===== */

/* Tablet */
@media (max-width: 768px) {
  .container {
    padding: 0 16px;
  }

  .nav {
    flex-direction: column;
    gap: 12px;
    padding: 16px 20px;
    border-radius: 16px;
    margin: 12px 0 24px;
    position: relative;
    top: 0;
  }

  .links {
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
  }

  h1 {
    font-size: 2rem;
  }
  h2 {
    font-size: 1.5rem;
  }
  h3 {
    font-size: 1.2rem;
  }

  .card {
    padding: 24px;
    border-radius: 16px;
    margin-bottom: 20px;
  }

  .card:hover {
    transform: none;
  }

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

  .game-hero {
    padding: 60px 16px;
    margin-bottom: 30px;
    border-radius: 16px;
  }

  .game-logo {
    max-width: 560px;
  }

  .char-section {
    gap: 20px;
    margin: 30px 0;
  }

  .char-img {
    max-height: 250px;
  }

  .screenshot-track {
    padding: 4px 32px;
  }

  .screenshot-slide {
    flex-basis: calc(100% - 4px);
  }

  .screenshot-nav {
    width: 32px;
    height: 32px;
    font-size: 1.2rem;
  }

  .specs-table th,
  .specs-table td {
    padding: 12px 8px;
    font-size: 0.9rem;
  }

  .specs-table th {
    width: 35%;
  }

  .cta,
  button.cta {
    padding: 12px 24px;
    font-size: 0.9rem;
  }
}

/* Mobile */
@media (max-width: 480px) {
  .home-page .nav .brand {
    display: none;
  }

  .container {
    padding: 0 12px;
  }

  .nav {
    padding: 12px 16px;
    margin: 8px 0 16px;
  }

  .brand {
    font-size: 1.1rem;
  }

  .links {
    gap: 12px;
  }

  .links a {
    font-size: 0.85rem;
  }

  h1 {
    font-size: 1.6rem;
  }
  h2 {
    font-size: 1.3rem;
    margin-bottom: 20px;
  }
  h3 {
    font-size: 1.1rem;
  }

  .card {
    padding: 20px 16px;
    border-radius: 12px;
  }

  .game-hero {
    padding: 40px 12px;
    border-radius: 12px;
  }

  .game-logo {
    max-width: 360px;
  }

  .screenshot-track {
    gap: 12px;
    padding: 0 28px;
  }

  .screenshot-nav {
    width: 28px;
    height: 28px;
    font-size: 1.1rem;
  }

  .char-section {
    flex-direction: column;
    align-items: center;
  }

  .char-img {
    max-height: 200px;
  }

  .badges {
    justify-content: center;
  }

  .feature-list {
    gap: 16px;
  }

  .specs-table th {
    width: 40%;
  }

  .form input[type="text"],
  .form input[type="email"],
  .form textarea {
    padding: 10px 12px;
    font-size: 0.95rem;
  }

  .footer {
    padding: 24px 0;
    font-size: 0.8rem;
  }
}
