:root {
  --bg-color: #3d5363; /* Matches the light fringe exactly */
  --bg-color-bright: #5c7c94; /* Brighter glow for the 'on' state */
  --bg-darker: #050d12; /* Deep ink blue-black for the edges */
  --text-color: #ffffff;
  --accent-color: #5865f2; /* Discord blue */
  --link-hover: #4e5bd4;
  --email-hover: #45a4fb;
  --font-family: "LINE Seed JP", system-ui, -apple-system, sans-serif;
}

html {
  overflow-x: hidden;
}

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

body {
  background-color: var(--bg-darker);
  color: var(--text-color);
  font-family: var(--font-family);
  font-weight: 300; /* Light weight for thinner strokes */
  min-height: 100vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  overflow-x: hidden; /* Prevent horizontal scroll from rays */
  padding: 0;
  position: relative;
}

/* Base 'Off' Glow - Anchored to Bulb */
.glow-off {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100vw;
  height: 100vh;
  max-width: 1200px; /* Limit spread on huge screens */
  background: radial-gradient(
    ellipse 40% 50% at 50% 50%,
    var(--bg-color) 0%,
    transparent 70%
  );
  z-index: 1;
  pointer-events: none;
  transition: opacity 0.3s ease-in-out;
  opacity: 1;
}

/* Bright 'On' Glow - Anchored to Bulb */
.glow-on {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.6);
  width: 150vw;
  height: 150vh;
  max-width: 2000px;
  background: radial-gradient(
    ellipse 40% 50% at 50% 50%,
    var(--bg-color-bright) 0%,
    transparent 70%
  );
  z-index: 2;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease-out, transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* Effects Layer Container */
.effects-layer {
  position: absolute;
  top: 47.5%; /* Aligned with original design */
  left: 50%;
  width: 0;
  height: 0;
  z-index: -1; /* Behind bulb */
  overflow: visible; /* Allow glow to spill out */
}

/* Ensure body background is solid dark since we removed the body::before gradient overlay */
body.home-page {
  background-color: var(--bg-darker);
}

/* Hide Off Glow when On */
body.is-on .glow-off {
  opacity: 0;
}

/* Show On Glow when On */
body.is-on .glow-on {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* Rotating RGB Rays Overlay (Primary) */
.rays-primary {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1000px;
  height: 1000px;
  /* Revert to margin centering to avoid rotate+translate axis conflict */
  margin-top: -500px;
  margin-left: -500px;
  transform: scale(0.6) rotate(0deg);
  background: repeating-conic-gradient(
    from 0deg at 50% 50%,
    transparent 0deg,
    hsla(0, 100%, 70%, 0.15) 3deg 9deg, /* Red */
    transparent 12deg 72deg,
    transparent 72deg,
    hsla(180, 100%, 70%, 0.15) 75deg 81deg, /* Cyan */
    transparent 84deg 144deg,
    transparent 144deg,
    hsla(60, 100%, 70%, 0.15) 147deg 153deg, /* Yellow */
    transparent 156deg 216deg,
    transparent 216deg,
    hsla(240, 100%, 70%, 0.15) 219deg 225deg, /* Blue */
    transparent 228deg 288deg,
    transparent 288deg,
    hsla(120, 100%, 70%, 0.15) 291deg 297deg, /* Green */
    transparent 300deg 360deg
  );
  -webkit-mask-image: radial-gradient(circle at 50% 50%, black 0%, black 25%, transparent 70%);
  mask-image: radial-gradient(circle at 50% 50%, black 0%, black 25%, transparent 70%);
  z-index: 3;
  opacity: 0;
  transition: opacity 0.5s ease-out, transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
  pointer-events: none;
  animation: shimmer 20s linear infinite;
}

/* Secondary Interference Rays (Secondary Wave) */
.rays-secondary {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1000px;
  height: 1000px;
  /* Revert to margin centering */
  margin-top: -500px;
  margin-left: -500px;
  transform: scale(0.6) rotate(0deg);
  background: repeating-conic-gradient(
    from 0deg at 50% 50%,
    transparent 0deg,
    hsla(180, 100%, 80%, 0.08) 1.5deg 3.5deg,
    transparent 5deg 51.4deg
  );
  -webkit-mask-image: radial-gradient(circle at 50% 50%, black 0%, black 10%, transparent 40%);
  mask-image: radial-gradient(circle at 50% 50%, black 0%, black 10%, transparent 40%);
  z-index: 3;
  opacity: 0;
  transition: opacity 0.5s ease-out, transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
  pointer-events: none;
  animation: shimmer-fast 13s linear infinite reverse;
}

/* Party Mode States */
body.is-party .rays-primary {
  opacity: 1;
  transform: scale(1);
}

body.is-party .rays-secondary {
  opacity: 1;
  transform: scale(1);
}

@keyframes shimmer {
  from { rotate: 0deg; filter: hue-rotate(0deg); }
  to { rotate: 360deg; filter: hue-rotate(360deg); }
}

@keyframes shimmer-fast {
  from { rotate: 0deg; }
  to { rotate: 360deg; }
}

.container {
  text-align: center;
  max-width: 600px;
  width: 100%;
  margin: 0 auto;
  animation: fadeIn 1.2s ease-out;
  padding: 40px 20px;
}

.logo-container {
  margin-bottom: 2rem;
  position: relative;
  display: inline-block;
  cursor: pointer;
  /* Remove the default highlight box on mobile tap */
  -webkit-tap-highlight-color: transparent;
  /* Prevent blue box or outline on focus in some browsers */
  outline: none;
  /* Prevent accidental text/image selection on rapid tapping */
  user-select: none;
  -webkit-user-select: none;
}

.logo-container img {
  max-width: 100%;
  height: auto;
  display: block;
  /* Apply the alpha erosion filter to both */
  filter: url(#remove-fringe);
}

.logo-on {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

body.is-on .logo-on {
  opacity: 1;
}

.logo-off {
  transition: opacity 0.3s ease-in-out;
}

.links {
  display: flex;
  gap: 2rem;
  justify-content: center;
  align-items: center;
  margin-top: 1rem;
}

.link-item {
  color: var(--text-color);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 400; /* Reduced from 500 */
  transition: all 0.3s ease;
  opacity: 0.7;
}

.link-item:hover {
  opacity: 1;
  transform: translateY(-2px);
  color: var(--accent-color);
}

.link-item i,
.link-item svg {
  width: 24px;
  height: 24px;
}

#discord-link svg {
  fill: currentColor;
}

#email-link svg {
  fill: currentColor;
}

.email-link:hover {
  color: var(--email-hover);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive adjustments */
@media (max-width: 480px) {
  .links {
    flex-direction: column;
    gap: 1.5rem;
  }
}

/* Products Section */
.products-section {
  margin: 30px 0 6rem;
  text-align: center;
  position: relative;
  z-index: 1;
}

.section-title {
  font-size: clamp(2.5rem, 11vw, 4rem);
  font-weight: 600; /* Reduced from 700 */
  margin-bottom: 7rem;
  color: var(--text-color);
  line-height: 1.2;
}

.section-subtitle {
  display: block;
  font-size: clamp(1.25rem, 5.5vw, 2rem); /* Scales proportionally with title */
  font-weight: 300; /* Reduced from 400 */
  opacity: 0.7;
  margin: 0.5rem 0 4rem;
}

/* Product Card Container - Layout Only */
.product-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  width: 60%; /* Scale relative to container, causing earlier shrink */
  max-width: 300px;
  min-width: 200px; /* Prevent it from getting too tiny on very small screens */
  margin: 0 auto 2rem;
  text-decoration: none;
  position: relative;
  /* Ensure hover on text also triggers card effects */
  cursor: pointer;
  perspective: 1000px;
}

/* The "Album Art" Visual */
.card-visual {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 20px;
  background: #1a1a1a;
  z-index: 1;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 10px 30px rgba(0,0,0,0.3); /* Base shadow */
}

.product-card:hover .card-visual {
  transform: translateY(-5px) scale(1.02);
}

/* The Logo/Image inside the card */
.product-logo {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Album art style - fill the box */
  padding: 0;        /* Remove padding to allow full bleed */
  position: relative;
  z-index: 2;
  border-radius: 20px; /* Matches .card-visual border-radius */
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: border-color 0.3s ease;
}

.product-card:hover .product-logo {
  border-color: rgba(255, 255, 255, 0.3);
}

/* The Glow Effect - "Backlight" */
.glow-container {
  position: absolute;
  top: 5%;
  left: 5%;
  width: 90%;
  height: 90%;
  border-radius: 50%; /* Softer blob glow */
  z-index: -1;
  opacity: 0;
  filter: blur(40px);
  transition: opacity 0.5s ease, transform 0.5s ease;
  transform: scale(0.8);
}

/* Reveal glow on hover */
.product-card:hover .glow-container {
  opacity: 0.8;
  transform: scale(1.2); /* Expand glow outwards */
}

/* Sponder Specific Colors */
.product-sponder .glow-container {
  background: linear-gradient(
    135deg,
    #00ff88, /* Green/Cyan */
    #00b8ff, /* Blue */
    #bd00ff  /* Purple */
  );
}

/* Text Info separate from card */
.card-info {
  text-align: center;
  z-index: 2;
  transition: transform 0.3s ease;
}

.product-card:hover .card-info {
  transform: translateY(2px);
}

.product-name {
  font-size: 1.8rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
  text-shadow: 0 4px 12px rgba(0,0,0,0.5); /* Legibility */
  background: none;
  -webkit-text-fill-color: initial;
}

.product-desc {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 400;
  line-height: 1.4;
  margin: 0;
  max-width: 250px;
  margin: 0 auto;
}

/* Footer */
.site-footer {
  width: 100%;
  margin-top: auto; /* Push to bottom */
  padding: 1rem;
  background-color: rgba(0, 0, 0, 0.3);
  border-top: 1px solid rgba(255, 255, 255, 0.05); /* Dim border */
  font-size: 0.75rem; /* Smaller font */
  text-align: center;
  color: rgba(255, 255, 255, 0.4); /* Dimmed text */
}

.footer-content {
  margin: 0 auto;
  display: flex;
  flex-direction: row; /* Horizontal layout */
  flex-wrap: wrap;    /* Wrap on small screens */
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
}

.footer-info {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
}

.footer-info p {
  margin: 0;
}

.footer-info a {
  color: inherit;
  text-decoration: underline;
}

.footer-badge {
  display: none; /* Ensure removed if present in markup */
}

.footer-links a {
  color: inherit;
  text-decoration: none;
  transition: opacity 0.2s, color 0.2s;
}

.footer-links a:hover {
  opacity: 1;
  color: var(--text-color);
  text-decoration: underline;
}

@media (max-width: 768px) {
  .footer-content, .footer-info {
    gap: 0.5rem;
    flex-direction: column;
  }

  body.home-page::before {
    background: radial-gradient(
      ellipse 150px 300px at 50% 250px,
      var(--bg-color) 0%,
      var(--bg-darker) 100%
    );
  }

  body.home-page::after {
    background: radial-gradient(
      ellipse 400px 600px at 50% 1250px,
      var(--bg-color-bright) 0%,
      var(--bg-darker) 80%
    );
    transform-origin: 50% 1250px;
  }
}


/* Legal Content Styling - Dark Mode */
.legal-content {
  background-color: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  color: var(--text-color);
  padding: 40px;
  border-radius: 16px;
  width: 100%;
  max-width: 800px;
  margin: 2rem auto 4rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-align: left;
}

.legal-content h1 {
  font-size: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 1rem;
  margin-bottom: 2rem;
  color: #fff;
}

.legal-content h2 {
  font-size: 1.5rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  color: #fff;
}

.legal-content h3 {
  font-size: 1.25rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  color: rgba(255, 255, 255, 0.9);
}

.legal-content p, .legal-content li {
  line-height: 1.6;
  margin-bottom: 1rem;
  color: rgba(255, 255, 255, 0.8);
}

.legal-content ul {
  padding-left: 1.5rem;
  margin: 1rem 0;
}

.legal-content a {
  color: #6ba6ff;
  text-decoration: none;
}

.legal-content a:hover {
  text-decoration: underline;
  color: #8cbaff;
}

.legal-content .meta-info {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
  margin-bottom: 2rem;
}

/* Legal Header */
.legal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 2rem;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  flex-wrap: wrap;
  gap: 1rem;
}

.legal-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: #fff;
  font-weight: 600; /* Reduced from 700 */
  font-size: 1.1rem;
  opacity: 0.9;
  transition: opacity 0.2s;
}

.legal-logo:hover {
  opacity: 1;
}

.legal-logo img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.legal-nav {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.legal-nav a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s;
}

.legal-nav a:hover, .legal-nav a.active {
  color: #fff;
}

/* Legal specific components */
/* Higher specificity to override .legal-content ul */
.legal-content .doc-list {
  list-style: none;
  padding: 0;
  margin-top: 2rem;
  padding-left: 0;
}

.doc-item {
  display: block;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  transition: border-color 0.2s ease, background-color 0.2s;
}

/* Higher specificity to override .legal-content a:hover */
.legal-content .doc-item:hover {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(0, 0, 0, 0.3);
  text-decoration: none;
  color: inherit; /* Prevent blue color override */
}

.doc-item:hover .doc-title {
  text-decoration: underline;
}

.doc-title {
  display: block;
  font-size: 1.25rem;
  font-weight: 500; /* Reduced from 600 */
  margin-bottom: 0.5rem;
  color: #fff;
}

.doc-desc {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.95rem;
  margin: 0;
  text-decoration: none;
}

.policy-block, .address-block, .alert-box {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 1.5rem;
  margin-top: 2rem;
}

.alert-box {
  background-color: rgba(255, 193, 7, 0.1);
  border: 1px solid rgba(255, 193, 7, 0.3);
  border-left: 4px solid #ffc107;
}

.alert-box p {
    color: rgba(255, 255, 255, 0.9);
}

.subprocessor-list {
  list-style: none;
  padding: 0;
}

.subprocessor-item {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1rem;
}

.subprocessor-name {
  font-weight: 500; /* Reduced from 600 */
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  display: block;
  color: #fff;
}

.subprocessor-role {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  display: block;
}

.link-group {
  margin-top: 1rem;
}

.link-group a {
  font-size: 0.9rem;
  margin-right: 1rem;
}

@media (max-width: 600px) {
    .legal-header {
        flex-direction: column;
        align-items: flex-start;
        padding: 1.5rem;
    }

    .legal-nav {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 0.5rem;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }

    .legal-content {
        padding: 24px;
        margin: 1rem;
    }
}


