:root {
  --primary-color: #9e6dff;
  --secondary-color: #ff6dcb;
  --background-color: #0f0c29;
  --surface-color: rgba(23, 17, 65, 0.6);
  --text-color: #f0f0f0;
  --glow-color: rgba(158, 109, 255, 0.8);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--background-color);
  color: var(--text-color);
  font-family: 'Noto Sans JP', sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

/* === Character Image Style (New) === */
.character-image {
    position: fixed;
    bottom: 0;
    right: 0;
    width: 60vw; /* 画像の幅 */
    height: 100vh; /* 画像の高さ */
    opacity: 0.5;
}
.character-image::after {
  content: "";
  display: block;
  position: fixed;
  right: 0;
  left: 0;
  top: 0;
  bottom: 0;
  background: url(irami2.png) top right no-repeat;
}

#particles-js {
  position: fixed;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: -1; /* 一番後ろのレイヤー */
}

main {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
  position: relative;
  z-index: 1; /* 一番手前のレイヤー */
}

.main-visual {
  text-align: center;
  margin-bottom: 4rem;
  padding-top: 4rem;
}

.main-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 5rem;
  font-weight: 700;
  text-transform: uppercase;
  color: transparent;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color), var(--primary-color));
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  animation: gradient-flow 5s linear infinite, flicker 3s infinite alternate;
  position: relative;
  text-shadow: 0 0 10px var(--glow-color), 0 0 20px var(--glow-color), 0 0 40px var(--glow-color);
}

.sub-title {
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--text-color);
  letter-spacing: 0.5em;
  text-transform: uppercase;
  animation: text-glow 2s ease-in-out infinite alternate;
}

.content-box {
  background: var(--surface-color);
  border: 1px solid var(--primary-color);
  border-radius: 15px;
  padding: 2rem;
  margin-bottom: 2.5rem;
  box-shadow: 0 0 15px rgba(0,0,0,0.2), 0 0 30px var(--glow-color);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.content-box:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 20px rgba(0,0,0,0.3), 0 0 40px var(--glow-color);
}

.section-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 2rem;
  color: var(--primary-color);
  text-shadow: 0 0 8px var(--glow-color);
  margin-bottom: 1rem;
  text-align: center;
  border-bottom: 2px solid var(--secondary-color);
  padding-bottom: 0.5rem;
  display: inline-block;
  width: 100%;
}

.description {
  text-align: center;
  margin-bottom: 2rem;
  font-size: 1.1rem;
}

.twitch-cta-button {
  display: block;
  width: 80%;
  max-width: 400px;
  margin: 1rem auto;
  padding: 1rem 1.5rem;
  text-align: center;
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  border-radius: 50px;
  background: linear-gradient(90deg, #6441a5, var(--primary-color), var(--secondary-color));
  background-size: 200% auto;
  border: none;
  cursor: pointer;
  transition: all 0.4s ease;
  box-shadow: 0 0 20px #6441a5;
  animation: pulse-glow 2s infinite;
}

.twitch-cta-button:hover {
  background-position: right center;
  transform: scale(1.05);
  box-shadow: 0 0 30px var(--secondary-color);
}

.icon-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.sns-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: var(--text-color);
  transition: transform 0.3s ease, color 0.3s ease;
}

.sns-icon svg {
  width: 50px;
  height: 50px;
  fill: var(--text-color);
  transition: all 0.3s ease;
}

.sns-icon span {
  font-size: 0.8rem;
  margin-top: 0.5rem;
}

.sns-icon:hover {
  transform: translateY(-5px) scale(1.1);
  color: var(--secondary-color);
}
.sns-icon:hover svg {
  fill: var(--secondary-color);
}

.sns-icon.twitch svg {
  fill: #a970ff;
  animation: twitch-pulse 1.5s infinite;
}
.sns-icon.twitch:hover svg {
  fill: #fff;
  filter: drop-shadow(0 0 10px #fff);
}

.goods-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.goods-item {
  background: rgba(0,0,0,0.3);
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid transparent;
}

.goods-item img {
  width: 100%;
  height: auto;
  display: block;
}

.goods-item:hover {
  transform: scale(1.05);
  box-shadow: 0 0 15px var(--secondary-color);
  border-color: var(--secondary-color);
}

.view-more-button {
  display: block;
  width: fit-content;
  margin: 1.5rem auto 0;
  padding: 0.8rem 2rem;
  text-align: center;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-color);
  text-decoration: none;
  border-radius: 50px;
  background-color: transparent;
  border: 2px solid var(--primary-color);
  cursor: pointer;
  transition: all 0.3s ease;
}

.view-more-button:hover {
  background-color: var(--primary-color);
  color: #fff;
  box-shadow: 0 0 15px var(--primary-color);
}

.video-border-box {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.video-card {
    display: flex;
    flex-direction: column;
    background: rgba(0,0,0,0.3);
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none;
    color: var(--text-color);
    border: 1px solid transparent;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 20px var(--secondary-color);
    border-color: var(--secondary-color);
}

.video-thumbnail {
    width: 100%;
    display: block;
    border-bottom: 1px solid var(--primary-color);
}

.video-meta,
.video-title {
    font-size: 0.9rem;
    padding: 1rem;
    font-weight: normal;
}
.video-meta{
  padding-top: 0;
  margin-top: auto;
}

#commentContainer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 70vh;
  pointer-events: none;
  overflow: hidden;
}

.comment {
  position: absolute;
  color: white;
  font-size: 2rem;
  white-space: nowrap;
  text-shadow: 0 0 5px black, 0 0 10px var(--secondary-color);
  font-weight: bold;
}

footer {
  text-align: center;
  padding: 2rem;
  margin-top: 2rem;
  color: #aaa;
  font-size: 0.9rem;
}

@keyframes gradient-flow { to { background-position: 200% center; } }

@keyframes flicker {
  0%, 18%, 22%, 25%, 53%, 57%, 100% { text-shadow: 0 0 10px var(--glow-color), 0 0 20px var(--glow-color), 0 0 40px var(--glow-color); }
  20%, 24%, 55% { text-shadow: none; }
}

@keyframes text-glow {
  from { text-shadow: 0 0 3px #fff, 0 0 6px var(--primary-color); }
  to { text-shadow: 0 0 6px #fff, 0 0 12px var(--primary-color); }
}

@keyframes pulse-glow {
  0% { box-shadow: 0 0 10px #6441a5; }
  50% { box-shadow: 0 0 25px #ae8cff; }
  100% { box-shadow: 0 0 10px #6441a5; }
}

@keyframes twitch-pulse {
  0% { transform: scale(1); filter: drop-shadow(0 0 5px #a970ff); }
  50% { transform: scale(1.1); filter: drop-shadow(0 0 15px #a970ff); }
  100% { transform: scale(1); filter: drop-shadow(0 0 5px #a970ff); }
}

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 768px) {
    .main-title { font-size: 3.5rem; }
    .sub-title { font-size: 1.2rem; }
    main { padding: 1rem; }
    .content-box { padding: 1.5rem; }
    .video-border-box { grid-template-columns: 1fr; }
    .comment { font-size: 1.5rem; }
}
.character-image::after {
  background: url(irami2.png) top left 80% no-repeat;
}

/* === Twitch Embed Style === */
.twitch-embed-container {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 アスペクト比 */
  height: 0;
  overflow: hidden;
  width: 100%;
  max-width: 100%;
  margin: 2rem auto; /* 上下の余白 */
  border-radius: 10px; /* 角を少し丸める */
  border: 1px solid var(--primary-color);
  box-shadow: 0 0 15px var(--glow-color);
}

.twitch-embed-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}