/* ============================================================
   WedLink — Global Stylesheet
   Luxury Wedding Dark Theme with Premium Glassmorphism
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400;1,600&family=Inter:wght@300;400;500;600;700&family=Great+Vibes&display=swap');

/* ─── Design System Tokens ──────────────────────────────────── */
:root {
  --bg-primary:    #07070d;
  --bg-secondary:  #0e0e18;
  --bg-card:       rgba(255, 255, 255, 0.03);
  --bg-card-hover: rgba(255, 255, 255, 0.06);

  --gold:          #d4af37;
  --gold-light:    #f3e5ab;
  --gold-dim:      rgba(212, 175, 55, 0.12);
  --rose:          #c9956c;
  --rose-light:    #e0b08a;
  --rose-dim:      rgba(201, 149, 108, 0.12);

  --text:          #f5e6d3;
  --text-soft:     rgba(245, 230, 211, 0.75);
  --text-muted:    rgba(245, 230, 211, 0.45);
  --text-dark:     #07070d;

  --border:        rgba(201, 149, 108, 0.16);
  --border-focus:  rgba(212, 175, 55, 0.50);

  --shadow:        0 12px 40px rgba(0, 0, 0, 0.6);
  --shadow-gold:   0 0 50px rgba(212, 175, 55, 0.08);
  --shadow-card:   0 8px 32px rgba(0, 0, 0, 0.45);

  --radius:        20px;
  --radius-sm:     12px;
  --radius-xs:     8px;
  --transition:    0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* ─── Base Reset ────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: 'Inter', system-ui, sans-serif;
  background-color: var(--bg-primary);
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(212, 175, 55, 0.04) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(201, 149, 108, 0.03) 0%, transparent 45%);
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ─── Scrollbar ─────────────────────────────────────────────── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--rose); }

/* ─── Typography ────────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.script { 
  font-family: 'Great Vibes', cursive; 
}

/* ─── SVG Icons ─────────────────────────────────────────────── */
.svg-icon {
  width: 1.25em;
  height: 1.25em;
  stroke-width: 1.75;
  stroke: currentColor;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: inline-block;
  vertical-align: middle;
  transition: transform var(--transition), stroke var(--transition), fill var(--transition);
}

.btn:hover .svg-icon {
  transform: scale(1.1);
}

/* ─── Layout ────────────────────────────────────────────────── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ─── Decorative Divider ────────────────────────────────────── */
.ornament {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--gold);
  font-size: 20px;
  margin: 24px 0;
}
.ornament::before,
.ornament::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-dim), transparent);
}

/* ─── Navbar ────────────────────────────────────────────────── */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 48px;
  border-bottom: 1px solid var(--border);
  background: rgba(7, 7, 13, 0.85);
  backdrop-filter: blur(20px);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 30px rgba(0,0,0,0.15);
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.navbar-brand .logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--gold), var(--rose));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dark);
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.2);
}

.navbar-brand .logo-icon .svg-icon {
  width: 24px;
  height: 24px;
}

.navbar-brand .logo-text {
  font-family: 'Playfair Display', serif;
  font-size: 24px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--gold-light), var(--rose-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 0.5px;
}

/* ─── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 24px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold), var(--rose));
  color: var(--text-dark);
  font-weight: 600;
  box-shadow: 0 4px 20px rgba(212, 175, 55, 0.2);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(212, 175, 55, 0.35);
  filter: brightness(1.08);
}
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  background: transparent;
  color: var(--text-soft);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  border-color: var(--rose);
  color: var(--text);
  background: var(--rose-dim);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.1);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.2);
}
.btn-danger:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.45);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
  border-radius: var(--radius-xs);
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* ─── Cards ─────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  transition: all var(--transition);
  backdrop-filter: blur(12px);
}
.card:hover { 
  border-color: rgba(201, 149, 108, 0.35);
  box-shadow: var(--shadow-card);
}

/* ─── Form Elements ─────────────────────────────────────────── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--gold-light);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.form-input,
.form-textarea {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  padding: 12px 18px;
  outline: none;
  transition: all var(--transition);
  width: 100%;
}

.form-input::placeholder,
.form-textarea::placeholder { color: var(--text-muted); }

.form-input:focus,
.form-textarea:focus {
  border-color: var(--border-focus);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.12);
}

.form-textarea { resize: vertical; min-height: 120px; }

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

@media (max-width: 580px) {
  .form-grid { grid-template-columns: 1fr; gap: 14px; }
}

/* ─── Badge ─────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 550;
  letter-spacing: 0.02em;
}
.badge-green  { background: rgba(34, 197, 94, 0.08); color: #4ade80; border: 1px solid rgba(34, 197, 94, 0.2); }
.badge-red    { background: rgba(239, 68, 68, 0.08);  color: #f87171; border: 1px solid rgba(239, 68, 68, 0.2); }
.badge-gold   { background: var(--gold-dim); color: var(--gold-light); border: 1px solid rgba(212, 175, 55, 0.25); }

/* ─── Modal ─────────────────────────────────────────────────── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(8px);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fadeIn 0.25s ease;
}
.modal-overlay.active { display: flex; }

.modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow);
  animation: slideUp 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
  padding: 4px;
  border-radius: 6px;
  transition: color var(--transition);
}
.modal-close:hover { color: var(--text); }

/* ─── Toast Notifications ───────────────────────────────────── */
#toast-container {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 380px;
  width: calc(100% - 56px);
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 22px;
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  font-size: 14px;
  animation: slideInRight 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  color: var(--text);
}
.toast.success { border-left: 4px solid #4ade80; }
.toast.error   { border-left: 4px solid #f87171; }
.toast.info    { border-left: 4px solid var(--gold); }
.toast-icon { display: flex; align-items: center; justify-content: center; }
.toast-hide { animation: slideOutRight 0.3s ease forwards; }

/* ─── Empty State ───────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 80px 24px;
  color: var(--text-muted);
  background: rgba(255,255,255,0.01);
  border-radius: var(--radius);
  border: 1px dashed var(--border);
}
.empty-state .empty-icon { 
  margin-bottom: 20px; 
  color: var(--gold-light);
  opacity: 0.8;
  animation: float 4s ease-in-out infinite;
}
.empty-state .empty-icon .svg-icon {
  width: 56px;
  height: 56px;
}
.empty-state h3 {
  margin-bottom: 8px;
}
.empty-state p { font-size: 15px; }

/* ─── Skeleton loader ───────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--bg-card) 25%, rgba(255,255,255,0.07) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

/* ─── Animations ────────────────────────────────────────────── */
@keyframes fadeIn     { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp    { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideInRight  { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: translateX(0); } }
@keyframes slideOutRight { from { opacity: 1; transform: translateX(0); } to { opacity: 0; transform: translateX(30px); } }
@keyframes shimmer    { to { background-position: -200% 0; } }
@keyframes float      { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes spin       { to { transform: rotate(360deg); } }
@keyframes pulse      { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

/* ─── Spinner ───────────────────────────────────────────────── */
.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.2);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* ─── Copy Button Feedback ──────────────────────────────────── */
.copy-success { 
  color: #4ade80 !important; 
  border-color: rgba(34, 197, 94, 0.4) !important;
}

/* ─── Responsive ────────────────────────────────────────────── */
@media (max-width: 768px) {
  .navbar { padding: 16px 24px; }
  .modal  { padding: 28px; }
}

@media (max-width: 580px) {
  .navbar {
    flex-direction: column;
    gap: 16px;
    padding: 16px;
  }
  .navbar-actions {
    width: 100%;
    justify-content: center;
  }
  .user-badge {
    display: none;
  }
}
