/* ==========================================================================
   CardCraft 3D / 2D - Design System & App Styles
   ========================================================================== */

:root {
  --bg-main: #090d16;
  --bg-surface: #111827;
  --bg-surface-elevated: #1e293b;
  --bg-glass: rgba(17, 24, 39, 0.82);
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(99, 102, 241, 0.35);

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --accent-primary: #6366f1;
  --accent-primary-hover: #4f46e5;
  --accent-gold: #f59e0b;
  --accent-pink: #ec4899;
  --accent-cyan: #06b6d4;
  --accent-success: #10b981;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 16px -2px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 24px rgba(99, 102, 241, 0.35);

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --sidebar-width: 440px;
  --navbar-height: 64px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-main);
  color: var(--text-primary);
  overflow: hidden;
  height: 100vh;
  width: 100vw;
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   NAVIGATION BAR
   ========================================================================== */

.app-navbar {
  height: var(--navbar-height);
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 50;
  flex-shrink: 0;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-icon {
  font-size: 26px;
  filter: drop-shadow(0 0 8px rgba(245, 158, 11, 0.5));
}

.brand-title {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 50%, #f59e0b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  background: rgba(99, 102, 241, 0.18);
  color: #818cf8;
  border: 1px solid rgba(99, 102, 241, 0.4);
  border-radius: 12px;
}

.nav-center {
  display: flex;
  align-items: center;
}

/* Mode Switcher Pill (3D vs 2D) */
.mode-toggle-pill {
  display: flex;
  background: var(--bg-main);
  border: 1px solid var(--border-glass);
  padding: 4px;
  border-radius: 30px;
  gap: 4px;
}

.mode-btn {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  padding: 6px 18px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.mode-btn:hover {
  color: var(--text-primary);
}

.mode-btn.active {
  background: var(--accent-primary);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.4);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ==========================================================================
   BUTTONS & INPUTS
   ========================================================================== */

button {
  font-family: var(--font-sans);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-primary {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-surface-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border-glass);
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
}

.btn-icon:hover {
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-magic-gradient {
  background: linear-gradient(135deg, #f59e0b 0%, #ec4899 50%, #8b5cf6 100%);
  color: white;
  border: none;
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(236, 72, 153, 0.3);
}

.btn-magic-gradient:hover {
  filter: brightness(1.1);
  box-shadow: 0 6px 20px rgba(236, 72, 153, 0.5);
  transform: translateY(-1px);
}

input, select, textarea {
  font-family: var(--font-sans);
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  font-size: 13px;
  transition: all 0.2s ease;
  width: 100%;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.25);
  background: rgba(15, 23, 42, 0.85);
}

label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ==========================================================================
   APP WORKSPACE LAYOUT
   ========================================================================== */

.app-main {
  display: flex;
  flex: 1;
  height: calc(100vh - var(--navbar-height));
  overflow: hidden;
  position: relative;
}

/* Studio Sidebar */
.studio-sidebar {
  width: var(--sidebar-width);
  background: var(--bg-surface);
  border-right: 1px solid var(--border-glass);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  z-index: 20;
}

/* Tab Navigation */
.studio-tabs {
  display: flex;
  background: rgba(15, 23, 42, 0.7);
  border-bottom: 1px solid var(--border-glass);
  overflow-x: auto;
  scrollbar-width: none;
}
.studio-tabs::-webkit-scrollbar { display: none; }

.studio-tab {
  flex: 1;
  padding: 14px 10px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.studio-tab span:first-child {
  font-size: 16px;
}

.studio-tab:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.02);
}

.studio-tab.active {
  color: var(--accent-primary);
  border-bottom-color: var(--accent-primary);
  background: rgba(99, 102, 241, 0.06);
}

/* Studio Panels Container */
.studio-panels-container {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.studio-panel {
  display: none;
  flex-direction: column;
  gap: 18px;
  animation: fadeIn 0.2s ease;
}

.studio-panel.active {
  display: flex;
}

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

/* Form Groups */
.form-group {
  display: flex;
  flex-direction: column;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* Inspiration Chips */
.chips-container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.chip-prompt {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  padding: 4px 10px;
  font-size: 11px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.chip-prompt:hover {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.4);
  color: var(--text-primary);
}

/* AI Refiners Grid */
.ai-refiners-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.btn-ai-refine {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  padding: 8px 10px;
  border-radius: var(--radius-md);
  font-size: 12px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: center;
}

.btn-ai-refine:hover {
  background: rgba(99, 102, 241, 0.15);
  border-color: var(--accent-primary);
}

/* Theme Picker Grid */
.theme-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.theme-card {
  background: var(--bg-surface-elevated);
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  padding: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.2s ease;
}

.theme-card:hover {
  border-color: rgba(255, 255, 255, 0.2);
}

.theme-card.active {
  border-color: var(--accent-primary);
  background: rgba(99, 102, 241, 0.12);
}

.theme-preview {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 14px;
  flex-shrink: 0;
}

.theme-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
}

.theme-badge {
  font-size: 10px;
  color: var(--text-muted);
}

/* Foil & Texture Pill Selectors */
.pill-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.foil-pill, .texture-pill {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 20px;
  cursor: pointer;
}

.foil-pill.active, .texture-pill.active {
  background: var(--accent-primary);
  color: white;
  border-color: var(--accent-primary);
}

/* Color Picker Inputs */
.color-inputs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.color-picker-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-surface-elevated);
  padding: 6px 10px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-glass);
}

.color-picker-item input[type="color"] {
  width: 28px;
  height: 28px;
  border: none;
  padding: 0;
  border-radius: 6px;
  cursor: pointer;
  background: transparent;
}

.color-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0;
}

/* Sticker Tray */
.stickers-tray {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  background: var(--bg-surface-elevated);
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-glass);
}

.sticker-item {
  font-size: 24px;
  background: transparent;
  border: none;
  border-radius: 8px;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease;
}

.sticker-item:hover {
  transform: scale(1.3);
  background: rgba(255, 255, 255, 0.08);
}

/* ==========================================================================
   CENTRAL VIEWPORT (3D / 2D)
   ========================================================================== */

.viewport-container {
  flex: 1;
  position: relative;
  background: radial-gradient(circle at center, #151d2f 0%, #090d16 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

#viewport-3d {
  width: 100%;
  height: 100%;
  outline: none;
}

#viewport-2d {
  width: 100%;
  height: 100%;
  display: none;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  padding: 30px;
}

/* Floating 3D Controls Overlay */
.floating-controls {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  padding: 8px 16px;
  border-radius: 40px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-lg);
  z-index: 30;
}

.fold-slider-container {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
}

.fold-slider-container input[type="range"] {
  width: 130px;
  accent-color: var(--accent-primary);
  cursor: pointer;
}

.control-divider {
  width: 1px;
  height: 22px;
  background: var(--border-glass);
}

/* ==========================================================================
   2D CARD DESIGNER SPECIFICS
   ========================================================================== */

.card2d-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  max-width: 100%;
}

.card2d-toolbar {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-glass);
  padding: 6px 14px;
  border-radius: 30px;
}

.card2d-nav-buttons {
  display: flex;
  gap: 6px;
}

.card2d-nav-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.card2d-nav-btn.active {
  background: var(--accent-primary);
  color: white;
}

.card2d-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1200px;
}

.card2d-leaf {
  width: 360px;
  height: 504px;
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  padding: 24px;
  position: relative;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  transition: transform 0.3s ease;
}

.card2d-spread {
  display: flex;
  align-items: center;
  box-shadow: var(--shadow-lg);
  border-radius: 8px;
  overflow: hidden;
}

.card2d-spread .card2d-leaf {
  border-radius: 0;
  box-shadow: none;
}

.card2d-crease {
  width: 4px;
  height: 504px;
  background: linear-gradient(to right, rgba(0,0,0,0.15), rgba(0,0,0,0.05), rgba(0,0,0,0.15));
}

.card2d-border {
  border: 2px solid var(--accent-color, #f59e0b);
  border-radius: 6px;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
  box-sizing: border-box;
}

.card2d-border.subtle {
  border-color: rgba(0, 0, 0, 0.15);
}

.card2d-badge {
  position: absolute;
  top: 14px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
}

.card2d-front-content {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.card2d-title {
  font-size: 30px;
  font-weight: 700;
  line-height: 1.25;
  outline: none;
}

.card2d-subtitle {
  font-size: 18px;
  opacity: 0.9;
  line-height: 1.4;
  outline: none;
}

.card2d-ornament {
  width: 60px;
  height: 3px;
  border-radius: 2px;
}

.card2d-quote-wrapper {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.card2d-big-quote {
  font-size: 64px;
  line-height: 1;
  opacity: 0.3;
}

.card2d-quote-text {
  font-size: 18px;
  line-height: 1.4;
  outline: none;
}

.card2d-quote-author {
  font-size: 13px;
  font-weight: 600;
  outline: none;
}

.card2d-message-wrapper {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
}

.card2d-message-body {
  font-size: 17px;
  line-height: 1.5;
  outline: none;
  white-space: pre-line;
}

.card2d-signoff-block {
  margin-top: 18px;
}

.card2d-signoff {
  font-size: 16px;
  outline: none;
}

.card2d-sender {
  font-size: 20px;
  font-weight: 700;
  outline: none;
}

.card2d-back-content {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.card2d-seal {
  font-size: 28px;
}

.card2d-credit {
  font-size: 12px;
  opacity: 0.8;
  outline: none;
}

.card2d-barcode-box {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.barcode-lines {
  width: 140px;
  height: 30px;
  background: repeating-linear-gradient(90deg, currentColor, currentColor 2px, transparent 2px, transparent 5px);
  opacity: 0.7;
}

.barcode-text {
  font-size: 10px;
  font-family: monospace;
  opacity: 0.7;
}

.card2d-stickers-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.card2d-sticker {
  position: absolute;
  pointer-events: auto;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.card2d-sticker:hover {
  transform: translate(-50%, -50%) scale(1.3) !important;
}

/* ==========================================================================
   MODAL WINDOWS & TOAST
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.modal-backdrop.show {
  display: flex;
}

.modal-window {
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 520px;
  box-shadow: var(--shadow-lg);
  animation: modalPop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

@keyframes modalPop {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-glass);
}

.modal-header h3 {
  font-size: 17px;
  font-weight: 600;
}

.modal-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal-footer {
  padding: 14px 20px;
  background: rgba(15, 23, 42, 0.5);
  border-top: 1px solid var(--border-glass);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.toast-notification {
  position: fixed;
  top: 80px;
  right: 24px;
  background: var(--bg-surface-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border-glow);
  box-shadow: var(--shadow-glow), var(--shadow-lg);
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 200;
  transform: translateY(-20px);
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast-notification.show {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* ==========================================================================
   MOBILE & TABLET RESPONSIVENESS
   ========================================================================== */

@media (max-width: 900px) {
  .app-main {
    flex-direction: column-reverse;
  }

  .studio-sidebar {
    width: 100%;
    height: 48vh;
    border-right: none;
    border-top: 1px solid var(--border-glass);
  }

  .viewport-container {
    height: 52vh;
  }

  .floating-controls {
    bottom: 12px;
    padding: 6px 12px;
    gap: 8px;
  }

  .fold-slider-container input[type="range"] {
    width: 80px;
  }

  .brand-title {
    font-size: 16px;
  }
}

/* ==========================================================================
   PHOTO UPLOADER, GALLERY & 2D/3D POP-UP FRAMES
   ========================================================================== */

/* Dropzone */
.photo-dropzone {
  border: 2px dashed rgba(99, 102, 241, 0.4);
  border-radius: var(--radius-md);
  padding: 24px 16px;
  text-align: center;
  background: rgba(99, 102, 241, 0.05);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.photo-dropzone:hover, .photo-dropzone.drag-over {
  border-color: var(--accent-primary);
  background: rgba(99, 102, 241, 0.12);
  box-shadow: 0 0 16px rgba(99, 102, 241, 0.2);
}

/* Photo Gallery Cards */
.photos-gallery-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 280px;
  overflow-y: auto;
  padding-right: 4px;
}

.photo-gallery-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 10px;
  transition: all 0.2s ease;
}

.photo-gallery-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
}

.photo-thumb {
  width: 54px;
  height: 54px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.photo-meta {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.photo-meta input {
  padding: 4px 8px;
  font-size: 12px;
  height: 28px;
}

.photo-meta-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.photo-meta-row select {
  padding: 2px 6px;
  font-size: 11px;
  height: 24px;
  flex: 1;
}

.btn-toggle-popup {
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.35);
  color: #818cf8;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 12px;
  cursor: pointer;
  white-space: nowrap;
}

.btn-toggle-popup.active {
  background: #6366f1;
  color: white;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

/* 2D Photo Cards */
.card2d-photos-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.card2d-photo-card {
  position: absolute;
  pointer-events: auto;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.2s ease;
  z-index: 5;
}

.card2d-photo-card:hover {
  z-index: 10;
  transform: translate(-50%, -50%) scale(1.08) !important;
}

.photo-media-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-remove-photo-2d {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 22px;
  height: 22px;
  background: #ef4444;
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 11px;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.card2d-photo-card:hover .btn-remove-photo-2d {
  display: flex;
}

.photo-caption {
  font-family: 'Caveat', cursive, sans-serif;
  font-size: 14px;
  color: #1e293b;
  text-align: center;
  margin-top: 4px;
  outline: none;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.photo-popup-tag {
  position: absolute;
  bottom: -18px;
  font-size: 9px;
  font-weight: 700;
  background: #6366f1;
  color: white;
  padding: 2px 6px;
  border-radius: 10px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  white-space: nowrap;
}

/* Frame Styles */
.frame-polaroid {
  background: #ffffff;
  padding: 8px 8px 18px 8px;
  border-radius: 4px;
  border: 1px solid #e2e8f0;
}
.frame-polaroid img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 2px;
}

.frame-gold-frame {
  background: #1e293b;
  padding: 6px;
  border: 3px solid #ffd700;
  border-radius: 6px;
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.4);
}
.frame-gold-frame img {
  width: 130px;
  height: 130px;
  object-fit: cover;
  border-radius: 4px;
}
.frame-gold-frame .photo-caption {
  color: #ffd700;
}

.frame-rounded {
  background: transparent;
}
.frame-rounded img {
  width: 130px;
  height: 130px;
  object-fit: cover;
  border-radius: 16px;
  border: 2px solid white;
}
.frame-rounded .photo-caption {
  color: white;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

.frame-stamp {
  background: white;
  padding: 6px;
  border: 2px dashed #94a3b8;
  border-radius: 4px;
}
.frame-stamp img {
  width: 110px;
  height: 110px;
  object-fit: cover;
}
