/* =============================================
   SHELL STYLES — komponen platform (bukan template)
   Loading, 404, music toggle, toast, lightbox, utilitas.
   Styling undangan per template ada di templates/<id>/styles.css
   ============================================= */

/* Core Design Variables */
:root {
  --color-gold: #d4af37;
  --color-gold-light: #f3e5ab;
  --color-gold-dark: #aa7c11;
  --color-cream: #faf6f0;
  --color-rose: #fff0f0;
  --color-text-dark: #2c2520;
  --color-text-muted: #7c7267;
  --color-white: #ffffff;
  --color-overlay: rgba(44, 37, 32, 0.6);
  --color-card-bg: rgba(255, 255, 255, 0.9);

  --font-fancy: 'Great Vibes', cursive;
  --font-serif: 'Playfair Display', serif;
  --font-sans: 'Plus Jakarta Sans', sans-serif;

  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 20px 25px -5px rgba(212, 175, 55, 0.1), 0 10px 10px -5px rgba(212, 175, 55, 0.04);

  --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: all 0.2s ease;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  color: var(--color-text-dark);
  background-color: var(--color-cream);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Typography Extensions (fallback heading font untuk shell) */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 700;
}

/* Utility Helpers */
.mr-2 { margin-right: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.w-100 { width: 100%; }
.hidden { display: none !important; }

/* Buttons (dipakai shell & template) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 2rem;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 12px;
  cursor: pointer;
  transition: var(--transition-smooth);
  border: none;
  text-decoration: none;
  outline: none;
}

.btn-gold {
  background: linear-gradient(135deg, var(--color-gold) 0%, var(--color-gold-dark) 100%);
  color: var(--color-white);
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
}

.btn-gold:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.6);
  filter: brightness(1.05);
}

.btn-gold-outline {
  background: transparent;
  color: var(--color-gold-dark);
  border: 2px solid var(--color-gold);
}

.btn-gold-outline:hover {
  background: var(--color-gold);
  color: var(--color-white);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.2);
}

/* Loading Screen */
.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--color-cream);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader {
  text-align: center;
}

.loader-logo {
  font-family: var(--font-fancy);
  font-size: 3.5rem;
  color: var(--color-gold-dark);
  margin-bottom: 1rem;
  animation: pulse 2s infinite ease-in-out;
}

.loader-bar {
  width: 120px;
  height: 3px;
  background: #e2d8cd;
  margin: 0 auto 1rem;
  position: relative;
  overflow: hidden;
  border-radius: 2px;
}

.loader-bar::after {
  content: '';
  position: absolute;
  left: -50%;
  top: 0;
  width: 50%;
  height: 100%;
  background: var(--color-gold);
  animation: loading-slide 1.5s infinite linear;
}

/* 404 Page */
.not-found-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--color-cream);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9998;
}

.not-found-card {
  background: var(--color-white);
  padding: 3rem 2rem;
  border-radius: 24px;
  text-align: center;
  max-width: 480px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--color-gold-light);
  margin: 1.5rem;
  transform: translateY(0);
  animation: slide-up-fade 0.6s ease;
}

.not-found-icon {
  font-size: 4rem;
  color: #e53e3e;
  margin-bottom: 1.5rem;
  animation: heartbeat 1.5s infinite ease-in-out;
}

.not-found-card h1 {
  font-size: 2rem;
  color: var(--color-text-dark);
  margin-bottom: 1rem;
}

.not-found-card p {
  color: var(--color-text-muted);
}

/* Audio Music Control */
.music-toggle {
  position: fixed;
  bottom: max(24px, calc(env(safe-area-inset-bottom) + 16px));
  right: max(24px, calc(env(safe-area-inset-right) + 16px));
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-white);
  border: 1px solid var(--color-gold-light);
  box-shadow: var(--shadow-md);
  color: var(--color-gold-dark);
  font-size: 1.2rem;
  cursor: pointer;
  z-index: 100;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: var(--transition-fast);
}

.music-toggle:hover {
  transform: scale(1.1);
  background: var(--color-gold);
  color: var(--color-white);
}

.music-toggle.playing i {
  animation: spin 6s infinite linear;
}

/* Notification Toast */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(0);
  background: rgba(44, 37, 32, 0.9);
  color: var(--color-white);
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  z-index: 10000;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  box-shadow: var(--shadow-md);
  transition: opacity 0.3s ease, transform 0.3s ease;
  opacity: 1;
}

.toast.hidden {
  opacity: 0;
  transform: translateX(-50%) translateY(20px);
  pointer-events: none;
}

.toast-icon {
  color: var(--color-gold);
}

/* Lightbox */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 10001;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.lightbox.hidden {
  opacity: 0;
  pointer-events: none;
}

.lightbox-img {
  max-width: 90%;
  max-height: 85%;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
  animation: scale-up 0.3s ease;
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 24px;
  font-size: 3rem;
  color: var(--color-white);
  cursor: pointer;
  user-select: none;
  transition: var(--transition-fast);
}

.lightbox-close:hover {
  color: var(--color-gold);
  transform: scale(1.1);
}

/* Animations (Shell) */
@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.05); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

@keyframes loading-slide {
  0% { left: -50%; }
  100% { left: 100%; }
}

@keyframes heartbeat {
  0% { transform: scale(1); }
  14% { transform: scale(1.1); }
  28% { transform: scale(1); }
  42% { transform: scale(1.1); }
  70% { transform: scale(1); }
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slide-up-fade {
  from { transform: translateY(30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes scale-up {
  from { transform: scale(0.9); }
  to { transform: scale(1); }
}