:root {
  --primary-color: #4f46e5;
  --primary-hover: #4338ca;
  --secondary-color: #64748b;
  --success-color: #10b981;
  --error-color: #ef4444;
  --warning-color: #f59e0b;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --bg-light: #f8fafc;
  --bg-white: #ffffff;
  --border-color: #e2e8f0;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --radius: 12px;
  --radius-sm: 8px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  color: var(--text-primary);
  line-height: 1.6;
}

.container {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
}

.container.landing {
  max-width: 500px;
}

.card {
  background: var(--bg-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 40px;
  animation: slideUp 0.4s ease-out;
}

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

.welcome-card {
  text-align: center;
}

.welcome-card .icon {
  font-size: 64px;
  margin-bottom: 20px;
}

.welcome-card h1 {
  font-size: 32px;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.welcome-card p {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 30px;
}

.info-box {
  background: var(--bg-light);
  border-radius: var(--radius-sm);
  padding: 20px;
  margin-bottom: 30px;
  border-left: 4px solid var(--primary-color);
}

.info-box p {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.info-box p:last-child {
  margin-bottom: 0;
}

.invitation-card {
  position: relative;
}

.loading {
  text-align: center;
  padding: 40px 20px;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--border-color);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 20px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.header-icon {
  font-size: 64px;
  text-align: center;
  margin-bottom: 20px;
}

h1 {
  font-size: 32px;
  text-align: center;
  margin-bottom: 20px;
  color: var(--text-primary);
}

h2 {
  font-size: 24px;
  margin-top: 32px;
  margin-bottom: 20px;
  color: var(--text-primary);
}

.personal-message {
  font-size: 16px;
  line-height: 1.7;
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: 32px;
  padding: 20px;
  background: var(--bg-light);
  border-radius: var(--radius-sm);
  font-style: italic;
}

.info-section {
  background: var(--bg-light);
  border-radius: var(--radius-sm);
  padding: 20px;
  margin-bottom: 32px;
}

.info-item {
  margin-bottom: 12px;
  font-size: 15px;
}

.info-item:last-child {
  margin-bottom: 0;
}

.info-item strong {
  color: var(--text-primary);
}

.info-item span {
  color: var(--text-secondary);
}

.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-primary);
}

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

.radio-label {
  display: flex;
  align-items: center;
  padding: 16px;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 500;
}

.radio-label:hover {
  border-color: var(--primary-color);
  background: var(--bg-light);
}

.radio-label input[type="radio"] {
  margin-right: 12px;
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: var(--primary-color);
}

.input-field {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-family: inherit;
  transition: all 0.2s;
}

.input-field:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.input-field:disabled {
  background: var(--bg-light);
  cursor: not-allowed;
}

textarea.input-field {
  resize: vertical;
  min-height: 80px;
}

.help-text {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  color: var(--text-secondary);
}

.btn {
  display: inline-block;
  padding: 12px 24px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  text-align: center;
}

.btn-primary {
  background: var(--primary-color);
  color: white;
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  background: var(--secondary-color);
  color: white;
}

.btn-secondary:hover {
  background: #475569;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-danger {
  background: var(--error-color);
  color: white;
}

.btn-danger:hover {
  background: #dc2626;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 14px;
}

.button-group {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 20px;
}

#submitBtn {
  width: 100%;
  margin-top: 32px;
}

.message {
  margin-top: 20px;
  padding: 16px;
  border-radius: var(--radius-sm);
  text-align: center;
  font-weight: 500;
  display: none;
}

.message.success {
  display: block;
  background: #d1fae5;
  color: #065f46;
  border: 2px solid var(--success-color);
}

.message.error {
  display: block;
  background: #fee2e2;
  color: #991b1b;
  border: 2px solid var(--error-color);
}

.success-message,
.error-message {
  text-align: center;
  padding: 40px 20px;
}

.success-message .icon,
.error-message .icon {
  font-size: 64px;
  margin-bottom: 20px;
}

.success-message h2 {
  color: var(--success-color);
  margin-top: 0;
}

.error-message h2 {
  color: var(--error-color);
  margin-top: 0;
}

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

#changeBtn {
  margin-top: 20px;
}

/* Contenedor de nombres individuales */
#guestNamesContainer {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#guestNamesContainer input {
  margin-bottom: 0;
}

/* Responsive */
@media (max-width: 640px) {
  .card {
    padding: 24px;
  }
  
  h1 {
    font-size: 24px;
  }
  
  h2 {
    font-size: 20px;
  }
  
  .header-icon,
  .welcome-card .icon,
  .success-message .icon,
  .error-message .icon {
    font-size: 48px;
  }
}
