/* ============================================
   Premium Design Enhancements
   Elevate the overall visual experience
   ============================================ */

/* --- Enhanced Design Tokens --- */
:root {
  --enh-glow-gold: 0 0 20px rgba(240, 180, 41, 0.15);
  --enh-glow-blue: 0 0 20px rgba(59, 130, 246, 0.1);
  --enh-glass-dark: rgba(15, 29, 58, 0.6);
  --enh-border-subtle: rgba(255, 255, 255, 0.06);
  --enh-text-muted: rgba(255, 255, 255, 0.4);
  --enh-transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  --enh-transition-bounce: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* --- Smooth Scrolling & Base --- */
html {
  scroll-behavior: smooth;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* --- Background Refinement --- */
body::before {
  opacity: 0.8;
}

/* ============================================
   Header — Premium Hero Enhancement
   ============================================ */
.header {
  position: relative;
  isolation: isolate;
  transition: box-shadow 0.4s ease;
}

.header:hover {
  box-shadow: 0 12px 48px rgba(10, 22, 40, 0.2);
}

/* Logo brand + badge layout */
.logo {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

.logo-brand {
  font-size: inherit;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.logo-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--prem-navy-900);
  background: var(--prem-gradient-gold);
  padding: 3px 12px;
  border-radius: 20px;
  letter-spacing: 0.3px;
  box-shadow: 0 2px 8px rgba(240, 180, 41, 0.3);
  vertical-align: middle;
  line-height: 1.4;
  position: relative;
  top: -2px;
}

/* Animated shine overlay on header */
.header::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 50%;
  height: 100%;
  background: radial-gradient(ellipse at center, rgba(240, 180, 41, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

/* Animated gold line across header bottom */
.header::after {
  background: linear-gradient(90deg,
    transparent 0%,
    var(--prem-gold) 20%,
    var(--prem-gold-light) 50%,
    var(--prem-gold) 80%,
    transparent 100%
  ) !important;
  background-size: 200% 100% !important;
  animation: goldShimmer 4s ease-in-out infinite;
}

@keyframes goldShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.tagline {
  max-width: 640px;
  font-size: 1rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.55);
}

/* ============================================
   Feature Sections — Refined Cards
   ============================================ */
.feature-section {
  transition: transform 0.3s ease, box-shadow 0.4s ease;
  backdrop-filter: blur(8px);
}

.feature-section:hover {
  box-shadow: 0 12px 48px rgba(10, 22, 40, 0.12);
}

/* Subtle glass shine on feature card top */
.feature-section .feature-header {
  position: relative;
}

.feature-header h2 {
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* Section entrance animation */
.feature-section {
  animation: fadeInUp 0.6s ease-out both;
}

.feature-section:nth-child(1) { animation-delay: 0.05s; }
.feature-section:nth-child(2) { animation-delay: 0.1s; }
.feature-section:nth-child(3) { animation-delay: 0.15s; }
.feature-section:nth-child(4) { animation-delay: 0.2s; }
.feature-section:nth-child(5) { animation-delay: 0.25s; }
.feature-section:nth-child(6) { animation-delay: 0.3s; }
.feature-section:nth-child(7) { animation-delay: 0.35s; }

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

/* ============================================
   Demo Controls — Elevated
   ============================================ */
.control-group {
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.control-group:hover {
  box-shadow: 0 4px 20px rgba(10, 22, 40, 0.08);
}

.control-btn {
  position: relative;
  overflow: hidden;
  letter-spacing: 0.02em;
}

/* Ripple effect on buttons */
.control-btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
  pointer-events: none;
}

.control-btn:active::after {
  width: 300px;
  height: 300px;
}

.control-btn i {
  transition: transform 0.3s ease;
}

.control-btn:hover i {
  transform: scale(1.1);
}

/* ============================================
   Result Images — Premium Frame
   ============================================ */
.original-image,
.result-image {
  position: relative;
  transition: box-shadow 0.4s ease, transform 0.3s ease;
}

.result-image::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
  pointer-events: none;
}

.original-image:hover,
.result-image:hover {
  box-shadow: 0 8px 32px rgba(10, 22, 40, 0.12);
}

.image-label {
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* ============================================
   Mode Switcher — Refined Pill Tabs
   ============================================ */
.mode-buttons {
  backdrop-filter: blur(4px);
}

.btn-mode {
  position: relative;
  letter-spacing: 0.01em;
}

.btn-mode.active {
  box-shadow: 0 4px 12px rgba(15, 29, 58, 0.2);
}

/* ============================================
   Cutout Options Panel — Refined
   ============================================ */
.cutout-options-panel {
  transition: box-shadow 0.3s ease;
}

.cutout-options-panel:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

/* Better color swatches */
.bg-color-btn {
  transition: all 0.25s ease;
}

.bg-color-btn.active {
  transform: scale(1.05);
}

.bg-color-swatch {
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

/* Premium size buttons */
.size-btn {
  transition: all 0.25s ease;
}

.size-btn.active {
  transform: scale(1.02);
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.15);
}

/* Scale slider enhancement */
.scale-control input[type="range"]::-webkit-slider-thumb {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.scale-control input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 3px 10px rgba(0,0,0,0.25);
}

.scale-input {
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* ============================================
   Batch Section — Refined
   ============================================ */
.batch-thumbnail {
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.batch-thumbnail:hover {
  box-shadow: 0 8px 24px rgba(10, 22, 40, 0.15);
}

.batch-thumbnail.add-thumbnail {
  animation: addPulse 3s ease-in-out infinite;
}

@keyframes addPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(240, 180, 41, 0.15); }
  50% { box-shadow: 0 0 0 8px rgba(240, 180, 41, 0); }
}

/* Batch progress bar enhancement */
.batch-progress-overall .progress-bar {
  background: linear-gradient(90deg,
    var(--prem-gold-dark),
    var(--prem-gold),
    var(--prem-gold-light),
    var(--prem-gold),
    var(--prem-gold-dark)
  );
  background-size: 200% 100%;
  animation: progressShimmer 2s linear infinite;
}

@keyframes progressShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ============================================
   Batch Promo Banner — Enhanced
   ============================================ */
.batch-promo-banner {
  backdrop-filter: blur(4px);
  transition: all 0.3s ease;
}

.batch-promo-text a {
  transition: all 0.3s ease;
}

/* ============================================
   Pricing Section — Ultra Premium
   ============================================ */
.pricing-section {
  isolation: isolate;
}

/* Floating particles effect for pricing */
.pricing-section::after {
  content: '';
  position: absolute;
  top: -20%;
  right: -5%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(240, 180, 41, 0.05) 0%, transparent 70%);
  pointer-events: none;
}

.pricing-card {
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.4s ease,
              border-color 0.3s ease;
  overflow: visible;
}

.pricing-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.pricing-card.popular {
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.4s ease;
}

.pricing-card.popular:hover {
  transform: scale(1.04) translateY(-8px);
  box-shadow: 0 24px 64px rgba(240, 180, 41, 0.2);
}

/* Gold shimmer effect on popular card */
.pricing-card.popular::before {
  content: '';
  position: absolute;
  top: -1px;
  left: -1px;
  right: -1px;
  bottom: -1px;
  border-radius: inherit;
  background: linear-gradient(135deg,
    transparent,
    rgba(240, 180, 41, 0.1),
    transparent,
    rgba(240, 180, 41, 0.05),
    transparent
  );
  background-size: 300% 300%;
  animation: goldBorderShimmer 4s ease-in-out infinite;
  z-index: -1;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  -webkit-mask-composite: xor;
  padding: 1px;
  pointer-events: none;
}

@keyframes goldBorderShimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.pricing-price {
  letter-spacing: -0.02em;
}

.pricing-btn {
  transition: all 0.3s ease;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.pricing-card:hover .pricing-btn {
  transform: translateY(-1px);
}

/* ============================================
   Navigation — Refined
   ============================================ */
.sidebar-nav {
  transition: box-shadow 0.3s ease;
}

.nav-link {
  position: relative;
  transition: all 0.25s ease;
}

.nav-link i {
  transition: all 0.25s ease;
}

.nav-link:hover i {
  transform: scale(1.15);
}

.nav-link.active {
  background: rgba(240, 180, 41, 0.1);
}

.nav-link.active i {
  color: var(--prem-gold);
}

/* ============================================
   Footer — Refined
   ============================================ */
.footer {
  position: relative;
  letter-spacing: 0.01em;
}

.footer::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 10%;
  width: 80%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--prem-gray-200), transparent);
}

/* ============================================
   Back to Top Button — Premium
   ============================================ */
.back-to-top-btn {
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.back-to-top-btn:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 8px 24px rgba(240, 180, 41, 0.35);
}

.back-to-top-btn i {
  transition: transform 0.3s ease;
}

.back-to-top-btn:hover i {
  transform: translateY(-2px);
}

/* ============================================
   Scrollbar — Refined
   ============================================ */
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--prem-gray-300), var(--prem-gray-400));
  border-radius: 3px;
}

/* ============================================
   Hint & Status — Refined
   ============================================ */
.hint {
  transition: background 0.3s ease;
}

/* ============================================
   Pagination & Loading — Refined
   ============================================ */
.bg-search-pagination button {
  transition: all 0.25s ease;
}

.bg-search-loading {
  animation: fadeIn 0.3s ease;
}

/* ============================================
   Responsive Refinements
   ============================================ */
@media (max-width: 992px) {
  .logo {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .logo-badge {
    font-size: 0.65rem;
  }
}

@media (max-width: 768px) {
  .feature-section {
    animation: none;
  }

  .pricing-card.popular::before {
    animation: none;
  }

  .logo-badge {
    font-size: 0.6rem;
    padding: 2px 10px;
  }
}
