:root {
  --page-bg-1: #e0efef;
  --page-bg-2: #d0e4e5;
  --page-bg-3: #c3dbdd;
  --teal-bg-top: rgba(7, 104, 118, 0.16);
  --teal-bg-bottom: rgba(7, 104, 118, 0.09);
  --teal-border: rgba(7, 104, 118, 0.5);
  --teal-text: #0a5669;
  --teal-shadow: 0 8px 18px rgba(7, 104, 118, 0.19);
  --teal-soft-bg: rgba(7, 104, 118, 0.1);
}

/* Unified page background across all tool screens */
html,
body {
  background: linear-gradient(140deg, var(--page-bg-1), var(--page-bg-2) 52%, var(--page-bg-3)) !important;
  color: var(--teal-text);
}

body {
  background-attachment: fixed !important;
  overflow-x: hidden;
}

/* Liquid glass animated layer across all tools */
.sp-liquid-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.42;
  filter: saturate(1.12) contrast(1.05);
}

.sp-liquid-canvas.sp-liquid-fallback {
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.3), transparent 35%),
    radial-gradient(circle at 80% 30%, rgba(90, 170, 176, 0.32), transparent 40%),
    radial-gradient(circle at 40% 80%, rgba(58, 139, 151, 0.26), transparent 42%);
  background-size: 130% 130%;
  animation: spLiquidFallbackShift 14s ease-in-out infinite alternate;
}

@keyframes spLiquidFallbackShift {
  0% {
    background-position: 0% 0%, 100% 0%, 30% 100%;
  }
  100% {
    background-position: 20% 10%, 80% 20%, 45% 90%;
  }
}

/* Keep page layers above liquid canvas without overriding nested layout positioning */
body > *:not(.sp-liquid-canvas) {
  position: relative;
  z-index: 1;
}

/* Keep all major blocks on the same color language */
.hero,
.hero-content,
.section,
.section.center,
.section.center.half,
.nav,
.nav-inner,
.tool-info-section,
.tool-info-inner,
.other-tools-section,
.faq-section,
.faq-item,
.footer,
.footer-list,
.wrap {
  background: linear-gradient(180deg, var(--teal-bg-top), var(--teal-bg-bottom)) !important;
  -webkit-backdrop-filter: blur(10px) saturate(120%);
  backdrop-filter: blur(10px) saturate(120%);
}

/* Keep primary upload hero area inside a centered container */
.sp-hero-container {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  border: 2px solid rgba(5, 116, 113, 0.5) !important;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(5, 116, 113, 0.17), rgba(5, 116, 113, 0.1)) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72), 0 8px 18px rgba(5, 116, 113, 0.18) !important;
  box-sizing: border-box;
  overflow: hidden;
}

.sp-hero-container .hero-content,
.sp-hero-container > .heading,
.sp-hero-container > .subheading,
.sp-hero-container > .code-embed {
  width: 100%;
  max-width: 100%;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* Keep upload-area tint full-bleed inside container */
.sp-hero-container .hero-content {
  max-width: 100% !important;
  width: 100% !important;
  min-height: 100% !important;
  background: linear-gradient(180deg, rgba(5, 116, 113, 0.17), rgba(5, 116, 113, 0.1)) !important;
  border: 0 !important;
  box-shadow: none !important;
  box-sizing: border-box;
  padding: clamp(14px, 2.2vw, 24px) clamp(10px, 2.1vw, 22px) !important;
}

/* 3D page has an extra 500px min-height in source CSS; normalize to match other tools */
html[data-wf-page="638d5b7b10a6ce44ed6d1db8"] .sp-hero-container {
  height: auto !important;
  min-height: clamp(280px, 36vh, 420px) !important;
}

/* Buttons and action controls */
.button,
.button.small,
.button-ver2,
.button-ver2.small,
#browseBtnOG,
#browseBtn,
#downloadLocation,
#playBtn,
#settingsOn,
#settingsOff,
#toggleVocalMode,
#toggleMuteBtn {
  background: linear-gradient(180deg, var(--teal-bg-top), var(--teal-bg-bottom));
  border-color: var(--teal-border) !important;
  color: var(--teal-text) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72), var(--teal-shadow) !important;
}

.button .button-text,
.button-ver2 .button-text,
.button .custom-btn-icon,
.button-ver2 .custom-btn-icon,
.button-ver2 .custom-btn-icon-new,
.button .custom-btn-icon-new {
  color: var(--teal-text) !important;
}

/* Panels/cards */
.controlbox,
.settings,
.settings-item,
.tool-info-column,
.other-tools-box-container,
.dropdown-list,
.tools-link,
#controls,
.controls {
  background: linear-gradient(180deg, var(--teal-bg-top), var(--teal-bg-bottom));
  border-color: var(--teal-border) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72), var(--teal-shadow) !important;
}

/* Make settings/edit panel non-transparent (especially 3D Orbit Speed area) */
.settings,
.settings.reverb,
.controlbox,
.settings-item,
.settings-item-half {
  background: linear-gradient(180deg, rgba(202, 229, 230, 0.97), rgba(186, 216, 217, 0.96)) !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

.custom-tool-info-icon,
.custom-tool-info-icon-new,
.other-tools-icon-new {
  background: linear-gradient(180deg, rgba(5, 116, 113, 0.2), rgba(5, 116, 113, 0.12));
  border-color: var(--teal-border) !important;
  color: var(--teal-text) !important;
}

/* Text/link colors */
h1,
h2,
h3,
h4,
h5,
h6,
.text-block,
.nav-link,
.tools-menu-icon,
.tools-menu-icon-mobile-new {
  color: var(--teal-text) !important;
}

.tool-info-header,
.setting-description,
.tools-header,
.footer-link,
.button-text,
.tools-link-text {
  color: var(--teal-text) !important;
}

.tool-info-p,
.other-tools-paragraph,
.s2k-info {
  color: rgba(9, 76, 90, 0.96) !important;
}

a,
.tool-info-p a,
.other-tools-paragraph a {
  color: #0b6a7f;
}

a:hover,
.footer-link:hover {
  color: #074e61 !important;
}

.footer-list.sp-footer-only {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin: 0 !important;
  text-align: center;
  color: #0b5f73 !important;
  font-family: "Open Sans", sans-serif;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0.2px;
  padding: 8px 14px;
  background: linear-gradient(180deg, rgba(5, 116, 113, 0.12), rgba(5, 116, 113, 0.07)) !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

/* Remove centered footer strip and make copyright full width */
.footer {
  padding: 0 !important;
}

.footer .wrap {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

/* Subtle matching accents */
.wavecontainer,
.waveform,
#dropTarget {
  border-color: var(--teal-border) !important;
  background: var(--teal-soft-bg);
}

input[type="range"] {
  accent-color: #0b6a7f;
}

/* Hide the "Future Tool..." feedback card from tool pages */
.feedback-box-container {
  display: none !important;
}

/* Remove "Other Tools You'll Love" section only on 3D Audio page */
html[data-wf-page="638d5b7b10a6ce44ed6d1db8"] .other-tools-section {
  display: none !important;
}

/* Hide legacy mixed headers and use one injected header across tools */
body .nav.w-nav {
  display: none !important;
}

/* Shared tool header */
.sp-global-header {
  border-bottom: 1px solid rgba(5, 116, 113, 0.18);
  background: linear-gradient(140deg, #c7dfdf 0%, #b6d4d4 55%, #a8cccc 100%);
  padding: 4px 12px;
  position: relative;
  z-index: 2147483646 !important;
  isolation: isolate;
}

.sp-global-header-inner {
  max-width: 1500px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.sp-brand {
  display: inline-flex;
  align-items: center;
  gap: 0;
  text-decoration: none;
}

.sp-brand-logo {
  width: 220px;
  height: auto;
  max-height: 58px;
  object-fit: contain;
  display: block;
}

.sp-brand-text {
  color: #0b5f73;
  letter-spacing: 0.5px;
  line-height: 1;
  font-family: "Gothic A1", sans-serif;
  font-size: 28px;
  font-weight: 300;
}

.sp-brand-text strong {
  font-weight: 700;
}

.sp-header-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.sp-telegram-link {
  min-width: 126px;
  height: 40px;
  padding: 0 16px;
  border: 2px solid rgba(5, 93, 91, 0.75);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(5, 116, 113, 0.16), rgba(5, 116, 113, 0.07));
  color: #0b5f73 !important;
  text-decoration: none;
  font-family: "Gothic A1", sans-serif;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sp-tools-wrap {
  position: relative;
}

.sp-tools-btn {
  min-width: 124px;
  height: 40px;
  border: 2px solid rgba(5, 116, 113, 0.5) !important;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(5, 116, 113, 0.12), rgba(5, 116, 113, 0.07));
  color: #0b5f73 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 14px;
  font-family: "Gothic A1", sans-serif;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72), 0 8px 18px rgba(5, 116, 113, 0.18) !important;
  cursor: pointer;
}

.sp-tools-btn:hover,
.sp-tools-btn:focus-visible {
  background: linear-gradient(180deg, rgba(5, 116, 113, 0.2), rgba(5, 116, 113, 0.12));
}

.sp-tools-icon {
  width: 15px;
  display: inline-flex;
  flex-direction: column;
  gap: 3px;
}

.sp-tools-icon span {
  width: 100%;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.sp-tools-label {
  letter-spacing: 0.2px;
}

.sp-tools-caret {
  font-size: 12px;
  margin-top: 1px;
}

.sp-tools-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 10000 !important;
  display: none;
  min-width: 240px;
  padding: 8px;
  border: 2px solid rgba(5, 116, 113, 0.5) !important;
  border-radius: 12px;
  background: linear-gradient(180deg, #d7eceb, #cde5e4) !important;
  color: #0b5f73 !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72), 0 8px 18px rgba(5, 116, 113, 0.18) !important;
  opacity: 1 !important;
  max-height: min(68vh, 520px);
  overflow-y: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.sp-tools-menu::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.sp-tools-wrap.is-open .sp-tools-menu {
  display: block;
  z-index: 2147483600 !important;
}

.sp-tools-link {
  display: block;
  padding: 9px 11px;
  border-radius: 8px;
  border: 1px solid transparent;
  text-decoration: none;
  color: #0b5f73 !important;
  font-family: "Open Sans", sans-serif;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.2px;
}

.sp-tools-link:hover,
.sp-tools-link:focus-visible {
  background: linear-gradient(180deg, rgba(5, 116, 113, 0.18), rgba(5, 116, 113, 0.1));
  border-color: rgba(5, 116, 113, 0.35) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72), 0 8px 18px rgba(5, 116, 113, 0.18) !important;
}

@media screen and (max-width: 1100px) {
  .sp-brand-text {
    font-size: 24px;
  }

  .sp-brand-logo {
    width: 170px;
    max-height: 50px;
  }

  .sp-telegram-link {
    min-width: 112px;
    height: 38px;
    font-size: 15px;
    padding: 0 14px;
  }

  .sp-tools-btn {
    min-width: 112px;
    height: 38px;
    font-size: 15px;
    padding: 0 12px;
  }
}

@media screen and (max-width: 767px) {
  .sp-liquid-canvas {
    opacity: 0.3;
  }

  .sp-hero-container {
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    border-radius: 14px;
    padding-left: 0 !important;
    padding-right: 0 !important;
    background: linear-gradient(180deg, rgba(5, 116, 113, 0.22), rgba(5, 116, 113, 0.14)) !important;
  }

  html[data-wf-page="638d5b7b10a6ce44ed6d1db8"] .sp-hero-container {
    min-height: 0 !important;
  }

  .sp-hero-container .hero-content {
    flex: 0 1 auto !important;
    width: 100% !important;
    min-height: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    background: linear-gradient(180deg, rgba(5, 116, 113, 0.22), rgba(5, 116, 113, 0.14)) !important;
    padding: 14px 8px 16px !important;
  }

  .sp-global-header {
    padding: 4px 8px;
  }

  .sp-global-header-inner {
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
  }

  .sp-brand-logo {
    width: 130px;
    max-height: 42px;
  }

  .sp-brand-text {
    font-size: 22px;
  }

  .sp-header-actions {
    gap: 8px;
    margin-left: auto;
  }

  .sp-telegram-link {
    min-width: 98px;
    height: 34px;
    padding: 0 12px;
    font-size: 14px;
  }

  .sp-tools-btn {
    min-width: 96px;
    height: 34px;
    font-size: 14px;
    padding: 0 10px;
    gap: 6px;
  }

  .sp-tools-menu {
    right: 0;
    transform: none;
    min-width: min(92vw, 280px);
    top: calc(100% + 8px);
  }

  .sp-tools-link {
    font-size: 17px;
    padding: 11px 12px;
  }

  .footer-list.sp-footer-only {
    font-size: 11.5px;
    padding: 8px 10px;
  }
}
