/* ============================================================
   WALTON FRAME GENERATOR — style.css
   Aesthetic: Royal Blue Campaign · Hind Siliguri Bengali
   Deep navy/indigo base · Gold/yellow accents · Glows
   Mobile-first · CSS custom properties
   ============================================================ */

/* ── 1. RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

/* ── 2. TOKENS ── */
:root {
  --blue-deep:    #030e3a;
  --blue-dark:    #071050;
  --blue-mid:     #0a1a6e;
  --blue-bright:  #1240cc;
  --blue-glow:    #1e56ff;

  --gold:         #F5C518;
  --gold-light:   #ffe066;
  --gold-dim:     rgba(245,197,24,0.18);
  --gold-border:  rgba(245,197,24,0.35);

  --white:        #ffffff;
  --white-dim:    rgba(255,255,255,0.7);
  --white-faint:  rgba(255,255,255,0.12);

  --card-bg:      rgba(10, 22, 90, 0.85);
  --card-border:  rgba(30, 86, 255, 0.25);
  --glass:        rgba(18, 64, 204, 0.15);

  --font-bn:      'Hind Siliguri', 'Tiro Bangla', system-ui, sans-serif;

  --radius-sm:  8px;
  --radius-md:  14px;
  --radius-lg:  20px;
  --radius-xl:  28px;

  --shadow-card: 0 8px 48px rgba(0,0,0,0.55), 0 2px 16px rgba(0,0,0,0.3);
  --shadow-glow: 0 0 40px rgba(30,86,255,0.4);
  --shadow-gold: 0 4px 24px rgba(245,197,24,0.35);

  --transition: 260ms cubic-bezier(0.4,0,0.2,1);
  --spring:     400ms cubic-bezier(0.34,1.56,0.64,1);
}

/* ── 3. BASE ── */
body {
  background: var(--blue-deep);
  color: var(--white);
  font-family: var(--font-bn);
  font-size: 1rem;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(ellipse 70% 50% at 50% 0%, rgba(18,64,204,0.35) 0%, transparent 70%),
    radial-gradient(ellipse 50% 40% at 80% 80%, rgba(30,86,255,0.15) 0%, transparent 60%);
  min-height: 100vh;
}

/* ── 4. PARTICLES ── */
.particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.particle {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.6);
  animation: particleDrift linear infinite;
}

@keyframes particleDrift {
  0%   { transform: translateY(100vh) scale(0); opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 0.5; }
  100% { transform: translateY(-20px) scale(1); opacity: 0; }
}

/* ── 5. HERO ── */
.hero {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  padding: 3rem 1.25rem 2rem;
  max-width: 1100px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .hero {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 4rem 2rem 3rem;
    gap: 3rem;
  }
  .hero__left  { flex: 1; }
  .hero__right { flex: 1; display: flex; justify-content: center; }
}

.hero__tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--gold);
  border: 1px solid var(--gold-border);
  background: var(--gold-dim);
  padding: 0.35rem 1rem;
  border-radius: 100px;
  margin-bottom: 1rem;
  animation: fadeUp 0.7s ease 0.1s both;
}

.star-icon { font-size: 0.65rem; }

.hero__title {
  font-size: clamp(2.4rem, 8vw, 4.2rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--white);
  margin-bottom: 1rem;
  animation: fadeUp 0.7s ease 0.2s both;
}

.hero__title--gold {
  color: var(--gold);
  text-shadow: 0 0 30px rgba(245,197,24,0.5);
}

.hero__sub {
  font-size: 1rem;
  color: var(--white-dim);
  line-height: 1.75;
  margin-bottom: 1.75rem;
  animation: fadeUp 0.7s ease 0.3s both;
}

.hero__note {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.45);
  margin-top: 0.75rem;
}

/* Hero frame display */
.hero__frame-display {
  position: relative;
  width: min(340px, 90vw);
  animation: fadeUp 0.7s ease 0.4s both;
}

.frame-glow {
  position: absolute;
  inset: -20px;
  background: radial-gradient(ellipse at center, rgba(30,86,255,0.5) 0%, transparent 65%);
  pointer-events: none;
  animation: glowPulse 3s ease-in-out infinite;
}

@keyframes glowPulse {
  0%,100% { opacity: 0.6; transform: scale(1); }
  50%     { opacity: 1; transform: scale(1.04); }
}

.frame-pedestal {
  position: absolute;
  bottom: -30px;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 30px;
  background: radial-gradient(ellipse at center, rgba(30,86,255,0.6) 0%, transparent 70%);
  filter: blur(8px);
  pointer-events: none;
}

.hero__frame-img {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 8px 32px rgba(30,86,255,0.6));
  animation: floatFrame 4s ease-in-out infinite;
}

@keyframes floatFrame {
  0%,100% { transform: translateY(0); }
  50%     { transform: translateY(-10px); }
}

/* ── 6. BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  font-family: var(--font-bn);
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  text-decoration: none;
  transition: transform var(--transition), box-shadow var(--transition);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.btn--upload-hero {
  background: transparent;
  border: 2px solid var(--gold);
  color: var(--white);
  padding: 0.85rem 2rem;
  font-size: 1rem;
  animation: fadeUp 0.7s ease 0.4s both;
  position: relative;
  overflow: hidden;
}

.btn--upload-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(245,197,24,0.15), rgba(30,86,255,0.15));
  opacity: 0;
  transition: opacity var(--transition);
}

.btn--upload-hero:hover::before { opacity: 1; }
.btn--upload-hero:hover { transform: translateY(-2px); box-shadow: var(--shadow-gold); }
.btn--upload-hero:active { transform: translateY(0); }

.btn--select {
  background: var(--blue-bright);
  color: var(--white);
  padding: 0.7rem 1.75rem;
  font-size: 0.95rem;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 20px rgba(18,64,204,0.5);
}

.btn--select:hover { transform: translateY(-2px); box-shadow: 0 6px 28px rgba(18,64,204,0.7); }
.btn--select:active { transform: scale(0.98); }

.btn--download {
  display: flex;
  width: 100%;
  background: var(--blue-bright);
  color: var(--white);
  padding: 1rem;
  font-size: 1.05rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 24px rgba(18,64,204,0.55);
  letter-spacing: 0.02em;
  margin-bottom: 1rem;
}

.btn--download:hover { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(18,64,204,0.7); }

.btn--reset {
  background: transparent;
  border: 1px solid var(--card-border);
  color: var(--white-dim);
  padding: 0.45rem 1.2rem;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
  margin-top: 0.5rem;
}

.btn--reset:hover { border-color: var(--gold); color: var(--gold); }

/* ── 7. APP CARD ── */
.app-card {
  position: relative;
  z-index: 1;
  max-width: 860px;
  margin: 0 auto 2rem;
  padding: 0 1rem;
}

/* ── 8. CARD SECTIONS ── */
.card-section {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(16px);
  border-radius: var(--radius-xl);
  padding: 2rem 1.5rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-card);
}

@media (min-width: 640px) {
  .card-section { padding: 2.5rem 2.5rem; }
}

.card-section--download {
  background: var(--card-bg);
  text-align: center;
}

/* Section header */
.section-header {
  text-align: center;
  margin-bottom: 1.75rem;
}

.section-title {
  font-size: clamp(1.25rem, 4vw, 1.65rem);
  font-weight: 700;
  color: var(--white);
  margin-bottom: 0.5rem;
}

.section-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  color: var(--gold);
}

.section-divider::before,
.section-divider::after {
  content: '';
  flex: 1;
  max-width: 100px;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--gold-border));
}

.section-divider::after {
  background: linear-gradient(to left, transparent, var(--gold-border));
}

.divider-star { font-size: 0.8rem; }

/* ── 9. UPLOAD LAYOUT ── */
.upload-layout {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .upload-layout {
    flex-direction: row;
    align-items: flex-start;
    gap: 1.75rem;
  }
}

/* Drop zone */
.drop-zone {
  flex: 1;
  border: 2px dashed rgba(30,86,255,0.45);
  border-radius: var(--radius-lg);
  background: rgba(10,26,110,0.4);
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition), transform var(--transition);
  min-height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
}

.drop-zone:hover,
.drop-zone:focus-visible {
  border-color: var(--blue-glow);
  background: rgba(18,64,204,0.25);
  outline: none;
  transform: scale(1.01);
}

.drop-zone.drag-over {
  border-color: var(--gold);
  background: rgba(245,197,24,0.08);
  transform: scale(1.02);
}

.drop-zone__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 2rem 1.5rem;
  text-align: center;
}

.upload-icon-wrap {
  color: rgba(255,255,255,0.5);
  margin-bottom: 0.5rem;
}

.drop-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--white-dim);
}

.drop-or {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.35);
}

.drop-formats {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.3);
  margin-top: 0.5rem;
}

/* Upload error */
.upload-error {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: #ff6b6b;
  background: rgba(255,107,107,0.1);
  border: 1px solid rgba(255,107,107,0.25);
  border-radius: var(--radius-sm);
  padding: 0.65rem 1rem;
  margin-top: 1rem;
}

/* ── 10. PREVIEW PANEL ── */
.preview-panel {
  flex: 1;
}

.preview-label {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--white-dim);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
  text-align: center;
}

.preview-stage {
  position: relative;
  width: 100%;
  padding-bottom: 100%;
  background: rgba(5,12,55,0.7);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-glow);
  cursor: grab;
  touch-action: none;
}

.preview-stage:active { cursor: grabbing; }

.preview-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.2);
}

.user-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform-origin: center center;
  will-change: transform;
  user-select: none;
}

.frame-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
  z-index: 10;
  user-select: none;
}

.drag-hint {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(6px);
  color: rgba(255,255,255,0.8);
  font-size: 0.7rem;
  padding: 0.3rem 0.75rem;
  border-radius: 100px;
  pointer-events: none;
  transition: opacity 0.5s ease;
  white-space: nowrap;
}

.drag-hint.hidden { opacity: 0; }

/* ── 11. CONTROLS ROW ── */
.controls-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 540px) {
  .controls-row { grid-template-columns: 1fr 2fr 1fr; gap: 1rem; align-items: start; }
}

.ctrl-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.35rem;
  padding: 1.25rem 0.75rem;
  background: rgba(10,26,110,0.3);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
}

.ctrl-icon {
  width: 46px; height: 46px;
  background: rgba(18,64,204,0.35);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  margin-bottom: 0.25rem;
}

.ctrl-label {
  font-size: 1rem;
  font-weight: 600;
  color: var(--white);
}

.ctrl-sub {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.45);
  line-height: 1.4;
}

/* Zoom controls */
.ctrl-group--zoom { gap: 0.5rem; }

.zoom-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0 0.25rem;
}

.zoom-btn {
  width: 30px; height: 30px;
  flex-shrink: 0;
  background: rgba(18,64,204,0.5);
  border: 1px solid var(--card-border);
  color: var(--white);
  border-radius: 50%;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), transform var(--transition);
  -webkit-tap-highlight-color: transparent;
}

.zoom-btn:hover { background: var(--blue-bright); transform: scale(1.1); }
.zoom-btn:active { transform: scale(0.95); }

.zoom-slider {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  background: linear-gradient(to right, var(--blue-bright) 0%, var(--blue-bright) var(--val, 46.67%), rgba(255,255,255,0.15) var(--val, 46.67%));
  border-radius: 4px;
  outline: none;
  cursor: pointer;
}

.zoom-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--white);
  box-shadow: 0 0 6px rgba(30,86,255,0.6);
  cursor: pointer;
  transition: transform var(--transition);
}

.zoom-slider::-webkit-slider-thumb:hover { transform: scale(1.2); }
.zoom-slider::-moz-range-thumb {
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--white);
  border: none;
  cursor: pointer;
}

/* ── 12. DOWNLOAD ── */
.fb-note {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.4);
  text-align: center;
  margin-top: 0.5rem;
}

/* ── 13. FOOTER ── */
.footer {
  position: relative;
  z-index: 1;
  background: rgba(3,8,35,0.9);
  border-top: 1px solid rgba(30,86,255,0.2);
  padding: 1.75rem 1.25rem;
}

.footer__inner {
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

@media (min-width: 640px) {
  .footer__inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

.logo-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--blue-mid);
  border: 2px solid var(--gold-border);
  font-size: 0.55rem;
  line-height: 1.3;
  text-align: center;
  color: var(--white-dim);
  padding: 0.3rem;
}

.logo-badge strong {
  color: var(--gold);
  font-size: 0.65rem;
  font-weight: 700;
}

.footer__copy {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.45);
}

.footer__social {
  display: flex;
  gap: 0.6rem;
}

.social-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(18,64,204,0.3);
  border: 1px solid var(--card-border);
  color: var(--white-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: background var(--transition), color var(--transition), transform var(--transition);
}

.social-btn:hover {
  background: var(--blue-bright);
  color: var(--white);
  transform: translateY(-2px);
}

/* ── 14. ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── 15. ACCESSIBILITY ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ── 16. SCROLLBAR ── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--blue-deep); }
::-webkit-scrollbar-thumb { background: var(--blue-mid); border-radius: 3px; }
