@import url('./variables.css');

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

html {
  font-family: var(--font-sans);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  background: 
    radial-gradient(circle at 50% 0%, rgba(212, 175, 55, 0.12) 0%, transparent 60%),
    radial-gradient(circle at 10% 80%, rgba(170, 119, 28, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 90% 40%, rgba(245, 228, 168, 0.06) 0%, transparent 50%),
    var(--bg-main);
  background-attachment: fixed;
  overflow-x: hidden;
  position: relative;
}

/* Subtle Gold Particles Background Effect */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: radial-gradient(rgba(212, 175, 55, 0.25) 1px, transparent 0);
  background-size: 40px 40px;
  opacity: 0.15;
  pointer-events: none;
  z-index: 0;
}

/* Main Container Layout */
.app-container {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 16px 60px;
  position: relative;
  z-index: 1;
}

/* Header & Logo */
.header-brand {
  text-align: center;
  margin-bottom: 24px;
}

.logo-img {
  max-width: 280px;
  width: 80%;
  height: auto;
  filter: drop-shadow(0 4px 12px rgba(212, 175, 55, 0.3));
  transition: transform var(--transition-normal);
}

.logo-img:hover {
  transform: scale(1.02);
}

.subtitle-badge {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold-light);
  background: var(--gold-gradient-soft);
  border: 1px solid var(--border-gold);
  padding: 6px 16px;
  border-radius: var(--radius-full);
  margin-top: 12px;
}

/* Hero Invitation Card */
.invitation-hero-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  text-align: center;
  box-shadow: var(--shadow-card), var(--shadow-gold-sm);
  position: relative;
  overflow: hidden;
  margin-bottom: 24px;
}

.invitation-hero-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--gold-gradient);
}

.guest-salutation {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.guest-name {
  font-family: var(--font-serif);
  font-size: 1.85rem;
  font-weight: 700;
  background: var(--gold-gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 4px;
}

.guest-role {
  font-size: 1.05rem;
  color: var(--text-gold);
  font-weight: 500;
  margin-bottom: 20px;
}

.divider-gold {
  width: 60px;
  height: 2px;
  background: var(--gold-gradient);
  margin: 0 auto 20px;
  border-radius: var(--radius-full);
}

.event-details-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 20px;
}

.event-detail-item {
  background: rgba(10, 10, 12, 0.6);
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: var(--radius-md);
  padding: 12px 8px;
}

.event-detail-icon {
  font-size: 1.3rem;
  color: var(--gold-primary);
  margin-bottom: 4px;
}

.event-detail-title {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.event-detail-value {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
}

/* Generic Section Glass Cards */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-card);
}

.section-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--gold-light);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title i {
  color: var(--gold-primary);
}

/* Form Controls */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-gold);
  margin-bottom: 8px;
}

.form-input, .form-textarea, .form-select {
  width: 100%;
  background: rgba(10, 10, 12, 0.8);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--text-main);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
  outline: none;
  border-color: var(--gold-light);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2);
}

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

/* Custom RSVP Option Selector Cards */
.rsvp-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}

.rsvp-option-card {
  position: relative;
  cursor: pointer;
}

.rsvp-option-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.rsvp-option-content {
  background: rgba(10, 10, 12, 0.6);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-md);
  padding: 16px 12px;
  text-align: center;
  transition: all var(--transition-fast);
}

.rsvp-option-card:hover .rsvp-option-content {
  border-color: var(--gold-light);
  background: rgba(30, 30, 38, 0.8);
}

.rsvp-option-card input[type="radio"]:checked + .rsvp-option-content {
  background: var(--gold-gradient-soft);
  border-color: var(--gold-light);
  box-shadow: var(--shadow-gold-sm);
}

.rsvp-icon {
  font-size: 1.5rem;
  margin-bottom: 6px;
  color: var(--gold-primary);
}

.rsvp-label {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-main);
}

/* Number Stepper for Pendamping */
.stepper-container {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(10, 10, 12, 0.8);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-md);
  padding: 6px 12px;
  width: fit-content;
}

.stepper-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-gold);
  color: var(--gold-light);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-fast);
}

.stepper-btn:hover {
  background: var(--gold-primary);
  color: #000;
}

.stepper-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
  min-width: 30px;
  text-align: center;
}

/* Metallic Gold Button */
.btn-gold {
  width: 100%;
  background: var(--gold-gradient);
  color: #0d0d0d;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  border: none;
  border-radius: var(--radius-md);
  padding: 14px 24px;
  cursor: pointer;
  box-shadow: var(--shadow-gold-md);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-gold-glow);
}

.btn-gold:active {
  transform: translateY(0);
}

.btn-gold:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Guest Wishes Feed */
.wishes-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: 450px;
  overflow-y: auto;
  padding-right: 4px;
}

.wishes-list::-webkit-scrollbar {
  width: 6px;
}

.wishes-list::-webkit-scrollbar-thumb {
  background: var(--border-gold);
  border-radius: var(--radius-full);
}

.wish-card {
  background: rgba(10, 10, 12, 0.6);
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: var(--radius-md);
  padding: 16px;
}

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

.wish-author {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-gold);
}

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

.wish-time {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.wish-body {
  font-size: 0.9rem;
  color: var(--text-main);
  white-space: pre-line;
}

/* Invalid / Error State */
.invalid-state-card {
  text-align: center;
  padding: 48px 24px;
}

.invalid-icon {
  font-size: 3.5rem;
  color: var(--gold-primary);
  margin-bottom: 16px;
}

.invalid-title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--gold-light);
  margin-bottom: 12px;
}

.invalid-text {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 24px;
}

/* Modal Overlay */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-fast);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-gold-light);
  border-radius: var(--radius-lg);
  max-width: 480px;
  width: 100%;
  padding: 24px;
  box-shadow: var(--shadow-gold-md);
  position: relative;
}

.modal-close {
  position: absolute;
  top: 16px; right: 16px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.25rem;
  cursor: pointer;
}

.modal-close:hover {
  color: var(--gold-light);
}

/* Footer branding */
.app-footer {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-top: 40px;
}

.app-footer span {
  color: var(--gold-primary);
}

/* Responsive tweaks */
@media (max-width: 600px) {
  .event-details-grid {
    grid-template-columns: 1fr;
  }
  
  .rsvp-options {
    grid-template-columns: 1fr;
  }
  
  .guest-name {
    font-size: 1.5rem;
  }
}
