@import url('https://fonts.googleapis.com/css2?family=M+PLUS+Rounded+1c:wght@700;900&family=Noto+Sans+JP:wght@400;700;900&display=swap');

:root {
  --bg-color: #0d0d12;
  --panel-bg: rgba(30, 30, 40, 0.7);
  --text-main: #ffffff;
  --text-sub: #b0b0c0;
  --accent-green: #39ff14;
  --accent-blue: #00f0ff;
  --accent-red: #ff3366;
  --glow-green: 0 0 10px rgba(57, 255, 20, 0.5);
  --glow-blue: 0 0 10px rgba(0, 240, 255, 0.5);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Noto Sans JP', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.6;
  background-image: 
    radial-gradient(circle at 15% 50%, rgba(0, 240, 255, 0.05), transparent 25%),
    radial-gradient(circle at 85% 30%, rgba(57, 255, 20, 0.05), transparent 25%);
  background-attachment: fixed;
}

/* Typography */
h1, h2, h3, h4 {
  font-family: 'M PLUS Rounded 1c', sans-serif;
  font-weight: 900;
  letter-spacing: 1px;
}

h2 {
  font-size: 2.5rem;
  text-align: center;
  margin: 3rem 0 2rem;
  text-transform: uppercase;
  text-shadow: var(--glow-blue);
  color: var(--accent-blue);
}

/* Header */
header {
  background: rgba(13, 13, 18, 0.9);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 5%;
}

.logo {
  font-family: 'M PLUS Rounded 1c', sans-serif;
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--text-main);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo span {
  color: var(--accent-green);
  text-shadow: var(--glow-green);
}

.logo img {
  height: 40px;
  border-radius: 8px;
}

nav ul {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0;
  gap: 20px;
}

nav a {
  color: var(--text-main);
  text-decoration: none;
  font-weight: 700;
  transition: all 0.3s ease;
  padding: 0.5rem 1rem;
  border-radius: 20px;
}

nav a:hover, nav a.active {
  background: var(--accent-blue);
  color: var(--bg-color);
  box-shadow: var(--glow-blue);
}

/* Hero Section */
.hero {
  position: relative;
  height: 60vh;
  min-height: 400px;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  border-bottom: 2px solid var(--accent-green);
}

.hero-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 1;
  z-index: 1;
}



/* Main Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 5%;
}

/* Cards (for news, items, etc) */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.card {
  background: var(--panel-bg);
  border-radius: 15px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--glow-green);
  border-color: var(--accent-green);
}

.card-img-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #111;
}

.card-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-price-badge {
  position: absolute;
  bottom: 0;
  left: 0;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  padding: 0.3rem 1rem;
  font-size: 1.2rem;
  font-weight: 900;
  font-family: 'M PLUS Rounded 1c', sans-serif;
  border-top-right-radius: 10px;
  backdrop-filter: blur(4px);
}

.card-content {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.card-title {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: var(--text-main);
  line-height: 1.4;
}

.card-desc {
  color: var(--text-sub);
  font-size: 0.9rem;
  margin-bottom: 1rem;
  flex-grow: 1;
}

.card-actions {
  margin-top: auto;
}

/* Buttons */
.btn {
  display: inline-block;
  background: var(--accent-green);
  color: var(--bg-color);
  font-weight: 900;
  font-family: 'M PLUS Rounded 1c', sans-serif;
  text-decoration: none;
  padding: 0.8rem 2rem;
  border-radius: 30px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: var(--glow-green);
  font-size: 1.1rem;
  text-transform: uppercase;
}

.btn:hover {
  transform: scale(1.05);
  background: #fff;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
}

.btn-secondary {
  background: transparent;
  color: var(--accent-blue);
  border: 2px solid var(--accent-blue);
  box-shadow: none;
}

.btn-secondary:hover {
  background: var(--accent-blue);
  color: var(--bg-color);
  box-shadow: var(--glow-blue);
}

/* Tables (for Shop) */
table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 2rem;
  background: var(--panel-bg);
  border-radius: 10px;
  overflow: hidden;
}

th, td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

th {
  background: rgba(0, 240, 255, 0.1);
  color: var(--accent-blue);
  font-weight: 700;
}

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

tr:hover td {
  background: rgba(255,255,255,0.05);
}

.price {
  color: var(--accent-green);
  font-weight: 900;
  font-size: 1.2rem;
}

/* Footer */
footer {
  background: #000;
  text-align: center;
  padding: 3rem 5% 1rem;
  margin-top: 5rem;
  border-top: 1px solid rgba(255,255,255,0.1);
}

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

.footer-links a {
  color: var(--text-sub);
  text-decoration: none;
  font-size: 0.9rem;
}

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

/* Modal (Popup) */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(5px);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: var(--bg-color);
  border: 1px solid var(--accent-blue);
  border-radius: 15px;
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  position: relative;
  transform: translateY(-20px);
  transition: transform 0.3s ease;
  box-shadow: var(--glow-blue);
}

.modal-overlay.active .modal-content {
  transform: translateY(0);
}

.modal-close {
  position: absolute;
  top: 1.2rem;
  right: 1.5rem;
  font-size: 2rem;
  color: var(--text-sub);
  cursor: pointer;
  line-height: 1;
  transition: color 0.3s ease;
  z-index: 10;
}

.modal-close:hover {
  color: var(--accent-red);
}

.modal-header {
  margin-bottom: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1.5rem 2rem 1rem;
  flex-shrink: 0;
}

.modal-title {
  font-size: 1.5rem;
  color: var(--accent-blue);
  padding-right: 1.5rem;
}

.modal-body {
  padding: 1.5rem 2rem;
  overflow-y: auto;
}

.modal-body h4 {
  color: var(--accent-green);
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
}

.modal-info-group {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.5rem;
  margin-bottom: 2rem;
  background: rgba(255, 255, 255, 0.03);
  padding: 1.5rem;
  border-radius: 10px;
}

.modal-img-container {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #111;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 1rem;
}

.modal-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.modal-body ul {
  list-style-type: none;
  padding-left: 0;
}

.modal-body ul li {
  margin-bottom: 0.5rem;
  padding-left: 1.5rem;
  position: relative;
  color: var(--text-sub);
}

.modal-body ul li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--accent-green);
}

.modal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1.5rem 2rem;
  flex-shrink: 0;
}

/* Responsive */
@media (max-width: 768px) {
  header {
    flex-direction: column;
    align-items: stretch;
    gap: 15px;
    padding: 1rem 5%;
  }
  .logo {
    font-size: 1.1rem;
    width: 100%;
    justify-content: flex-start; /* 左揃えに戻す */
  }
  .logo span {
    display: inline; /* 文字を復活 */
  }
  .logo img {
    height: 30px; /* 画像もスマホサイズに縮小 */
  }
  nav {
    width: 100%;
    margin-top: 5px;
    margin-bottom: 5px;
  }
  nav ul {
    display: flex;
    flex-wrap: wrap; /* 横スクロールではなく折り返しにする */
    justify-content: center; /* 中央揃えに変更 */
    gap: 10px 8px; /* 行間と列間の余白 */
  }
  nav a {
    font-size: 0.8rem;
    padding: 0.5rem 0.8rem; /* ボタンの上下の余白も少し確保 */
    text-align: center;
  }
  .hero {
    height: auto;
    min-height: auto;
    padding: 1rem 0;
  }
  .hero-img {
    position: relative;
    max-height: 250px;
  }
  h2 {
    font-size: 2rem;
  }
  /* スマホでのカード一覧を3列にして小さく表示 */
  .card-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
  }
  .card-content {
    padding: 0.5rem;
  }
  .card-title {
    font-size: 0.75rem;
    margin-bottom: 0.2rem;
  }
  .card-desc {
    display: none; /* スマホ3列だと説明文は長すぎるため非表示 */
  }
  .card-price-badge {
    font-size: 0.8rem;
    padding: 0.2rem 0.5rem;
  }
  .card-content .price {
    font-size: 0.8rem;
    margin-top: 0.2rem !important;
  }
  .card-content .btn {
    padding: 0.3rem;
    font-size: 0.7rem;
    margin-top: 0.4rem;
    align-self: center; /* ボタンを中央揃えに */
  }
  .card-content {
    text-align: center; /* テキスト全体も中央に */
  }
  /* モーダルのスマホ対応 */
  .modal-footer {
    flex-direction: column;
    gap: 10px;
    align-items: center;
    padding: 1rem;
  }
  .modal-footer .price {
    font-size: 1.3rem;
  }
  .modal-footer .btn {
    width: 100%;
    text-align: center;
    padding: 0.6rem;
  }
}
