:root {
  --main-bg-color: #1a1a2e; 
  --accent-color: #e94560; 
  --text-color: #e0e0e0; 
  --dark-text-color: #333; 
  --card-bg-color: #2a2a4e; 
  --border-color: #4a4a6e; 
  --hover-color: #c93550; 
  --font-heading: 'Roboto', sans-serif;
  --font-body: 'Noto Sans JP', sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-body);
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--main-bg-color);
  overflow-x: hidden; 
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

a {
  color: var(--accent-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--hover-color);
}

h1, h2, h3 {
  font-family: var(--font-heading);
  color: var(--accent-color);
  margin-bottom: 20px;
}

h2 {
  font-size: 2.5em;
  text-align: center;
  margin-bottom: 40px;
  position: relative;
  padding-bottom: 15px;
}

h2::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background-color: var(--accent-color);
  border-radius: 2px;
}

.section-container {
  padding: 80px 0;
  position: relative;
  z-index: 1; 
}


.main-header {
  background-color: rgba(0, 0, 0, 0.7);
  color: #fff;
  padding: 15px 0;
  position: fixed;
  width: 100%;
  top: 0;
  left: 0;
  z-index: 1000;
  backdrop-filter: blur(5px); 
}

.main-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.main-header h1 {
  margin: 0;
  font-size: 1.8em;
}

.main-header h1 a {
  color: #fff;
  font-weight: bold;
}

.main-nav ul {
  list-style: none;
  display: flex;
}

.main-nav ul li {
  margin-left: 30px;
}

.main-nav ul li a {
  color: #fff;
  font-weight: bold;
  font-size: 1.1em;
  padding: 5px 0;
  position: relative;
}

.main-nav ul li a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  background-color: var(--accent-color);
  left: 0;
  bottom: -5px;
  transition: width 0.3s ease;
}

.main-nav ul li a:hover::after {
  width: 100%;
}


.hero-section {
  position: relative;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  color: #fff;
}

#background-video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  z-index: -2;
  transform: translateX(-50%) translateY(-50%);
  background-size: cover;
  filter: brightness(0.6); 
}

.hero-section .overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4); 
  z-index: -1;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
}

.hero-content h2 {
  font-size: 4em;
  margin-bottom: 20px;
  color: #fff;
  text-shadow: 2px 2px 8px rgba(0,0,0,0.7);
}

.hero-content p {
  font-size: 1.5em;
  margin-bottom: 40px;
  text-shadow: 1px 1px 4px rgba(0,0,0,0.5);
}

.hero-card img {
  width:100% !important;
  height:300px !important;
  object-fit: cover !important;
  object-position: top !important;
}

.btn-play {
  display: inline-block;
  background-color: var(--accent-color);
  color: #fff;
  padding: 15px 40px;
  border-radius: 5px;
  font-size: 1.3em;
  font-weight: bold;
  transition: transform 0.3s ease, background-color 0.3s ease;
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.btn-play:hover {
  background-color: var(--hover-color);
  transform: translateY(-5px);
}


.heroes-section {
  background: linear-gradient(to bottom, var(--main-bg-color), #22223e);
}

.hero-filter {
  text-align: center;
  margin-bottom: 40px;
}

.filter-btn {
  background-color: var(--card-bg-color);
  color: var(--text-color);
  border: 1px solid var(--border-color);
  padding: 10px 20px;
  margin: 5px;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
  font-size: 1.1em;
}

.filter-btn:hover {
  background-color: var(--border-color);
  transform: translateY(-2px);
}

.filter-btn.active {
  background-color: var(--accent-color);
  border-color: var(--accent-color);
  color: #fff;
}

.hero-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  padding: 20px;
}

.hero-card {
  background-color: var(--card-bg-color);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0,0,0,0.5);
  text-align: center;
  padding: 20px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid var(--border-color);
}

.hero-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0,0,0,0.7);
}

.hero-card img {
  max-width: 100%;
  height: auto;
  border-radius: 5px;
  margin-bottom: 15px;
  transition: transform 0.3s ease;
}

.hero-card:hover img {
  transform: scale(1.05);
}

.hero-card h3 {
  font-size: 1.8em;
  margin-bottom: 10px;
  color: var(--accent-color);
}

.hero-card p {
  font-size: 1em;
  color: var(--text-color);
  margin-bottom: 20px;
}

.btn-detail {
  display: inline-block;
  background-color: var(--accent-color);
  color: #fff;
  padding: 10px 25px;
  border-radius: 5px;
  font-weight: bold;
  transition: background-color 0.3s ease;
}

.btn-detail:hover {
  background-color: var(--hover-color);
}


.system-section {
  background-color: #22223e;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.system-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 40px;
  text-align: center;
}

.system-item {
  background-color: var(--card-bg-color);
  border-radius: 10px;
  padding: 30px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
  border: 1px solid var(--border-color);
  transition: transform 0.3s ease, background-color 0.3s ease;
}

.system-item:hover {
  transform: translateY(-10px);
  background-color: #3a3a5e; 
}

.system-item img {
  width: 100%;
  height: 500px;
  object-fit: cover;
  object-position: center;
  margin-bottom: 20px;
}

.system-item h3 {
  font-size: 1.6em;
  color: var(--accent-color);
  margin-bottom: 10px;
}

.system-item p {
  color: var(--text-color);
}


.cards-section {
  background: linear-gradient(to bottom, #22223e, var(--main-bg-color));
  text-align: center;
  position: relative;
  overflow: hidden; 
}

.card-carousel {
  display: flex;
  overflow-x: auto; 
  scroll-snap-type: x mandatory; 
  -webkit-overflow-scrolling: touch; 
  gap: 30px;
  padding: 20px 0;
  margin-bottom: 30px;
  justify-content: flex-start; 
  position: relative;
  z-index: 1; 
}

.card-item {
  flex: 0 0 auto; 
  width: 200px; 
  background-color: var(--card-bg-color);
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
  padding: 20px;
  text-align: center;
  border: 1px solid var(--border-color);
  scroll-snap-align: center; 
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.5);
}

.card-item img {
  max-width: 100%;
  height: auto;
  border-radius: 5px;
  margin-bottom: 15px;
}

.card-item h4 {
  font-size: 1.3em;
  color: var(--text-color);
  margin-bottom: 10px;
}

.rarity {
  display: inline-block;
  padding: 5px 10px;
  border-radius: 3px;
  font-weight: bold;
  font-size: 0.9em;
  color: #fff;
}

.rarity.sr { background-color: #ff5555; } 
.rarity.ur { background-color: #aa55ff; } 
.rarity.r { background-color: #55aaff; }  
.rarity.n { background-color: #55aa55; }  

.carousel-prev,
.carousel-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0, 0, 0, 0.6);
  color: #fff;
  border: none;
  padding: 15px 10px;
  cursor: pointer;
  font-size: 1.5em;
  border-radius: 5px;
  transition: background-color 0.3s ease;
  z-index: 2; 
}

.carousel-prev:hover,
.carousel-next:hover {
  background-color: rgba(0, 0, 0, 0.8);
}

.carousel-prev { left: 20px; }
.carousel-next { right: 20px; }



.world-section {
  background-color: var(--main-bg-color);
  position: relative;
  overflow: hidden;
  min-height: 600px; 
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 80px 20px;
}

.parallax-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('../images/world_bg.jpg'); 
  background-attachment: fixed; 
  background-position: center;
  background-size: cover;
  z-index: -1;
  filter: brightness(0.5); 
}

.world-section h2 {
  color: #fff;
  text-shadow: 2px 2px 5px rgba(0,0,0,0.7);
  z-index: 1;
}

.world-description {
  max-width: 800px;
  font-size: 1.3em;
  line-height: 1.8;
  color: #f0f0f0;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
  z-index: 1;
}



.news-section {
  background-color: #22223e;
  border-top: 1px solid var(--border-color);
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  padding: 20px;
}

.news-card {
  background-color: var(--card-bg-color);
  border-radius: 10px;
  padding: 25px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
  border: 1px solid var(--border-color);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.news-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.5);
}

.news-date {
  display: block;
  font-size: 0.9em;
  color: #aaa;
  margin-bottom: 10px;
}

.news-card h3 {
  font-size: 1.5em;
  color: var(--accent-color);
  margin-bottom: 10px;
}

.news-card p {
  font-size: 1em;
  color: var(--text-color);
  margin-bottom: 15px;
}

.news-link {
  display: inline-block;
  color: var(--accent-color);
  font-weight: bold;
}


.main-footer {
  background-color: rgba(0, 0, 0, 0.7);
  color: #fff;
  padding: 30px 0;
  text-align: center;
  border-top: 1px solid var(--border-color);
}

.main-footer .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

.social-links a {
  color: #fff;
  font-size: 1.8em;
  margin: 0 15px;
  transition: color 0.3s ease, transform 0.3s ease;
}

.social-links a:hover {
  color: var(--accent-color);
  transform: scale(1.2);
}


::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--main-bg-color);
}

::-webkit-scrollbar-thumb {
  background: var(--accent-color);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--hover-color);
}


@media (max-width: 768px) {
  .main-header .container {
      flex-direction: column;
  }

  .main-nav ul {
      margin-top: 15px;
      flex-wrap: wrap;
      justify-content: center;
  }

  .main-nav ul li {
      margin: 5px 15px;
  }

  .hero-content h2 {
      font-size: 3em;
  }

  .hero-content p {
      font-size: 1.2em;
  }

  h2 {
      font-size: 2em;
  }

  .hero-grid, .system-grid, .news-grid {
      grid-template-columns: 1fr;
  }

  .carousel-prev,
  .carousel-next {
      padding: 10px 5px;
      font-size: 1.2em;
  }
  .carousel-prev { left: 10px; }
  .carousel-next { right: 10px; }
}

@media (max-width: 480px) {
  .main-nav ul li {
      margin: 5px 10px;
  }
  .hero-content h2 {
      font-size: 2.5em;
  }
  .hero-content p {
      font-size: 1em;
  }
}