/* CSS Custom Variables for Color Palette and Tokens */
:root {
  --rose-gold-light: hsl(270, 75%, 82%);
  --rose-gold: hsl(270, 60%, 65%);
  --rose-gold-dark: hsl(270, 50%, 45%);
  --gold: hsl(46, 65%, 52%);
  --gold-glow: hsla(46, 65%, 52%, 0.4);
  
  --blush-pink: hsl(270, 60%, 90%);
  --crimson: hsl(275, 60%, 25%);
  --crimson-glow: hsla(275, 60%, 25%, 0.4);
  
  --bg-space: hsl(270, 50%, 4%);
  --bg-space-end: hsl(280, 45%, 6%);
  
  --text-primary: hsl(0, 0%, 100%);
  --text-secondary: hsl(270, 20%, 75%);
  --text-muted: hsl(270, 15%, 50%);
  
  --glass-bg: rgba(255, 255, 255, 0.04);
  --glass-bg-hover: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-border-gold: rgba(212, 175, 55, 0.25);
  --glass-border-rose: rgba(180, 120, 220, 0.3);
  --glass-shadow: 0 16px 40px 0 rgba(0, 0, 0, 0.5);
  
  --font-sans: 'Outfit', sans-serif;
  --font-serif: 'Playfair Display', serif;
  --font-tamil: 'Kavivanar', cursive;
  
  --transition-smooth: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  --transition-elastic: all 0.5s cubic-bezier(0.68, -0.6, 0.32, 1.6);
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-space);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

/* Ambient Background Lights */
.ambient-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: linear-gradient(135deg, var(--bg-space) 0%, var(--bg-space-end) 100%);
  z-index: -2;
  overflow: hidden;
}

.glow-circle {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.25;
  mix-blend-mode: screen;
}

.glow-1 {
  top: -10%;
  right: -10%;
  width: 60vw;
  height: 60vw;
  background: radial-gradient(circle, var(--rose-gold) 0%, transparent 70%);
  animation: float-slow 20s infinite alternate;
}

.glow-2 {
  bottom: -10%;
  left: -10%;
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, var(--crimson) 0%, transparent 70%);
  animation: float-slow 25s infinite alternate-reverse;
}

@keyframes float-slow {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(50px, 30px) scale(1.1); }
}

/* Common Layout and Classes */
.hidden {
  display: none !important;
}

.panel-card {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  box-shadow: var(--glass-shadow);
  padding: 40px;
  transition: var(--transition-smooth);
}

.panel-card:hover {
  border-color: var(--glass-border-rose);
}

/* Dashboard Split Grid Layout */
.split-layout {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 30px;
  width: 92%;
  max-width: 1200px;
  margin: 40px auto;
  z-index: 1;
}

@media (max-width: 900px) {
  .split-layout {
    grid-template-columns: 1fr;
    width: 95%;
    margin: 20px auto;
  }
}

/* Step Badges */
.badge {
  display: inline-block;
  padding: 6px 12px;
  background: rgba(180, 120, 220, 0.15);
  border: 1px solid var(--glass-border-rose);
  color: var(--blush-pink);
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-radius: 30px;
  margin-bottom: 12px;
}

/* LEFT PANEL: Gallery/Manager */
.manager-panel {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.panel-header h2 {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 6px;
  background: linear-gradient(90deg, #FFF 0%, var(--text-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.panel-header p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.5;
}

/* Drag-and-Drop Uploader */
.upload-zone {
  border: 2px dashed rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.01);
  border-radius: 16px;
  padding: 30px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: pointer;
  transition: var(--transition-smooth);
  position: relative;
}

.upload-zone:hover, .upload-zone.drag-active {
  border-color: var(--rose-gold);
  background: rgba(180, 120, 220, 0.05);
}

.file-hidden {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  opacity: 0;
  cursor: pointer;
}

.upload-icon {
  fill: var(--rose-gold-light);
  margin-bottom: 12px;
  transition: var(--transition-elastic);
}

.upload-zone:hover .upload-icon {
  transform: translateY(-5px) scale(1.05);
  fill: var(--gold);
}

.upload-text {
  font-size: 0.95rem;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.upload-text strong {
  color: var(--rose-gold-light);
}

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

/* Gallery Display Container */
.gallery-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.gallery-container h3 {
  font-size: 1rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 8px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 12px;
  max-height: 260px;
  overflow-y: auto;
  padding-right: 4px;
}

/* Custom Scrollbars */
.gallery-grid::-webkit-scrollbar, 
.letter-scroll-area::-webkit-scrollbar {
  width: 6px;
}
.gallery-grid::-webkit-scrollbar-track,
.letter-scroll-area::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 10px;
}
.gallery-grid::-webkit-scrollbar-thumb,
.letter-scroll-area::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 10px;
}
.gallery-grid::-webkit-scrollbar-thumb:hover,
.letter-scroll-area::-webkit-scrollbar-thumb:hover {
  background: var(--rose-gold);
}

.gallery-empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Polaroid-like Thumbnail Cards */
.thumbnail-card {
  position: relative;
  background: #FFF;
  padding: 6px 6px 16px 6px;
  border-radius: 6px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  transform: rotate(var(--rotation, 0deg));
  transition: var(--transition-elastic);
  display: flex;
  flex-direction: column;
}

.thumbnail-card:hover {
  transform: scale(1.1) rotate(0deg) translateY(-5px);
  z-index: 10;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
}

.thumbnail-img-wrapper {
  width: 100%;
  padding-top: 100%; /* 1:1 Aspect Ratio */
  position: relative;
  overflow: hidden;
  border-radius: 2px;
}

.thumbnail-card img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.caption-input-box {
  width: 100%;
  border: none;
  background: transparent;
  font-family: var(--font-sans);
  font-size: 0.7rem;
  text-align: center;
  color: #333;
  margin-top: 6px;
  padding: 2px 4px;
  border-bottom: 1px dotted #ccc;
}

.caption-input-box:focus {
  outline: none;
  border-bottom-color: var(--rose-gold);
}

.btn-delete-thumb {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--crimson);
  color: white;
  border: none;
  font-size: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
  opacity: 0;
  transition: var(--transition-smooth);
}

.thumbnail-card:hover .btn-delete-thumb {
  opacity: 1;
}

/* Card Containers & Info */
.music-setup-card, .video-export-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 20px;
}

.music-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.card-icon {
  fill: var(--gold);
}

.music-setup-card h4, .video-export-card h4 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--gold);
}

.music-setup-card p, .video-export-card p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-top: 4px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: var(--transition-elastic);
  z-index: 1;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(135deg, var(--rose-gold) 0%, var(--rose-gold-dark) 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(180, 120, 220, 0.3);
}

.btn-primary:not(:disabled):hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(180, 120, 220, 0.5);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
}

.btn-secondary:not(:disabled):hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--rose-gold-light);
  transform: translateY(-2px);
}

.btn-full {
  width: 100%;
  margin-top: 12px;
}

/* Progress Bars */
.progress-container {
  margin-top: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  height: 24px;
  border-radius: 30px;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.progress-bar-fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--rose-gold) 0%, var(--gold) 100%);
  transition: width 0.1s ease-out;
}

.progress-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: white;
  z-index: 2;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.download-text {
  text-align: center;
  color: var(--gold) !important;
  font-weight: 500;
  margin-top: 12px;
}

/* RIGHT PANEL: Lock Screen & Keypad */
.lock-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 30px;
  text-align: center;
  border: 1px solid var(--glass-border-gold);
}

.lock-icon-wrapper {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(212, 175, 55, 0.05);
  border: 1px solid var(--glass-border-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px auto;
  box-shadow: 0 0 20px var(--gold-glow);
  animation: pulse-gold 2s infinite alternate;
}

@keyframes pulse-gold {
  0% { box-shadow: 0 0 10px var(--gold-glow); }
  100% { box-shadow: 0 0 25px rgba(212, 175, 55, 0.6); }
}

.lock-svg {
  fill: var(--gold);
}

.lock-header h2 {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.lock-header p {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

/* Passcode Display Box */
.passcode-screen-container {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 16px 32px;
  border-radius: 16px;
  display: inline-block;
  margin: 0 auto;
}

.passcode-display {
  display: flex;
  gap: 16px;
}

.passcode-display .dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.3);
  background: transparent;
  transition: var(--transition-smooth);
}

.passcode-display .dot.active {
  background: var(--gold);
  border-color: var(--gold);
  box-shadow: 0 0 10px var(--gold);
  transform: scale(1.2);
}

/* Keypad Layout */
.keypad-grid {
  display: grid;
  grid-template-columns: repeat(3, 75px);
  gap: 16px 24px;
  justify-content: center;
}

.key-btn {
  width: 75px;
  height: 75px;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  color: white;
  font-family: var(--font-sans);
  font-size: 1.6rem;
  font-weight: 300;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-elastic);
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.key-btn:hover {
  background: var(--glass-bg-hover);
  border-color: var(--glass-border-gold);
  color: var(--gold);
  transform: scale(1.05);
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.2);
}

.key-btn:active {
  transform: scale(0.9);
}

.action-key {
  font-size: 1.1rem;
  font-weight: 500;
  border-color: rgba(255, 255, 255, 0.05);
}

.action-key svg {
  fill: white;
  transition: var(--transition-smooth);
}

.action-key:hover svg {
  fill: var(--gold);
}

/* Lock Shake on Error */
.lock-panel.shake {
  animation: shake-error 0.5s ease-in-out;
  border-color: var(--crimson-glow);
}

@keyframes shake-error {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-8px); }
  20%, 40%, 60%, 80% { transform: translateX(8px); }
}

.unlock-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 10px;
}

/* FULLSCREEN OVERLAY REVEAL SCREEN */
.reveal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, hsl(270, 50%, 4%) 0%, hsl(280, 45%, 6%) 100%);
  z-index: 1000;
  overflow-y: auto;
  opacity: 0;
  transform: scale(1.05);
  transition: opacity 0.8s ease, transform 0.8s ease;
  display: flex;
  flex-direction: column;
}

.reveal-overlay.unlocked {
  opacity: 1;
  transform: scale(1);
}

.hearts-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
}

.reveal-container {
  width: 90%;
  max-width: 1200px;
  margin: 40px auto;
  display: flex;
  flex-direction: column;
  gap: 40px;
  padding-bottom: 60px;
}

/* Nav Actions in Surprise View */
.reveal-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 16px;
}

.btn-text-nav {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition-smooth);
}

.btn-text-nav svg {
  fill: var(--text-secondary);
  transition: var(--transition-smooth);
}

.btn-text-nav:hover {
  color: var(--rose-gold-light);
}

.btn-text-nav:hover svg {
  fill: var(--rose-gold-light);
  transform: translateX(-3px);
}

.sound-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.select-music-dropdown {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--glass-border);
  color: white;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
}

.select-music-dropdown:focus {
  outline: none;
  border-color: var(--rose-gold);
}

.btn-icon-nav {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
  cursor: pointer;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}

.btn-icon-nav:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--rose-gold);
}

.btn-icon-nav svg {
  fill: white;
}

/* Countdown & Anniversary Title */
.anniversary-hero {
  text-align: center;
}

.romantic-title {
  font-family: var(--font-serif);
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 24px;
  letter-spacing: -1px;
  background: linear-gradient(135deg, #FFF 0%, var(--rose-gold-light) 50%, var(--gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: title-glow 3s infinite alternate;
}

@keyframes title-glow {
  0% { filter: drop-shadow(0 0 5px rgba(255,255,255,0)); }
  100% { filter: drop-shadow(0 0 10px rgba(180, 120, 220, 0.3)); }
}

.countdown-grid {
  display: inline-flex;
  gap: 16px;
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(8px);
  padding: 20px 30px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.countdown-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 65px;
}

.countdown-item .number {
  font-family: var(--font-sans);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--gold);
}

.countdown-item .label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  margin-top: 4px;
}

@media (max-width: 600px) {
  .romantic-title {
    font-size: 2.2rem;
  }
  .countdown-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding: 15px;
  }
}

/* Split Content Reveal (Letter + Slideshow) */
.reveal-content {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 480px;
}

/* Love Letter Card */
.love-letter-card {
  background: hsl(35, 30%, 96%); /* Parchment white */
  color: hsl(233, 40%, 15%);
  border-radius: 20px;
  box-shadow: var(--glass-shadow), inset 0 0 60px rgba(139, 69, 19, 0.1);
  padding: 40px;
  position: relative;
  display: flex;
  flex-direction: column;
  border: 4px double hsl(270, 40%, 80%);
  max-width: 680px;
  width: 100%;
}

.wax-seal {
  position: absolute;
  top: -15px;
  right: 40px;
  transform: rotate(-10deg);
}

.letter-scroll-area {
  flex-grow: 1;
  overflow-y: auto;
  padding-right: 8px;
  max-height: 400px;
}

.love-letter-tamil {
  font-family: var(--font-tamil);
  font-size: 1.35rem;
  line-height: 1.9;
  text-align: justify;
  text-justify: inter-word;
  white-space: pre-line;
  color: #4A1521; /* Rich maroon */
}



/* Memory Wall (Polaroid Grid) */
.memory-wall-section {
  margin-top: 20px;
}

.section-title {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  text-align: center;
  margin-bottom: 30px;
  color: var(--rose-gold-light);
}

.memory-wall-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 30px;
  justify-items: center;
}

.polaroid-wrapper {
  max-width: 280px;
  width: 100%;
  opacity: 0;
  transform: translateY(60px) scale(0.85) rotate(-3deg);
  transition: opacity 0.7s cubic-bezier(0.34, 1.56, 0.64, 1),
              transform 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
  transition-delay: var(--animation-delay, 0s);
  will-change: transform, opacity;
}

/* Visible state - triggered by Intersection Observer */
.polaroid-wrapper.polaroid-visible {
  opacity: 1;
  transform: translateY(0) scale(1) rotate(0deg);
}

/* Animation variant 1: Slide from left */
.polaroid-wrapper[data-anim="slide-left"] {
  transform: translateX(-80px) scale(0.85) rotate(5deg);
}
.polaroid-wrapper[data-anim="slide-left"].polaroid-visible {
  transform: translateX(0) scale(1) rotate(0deg);
}

/* Animation variant 2: Slide from right */
.polaroid-wrapper[data-anim="slide-right"] {
  transform: translateX(80px) scale(0.85) rotate(-5deg);
}
.polaroid-wrapper[data-anim="slide-right"].polaroid-visible {
  transform: translateX(0) scale(1) rotate(0deg);
}

/* Animation variant 3: Zoom burst */
.polaroid-wrapper[data-anim="zoom-burst"] {
  transform: scale(0.4) rotate(10deg);
}
.polaroid-wrapper[data-anim="zoom-burst"].polaroid-visible {
  transform: scale(1) rotate(0deg);
}

/* Animation variant 4: Flip in */
.polaroid-wrapper[data-anim="flip-in"] {
  transform: perspective(600px) rotateY(90deg) scale(0.8);
}
.polaroid-wrapper[data-anim="flip-in"].polaroid-visible {
  transform: perspective(600px) rotateY(0deg) scale(1);
}

/* Animation variant 5: Drop bounce */
.polaroid-wrapper[data-anim="drop-bounce"] {
  transform: translateY(-100px) scale(0.7);
}
.polaroid-wrapper[data-anim="drop-bounce"].polaroid-visible {
  transform: translateY(0) scale(1);
}

/* Subtle glow pulse on visible polaroids */
.polaroid-wrapper.polaroid-visible .polaroid-card {
  animation: polaroid-glow-pulse 2.5s ease-in-out infinite;
  animation-delay: var(--animation-delay, 0s);
}

@keyframes polaroid-glow-pulse {
  0%, 100% { box-shadow: 0 10px 25px rgba(0,0,0,0.4); }
  50% { box-shadow: 0 10px 35px rgba(180, 120, 220, 0.3), 0 0 15px rgba(180, 120, 220, 0.15); }
}

.polaroid-card {
  background: #FFF;
  padding: 16px 16px 36px 16px;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.4);
  transform: rotate(var(--polaroid-rotation, 0deg));
  transition: transform 0.3s cubic-bezier(0.68, -0.6, 0.32, 1.6),
              box-shadow 0.3s ease;
  width: 100%;
}

.polaroid-card:hover {
  transform: scale(1.08) rotate(0deg) translateY(-8px);
  z-index: 50;
  box-shadow: 0 20px 40px rgba(0,0,0,0.6);
}

.polaroid-img-box {
  width: 100%;
  padding-top: 90%; /* Rectangular polaroid style */
  position: relative;
  overflow: hidden;
  border: 1px solid #EAEAEA;
  background: #EAEAEA;
}

.polaroid-img-box img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.polaroid-note {
  font-family: var(--font-tamil);
  color: #2F3E46;
  text-align: center;
  margin-top: 18px;
  font-size: 1.1rem;
  line-height: 1.4;
  word-wrap: break-word;
}

/* Center Layout adjustments when admin is off */
body:not(.admin-mode) .split-layout {
  grid-template-columns: 1fr;
  max-width: 480px;
  justify-content: center;
  align-items: center;
  margin: 60px auto;
}

body:not(.admin-mode) .manager-panel {
  display: none !important;
}

body:not(.admin-mode) .lock-panel {
  width: 100%;
}



/* Admin Audio Selection Styles */
.audio-select-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 14px;
  margin-bottom: 14px;
  text-align: left;
}

.field-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--rose-gold-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.admin-select-music {
  width: 100%;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--glass-border);
  color: white;
  padding: 10px 14px;
  border-radius: 10px;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.admin-select-music:focus {
  outline: none;
  border-color: var(--rose-gold);
  box-shadow: 0 0 10px rgba(180, 120, 220, 0.2);
}

.audio-select-row {
  display: flex;
  gap: 8px;
  align-items: center;
  width: 100%;
}

#btn-select-audio-file {
  padding: 10px 14px;
  white-space: nowrap;
  font-size: 0.8rem;
  height: 40px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
  border-radius: 10px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

#btn-select-audio-file:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--rose-gold-light);
}

.audio-filename-label {
  font-size: 0.75rem;
  color: var(--rose-gold-light);
  margin-top: 4px;
  display: block;
  font-style: italic;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Custom Modal styles for Help / Error info */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  padding: 20px;
}

.modal-overlay:not(.hidden) {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: rgba(25, 25, 35, 0.95);
  border: 1px solid var(--glass-border-rose);
  border-radius: 20px;
  width: 100%;
  max-width: 480px;
  padding: 24px;
  box-shadow: var(--glass-shadow);
  display: flex;
  flex-direction: column;
  gap: 16px;
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay:not(.hidden) .modal-card {
  transform: scale(1);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 12px;
}

.modal-header h3 {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  color: var(--blush-pink);
}

.btn-close {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 4px;
  transition: var(--transition-smooth);
  line-height: 1;
}

.btn-close:hover {
  color: white;
  transform: scale(1.1);
}

.modal-body {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.modal-tips {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 16px;
}

.modal-tips h4 {
  font-size: 0.95rem;
  color: var(--gold);
  margin-bottom: 8px;
}

.modal-tips ul {
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.modal-tips li {
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-align: left;
}

.modal-tips strong {
  color: white;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 12px;
}

/* Visual Debug Console Styles */
.debug-console-card {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
  margin-top: 10px;
}

.debug-console-card h4 {
  font-size: 0.85rem;
  color: var(--rose-gold-light);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-family: var(--font-sans);
  font-weight: 700;
  margin: 0;
}

.debug-log-output {
  background: rgba(10, 10, 15, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 12px 16px;
  height: 140px;
  overflow-y: auto;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.78rem;
  color: #39FF14; /* Matrix Green */
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.8);
}

.debug-placeholder {
  color: var(--text-muted);
  font-style: italic;
  margin: 0;
}

.debug-log-line {
  margin: 0;
  line-height: 1.4;
  word-wrap: break-word;
  white-space: pre-wrap;
  border-bottom: 1px dashed rgba(57, 255, 20, 0.15);
  padding-bottom: 4px;
}

#btn-play-preview-song {
  padding: 10px 14px;
  white-space: nowrap;
  font-size: 0.8rem;
  height: 40px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
  border-radius: 10px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

#btn-play-preview-song:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--rose-gold-light);
}

#btn-play-preview-song.playing {
  background: rgba(180, 120, 220, 0.25);
  border-color: var(--rose-gold);
  color: var(--blush-pink);
  box-shadow: 0 0 10px rgba(180, 120, 220, 0.4);
}

/* Custom checkbox overlay on photos */
.photo-select-checkbox-container {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 5;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.photo-select-checkbox {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.custom-checkbox-checkmark {
  height: 24px;
  width: 24px;
  background: rgba(0, 0, 0, 0.6);
  border: 2px solid rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.photo-select-checkbox-container:hover .custom-checkbox-checkmark {
  border-color: var(--rose-gold-light);
  transform: scale(1.1);
}

.photo-select-checkbox:checked ~ .custom-checkbox-checkmark {
  background: var(--rose-gold);
  border-color: var(--rose-gold);
}

.custom-checkbox-checkmark::after {
  content: "";
  display: none;
}

.photo-select-checkbox:checked ~ .custom-checkbox-checkmark::after {
  display: block;
}

.photo-select-checkbox-container .custom-checkbox-checkmark::after {
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) translate(-2px, -3px);
}

/* Glassmorphic audio prompt overlay */
.audio-prompt-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 5, 20, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease;
  padding: 20px;
}

.audio-prompt-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.audio-prompt-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border-rose);
  border-radius: 24px;
  max-width: 420px;
  width: 100%;
  padding: 40px 30px;
  text-align: center;
  box-shadow: var(--glass-shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.music-note-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(180, 120, 220, 0.15);
  border: 1px solid var(--glass-border-rose);
  color: var(--rose-gold-light);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px rgba(180, 120, 220, 0.4);
  animation: float-note 3s infinite ease-in-out;
}

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

.audio-prompt-card h2 {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  color: white;
  margin: 0;
}

.audio-prompt-card p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}

.audio-notice {
  font-weight: 600;
  color: var(--gold) !important;
  background: rgba(212, 175, 55, 0.08);
  border: 1px solid var(--glass-border-gold);
  border-radius: 12px;
  padding: 10px 16px;
  width: 100%;
}









