:root {
  --color-bg: #0a0a1a;
  --color-text: #e0e0ff;
  --color-primary: #00f0ff;
  --color-secondary: #ff00ff;
  --color-accent: #f0ff00;
  --color-bg-light: #1a1a3a;
  --font-heading: "Orbitron", sans-serif;
  --font-body: "Noto Sans JP", sans-serif;
  --transition-speed: 0.4s;
}

body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  margin: 0;
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
  z-index: 2;
}

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 100px 0 60px;
}

.hero .hero-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  background: linear-gradient(135deg, rgba(10, 10, 26, 0.9), rgba(26, 26, 58, 0.95));
}

.hero .hero-background #hero-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.hero .hero-content {
  display: flex;
  align-items: center;
  gap: 40px;
}

@media (max-width: 1024px) {
  .hero .hero-content {
    flex-direction: column;
    text-align: center;
  }
}

.hero .hero-text {
  flex: 1;
}

.hero .hero-title {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  color: var(--color-primary);
  margin: 0 0 1rem;
  line-height: 1.2;
  text-shadow: 0 0 15px rgba(0, 240, 255, 0.5);
}

.hero .hero-title .highlight {
  color: var(--color-accent);
  text-shadow: 0 0 15px rgba(240, 255, 0, 0.6);
}

.hero .hero-subtitle {
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  margin-bottom: 2rem;
  opacity: 0.9;
}

.hero .hero-subtitle .typewriter {
  border-right: 2px solid var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  display: inline-block;
  vertical-align: bottom;
  animation: typing 2s steps(10, end) 1s 1 normal both, blink-caret 0.75s step-end infinite;
  animation-delay: 1.5s;
}

.hero .cta-button {
  display: inline-block;
  padding: 12px 30px;
  background: linear-gradient(45deg, var(--color-primary), var(--color-secondary));
  color: var(--color-bg);
  font-family: var(--font-heading);
  font-size: 1.1rem;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
  text-decoration: none;
  text-shadow: none;
}

.hero .cta-button:hover {
  transform: scale(1.05) translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 240, 255, 0.3), 0 6px 6px rgba(255, 0, 255, 0.2);
}

.hero .hero-visual {
  flex: 1.2;
  max-width: 600px;
  width: 100%;
}

@media (max-width: 1024px) {
  .hero .hero-visual {
    max-width: 500px;
    margin-top: 40px;
  }
}

.hero .visual-caption {
  text-align: center;
  font-size: 0.9rem;
  opacity: 0.7;
  margin-top: 10px;
}

.hero .image-comparison-slider {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  border: 2px solid rgba(0, 240, 255, 0.3);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.hero .img-comp-container {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
}

.hero .img-comp-img {
  position: absolute;
  width: 100%;
  height: 100%;
  overflow: hidden;
  top: 0;
  left: 0;
}

.hero .img-comp-img.img-comp-before {
   z-index: 1;
}


.hero .img-comp-img img {
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero .img-comp-overlay {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 50%;
  overflow: hidden;
  z-index: 2;
}

.hero .img-comp-slider {
  position: absolute;
  z-index: 9;
  cursor: ew-resize;
  width: 4px;
  height: 100%;
  background-color: var(--color-primary);
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  box-shadow: 0 0 10px var(--color-primary);
}

.hero .img-comp-slider::before, .hero .img-comp-slider::after {
  content: "";
  position: absolute;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--color-primary);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-bg);
  font-size: 1rem;
  font-family: sans-serif;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4);
}
.hero .img-comp-slider::before {
  top: calc(50% - 20px);
  content: "◀";
  padding-right: 3px;
}
.hero .img-comp-slider::after {
  bottom: calc(50% - 20px);
  content: "▶";
  padding-left: 3px;
}

.hero .img-comp-label {
  position: absolute;
  bottom: 10px;
  background-color: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 0.8rem;
  pointer-events: none;
  opacity: 0.8;
}
.hero .label-before {
  left: 10px;
}
.hero .label-after {
  right: 10px;
}

.hero .scroll-indicator {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  text-align: center;
  color: var(--color-primary);
  opacity: 0.7;
  font-size: 0.8rem;
  animation: bounce 2s infinite;
}

.hero .scroll-indicator .arrow {
  width: 10px;
  height: 10px;
  border: 2px solid var(--color-primary);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  margin: 5px auto 0;
}

.section-padding {
  padding: 80px 0;
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5vw, 3rem);
  color: var(--color-primary);
  margin-bottom: 1.5rem;
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.4);
}

.section-title .highlight {
  color: var(--color-accent);
  text-shadow: 0 0 10px rgba(240, 255, 0, 0.5);
}

p {
  line-height: 1.7;
  margin-bottom: 1rem;
  color: var(--color-text);
  opacity: 0.9;
}

.highlight-strong {
  color: var(--color-accent);
  font-weight: bold;
}

.intro {
  background-color: #101020;
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.intro-container {
  display: flex;
  align-items: center;
  gap: 60px;
}

@media (max-width: 767px) {
  .intro-container {
    flex-direction: column;
    gap: 40px;
  }
}

.intro-text {
  flex: 1;
}

.intro-visual {
  flex-basis: 40%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.ai-logo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  background: rgba(26, 26, 58, 0.3);
  padding: 25px;
  border-radius: 8px;
  border: 1px solid rgba(0, 240, 255, 0.1);
  margin-bottom: 15px;
}

.logo-item {
  background: rgba(10, 10, 26, 0.5);
  padding: 15px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 80px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.logo-item:hover {
  transform: scale(1.05);
  box-shadow: 0 5px 15px rgba(0, 240, 255, 0.2);
}

.logo-item img {
  max-width: 100%;
  max-height: 50px;
  filter: grayscale(50%) brightness(1.5);
  opacity: 0.8;
  transition: filter 0.3s ease, opacity 0.3s ease;
}
.logo-item:hover img {
  filter: grayscale(0%) brightness(1);
  opacity: 1;
}

.logo-item.plus-icon {
  font-size: 2rem;
  color: var(--color-primary);
  font-weight: bold;
}

.visual-subtext {
  font-size: 0.9rem;
  opacity: 0.7;
  text-align: center;
}

.text-center {
  text-align: center;
}

.section-subtitle {
  max-width: 700px;
  margin: 0 auto 2.5rem auto;
  font-size: 1.1rem;
  opacity: 0.8;
}

.gallery {
  background-color: var(--color-bg);
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.filter-buttons {
  margin-bottom: 2rem;
}

.filter-btn {
  background: transparent;
  border: 1px solid var(--color-primary);
  color: var(--color-primary);
  padding: 8px 18px;
  margin: 0 5px;
  border-radius: 20px;
  cursor: pointer;
  transition: background-color 0.3s, color 0.3s, box-shadow 0.3s;
  font-size: 0.9rem;
}

.filter-btn:hover,
.filter-btn.active {
  background-color: var(--color-primary);
  color: var(--color-bg);
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.4);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  cursor: pointer;
  background-color: #1a1a3a;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  margin-bottom: 25px;
}

.gallery-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.5);
}

.gallery-item img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.gallery-item:hover img {
  transform: scale(1.08);
}

.gallery-item-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0) 100%);
  padding: 30px 15px 15px 15px;
  color: #fff;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  pointer-events: none;
}

.gallery-item:hover .gallery-item-overlay {
  opacity: 1;
  transform: translateY(0);
}

.item-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  margin: 0 0 5px 0;
  color: var(--color-primary);
  text-shadow: 0 0 5px rgba(0, 240, 255, 0.7);
}

.item-prompt-preview {
  font-size: 0.85rem;
  line-height: 1.4;
  opacity: 0.8;
  margin-bottom: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.structure {
  background-color: #101020;
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.structure-diagram-wrapper {
  position: relative;
  margin: 3rem auto 4rem auto;
  max-width: 900px;
}

.structure-diagram {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  padding: 20px;
  border: 1px solid rgba(0, 240, 255, 0.2);
  background: rgba(26, 26, 58, 0.2);
  border-radius: 10px;
  position: relative;
  z-index: 1;
}

.prompt-block {
  background: var(--color-bg-light, #1a1a3a);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 12px 18px;
  text-align: center;
  color: var(--color-text);
  cursor: default;
  transition: background-color 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
  flex-grow: 1;
  min-width: 150px;
}

.prompt-block:hover {
  background-color: rgba(0, 240, 255, 0.1);
  border-color: var(--color-primary);
  transform: scale(1.03);
}

.block-label {
  display: block;
  font-weight: bold;
  font-family: var(--font-heading);
  font-size: 1rem;
  margin-bottom: 8px;
  color: var(--color-primary);
}

.block-subject .block-label { color: var(--color-accent); }
.block-style .block-label { color: var(--color-secondary); }
.block-quality .block-label { color: #4dff4d; }
.block-params .block-label { color: #ffa500; }
.block-negative .block-label { color: #ff4d4d; }

.block-example {
  display: block;
  font-size: 0.85rem;
  font-style: italic;
  opacity: 0.7;
  word-wrap: break-word;
}

.structure-explanations {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.explanation-card {
  background: var(--color-bg-light, #1a1a3a);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 25px;
  border-radius: 8px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.explanation-card.highlighted {
  border-color: var(--color-primary);
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.3);
}

.card-title {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  margin: 0 0 10px 0;
  color: var(--color-text);
  display: flex;
  align-items: center;
}

.card-title .icon {
  margin-right: 10px;
  font-size: 1.5rem;
  line-height: 1;
  display: inline-block;
}

#card-subject .icon { color: var(--color-accent); }
#card-style .icon { color: var(--color-secondary); }
#card-quality .icon { color: #4dff4d; }
#card-params .icon { color: #ffa500; }
#card-negative .icon { color: #ff4d4d; }

.explanation-card p {
  font-size: 1rem;
  margin-bottom: 0;
}

.faq {
  background-color: var(--color-bg);
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.faq-accordion {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid rgba(0, 240, 255, 0.1);
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-question {
  background: none;
  border: none;
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 1.1rem;
  font-weight: bold;
  text-align: left;
  padding: 20px 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: color 0.3s ease;
}

.faq-question:hover {
  color: var(--color-primary);
}

.faq-question span:first-child {
  padding-right: 15px;
}

.faq-icon {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid var(--color-primary);
  border-radius: 50%;
  position: relative;
  transition: transform 0.3s ease, background-color 0.3s ease;
  flex-shrink: 0;
}

.faq-icon::before,
.faq-icon::after {
  content: '';
  position: absolute;
  background-color: var(--color-primary);
  transition: transform 0.3s ease;
}
.faq-icon::before {
  width: 60%;
  height: 2px;
  top: calc(50% - 1px);
  left: 20%;
}
.faq-icon::after {
  width: 2px;
  height: 60%;
  top: 20%;
  left: calc(50% - 1px);
}

.faq-question[aria-expanded="true"] .faq-icon::after {
  transform: rotate(90deg);
}
.faq-question[aria-expanded="true"] .faq-icon {
  transform: rotate(180deg);
  background-color: rgba(0, 240, 255, 0.1);
}

.faq-answer {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94), padding 0.5s ease;
  padding: 0 15px;
}

.faq-answer p {
  padding: 0 0 20px 0;
  margin: 0;
  font-size: 1rem;
  opacity: 0.85;
}

.download {
  background: linear-gradient(rgba(10, 10, 26, 0.8), rgba(10, 10, 26, 0.9)),
              url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" width="100%" height="100%"><defs><pattern id="p-down" width="15" height="15" patternUnits="userSpaceOnUse"><path d="M0 5 L5 0 L10 5 L15 0" stroke="%2300f0ff" stroke-width="0.5" fill="none" opacity="0.05"/></pattern></defs><rect width="100%" height="100%" fill="url(%23p-down)"/></svg>');
  background-size: cover, 15px 15px;
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
}

.download .section-subtitle {
  margin-bottom: 3rem;
}

.download-button {
  padding: 15px 35px;
  font-size: 1.2rem;
}

.download-button .icon {
  margin-right: 10px;
  display: inline-block;
  animation: download-bounce 1.5s infinite ease-in-out;
}

.download-note {
  margin-top: 1.5rem;
  font-size: 0.85rem;
  opacity: 0.6;
}

@keyframes typing {
  from { width: 0 }
  to { width: 100% }
}
@keyframes blink-caret {
  from, to { border-color: transparent }
  50% { border-color: var(--color-text); }
}
@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {transform: translate(-50%, 0);}
  40% {transform: translate(-50%, -10px);}
  60% {transform: translate(-50%, -5px);}
}
.animate-fade-in-up {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.8s ease-out forwards;
}
@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }
.delay-3 { animation-delay: 0.6s; }
.delay-4 { animation-delay: 0.8s; }

.scroll-animate {
  opacity: 0;
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.animate-fade-in-left {
  transform: translateX(-40px);
}
.animate-fade-in-right {
  transform: translateX(40px);
}
.scroll-animate.visible {
  opacity: 1;
  transform: translateX(0);
}
/* Note: Specific delays for scroll-animate might override animation-delay */
.scroll-animate.delay-1 { transition-delay: 0.2s; }
.scroll-animate.delay-2 { transition-delay: 0.4s; }
.scroll-animate.delay-3 { transition-delay: 0.45s; }
.scroll-animate.delay-4 { transition-delay: 0.6s; }

.animate-zoom-in {
  transform: scale(0.9);
}
.scroll-animate.animate-zoom-in.visible {
  transform: scale(1);
  opacity: 1;
}

.animate-pop-in {
  transform: scale(0.8);
  opacity: 0;
}
.scroll-animate.animate-pop-in.visible {
  transform: scale(1);
  opacity: 1;
}

.animate-fade-in {
   opacity: 0;
}
.scroll-animate.animate-fade-in.visible {
   opacity: 1;
   transform: none;
}

.animate-fade-in-up {
   transform: translateY(30px);
   opacity: 0;
}
.scroll-animate.animate-fade-in-up.visible {
   transform: translateY(0);
   opacity: 1;
}

@keyframes download-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}