:root {
  --primary: #f8af3c;   /* The bright golden/orange light hitting the dog's fur and the lantern */
  --secondary: #d36e2f; /* A darker, warmer burnt orange/brown for depth */
  --bg-color: #2b1f1a;  /* Very dark warm brown/black for the background to match the night scene */
  --text-dark: #120d0a; /* Almost pure black for borders/shadows */
  --text-light: #fffdf5; /* Off-white, slightly warm for the text to contrast the dark background */
  --border: #0a0705;    /* Deepest black for thick manga borders */
}

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

body {
  font-family: "Nunito", sans-serif;
  background-color: var(--bg-color);
  background-image:
    radial-gradient(circle at 100% 150%, var(--primary) 24%, transparent 24%),
    radial-gradient(circle at 0% 150%, var(--primary) 24%, transparent 24%),
    radial-gradient(circle at 50% -50%, var(--secondary) 25%, transparent 25%);
  background-size: cover;
  background-attachment: fixed;
  color: var(--text-dark);
  overflow-x: hidden;
}

/* Floating Manga Text */
.floating-characters {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
}

.char {
  position: absolute;
  font-family: "Kosugi Maru", sans-serif;
  font-size: 3rem;
  font-weight: 900;
  color: var(--text-light);
  text-shadow:
    3px 3px 0 var(--border),
    -1px -1px 0 var(--border),
    1px -1px 0 var(--border),
    -1px 1px 0 var(--border),
    1px 1px 0 var(--border);
  animation: float 6s ease-in-out infinite;
  opacity: 0.6;
}

.c1 {
  top: 15%;
  left: 10%;
  animation-delay: 0s;
}
.c2 {
  top: 70%;
  left: 85%;
  animation-delay: 1s;
  font-size: 4rem;
}
.c3 {
  top: 60%;
  left: 5%;
  animation-delay: 2s;
}
.c4 {
  top: 20%;
  left: 80%;
  animation-delay: 1.5s;
  font-size: 2.5rem;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0) rotate(-5deg);
  }
  50% {
    transform: translateY(-20px) rotate(5deg);
  }
}

/* Typography styles */
h1 {
  font-size: 5rem;
  font-weight: 900;
  color: var(--text-light);
  letter-spacing: 2px;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  text-shadow:
    4px 4px 0 var(--primary),
    8px 8px 0 var(--border),
    -2px -2px 0 var(--border),
    2px -2px 0 var(--border),
    -2px 2px 0 var(--border),
    2px 2px 0 var(--border);
  -webkit-text-stroke: 2px var(--border);
}

.subtitle {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 2rem;
  background: var(--text-light);
  padding: 0.5rem 1.5rem;
  display: inline-block;
  border: 3px solid var(--border);
  border-radius: 20px;
  box-shadow: 4px 4px 0 var(--border);
  transform: rotate(-2deg);
}

.hero {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 2rem;
}

.image-container {
  position: relative;
  max-width: 400px;
  margin: 0 auto 3rem;
  transition: transform 0.3s ease;
}

.image-container:hover {
  transform: scale(1.05) rotate(2deg);
}

.main-img {
  width: 100%;
  height: auto;
  border: 6px solid var(--border);
  border-radius: 50%;
  box-shadow:
    10px 10px 0 var(--primary),
    10px 10px 0 6px var(--border);
  position: relative;
  z-index: 2;
  background-color: white;
}

.glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 120%;
  height: 120%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.8) 0%,
    rgba(255, 255, 255, 0) 70%
  );
  z-index: 1;
  animation: pulse 2s infinite alternate;
}

@keyframes pulse {
  0% {
    transform: translate(-50%, -50%) scale(0.9);
    opacity: 0.5;
  }
  100% {
    transform: translate(-50%, -50%) scale(1.1);
    opacity: 1;
  }
}

/* CA Copier */
.ca-container {
  position: relative;
  margin-bottom: 2rem;
}

.ca-box {
  display: inline-flex;
  align-items: center;
  background: white;
  border: 4px solid var(--border);
  border-radius: 50px;
  padding: 0.5rem 0.5rem 0.5rem 1.5rem;
  box-shadow: 6px 6px 0 var(--border);
  transition: transform 0.2s;
}

.ca-box:hover {
  transform: translateY(-2px);
}

.ca-text {
  font-family: monospace;
  font-size: 1.2rem;
  font-weight: bold;
  margin-right: 1.5rem;
  word-break: break-all;
}

.copy-btn {
  background: var(--primary);
  color: var(--border);
  border: 3px solid var(--border);
  border-radius: 30px;
  padding: 0.8rem 1.5rem;
  font-size: 1.1rem;
  font-weight: 900;
  cursor: pointer;
  text-transform: uppercase;
  transition: all 0.2s;
}

.copy-btn:hover {
  background: var(--secondary);
  color: white;
  transform: scale(1.05);
}

.copy-btn:active {
  transform: scale(0.95);
}

.toast {
  position: absolute;
  top: -50px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--border);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 10px;
  font-weight: bold;
  opacity: 0;
  transition:
    opacity 0.3s,
    top 0.3s;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  top: -40px;
  animation: pop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

/* Socials */
.socials {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 1rem;
}

.social-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-color); /* Updated to dark background */
  color: var(--text-light);    /* Updated to light text */
  text-decoration: none;
  font-weight: 800;
  font-size: 1.2rem;
  padding: 1rem 2rem;
  border: 4px solid var(--border);
  border-radius: 20px;
  box-shadow: 4px 4px 0 var(--border);
  transition: all 0.2s;
}

.social-btn.tg {
  background: #0088cc;
  color: white;
}
.social-btn.x {
  background: #000;
  color: white;
}

.social-btn:hover {
  transform: translateY(-5px) rotate(3deg);
  box-shadow: 6px 9px 0 var(--border);
}

/* Story Section */
.story-section {
  padding: 6rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}

.story-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 3rem;
  margin-top: 3rem;
}

.story-card {
  background: var(--bg-color); /* Updated to fit dark theme */
  color: var(--text-light);    /* Ensure text is readable */
  border: 6px solid var(--border);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 10px 10px 0 var(--secondary);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.story-card:hover {
  transform: translateY(-10px) rotate(-1deg);
  box-shadow: 15px 15px 0 var(--secondary);
}

.story-img {
  width: 100%;
  max-width: 350px;
  border: 4px solid var(--border);
  border-radius: 12px;
  margin-bottom: 2rem;
  box-shadow: 6px 6px 0 var(--border);
}

.story-text {
  font-size: 1.3rem;
  line-height: 1.6;
  font-weight: 700;
  text-align: left;
}

.highlight {
  color: var(--secondary);
  font-weight: 900;
  font-size: 1.5rem;
  font-family: "Kosugi Maru", sans-serif;
}

/* Chart Section */
.chart-section {
  padding: 4rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.section-title {
  font-size: 3.5rem;
  font-weight: 900;
  margin-bottom: 2rem;
  text-transform: uppercase;
  color: white;
  text-shadow:
    3px 3px 0 var(--border),
    -1px -1px 0 var(--border),
    1px -1px 0 var(--border),
    -1px 1px 0 var(--border),
    1px 1px 0 var(--border);
}

.iframe-container {
  width: 100%;
  height: 600px;
  border: 6px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  box-shadow:
    10px 10px 0 var(--primary),
    10px 10px 0 6px var(--border);
  background: var(--border);
}

iframe {
  width: 100%;
  height: 100%;
}

footer {
  text-align: center;
  padding: 2rem;
  font-weight: bold;
  border-top: 4px solid var(--border);
  background: var(--bg-color); /* Updated for dark theme */
  color: var(--text-light);
}

/* Animations Utilities */
.bounce-in {
  animation: bounceIn 1s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.pop-in {
  animation: popIn 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
  animation-delay: 0.3s;
}
.slide-up {
  animation: slideUp 0.8s ease-out both;
  animation-delay: 0.5s;
}
.zoom-in {
  animation: zoomIn 0.8s ease-out both;
  animation-delay: 0.2s;
}

@keyframes bounceIn {
  0% {
    transform: scale(0.1);
    opacity: 0;
  }
  60% {
    transform: scale(1.2);
    opacity: 1;
  }
  100% {
    transform: scale(1);
  }
}

@keyframes popIn {
  0% {
    transform: scale(0.8) translateY(20px);
    opacity: 0;
  }
  100% {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

@keyframes slideUp {
  0% {
    transform: translateY(40px);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes zoomIn {
  0% {
    transform: scale(0.5);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Responsive */
@media (max-width: 768px) {
  h1 {
    font-size: 3.5rem;
  }
  .subtitle {
    font-size: 1.2rem;
  }
  
  .floating-characters .char {
    display: none; /* Hide floating Japanese text on mobile as it overlaps */
  }

  .ca-box {
    flex-direction: column;
    padding: 1rem;
    border-radius: 20px;
    text-align: center;
  }
  .ca-text {
    margin-right: 0;
    margin-bottom: 1rem;
    font-size: 1rem;
    word-break: break-all;
  }
  .socials {
    flex-direction: column;
  }
  
  .story-section {
    padding: 3rem 1rem;
  }
  
  .story-grid {
    grid-template-columns: 1fr; /* Stack story cards */
  }

  .chart-section {
    padding: 2rem 1rem;
  }
  .iframe-container {
    height: 400px;
  }
}
