/* ============================================
   GEMINI WATERMARK REMOVER — PREMIUM LIGHT UI
   ============================================ */

/* Google Font */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ── Design Tokens ── */
:root {
  /* Background */
  --bg-body: #f0f4ff;
  --bg-card: rgba(255, 255, 255, 0.72);
  --bg-card-solid: #ffffff;

  /* Borders */
  --border-color: rgba(99, 102, 241, 0.15);
  --border-hover: rgba(99, 102, 241, 0.4);
  --border-subtle: rgba(0, 0, 0, 0.06);

  /* Text */
  --text-primary: #0f0c29;
  --text-secondary: #6366f1;
  --text-muted: #6b7280;
  --text-body: #374151;

  /* Accent palette – indigo → violet → fuchsia */
  --accent-1: #6366f1;   /* indigo  */
  --accent-2: #8b5cf6;   /* violet  */
  --accent-3: #ec4899;   /* pink    */
  --accent-grad: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
  --accent-grad-soft: linear-gradient(135deg, rgba(99,102,241,0.12) 0%, rgba(236,72,153,0.08) 100%);

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 16px rgba(99,102,241,0.10), 0 1px 4px rgba(0,0,0,0.06);
  --shadow-lg: 0 12px 40px rgba(99,102,241,0.14), 0 2px 8px rgba(0,0,0,0.06);
  --shadow-xl: 0 24px 60px rgba(99,102,241,0.18), 0 4px 16px rgba(0,0,0,0.08);

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  --radius-lg: 20px;
  --radius-xl: 28px;
}

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

/* ── Body ── */
body {
  background: var(--bg-body);
  background-image:
    radial-gradient(ellipse 80% 60% at 20% -10%, rgba(99,102,241,0.14) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 110%, rgba(236,72,153,0.10) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 60% 50%, rgba(139,92,246,0.07) 0%, transparent 70%);
  color: var(--text-body);
  font-family: var(--font-sans);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  overflow-x: hidden;
  padding: 3rem 1rem 4rem;
}

/* ── Floating orbs (decorative) ── */
.bg-glow {
  position: fixed;
  top: -200px;
  left: -200px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(99,102,241,0.18) 0%, rgba(139,92,246,0.08) 40%, transparent 70%);
  filter: blur(60px);
  z-index: 0;
  pointer-events: none;
  animation: drift 12s ease-in-out infinite alternate;
}

.bg-glow::after {
  content: '';
  position: fixed;
  bottom: -180px;
  right: -180px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(236,72,153,0.14) 0%, rgba(99,102,241,0.06) 50%, transparent 70%);
  filter: blur(60px);
  z-index: 0;
}

@keyframes drift {
  0%   { transform: translate(0, 0) scale(0.95); opacity: 0.7; }
  100% { transform: translate(60px, 40px) scale(1.05); opacity: 1; }
}

/* ── Container ── */
.container {
  width: 100%;
  max-width: 860px;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

/* ── Header ── */
.app-header {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

/* Badge pill above title */
.app-header::before {
  content: '✦  AI-Powered  ✦';
  display: inline-block;
  padding: 0.3rem 1rem;
  background: var(--accent-grad-soft);
  border: 1px solid rgba(99,102,241,0.2);
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-1);
}

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
}

/* Gradient icon background */
.logo-icon-wrap {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--accent-grad);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(99,102,241,0.35);
}

.logo-icon {
  width: 2rem;
  height: 2rem;
  color: #ffffff;
  filter: none;
}

.logo h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
}

.subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  font-weight: 400;
  max-width: 560px;
  line-height: 1.65;
}

/* ── Stats row ── */
.stats-row {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.stat-pill {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
  background: rgba(255,255,255,0.8);
  border: 1px solid var(--border-subtle);
  border-radius: 100px;
  padding: 0.35rem 0.9rem;
  box-shadow: var(--shadow-sm);
}

.stat-pill svg {
  width: 14px;
  height: 14px;
  color: var(--accent-1);
}

/* ── Main Card ── */
.main-card {
  background: var(--bg-card);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl),
              inset 0 1px 0 rgba(255,255,255,0.9),
              inset 0 -1px 0 rgba(0,0,0,0.03);
  overflow: hidden;
  transition: var(--transition);
}

.main-card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 30px 70px rgba(99,102,241,0.18), 0 4px 16px rgba(0,0,0,0.07);
}

.card-body {
  display: none;
  padding: 2.5rem;
}

.card-body.active {
  display: block;
  animation: fadeUp 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

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

/* ── Drop Zone ── */
.drop-zone {
  border: 2px dashed rgba(99,102,241,0.25);
  border-radius: var(--radius-lg);
  padding: 4rem 2rem;
  text-align: center;
  cursor: pointer;
  background: linear-gradient(160deg, rgba(99,102,241,0.04) 0%, rgba(236,72,153,0.03) 100%);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

/* shimmer stripe */
.drop-zone::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg,
    transparent 35%,
    rgba(255,255,255,0.55) 50%,
    transparent 65%);
  background-size: 200% 100%;
  background-position: -200% 0;
  transition: background-position 0.6s ease;
}

.drop-zone:hover::before {
  background-position: 200% 0;
}

.drop-zone:hover,
.drop-zone.dragover {
  border-color: var(--accent-2);
  background: linear-gradient(160deg, rgba(99,102,241,0.07) 0%, rgba(236,72,153,0.05) 100%);
  box-shadow: inset 0 0 30px rgba(139,92,246,0.06), 0 4px 20px rgba(99,102,241,0.08);
  transform: translateY(-2px);
}

.drop-zone-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
  position: relative;
  z-index: 1;
}

.icon-wrapper {
  width: 5rem;
  height: 5rem;
  border-radius: 50%;
  background: var(--accent-grad);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.25rem;
  box-shadow: 0 8px 24px rgba(99,102,241,0.3);
  transition: var(--transition);
}

.drop-zone:hover .icon-wrapper {
  transform: translateY(-6px) scale(1.05);
  box-shadow: 0 14px 32px rgba(99,102,241,0.38);
}

.upload-icon {
  width: 2.2rem;
  height: 2.2rem;
  color: #ffffff;
}

.drop-zone:hover .upload-icon {
  color: #ffffff;
}

.drop-zone h3 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.drop-zone p {
  font-size: 0.95rem;
  color: var(--text-muted);
}

.file-limits {
  font-size: 0.78rem;
  color: #9ca3af;
  margin-top: 0.25rem;
  background: rgba(99,102,241,0.06);
  border: 1px solid rgba(99,102,241,0.12);
  border-radius: 100px;
  padding: 0.28rem 0.85rem;
  display: inline-block;
}

/* ── Processing Section ── */
.processing-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  text-align: center;
  gap: 1.75rem;
}

.loader-wrapper {
  position: relative;
  width: 80px;
  height: 80px;
}

.loader-ring {
  width: 100%;
  height: 100%;
  border: 4px solid rgba(99,102,241,0.1);
  border-top: 4px solid var(--accent-1);
  border-right: 4px solid var(--accent-3);
  border-radius: 50%;
  animation: spin 1.1s linear infinite;
  box-shadow: 0 0 20px rgba(99,102,241,0.2);
}

@keyframes spin {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loader-sparkle {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 10px 3px rgba(139,92,246,0.6), 0 0 22px 8px rgba(99,102,241,0.2);
  animation: sparkle 2s ease-in-out infinite;
}

@keyframes sparkle {
  0%, 100% { transform: translate(-50%, -50%) scale(0.5); opacity: 0.4; }
  50%       { transform: translate(-50%, -50%) scale(1.3); opacity: 1; }
}

.processing-content h3 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.processing-content p {
  color: var(--text-muted);
  font-size: 0.95rem;
  max-width: 320px;
  line-height: 1.6;
}

/* ── Result Section ── */
.result-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

/* ── Comparison Slider ── */
.comparison-slider {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  max-height: 480px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: #f8fafc;
  user-select: none;
  cursor: ew-resize;
  border: 1px solid var(--border-subtle);
}

.image-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.before-image { z-index: 10; }

.after-image {
  z-index: 20;
  clip-path: inset(0 0 0 50%);
  background: #f8fafc;
}

.image-label {
  position: absolute;
  bottom: 1rem;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 0.3rem 0.8rem;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  z-index: 30;
  pointer-events: none;
}

.before-label {
  left: 1rem;
  background: rgba(239,68,68,0.12);
  border: 1px solid rgba(239,68,68,0.25);
  color: #dc2626;
}

.after-label {
  right: 1rem;
  background: rgba(22,163,74,0.12);
  border: 1px solid rgba(22,163,74,0.25);
  color: #16a34a;
}

/* ── Slider Handle ── */
.slider-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 3px;
  background: linear-gradient(to bottom, var(--accent-1), var(--accent-3));
  z-index: 40;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  box-shadow: 0 0 10px rgba(99,102,241,0.3);
  pointer-events: none;
}

.handle-line {
  flex-grow: 1;
  width: 3px;
  background: transparent;
}

.handle-button {
  width: 44px;
  height: 44px;
  background: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 12px rgba(99,102,241,0.25), 0 0 0 4px rgba(255,255,255,0.9), 0 0 0 6px rgba(99,102,241,0.15);
  cursor: ew-resize;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  pointer-events: auto;
}

.comparison-slider:hover .handle-button {
  transform: scale(1.12);
  box-shadow: 0 4px 18px rgba(99,102,241,0.35), 0 0 0 4px rgba(255,255,255,0.95), 0 0 0 7px rgba(99,102,241,0.2);
}

.handle-icon {
  width: 1.3rem;
  height: 1.3rem;
  color: var(--accent-1);
  transform: rotate(90deg);
}

/* ── Action Buttons ── */
.result-actions {
  display: flex;
  gap: 1rem;
  width: 100%;
  max-width: 520px;
}

.btn {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.88rem 1.6rem;
  border-radius: 14px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  transition: var(--transition);
  flex: 1;
  letter-spacing: -0.01em;
}

.btn-primary {
  background: var(--accent-grad);
  color: #ffffff;
  box-shadow: 0 4px 18px rgba(99,102,241,0.32);
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.18) 0%, transparent 60%);
  pointer-events: none;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(99,102,241,0.42);
}

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

.btn-secondary {
  background: rgba(99,102,241,0.06);
  color: var(--accent-1);
  border: 1.5px solid rgba(99,102,241,0.2);
}

.btn-secondary:hover {
  background: rgba(99,102,241,0.1);
  border-color: rgba(99,102,241,0.35);
  transform: translateY(-1px);
}

.btn-icon {
  width: 1.2rem;
  height: 1.2rem;
}

/* ── Footer ── */
.app-footer {
  text-align: center;
  font-size: 0.82rem;
  color: #9ca3af;
  letter-spacing: 0.01em;
}

/* ── Toast ── */
.toast-notification {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: rgba(239,68,68,0.94);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(239,68,68,0.25);
  color: #ffffff;
  padding: 1rem 1.5rem;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(239,68,68,0.25);
  font-weight: 500;
  font-size: 0.9rem;
  z-index: 200;
  animation: slideIn 0.3s cubic-bezier(0.22,1,0.36,1);
}

@keyframes slideIn {
  from { transform: translateX(130%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

/* ── Card top accent line ── */
.main-card::before {
  content: '';
  display: block;
  height: 3px;
  background: var(--accent-grad);
  opacity: 0.85;
}

/* ── Responsive ── */
@media (max-width: 640px) {
  body { padding: 1.5rem 0.75rem 3rem; }

  .logo h1 { font-size: 1.7rem; }

  .card-body { padding: 1.5rem; }

  .drop-zone { padding: 2.5rem 1rem; }

  .result-actions { flex-direction: column; }

  .btn { width: 100%; }

  .stats-row { gap: 0.75rem; }
}
