:root {
  --bg-a: #07111f;
  --bg-b: #0e1a31;
  --bg-c: #171f3a;
  --line: rgba(255, 255, 255, 0.12);
  --text: #f5f7ff;
  --muted: rgba(245, 247, 255, 0.7);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}


html, body {
  min-height: 100%;
  height: auto;
}

body {
  margin: 0;
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(119, 200, 255, 0.16), transparent 28%),
    radial-gradient(circle at 80% 15%, rgba(139, 92, 246, 0.22), transparent 24%),
    radial-gradient(circle at 20% 85%, rgba(249, 115, 22, 0.12), transparent 22%),
    linear-gradient(135deg, var(--bg-a), var(--bg-b) 48%, var(--bg-c));
  overflow-x: hidden;  
  overflow-y: auto;
}


.scene {
  position: relative;
  min-height: 100vh;
  padding: 90px 20px 20px;
  overflow: visible;   
}
.scene::before {
  content: "";
  position: fixed;     
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(circle at center, black 46%, transparent 100%);
  pointer-events: none;
  z-index: 0;
}


.orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(10px);
  opacity: 0.95;
  pointer-events: none;
  z-index: 0;
}

.orb-a {
  width: 240px; height: 240px;
  top: -70px; left: -40px;
  background: radial-gradient(circle at 30% 30%, rgba(119,200,255,0.9), rgba(119,200,255,0.08) 70%, transparent 74%);
  box-shadow: 0 0 70px rgba(119,200,255,0.32);
}

.orb-b {
  width: 180px; height: 180px;
  right: 4%; top: 20%;
  background: radial-gradient(circle at 35% 35%, rgba(139,92,246,0.9), rgba(139,92,246,0.08) 70%, transparent 74%);
  box-shadow: 0 0 60px rgba(139,92,246,0.28);
}

.orb-c {
  width: 130px; height: 130px;
  right: 12%; bottom: 7%;
  background: radial-gradient(circle at 35% 35%, rgba(249,115,22,0.85), rgba(249,115,22,0.08) 70%, transparent 74%);
  box-shadow: 0 0 50px rgba(249,115,22,0.24);
}


.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 17, 31, 0.78);
  backdrop-filter: blur(14px);
}

.brand-wrap {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.brand-name {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #f5faff;
}

.brand-sub {
  font-size: 0.75rem;
  color: var(--muted);
}

.nav-links {
  display: flex;
  gap: 20px;
}

.nav-links a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
  transition: color 0.15s;
}

.nav-links a:hover {
  color: #eef8ff;
}


.landing {
  position: relative;
  z-index: 1;
  width: min(720px, 100%);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: stretch;
}


.hero-panel {
  padding: 24px 8px 8px;
}

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

.hero-panel h1 {
  margin: 0 0 14px;
  font-size: clamp(2rem, 6vw, 3.2rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-copy {
  margin: 0 auto;
  max-width: 54ch;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.75;
}


.studio-card {
  border-radius: 28px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(20,28,48,0.92), rgba(8,12,24,0.88));
  box-shadow: var(--shadow);
  padding: 20px;
}


.upload-area {
  position: relative;
  padding: 32px 20px 36px;
  border-radius: 22px;
  border: 1.5px dashed rgba(125,211,252,0.38);
  background:
    radial-gradient(circle at top, rgba(125,211,252,0.07), transparent 50%),
    rgba(255,255,255,0.03);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  overflow: hidden;
}

.upload-area:hover,
.upload-area.drag {
  border-color: rgba(125,211,252,0.7);
  background: rgba(125,211,252,0.07);
}

.upload-area.hidden {
  display: none;
}

.upload-area input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}


.upload-art {
  position: relative;
  width: 110px;
  height: 110px;
  margin: 0 auto 18px;
  display: grid;
  place-items: center;
  transform-style: preserve-3d;
}

.upload-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(125,211,252,0.3);
  box-shadow:
    inset 0 0 20px rgba(125,211,252,0.07),
    0 0 20px rgba(125,211,252,0.07);
}

.ring-one {
  transform: rotateX(68deg) rotateZ(18deg);
}

.ring-two {
  inset: 10px;
  border-color: rgba(139,92,246,0.24);
  transform: rotateX(68deg) rotateZ(-12deg);
}

.upload-core {
  position: relative;
  z-index: 1;
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(119,200,255,0.32), rgba(139,92,246,0.32));
  border: 1px solid rgba(255,255,255,0.16);
  font-size: 2rem;
  font-weight: 900;
  color: #fff;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.18),
    0 12px 30px rgba(0,0,0,0.25);
}

.upload-area h2 {
  margin: 0 0 6px;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.upload-area p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}


.preview-wrap {
  display: none;
  margin-bottom: 4px;
}

.preview-wrap.visible {
  display: block;
}

#preview {
  width: 100%;
  max-height: 340px;
  object-fit: cover;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.12);
  display: block;
}

.preview-meta {
  margin-top: 8px;
  font-size: 0.76rem;
  color: rgba(245,247,255,0.45);
  text-align: right;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}


.btn-row {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

#generateBtn,
#resetBtn {
  display: none;
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 15px 16px;
  border: 0;
  border-radius: 16px;
  font: inherit;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.16s, opacity 0.16s;
}

#generateBtn {
  color: #08111f;
  background: linear-gradient(135deg, #8ce0ff, #b29bff);
  box-shadow: 0 12px 28px rgba(139,92,246,0.2);
}

#resetBtn {
  color: #f3f6ff;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.13);
}

#generateBtn:hover,
#resetBtn:hover {
  transform: translateY(-1px);
}

#generateBtn:disabled {
  opacity: 0.65;
  cursor: wait;
  transform: none;
}


.btn-spinner {
  display: none;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(8,17,31,0.25);
  border-top-color: #08111f;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}


.result-box {
  display: none;
  margin-top: 16px;
  padding: 18px 18px 14px;
  border-radius: 20px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--line);
}

.result-label {
  font-size: 0.72rem;
  color: #9ed7ff;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

#captionText {
  margin: 0 0 12px;
  color: #f8fbff;
  line-height: 1.75;
  font-size: 1rem;
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  padding: 7px 18px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.07);
  color: rgba(245,247,255,0.72);
  font: inherit;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background 0.15s;
}

.copy-btn:hover {
  background: rgba(255,255,255,0.13);
}


.error {
  display: none;
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(248,113,113,0.12);
  border: 1px solid rgba(248,113,113,0.24);
  color: #ffd4d4;
  font-size: 0.88rem;
  line-height: 1.6;
}


.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.feature-card {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 16px;
  border-radius: 18px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line);
}

.feature-icon {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(119,200,255,0.22), rgba(139,92,246,0.2));
  border: 1px solid rgba(255,255,255,0.12);
  font-size: 1rem;
  color: #f7fbff;
}

.feature-card h3 {
  margin: 0 0 4px;
  font-size: 0.9rem;
  font-weight: 700;
}

.feature-card p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.55;
}


.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 18px 4px;
  border-top: 1px solid var(--line);
  font-size: 0.8rem;
  color: rgba(245,247,255,0.4);
}

.site-footer a {
  color: rgba(142,210,255,0.7);
  text-decoration: none;
}

.site-footer a:hover {
  color: #8ce0ff;
}
@media (max-width: 720px) {
  .scene {
    padding: 82px 14px 14px;
  }

  .navbar {
    padding: 12px 14px;
  }

  .hero-panel h1 {
    font-size: clamp(1.7rem, 10vw, 2.5rem);
  }

  .nav-links {
    display: none;
  }

  .btn-row {
    flex-direction: column;
  }

  .features {
    grid-template-columns: 1fr;
  }
}
