* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #6366F1;
  --primary-light: #818CF8;
  --accent: #A78BFA;
  --bg: #0A0A0F;
  --glass-bg: rgba(15, 15, 25, 0.7);
  --glass-border: rgba(255, 255, 255, 0.1);
  --text: #FFFFFF;
  --text-secondary: rgba(255, 255, 255, 0.6);
  --success: #10B981;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: 'Archivo', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Stage ── */
.stage {
  position: relative;
  width: 100%;
  height: 100%;
  max-width: 480px;
  margin: 0 auto;
  overflow: hidden;
  background: radial-gradient(circle at 50% 50%, #1a1a2e 0%, #0A0A0F 100%);
}

/* ── Particles Canvas ── */
.particles-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

/* ── Video Layer ── */
.video-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  opacity: 1;
}

.main-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* DejaCast player injects video.js tree (not native <video>); force cover-fill */
.video-layer .dejacast-embed,
.video-layer .dejacast-embed .video-js,
.video-layer .dejacast-embed .video-js .vjs-tech,
.video-layer .dejacast-embed .video-js video,
.video-layer .dejacast-embed .video-js .vjs-poster {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  padding-top: 0 !important;
}

.video-layer .dejacast-embed .video-js .vjs-tech,
.video-layer .dejacast-embed .video-js video {
  object-fit: cover;
}

.video-layer .dejacast-embed .video-js .vjs-poster {
  background-size: cover !important;
}

.video-veil {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    linear-gradient(180deg, rgba(10,10,15,0.4) 0%, transparent 20%, transparent 80%, rgba(10,10,15,0.6) 100%),
    linear-gradient(90deg, rgba(10,10,15,0.3) 0%, transparent 10%, transparent 90%, rgba(10,10,15,0.3) 100%);
  pointer-events: none;
}

/* ── Content Layer ── */
.content-layer {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: env(safe-area-inset-top) 20px env(safe-area-inset-bottom) 20px;
  padding-top: max(env(safe-area-inset-top), 24px);
  padding-bottom: max(env(safe-area-inset-bottom), 24px);
}

/* ── Floating Cards ── */
.floating-card {
  position: relative;
  background: var(--glass-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 24px;
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  overflow: hidden;
  opacity: 0;
  animation: floatIn 1s ease-out forwards;
}

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

.top-card {
  text-align: center;
  animation-delay: 0.3s;
}

.bottom-card {
  animation-delay: 0.5s;
}

.card-shimmer {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent 30%,
    rgba(255, 255, 255, 0.08) 50%,
    transparent 70%
  );
  animation: shimmer 3s ease-in-out infinite;
  pointer-events: none;
}

@keyframes shimmer {
  0%, 100% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
  50% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

/* ── Top Card Content ── */
.couple-title {
  font-family: 'Italiana', serif;
  font-size: 36px;
  font-weight: 400;
  color: white;
  margin-bottom: 8px;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.name-part {
  position: relative;
}

.divider-symbol {
  font-size: 28px;
  color: var(--primary-light);
  opacity: 0.8;
}

.event-meta {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
}

/* ── Play Trigger ── */
.play-trigger {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  transition: all 0.4s ease-out;
}

.play-trigger.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.8);
}

.play-orb {
  position: relative;
  width: 120px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.orb-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 2px solid rgba(99, 102, 241, 0.3);
}

.orb-ring-1 {
  width: 100%;
  height: 100%;
  animation: pulse 2s ease-in-out infinite;
}

.orb-ring-2 {
  width: 85%;
  height: 85%;
  animation: pulse 2s ease-in-out 0.3s infinite;
}

.orb-ring-3 {
  width: 70%;
  height: 70%;
  animation: pulse 2s ease-in-out 0.6s infinite;
}

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

.orb-center {
  position: relative;
  width: 70px;
  height: 70px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 
    0 0 40px rgba(99, 102, 241, 0.4),
    0 0 80px rgba(99, 102, 241, 0.2),
    inset 0 2px 8px rgba(255, 255, 255, 0.2);
  transition: all 0.3s;
}

.play-trigger:active .orb-center {
  transform: scale(0.95);
}

.play-hint {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
  animation: fadeInOut 2s ease-in-out infinite;
}

@keyframes fadeInOut {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* ── Sound Hint ── */
.sound-hint {
  position: absolute;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 30;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s ease-out;
}

.sound-hint.visible {
  opacity: 1;
  visibility: visible;
  animation: slideDown 0.5s ease-out;
}

@keyframes slideDown {
  from {
    transform: translateX(-50%) translateY(-20px);
  }
  to {
    transform: translateX(-50%) translateY(0);
  }
}

.glass-bubble {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  background: var(--glass-bg);
  backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: 50px;
  font-size: 13px;
  font-weight: 500;
  color: white;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  transition: all 0.2s;
}

.glass-bubble:active {
  transform: scale(0.95);
}

/* ── Quick Actions ── */
.quick-actions {
  display: flex;
  gap: 12px;
}

.quick-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  color: white;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  letter-spacing: 0.3px;
}

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

.quick-btn--primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  border-color: transparent;
  box-shadow: 
    0 4px 16px rgba(99, 102, 241, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* ── Progress Indicator ── */
.progress-indicator {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.1);
  z-index: 15;
  opacity: 0;
  transition: opacity 0.4s;
}

.progress-indicator.visible {
  opacity: 1;
}

.progress-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
  transition: width 0.1s linear;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

/* ── Modal Backdrop ── */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
}

.modal-backdrop.active {
  opacity: 1;
  visibility: visible;
}

/* ── Modal ── */
.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  width: 90%;
  max-width: 420px;
  max-height: 85vh;
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal.active {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

.modal-glass {
  position: relative;
  background: rgba(15, 15, 25, 0.95);
  backdrop-filter: blur(40px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 28px;
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  overflow: hidden;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
}

.modal-close-x {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 10;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.modal-close-x:active {
  transform: scale(0.9);
  background: rgba(255, 255, 255, 0.15);
}

.modal-header {
  padding: 32px 24px 24px;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.modal-title {
  font-size: 26px;
  font-weight: 700;
  color: white;
  margin-bottom: 6px;
  letter-spacing: -0.5px;
}

.modal-subtitle {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-secondary);
  letter-spacing: 0.3px;
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.modal-body::-webkit-scrollbar {
  width: 6px;
}

.modal-body::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
}

.modal-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

/* ── Location Block ── */
.location-block {
  display: flex;
  gap: 16px;
  margin-bottom: 28px;
}

.location-timeline {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 4px;
}

.timeline-dot {
  width: 12px;
  height: 12px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.6);
}

.timeline-line {
  width: 2px;
  flex: 1;
  min-height: 40px;
  background: linear-gradient(180deg, var(--primary) 0%, transparent 100%);
  margin-top: 8px;
}

.location-content {
  flex: 1;
}

.location-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.location-title {
  font-size: 18px;
  font-weight: 600;
  color: white;
}

.location-time {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary-light);
  padding: 4px 12px;
  background: rgba(99, 102, 241, 0.15);
  border-radius: 8px;
}

.location-venue {
  font-size: 15px;
  font-weight: 500;
  color: white;
  margin-bottom: 4px;
}

.location-address {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.location-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: white;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s;
}

.location-link:active {
  transform: scale(0.97);
  background: rgba(255, 255, 255, 0.12);
}

.modal-note {
  font-size: 13px;
  color: var(--text-secondary);
  text-align: center;
  padding: 16px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  margin-top: 8px;
}

.modal-note strong {
  color: var(--primary-light);
  font-weight: 600;
}

.modal-close {
  width: 100%;
  padding: 16px;
  background: rgba(255, 255, 255, 0.08);
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  color: white;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.modal-close:active {
  background: rgba(255, 255, 255, 0.12);
}

/* ── Form ── */
.form-field {
  margin-bottom: 24px;
}

.field-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: white;
  margin-bottom: 10px;
  letter-spacing: 0.3px;
}

.field-optional {
  font-weight: 400;
  color: var(--text-secondary);
  font-size: 13px;
}

.radio-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.radio-card {
  display: block;
}

.radio-card input {
  display: none;
}

.radio-card-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid transparent;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.3s;
}

.radio-card input:checked + .radio-card-inner {
  background: rgba(99, 102, 241, 0.15);
  border-color: var(--primary);
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.2);
}

.radio-card-inner span {
  font-size: 15px;
  font-weight: 500;
  color: white;
}

/* ── Counter ── */
.counter-control {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
}

.counter-btn {
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 12px;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.counter-btn:active {
  transform: scale(0.92);
  background: rgba(255, 255, 255, 0.15);
}

.counter-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.counter-value {
  font-size: 32px;
  font-weight: 700;
  color: white;
  line-height: 1;
}

.counter-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
}

/* ── Input ── */
.field-input {
  width: 100%;
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid transparent;
  border-radius: 16px;
  color: white;
  font-size: 15px;
  font-family: inherit;
  transition: all 0.3s;
}

.field-input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.field-input:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--primary);
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.2);
}

/* ── Submit Button ── */
.submit-button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 18px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  border: none;
  border-radius: 16px;
  color: white;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 
    0 8px 24px rgba(99, 102, 241, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: all 0.3s;
  margin-top: 8px;
}

.submit-button:active {
  transform: scale(0.98);
  box-shadow: 
    0 4px 16px rgba(99, 102, 241, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* ── Success Notification ── */
.success-notification {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  z-index: 300;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.success-notification.visible {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

.success-glass {
  padding: 40px 32px;
  background: rgba(15, 15, 25, 0.95);
  backdrop-filter: blur(40px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.success-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  background: linear-gradient(135deg, var(--success) 0%, #34D399 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 
    0 8px 24px rgba(16, 185, 129, 0.4),
    inset 0 2px 8px rgba(255, 255, 255, 0.2);
  animation: successPop 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes successPop {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.success-title {
  font-size: 22px;
  font-weight: 700;
  color: white;
  margin-bottom: 8px;
}

.success-message {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.success-btn {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  border: none;
  border-radius: 16px;
  color: white;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 
    0 4px 16px rgba(99, 102, 241, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

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

/* ── Responsive ── */
@media (max-width: 380px) {
  .couple-title {
    font-size: 30px;
    gap: 8px;
  }
  
  .divider-symbol {
    font-size: 24px;
  }
  
  .quick-btn {
    font-size: 11px;
    padding: 14px 10px;
  }
}
