* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  user-select: none;
}

body {
  min-height: 100vh;
  color: #1a1a1a;
  position: relative;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  background-color: #e5e5e5;
}

/* Background Image Overlay / Slideshow */
.bg-slideshow {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -2;
}

.bg-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.2s ease-in-out;
}

.bg-slide.active {
  opacity: 1;
}

.bg-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: -1;
}

/* Clear Glossy Glass UI Base */
.glass {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.55) 0%,
    rgba(255, 255, 255, 0.2) 100%
  );
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 
    0 8px 32px 0 rgba(0, 0, 0, 0.06),
    inset 0 1px 1px 0 rgba(255, 255, 255, 0.8),
    inset 0 -1px 1px 0 rgba(0, 0, 0, 0.05);
}

.box-smooth {
  border-radius: 24px;
}

/* Header Navigation */
header.header-glass {
  margin: 16px auto;
  width: calc(100% - 40px);
  max-width: 1240px;
  padding: 10px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 36px;
  position: relative;
  z-index: 100;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
}

.home-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.9);
  color: #111;
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: 800;
  font-size: 0.72rem;
  letter-spacing: 0.5px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
  transition: background 0.2s ease, transform 0.2s ease;
  white-space: nowrap;
}

.home-btn:hover {
  background: #ffffff;
  transform: translateY(-1px);
}

.logo-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-icon-wrap {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.6);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  flex-shrink: 0;
}

.logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.logo-text {
  display: flex;
  flex-direction: column;
  white-space: nowrap;
}

.logo-title {
  font-weight: 900;
  font-size: 0.95rem;
  letter-spacing: 0.5px;
  line-height: 1;
  color: #111;
}

.logo-subtitle {
  font-weight: 700;
  font-size: 0.55rem;
  letter-spacing: 1.2px;
  color: #666;
  margin-top: 2px;
}

/* Centered Header Column */
.header-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  flex: 1;
  white-space: nowrap;
}

.header-tagline {
  font-weight: 900;
  font-size: 0.88rem;
  letter-spacing: 0.8px;
  color: #111;
  line-height: 1.1;
}

.header-features {
  display: flex;
  gap: 8px;
  font-size: 0.65rem;
  font-weight: 700;
  color: #555;
  margin-top: 3px;
}

.header-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex: 1;
}

/* Instagram Gradient Button */
.instagram-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
  color: #ffffff;
  text-decoration: none;
  padding: 8px 18px;
  border-radius: 20px;
  font-weight: 800;
  font-size: 0.75rem;
  box-shadow: 0 4px 12px rgba(220, 39, 67, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
}

.instagram-btn svg {
  fill: #ffffff;
}

.instagram-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(220, 39, 67, 0.4);
}

.header-cta {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #232323;
  color: #ffffff;
  text-decoration: none;
  padding: 8px 18px;
  border-radius: 20px;
  font-weight: 800;
  font-size: 0.75rem;
  transition: background 0.2s ease, transform 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  white-space: nowrap;
}

.header-cta:hover {
  background: #000000;
  transform: translateY(-1px);
}

/* Main Container Layout */
.container {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 20px;
  max-width: 1240px;
  margin: 0 auto 30px;
  padding: 0 20px;
  flex-grow: 1;
}

.form-panel {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form-panel h2 {
  font-size: 1.2rem;
  margin-bottom: 2px;
  color: #111;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-group label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #333;
}

.form-group input {
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(10px);
  outline: none;
  font-size: 0.85rem;
  color: #111;
  user-select: text;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.form-group input:focus {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(0, 0, 0, 0.3);
}

.drop-zone {
  border: 2px dashed rgba(0, 0, 0, 0.2);
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px);
  padding: 12px;
  text-align: center;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.drop-zone.dragover {
  background: rgba(255, 255, 255, 0.6);
  border-color: #111;
}

.drop-zone div {
  font-size: 0.8rem;
  font-weight: 600;
  color: #222;
}

.file-btn {
  display: inline-block;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 12px;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 700;
  transition: background 0.2s ease;
}

.file-btn:hover {
  background: #ffffff;
}

.file-name-display {
  font-size: 0.7rem;
  color: #555;
  margin-top: 4px;
  word-break: break-all;
}

.submit-btn {
  margin-top: 6px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.85);
  color: #111;
  border: 1px solid rgba(0, 0, 0, 0.1);
  font-weight: 800;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.submit-btn:hover {
  background: #ffffff;
  transform: translateY(-2px);
}

.preview-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
}

.top-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 12px 20px;
}

.mode-toggle {
  display: flex;
  gap: 6px;
  background: rgba(0, 0, 0, 0.06);
  padding: 4px;
  border-radius: 14px;
}

.mode-btn {
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 700;
  border: none;
  background: transparent;
  cursor: pointer;
  color: #555;
  border-radius: 10px;
  transition: background 0.2s ease, color 0.2s ease;
}

.mode-btn.active {
  background: rgba(255, 255, 255, 0.9);
  color: #111;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Minimizable Music Player */
.vertical-music {
  width: 100%;
  padding: 14px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: padding 0.3s ease;
  /* Layer isolation to prevent compositor conflicts */
  isolation: isolate;
  transform: translateZ(0);
}

.music-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.music-title {
  font-weight: 800;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #111;
}

.minimize-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-weight: bold;
  font-size: 14px;
  color: #333;
  transition: background 0.2s ease;
}

.minimize-btn:hover {
  background: #ffffff;
}

.vertical-buttons {
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: 8px;
  overflow: hidden;
  max-height: 300px;
  transition: max-height 0.35s ease-in-out, opacity 0.25s ease-in-out;
  opacity: 1;
}

.vertical-music.minimized .vertical-buttons {
  max-height: 0;
  opacity: 0;
  pointer-events: none;
}

.vertical-music.minimized {
  padding-bottom: 14px;
}

.music-btn {
  width: 100%;
  padding: 10px 16px;
  font-size: 0.82rem;
  font-weight: 700;
  text-align: left;
  border: 1px solid rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.5);
  color: #111;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.music-btn:hover {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(255, 255, 255, 1);
}

.music-btn.playing {
  background: rgba(255, 255, 255, 0.95);
  color: #000;
  border-color: rgba(0, 0, 0, 0.2);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.stop-music-btn {
  width: 100%;
  padding: 10px 16px;
  font-size: 0.82rem;
  font-weight: 700;
  border: 1px solid rgba(220, 38, 38, 0.3);
  background: rgba(255, 255, 255, 0.5);
  color: #dc2626;
  cursor: pointer;
  text-align: center;
  transition: background 0.2s ease, color 0.2s ease;
}

.stop-music-btn:hover {
  background: #dc2626;
  color: #ffffff;
}

/* CD Container Box */
.cd-container-box {
  position: relative;
  width: 340px;
  height: 340px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.cd-container-box.acrylic-mode {
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(12px);
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.15),
    inset 0 0 15px rgba(255, 255, 255, 0.8),
    inset 0 0 2px rgba(0, 0, 0, 0.1);
  border: 4px solid rgba(255, 255, 255, 0.7);
}

.acrylic-case-overlay {
  display: none;
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  border-radius: 20px;
  pointer-events: none;
  z-index: 10;
  overflow: hidden;
}

.cd-container-box.acrylic-mode .acrylic-case-overlay {
  display: block;
}

.acrylic-shine {
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.4) 0%,
    rgba(255, 255, 255, 0) 40%,
    rgba(255, 255, 255, 0.2) 60%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: rotate(25deg);
}

/* Clear Glossy Transparent Disc (REMOVED BACKDROP-FILTER TO ELIMINATE GREY BOX GLITCH) */
.cd-display {
  position: relative;
  width: 290px;
  height: 290px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: grab;
  touch-action: none;
  isolation: isolate;
  transform: translateZ(0);
}

.cd-display:active {
  cursor: grabbing;
}

/* Inner Rotating Container Layer */
.cd-rotating-content {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  will-change: transform;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.glass-sheen {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.45) 0%,
    rgba(255, 255, 255, 0.05) 45%,
    rgba(255, 255, 255, 0.3) 55%,
    rgba(255, 255, 255, 0) 100%
  );
  pointer-events: none;
  z-index: 4;
}

.cd-art {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
  pointer-events: none;
}

.cd-svg-text {
  position: absolute;
  width: 100%;
  height: 100%;
  z-index: 5;
  pointer-events: none;
}

.cd-svg-text text {
  font-family: 'Inter', sans-serif;
  font-weight: 800;
  fill: #111;
  letter-spacing: 2px;
  font-size: 13px;
  text-transform: uppercase;
}

.cd-center-hole {
  position: relative;
  z-index: 6;
  width: 55px;
  height: 55px;
  background: rgba(255, 255, 255, 0.6);
  border: 2px solid rgba(255, 255, 255, 0.95);
  border-radius: 50%;
  box-shadow:
    inset 0 2px 4px rgba(0, 0, 0, 0.1),
    0 2px 8px rgba(0, 0, 0, 0.05);
  pointer-events: none;
}

.cd-metadata {
  position: absolute;
  bottom: 35px;
  z-index: 6;
  text-align: center;
  pointer-events: none;
  padding: 0 20px;
}

.cd-title-display {
  font-weight: 800;
  font-size: 0.85rem;
  text-transform: uppercase;
  color: #111;
  line-height: 1.1;
}

.cd-sub-display {
  font-size: 0.6rem;
  font-weight: 700;
  color: #333;
  margin-top: 2px;
  text-transform: uppercase;
}

/* Keychain Card Preview */
.mockup-card {
  width: 100%;
  padding: 18px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.mockup-card h3 {
  font-size: 0.8rem;
  letter-spacing: 1px;
  margin-bottom: 10px;
  color: #333;
}

.keychain-ring {
  width: 28px;
  height: 28px;
  border: 4px solid #aaa;
  border-radius: 50%;
  margin-bottom: -10px;
  z-index: 1;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.mini-cd-preview {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mini-cd-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
}

.cd-art[src*="photo-1579546929518"],
.mini-cd-preview img[src*="photo-1579546929518"] {
  opacity: 0;
}

.mini-cd-hole {
  position: absolute;
  width: 18px;
  height: 18px;
  background: rgba(255, 255, 255, 0.6);
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  border-radius: 50%;
  z-index: 5;
}

/* Footer */
footer {
  text-align: center;
  padding: 14px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #333;
  margin: 0 20px 20px;
}

@media (max-width: 900px) {
  header.header-glass {
    flex-direction: column;
    gap: 12px;
    border-radius: 24px;
    padding: 14px;
  }
  
  .header-left, .header-right {
    justify-content: center;
    flex: initial;
  }

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