/* ============================================
   AI FaceSwap Studio - Main Stylesheet
   轻奢亮色时尚风 - Luxury Bright Fashion Style
   ============================================ */

/* --- CSS Custom Properties (Design Tokens) --- */
:root {
  --bg-primary: #F3F4F8;
  --bg-card: #FFFFFF;
  --border-card: rgba(0, 0, 0, 0.05);
  --gradient-primary: linear-gradient(135deg, #FF6B81 0%, #A855F7 100%);
  --gradient-progress: linear-gradient(90deg, #FF6B81, #A855F7);
  --text-primary: #1F2937;
  --text-secondary: #6B7280;
  --accent-purple: #A855F7;
  --accent-success: #10B981;
  --accent-pink: #FF6B81;
  --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.05);
  --shadow-hover: 0 20px 40px rgba(0, 0, 0, 0.1);
  --shadow-btn: 0 4px 15px rgba(168, 85, 247, 0.3);
  --radius-card: 20px;
  --radius-btn: 12px;
  --radius-sm: 8px;
  --font-cn: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-en: "Inter", system-ui, sans-serif;
  --font-ja: "Hiragino Sans", "Yu Gothic", sans-serif;
  --transition: all 0.3s ease;
  --section-gap: 80px;
  --card-padding: 32px;
}

/* --- Reset & Base --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-cn);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: var(--transition);
}

ul, ol {
  list-style: none;
}

/* --- Utility --- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section-title {
  font-size: 2rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 16px;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 48px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  background: var(--gradient-primary);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-btn);
  box-shadow: var(--shadow-btn);
  transition: var(--transition);
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(168, 85, 247, 0.45);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--bg-card);
  color: var(--accent-purple);
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-btn);
  border: 2px solid var(--accent-purple);
  transition: var(--transition);
  cursor: pointer;
}

.btn-secondary:hover {
  background: var(--accent-purple);
  color: #fff;
  transform: translateY(-2px);
}

/* ============================================
   HEADER NAVIGATION
   ============================================ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-card);
  transition: var(--transition);
}

.header.scrolled {
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
}

.header-logo .logo-icon {
  width: 36px;
  height: 36px;
  background: var(--gradient-primary);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.1rem;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.header-nav a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  position: relative;
}

.header-nav a:hover {
  color: var(--accent-purple);
}

.header-nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  border-radius: 1px;
  transition: width 0.3s ease;
}

.header-nav a:hover::after {
  width: 100%;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lang-switcher {
  display: flex;
  align-items: center;
  background: var(--bg-primary);
  border-radius: var(--radius-sm);
  padding: 4px;
  gap: 2px;
}

.lang-btn {
  padding: 6px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 6px;
  background: transparent;
  color: var(--text-secondary);
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.lang-btn.active {
  background: var(--bg-card);
  color: var(--accent-purple);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.header-download-btn {
  padding: 8px 20px;
  background: var(--gradient-primary);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.header-download-btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-btn);
}

/* Mobile menu toggle */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.mobile-menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  padding-top: 120px;
  padding-bottom: var(--section-gap);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -200px;
  right: -200px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.08) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -100px;
  left: -150px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255, 107, 129, 0.06) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero-content {
  text-align: center;
  position: relative;
  z-index: 1;
}

.hero-title {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 20px;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 650px;
  margin: 0 auto 40px;
  line-height: 1.8;
}

/* --- Timer / Credits Bar --- */
.timer-bar {
  max-width: 600px;
  margin: 0 auto 40px;
  background: var(--bg-card);
  border-radius: 16px;
  padding: 20px 28px;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border-card);
}

.timer-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-primary);
}

.timer-status .status-icon {
  font-size: 1.2rem;
}

.timer-progress-track {
  width: 100%;
  height: 8px;
  background: #EEF0F4;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 8px;
}

.timer-progress-fill {
  height: 100%;
  background: var(--gradient-progress);
  border-radius: 4px;
  transition: width 0.5s ease;
  width: 0%;
}

.timer-credits {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.timer-credits .credits-count {
  font-weight: 700;
  color: var(--accent-purple);
}

/* --- Swap Card --- */
.swap-card {
  max-width: 700px;
  margin: 0 auto;
  background: var(--bg-card);
  border-radius: var(--radius-card);
  padding: var(--card-padding);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border-card);
  position: relative;
  z-index: 1;
}

/* Upload Area */
.upload-area {
  border: 2px dashed rgba(168, 85, 247, 0.3);
  border-radius: 16px;
  padding: 40px 24px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  margin-bottom: 24px;
  position: relative;
  background: rgba(168, 85, 247, 0.02);
}

.upload-area:hover,
.upload-area.dragover {
  border-color: var(--accent-purple);
  background: rgba(168, 85, 247, 0.05);
}

.upload-area.has-image {
  padding: 16px;
  border-style: solid;
  border-color: var(--accent-success);
  background: rgba(16, 185, 129, 0.03);
}

.upload-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
}

.upload-text {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.upload-hint {
  font-size: 0.85rem;
  color: #9CA3AF;
}

.upload-preview {
  display: none;
  max-width: 200px;
  max-height: 200px;
  margin: 0 auto;
  border-radius: 12px;
  object-fit: cover;
}

.upload-area.has-image .upload-preview {
  display: block;
}

.upload-area.has-image .upload-icon,
.upload-area.has-image .upload-text,
.upload-area.has-image .upload-hint {
  display: none;
}

.upload-remove {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 28px;
  height: 28px;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 0.9rem;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.upload-area.has-image .upload-remove {
  display: flex;
}

/* Template Selector */
.template-selector {
  margin-bottom: 24px;
}

.template-label {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.template-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.template-scroll::-webkit-scrollbar {
  height: 4px;
}

.template-scroll::-webkit-scrollbar-track {
  background: #F3F4F6;
  border-radius: 2px;
}

.template-scroll::-webkit-scrollbar-thumb {
  background: #D1D5DB;
  border-radius: 2px;
}

.template-item {
  flex: 0 0 120px;
  scroll-snap-align: start;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  border: 3px solid transparent;
}

.template-item:hover {
  transform: translateY(-2px);
}

.template-item.active {
  border-color: var(--accent-purple);
  box-shadow: 0 0 0 2px rgba(168, 85, 247, 0.2);
}

.template-item img {
  width: 120px;
  height: 150px;
  object-fit: cover;
  border-radius: 10px;
}

.template-item .template-name {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 6px 4px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  text-align: center;
  border-radius: 0 0 10px 10px;
}

/* Generate Button */
.generate-btn {
  width: 100%;
  padding: 16px;
  font-size: 1.1rem;
  font-weight: 700;
  position: relative;
  overflow: hidden;
}

.generate-btn .btn-shimmer {
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* --- Result Area --- */
.result-area {
  display: none;
  margin-top: 32px;
  animation: fadeInUp 0.5s ease;
}

.result-area.visible {
  display: block;
}

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

/* Before/After Slider */
.ba-slider-container {
  position: relative;
  width: 100%;
  max-width: 500px;
  margin: 0 auto 24px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  aspect-ratio: 3 / 4;
  background: #000;
  user-select: none;
  -webkit-user-select: none;
}

.ba-slider-container img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ba-slider-container .ba-after {
  clip-path: inset(0 50% 0 0);
}

.ba-slider-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 4px;
  background: #fff;
  cursor: ew-resize;
  z-index: 10;
  transform: translateX(-50%);
}

.ba-slider-handle::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.ba-slider-handle::after {
  content: '\u2194';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.2rem;
  color: var(--accent-purple);
  z-index: 1;
  font-weight: 700;
}

.ba-labels {
  position: absolute;
  bottom: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  justify-content: space-between;
  z-index: 5;
  pointer-events: none;
}

.ba-label {
  padding: 4px 12px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 20px;
  backdrop-filter: blur(4px);
}

/* APP CTA under result */
.result-app-cta {
  text-align: center;
  padding: 20px;
  background: linear-gradient(135deg, rgba(255, 107, 129, 0.05), rgba(168, 85, 247, 0.05));
  border-radius: 16px;
  border: 1px solid rgba(168, 85, 247, 0.1);
}

.result-app-cta p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

/* ============================================
   GALLERY SECTION
   ============================================ */
.gallery {
  padding: var(--section-gap) 0;
}

.gallery-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 36px;
}

.gallery-filter-btn {
  padding: 8px 20px;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 20px;
  background: var(--bg-card);
  color: var(--text-secondary);
  border: 1px solid var(--border-card);
  cursor: pointer;
  transition: var(--transition);
}

.gallery-filter-btn:hover {
  color: var(--accent-purple);
  border-color: var(--accent-purple);
}

.gallery-filter-btn.active {
  background: var(--gradient-primary);
  color: #fff;
  border-color: transparent;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.gallery-item {
  background: var(--bg-card);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border-card);
  transition: var(--transition);
  cursor: pointer;
}

.gallery-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.gallery-item-images {
  display: grid;
  grid-template-columns: 1fr 1fr;
  position: relative;
}

.gallery-item-images img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.gallery-item-images .gallery-arrow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 32px;
  height: 32px;
  background: var(--bg-card);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  z-index: 2;
}

.gallery-item-info {
  padding: 16px 20px;
}

.gallery-item-info .style-name {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.gallery-item-info .style-tag {
  display: inline-block;
  padding: 2px 10px;
  font-size: 0.75rem;
  background: rgba(168, 85, 247, 0.08);
  color: var(--accent-purple);
  border-radius: 10px;
  font-weight: 500;
}

/* ============================================
   PRIVACY SECTION
   ============================================ */
.privacy {
  padding: var(--section-gap) 0;
}

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

.privacy-card {
  background: var(--bg-card);
  border-radius: var(--radius-card);
  padding: var(--card-padding);
  text-align: center;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border-card);
  transition: var(--transition);
}

.privacy-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.privacy-icon {
  font-size: 2.5rem;
  margin-bottom: 16px;
}

.privacy-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.privacy-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ============================================
   APP DOWNLOAD SECTION
   ============================================ */
.app-section {
  padding: var(--section-gap) 0;
}

.app-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  background: var(--bg-card);
  border-radius: var(--radius-card);
  padding: 48px;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border-card);
  position: relative;
  overflow: hidden;
}

.app-inner::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.06) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.app-mockup {
  position: relative;
  z-index: 1;
  text-align: center;
}

.app-mockup img {
  max-width: 100%;
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
}

.app-content {
  position: relative;
  z-index: 1;
}

.app-content h2 {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 20px;
  line-height: 1.3;
  color: var(--text-primary);
}

.app-features {
  margin-bottom: 32px;
}

.app-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.app-feature-item .feature-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.app-download-btns {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.app-download-btns .btn-primary {
  flex: 1;
  min-width: 160px;
}

.app-download-btns .btn-secondary {
  flex: 1;
  min-width: 160px;
}

/* ============================================
   PRICING SECTION
   ============================================ */
.pricing {
  padding: var(--section-gap) 0;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: stretch;
}

.pricing-card {
  background: var(--bg-card);
  border-radius: var(--radius-card);
  padding: var(--card-padding);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border-card);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  position: relative;
}

.pricing-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.pricing-card.featured {
  border: 2px solid var(--accent-purple);
  position: relative;
}

.pricing-card.featured::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 20%;
  right: 20%;
  height: 3px;
  background: var(--gradient-primary);
  border-radius: 0 0 4px 4px;
}

.pricing-badge {
  position: absolute;
  top: -12px;
  right: 20px;
  padding: 4px 16px;
  background: var(--gradient-primary);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 20px;
}

.pricing-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.pricing-price {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--accent-purple);
  margin-bottom: 4px;
}

.pricing-price span {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.pricing-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.pricing-features {
  flex: 1;
  margin-bottom: 24px;
}

.pricing-feature {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.pricing-feature .check {
  color: var(--accent-success);
  font-size: 1rem;
  flex-shrink: 0;
}

.pricing-card .btn-primary,
.pricing-card .btn-secondary {
  width: 100%;
  text-align: center;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border-card);
  padding: 48px 0 24px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand .footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.footer-brand .footer-logo .logo-icon {
  width: 32px;
  height: 32px;
  background: var(--gradient-primary);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.9rem;
}

.footer-brand p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 300px;
}

.footer-col h4 {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.footer-col a {
  display: block;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.footer-col a:hover {
  color: var(--accent-purple);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 24px;
  border-top: 1px solid var(--border-card);
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.footer-bottom-lang {
  display: flex;
  gap: 8px;
}

.footer-bottom-lang button {
  padding: 4px 10px;
  font-size: 0.75rem;
  background: var(--bg-primary);
  border-radius: 6px;
  color: var(--text-secondary);
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.footer-bottom-lang button.active {
  background: var(--accent-purple);
  color: #fff;
}

/* ============================================
   MODAL
   ============================================ */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

.modal-overlay.visible {
  display: flex;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-box {
  background: var(--bg-card);
  border-radius: var(--radius-card);
  padding: 40px;
  max-width: 420px;
  width: 90%;
  text-align: center;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.15);
  animation: scaleIn 0.3s ease;
}

@keyframes scaleIn {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-box .modal-icon {
  font-size: 3rem;
  margin-bottom: 16px;
}

.modal-box h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.modal-box p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
  line-height: 1.7;
}

.modal-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ============================================
   LOADING OVERLAY
   ============================================ */
.loading-overlay {
  display: none;
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(4px);
  border-radius: var(--radius-card);
  z-index: 10;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 16px;
}

.loading-overlay.visible {
  display: flex;
}

.loading-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid #EEF0F4;
  border-top-color: var(--accent-purple);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.loading-text {
  font-size: 0.95rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* ============================================
   UNLOCK ANIMATION
   ============================================ */
@keyframes unlockPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.unlock-animate {
  animation: unlockPulse 0.5s ease;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }

  .app-inner {
    grid-template-columns: 1fr;
    padding: 32px;
    gap: 32px;
  }

  .app-mockup {
    order: -1;
  }
}

@media (max-width: 768px) {
  :root {
    --section-gap: 48px;
    --card-padding: 24px;
  }

  .header-nav {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--bg-card);
    flex-direction: column;
    padding: 20px 24px;
    gap: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid var(--border-card);
  }

  .header-nav.open {
    display: flex;
  }

  .mobile-menu-toggle {
    display: flex;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

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

  .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  .app-download-btns {
    flex-direction: column;
  }

  .template-item {
    flex: 0 0 100px;
  }

  .template-item img {
    width: 100px;
    height: 125px;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 1.6rem;
  }

  .timer-bar {
    padding: 16px 20px;
  }

  .swap-card {
    padding: 20px;
  }

  .section-title {
    font-size: 1.5rem;
  }

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

/* ========== Purchase Modal ========== */
.purchase-modal-box {
  max-width: 420px;
  width: 90%;
  padding: 32px 24px 24px;
  position: relative;
}

.modal-close-btn {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  font-size: 1.8rem;
  color: var(--text-secondary);
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.modal-close-btn:hover {
  background: var(--bg-primary);
  color: var(--text-primary);
}

.purchase-modal-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  text-align: center;
  margin-bottom: 8px;
}

.purchase-modal-subtitle {
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 24px;
}

.purchase-qr-section {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}

.purchase-qr-img {
  width: 200px;
  height: 200px;
  object-fit: contain;
  border-radius: 12px;
  border: 2px solid var(--bg-primary);
  padding: 8px;
  background: #fff;
}

.purchase-wallet-section {
  margin-bottom: 20px;
}

.purchase-wallet-label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
  font-weight: 500;
}

.purchase-wallet-address {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-primary);
  border-radius: 10px;
  padding: 12px 16px;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.purchase-wallet-address span {
  flex: 1;
  font-family: 'Courier New', monospace;
  font-size: 0.8rem;
  color: var(--text-primary);
  word-break: break-all;
  line-height: 1.4;
}

.copy-btn {
  padding: 6px 14px;
  background: var(--gradient-primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.3s ease;
}

.copy-btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-button);
}

.copy-btn.copied {
  background: var(--color-success);
}

.purchase-amount {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 16px;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.purchase-amount-value {
  font-size: 1.6rem;
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.purchase-note {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-align: center;
  margin: 0;
  opacity: 0.8;
}
