:root {
  --primary: #ff758f;
  --primary-hover: #ff4d6d;
  --primary-light: #fff0f3;
  --secondary: #7052ff;
  --success: #10b981;
  --success-hover: #059669;
  --bg-gradient: linear-gradient(135deg, #fff0f5 0%, #f7eeef 40%, #f2f5ff 100%);
  --card-bg: rgba(255, 255, 255, 0.88);
  --card-border: rgba(255, 255, 255, 0.95);
  --text-dark: #2b2d42;
  --text-muted: #6c757d;
  --shadow-soft: 0 15px 35px rgba(255, 117, 143, 0.08);
  --shadow-hover: 0 20px 45px rgba(255, 117, 143, 0.15);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 12px;
}

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

/* Defensive SVG Sizing */
svg {
  max-width: 100%;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}

body {
  background: var(--bg-gradient);
  color: var(--text-dark);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  overflow-x: hidden;
  padding-bottom: 30px;
}

/* Background Ambient Glows */
.ambient-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  z-index: 0;
  pointer-events: none;
}
.glow-1 {
  top: -100px;
  left: -100px;
  width: 350px;
  height: 350px;
  background: rgba(255, 182, 193, 0.35);
}
.glow-2 {
  top: 300px;
  right: -100px;
  width: 300px;
  height: 300px;
  background: rgba(112, 82, 255, 0.12);
}

/* Top Navbar */
.navbar {
  width: 100%;
  max-width: 900px;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 10;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text-dark);
  text-decoration: none;
}
.brand-icon {
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}
.brand-icon svg {
  width: 18px;
  height: 18px;
}

.pwa-badge {
  background: white;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--primary);
  box-shadow: 0 4px 12px rgba(0,0,0,0.04);
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(255, 117, 143, 0.2);
}

/* Main Container */
.main-wrapper {
  width: 100%;
  max-width: 900px;
  padding: 0 16px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Hero Section */
.hero {
  text-align: center;
  max-width: 650px;
  margin-top: 4px;
  margin-bottom: 20px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 117, 143, 0.1);
  color: var(--primary-hover);
  padding: 6px 14px;
  border-radius: 30px;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 12px;
  border: 1px solid rgba(255, 117, 143, 0.2);
}

.hero h1 {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.2;
  color: var(--text-dark);
  margin-bottom: 10px;
  letter-spacing: -0.02em;
}

.hero h1 span {
  background: linear-gradient(135deg, var(--primary-hover), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: 0.96rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Social Media Platforms Bar */
.social-platforms {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.platform-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.85);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #374151;
  border: 1px solid rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(6px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.platform-pill svg {
  width: 16px !important;
  height: 16px !important;
  min-width: 16px !important;
  min-height: 16px !important;
}

/* Card Section */
.card {
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: 30px 24px;
  width: 100%;
  max-width: 500px;
  text-align: center;
  transition: all 0.3s ease;
  margin-bottom: 20px;
}

/* Upload Box */
.drop-zone {
  border: 2px dashed rgba(255, 117, 143, 0.4);
  background: rgba(255, 240, 243, 0.4);
  border-radius: var(--radius-md);
  padding: 28px 16px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.drop-zone:hover, .drop-zone.dragover {
  border-color: var(--primary);
  background: rgba(255, 240, 243, 0.8);
  transform: translateY(-2px);
}

.upload-icon-wrapper {
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 6px 16px rgba(255, 117, 143, 0.3);
}

.upload-icon-wrapper svg {
  width: 24px;
  height: 24px;
}

.upload-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-dark);
}

.upload-hint {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  color: white;
  border: none;
  padding: 13px 26px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 6px 18px rgba(255, 117, 143, 0.35);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

/* Follow Box Immediately Under Upload Card */
.follow-box {
  width: 100%;
  max-width: 500px;
  display: flex;
  justify-content: center;
  margin-bottom: 36px;
}

.btn-instagram {
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
  color: white;
  text-decoration: none;
  padding: 12px 24px;
  border-radius: 30px;
  font-size: 0.9rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 6px 20px rgba(220, 39, 67, 0.3);
  transition: all 0.3s ease;
  width: 100%;
  justify-content: center;
}

.btn-instagram:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(220, 39, 67, 0.45);
}

/* Processing & Progress Section */
.processing-area {
  display: none;
  flex-direction: column;
  align-items: center;
  padding: 16px 0;
}

.progress-circle-box {
  position: relative;
  width: 110px;
  height: 110px;
  margin-bottom: 16px;
}

.progress-ring {
  transform: rotate(-90deg);
}

.progress-ring__circle-bg {
  stroke: rgba(255, 117, 143, 0.15);
}

.progress-ring__circle {
  stroke: var(--primary);
  stroke-dasharray: 326.72;
  stroke-dashoffset: 326.72;
  transition: stroke-dashoffset 0.3s linear;
  stroke-linecap: round;
}

.percentage-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-dark);
}

.processing-status {
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--primary-hover);
  margin-bottom: 4px;
}

.processing-subtext {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.progress-bar-container {
  width: 100%;
  height: 8px;
  background: rgba(255, 117, 143, 0.15);
  border-radius: 10px;
  overflow: hidden;
  margin-top: 14px;
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transition: width 0.2s linear;
}

/* Result Section */
.result-area {
  display: none;
  animation: slideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.success-badge {
  width: 56px;
  height: 56px;
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px auto;
}

.success-badge svg {
  width: 28px;
  height: 28px;
}

.result-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 4px;
}

.result-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.btn-success {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  text-decoration: none;
  padding: 15px 24px;
  font-size: 0.98rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  transition: all 0.3s ease;
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.35);
}

.btn-secondary {
  background: #f1f5f9;
  color: #475569;
  border: none;
  padding: 12px 20px;
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  width: 100%;
  margin-top: 10px;
  transition: all 0.2s ease;
}

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  width: 100%;
  max-width: 900px;
}

.feature-card {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: left;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.02);
}

.feature-icon {
  width: 38px;
  height: 38px;
  background: var(--primary-light);
  color: var(--primary-hover);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.feature-icon svg {
  width: 20px;
  height: 20px;
}

.feature-card h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text-dark);
}

.feature-card p {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.error-msg {
  background: #fef2f2;
  color: #ef4444;
  border: 1px solid #fecaca;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.86rem;
  margin-top: 14px;
  display: none;
}

.footer-credits {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 30px;
  text-align: center;
}

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

/* MOBILE SPECIFIC COMPACT OPTIMIZATIONS */
@media (max-width: 600px) {
  .navbar {
    padding: 10px 12px;
  }
  .brand { font-size: 1rem; }
  .brand-icon { width: 30px; height: 30px; }
  .pwa-badge { font-size: 0.72rem; padding: 4px 10px; }

  .hero {
    margin-top: 0;
    margin-bottom: 12px;
  }
  .hero-badge {
    display: none; /* Hide badge on mobile to save space */
  }
  .hero h1 {
    font-size: 1.45rem;
    margin-bottom: 4px;
  }
  .hero p {
    font-size: 0.82rem;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden; /* Keep subtitle punchy & short */
  }

  .social-platforms {
    margin-top: 8px;
    gap: 6px;
    flex-wrap: nowrap;
    overflow-x: auto;
    width: 100%;
    justify-content: center;
    padding-bottom: 2px;
  }
  .platform-pill {
    padding: 4px 10px;
    font-size: 0.74rem;
    white-space: nowrap;
  }
  .platform-pill svg {
    width: 14px !important;
    height: 14px !important;
    min-width: 14px !important;
    min-height: 14px !important;
  }

  .card {
    padding: 18px 14px;
    margin-bottom: 12px;
    border-radius: 18px;
  }

  .drop-zone {
    padding: 18px 12px;
    gap: 8px;
  }
  .upload-icon-wrapper {
    width: 44px;
    height: 44px;
  }
  .upload-icon-wrapper svg {
    width: 20px;
    height: 20px;
  }
  .upload-title {
    font-size: 0.95rem;
  }
  .upload-hint {
    font-size: 0.76rem;
  }
  .btn-primary {
    padding: 11px 20px;
    font-size: 0.88rem;
    width: 100%;
    justify-content: center;
  }

  .follow-box {
    margin-bottom: 24px;
  }
  .btn-instagram {
    padding: 11px 18px;
    font-size: 0.85rem;
  }

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