/* ==========================================================================
   GUJARATI SHRAVAN MAHADEV POSTER GENERATOR - PREMIUM MOBILE STYLESHEET
   ========================================================================== */

:root {
  --bg-dark: #04060B;
  --bg-card: rgba(16, 22, 34, 0.94);
  --bg-border: rgba(212, 175, 55, 0.32);

  --saffron-orange: #F57C00;
  --saffron-gradient: linear-gradient(135deg, #FF9800 0%, #E65100 100%);
  --gold-primary: #FFD700;
  --gold-light: #FFE58F;
  --gold-dark: #D4AF37;
  --whatsapp-green: #25D366;
  --whatsapp-gradient: linear-gradient(135deg, #25D366 0%, #128C7E 100%);

  --text-white: #FFFFFF;
  --text-muted: #9EABB8;

  --font-family: 'Hind Vadodara', 'Noto Sans Gujarati', system-ui, -apple-system, sans-serif;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --shadow-card: 0 10px 32px rgba(0, 0, 0, 0.6);
}

/* Reset & Mobile Viewport Setup */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-family: var(--font-family);
  background-color: var(--bg-dark);
  color: var(--text-white);
  line-height: 1.5;
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  background-color: #04060B;
  overflow-x: hidden;
}

/* Ambient Backdrop Glow */
.app-background {
  position: fixed;
  inset: 0;
  background: 
    radial-gradient(circle at 50% 10%, rgba(245, 124, 0, 0.25) 0%, transparent 60%),
    radial-gradient(circle at 80% 70%, rgba(212, 175, 55, 0.18) 0%, transparent 50%),
    #04060B;
  z-index: -1;
  pointer-events: none;
  animation: pulseGlow 8s ease-in-out infinite alternate;
}

@keyframes pulseGlow {
  0% { opacity: 0.8; transform: scale(1); }
  100% { opacity: 1; transform: scale(1.05); }
}

/* Mobile Application Container (Max-Width 430px Centered) */
.mobile-container {
  width: 100%;
  max-width: 430px;
  min-height: 100vh;
  background: rgba(8, 12, 20, 0.97);
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.85);
  display: flex;
  flex-direction: column;
  margin: 0 auto;
  position: relative;
  animation: pageFadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Devotional Header Bar */
.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(8, 12, 20, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--bg-border);
  padding: 12px 16px;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.header-icon {
  font-size: 1.3rem;
  animation: iconSpin 6s ease-in-out infinite alternate;
}

@keyframes iconSpin {
  0% { transform: scale(1) rotate(0deg); filter: drop-shadow(0 0 4px rgba(255,215,0,0.5)); }
  100% { transform: scale(1.15) rotate(10deg); filter: drop-shadow(0 0 12px rgba(255,215,0,0.9)); }
}

.header-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--gold-light);
  text-align: center;
  background: linear-gradient(180deg, #FFFFFF 0%, #FFE58F 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* App Content Area */
.app-content {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  flex: 1;
}

/* Top Instruction Banner */
.hero-card {
  background: linear-gradient(145deg, rgba(22, 30, 46, 0.92), rgba(12, 16, 26, 0.96));
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-lg);
  padding: 18px 16px;
  text-align: center;
  box-shadow: var(--shadow-card);
  animation: cardSlideUp 0.6s ease-out 0.1s both;
}

.divine-badge {
  display: inline-block;
  background: rgba(245, 124, 0, 0.18);
  border: 1px solid rgba(245, 124, 0, 0.5);
  color: #FFB74D;
  font-size: 0.84rem;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: var(--radius-full);
  margin-bottom: 10px;
  animation: badgeShimmer 2.5s infinite alternate;
}

@keyframes badgeShimmer {
  0% { box-shadow: 0 0 5px rgba(245, 124, 0, 0.3); }
  100% { box-shadow: 0 0 15px rgba(255, 215, 0, 0.7); }
}

.hero-heading {
  font-size: 1.3rem;
  font-weight: 800;
  line-height: 1.35;
  color: #FFFFFF;
  margin-bottom: 8px;
}

.hero-subtext {
  font-size: 0.92rem;
  color: var(--text-white);
  line-height: 1.5;
  margin-bottom: 14px;
  font-weight: 500;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px;
  background: var(--saffron-gradient);
  color: #FFFFFF;
  font-family: var(--font-family);
  font-size: 1rem;
  font-weight: 700;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 4px 18px rgba(230, 81, 0, 0.45);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-primary:active {
  transform: scale(0.98);
}

.hero-btn-text {
  color: #FFFFFF !important;
  font-weight: 800;
  font-size: 1.02rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

/* Creator Steps Container */
.creator-section {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.step-card {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-card);
  animation: cardSlideUp 0.6s ease-out both;
}

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

.step-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.step-badge {
  width: 28px;
  height: 28px;
  background: rgba(245, 124, 0, 0.2);
  border: 1px solid var(--saffron-orange);
  color: var(--saffron-orange);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
}

.step-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--gold-light);
}

/* Step 1: Photo Upload Box */
.photo-upload-box {
  border: 2px dashed rgba(212, 175, 55, 0.4);
  border-radius: var(--radius-md);
  background: rgba(6, 9, 14, 0.6);
  padding: 20px 14px;
  text-align: center;
  cursor: pointer;
  position: relative;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.photo-upload-box:active {
  border-color: var(--saffron-orange);
  background: rgba(245, 124, 0, 0.08);
}

.file-input-hidden {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
  z-index: 10;
}

.upload-icon-circle {
  font-size: 2.2rem;
  margin-bottom: 6px;
  animation: bounce 2s infinite;
}

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

.upload-main-text {
  font-size: 0.95rem;
  font-weight: 600;
  color: #FFFFFF;
}

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

.upload-active-view {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  position: relative;
  z-index: 15;
}

#photo-preview-thumb {
  width: 90px;
  height: 90px;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid var(--gold-dark);
  box-shadow: 0 0 14px rgba(212, 175, 55, 0.5);
  animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
  from { transform: scale(0.5); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.photo-btn-row {
  display: flex;
  gap: 10px;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #FFFFFF;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-family: var(--font-family);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.photo-zoom-drawer {
  margin-top: 12px;
  padding: 10px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  color: var(--text-muted);
}

.slider-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
}

.slider-row input[type="range"] {
  flex: 1;
  accent-color: var(--saffron-orange);
}

/* Step 2: Name Input Field */
.input-wrapper {
  position: relative;
  width: 100%;
}

.input-wrapper input {
  width: 100%;
  padding: 14px 44px 14px 14px;
  background: rgba(6, 9, 14, 0.8);
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-radius: var(--radius-md);
  color: #FFFFFF;
  font-family: var(--font-family);
  font-size: 1rem;
  font-weight: 600;
  outline: none;
}

.input-wrapper input:focus {
  border-color: var(--saffron-orange);
  box-shadow: 0 0 10px rgba(245, 124, 0, 0.3);
}

.input-pen-icon {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.1rem;
  pointer-events: none;
}

.quick-chips {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.chips-label {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.chip-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--gold-light);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-family: var(--font-family);
  font-size: 0.82rem;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.chip-btn:active {
  transform: scale(0.92);
  background: var(--saffron-orange);
  color: #FFFFFF;
}

/* Live Poster Preview Box */
.preview-step-card {
  border: 1px solid var(--bg-border);
  background: linear-gradient(180deg, rgba(16, 22, 34, 0.96) 0%, rgba(10, 14, 22, 0.98) 100%);
}

.social-proof-badge {
  display: block;
  text-align: center;
  margin-bottom: 12px;
}

.preview-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
}

/* Responsive Canvas Frame - Exact Match Between Preview and Export */
.canvas-frame {
  width: 100%;
  max-width: 360px;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.95);
  border: 2px solid var(--gold-primary);
  background: #04060B;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

#poster-canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
  object-fit: contain !important;
}

.live-status-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.status-dot {
  width: 8px;
  height: 8px;
  background: #25D366;
  border-radius: 50%;
  animation: pulseDot 1.5s infinite;
}

@keyframes pulseDot {
  0% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
  70% { transform: scale(1.2); box-shadow: 0 0 0 8px rgba(37, 211, 102, 0); }
  100% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* Action Buttons Group */
.action-buttons-box {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.btn-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 15px;
  border-radius: var(--radius-md);
  font-family: var(--font-family);
  font-size: 1.05rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-action:active {
  transform: scale(0.97);
}

.btn-download {
  background: var(--saffron-gradient);
  color: #FFFFFF;
  box-shadow: 0 4px 18px rgba(230, 81, 0, 0.4);
}

.btn-whatsapp {
  background: var(--whatsapp-gradient);
  color: #FFFFFF;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.45);
  animation: waPulse 2s infinite;
}

@keyframes waPulse {
  0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5); }
  70% { box-shadow: 0 0 0 12px rgba(37, 211, 102, 0); }
  100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* Clean Page Footer */
.app-footer {
  padding: 24px 16px;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(4, 6, 11, 0.96);
  margin-top: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.footer-devotional-text {
  font-size: 1.15rem;
  color: var(--gold-light);
  font-weight: 800;
  letter-spacing: 0.5px;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.footer-copy {
  font-size: 0.95rem;
  color: #FFFFFF;
  font-weight: 600;
}

.footer-copy a {
  color: var(--gold-primary);
  text-decoration: none;
  font-weight: 700;
}

.footer-site-link {
  margin-top: 2px;
}

.footer-site-link a {
  color: #FFFFFF !important;
  font-size: 0.98rem;
  font-weight: 700;
  text-decoration: underline;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
}

/* Toast Notification */
.toast-notification {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(16, 22, 34, 0.96);
  border: 1px solid var(--gold-primary);
  color: #FFFFFF;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  font-size: 0.92rem;
  font-weight: 600;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.7);
  z-index: 100;
  backdrop-filter: blur(8px);
  animation: slideToast 0.3s ease-out;
}

@keyframes slideToast {
  from { opacity: 0; transform: translate(-50%, 25px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

.hidden {
  display: none !important;
}
