/* Vivi Brand Colors */
:root {
  --brand-primary: #008BFF;
  --brand-secondary: #6CEBFF;
  --brand-accent: #F400FF;
  --brand-orange: #FF7400;
  --text-dark: #0A0A0A;
  --text-light: #737373;
  --bg-light: #F2F2F2;
  --bg-raised: #FAFAFA;
  --white: #FFFFFF;
}

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

body {
  font-family: 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text-dark);
  line-height: 1.6;
  background: #ffffff;
}

.app {
  min-height: 100vh;
}

/* Navigation */
.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 5%;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  z-index: 100;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.nav-logo {
  height: 40px;
  width: auto;
}

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-dark);
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--brand-primary);
}

.nav-cta {
  background: var(--brand-accent);
  color: var(--white) !important;
  padding: 0.5rem 1.25rem;
  border-radius: 8px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(244, 0, 255, 0.3);
}

.nav-cta-blue {
  background: var(--brand-primary);
  color: var(--white) !important;
  padding: 0.5rem 1.25rem;
  border-radius: 8px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.nav-cta-blue:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 139, 255, 0.3);
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 8rem 5% 4rem;
  background: linear-gradient(135deg, #E8F4FF 0%, #F0E8FF 100%);
}

.hero-logo {
  height: 207px;
  width: auto;
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-size: clamp(2rem, 4.8vw, 3.6rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  letter-spacing: -1px;
}

.highlight {
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 600;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-light);
  max-width: 600px;
  margin-top: 1rem;
  margin-bottom: 1.75rem;
  line-height: 1.7;
}

.hero-details {
  font-size: 1.25rem;
  color: var(--text-light);
  max-width: 600px;
  margin-bottom: 3.5rem;
  line-height: 1.7;
}

.hero-cta {
  display: flex;
  justify-content: center;
}

.hero-buttons-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}

.store-badge-large {
  display: block;
  position: relative;
  transition: transform 0.2s;
}

.store-badge-large:hover {
  transform: translateY(-2px);
}

.store-badge-large img {
  height: 60px;
  width: auto;
}

.how-to-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  height: 60px;
  min-width: 200px;
  background: var(--brand-accent);
  color: white;
  text-decoration: none;
  font-weight: 600;
  font-size: 20px;
  border-radius: 8px;
  transition: transform 0.2s;
}

.how-to-btn:hover {
  transform: translateY(-2px);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.875rem 2rem;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  font-family: inherit;
}

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

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(244, 0, 255, 0.3);
}

.btn-primary:disabled {
  background: #d4a8d8;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-secondary {
  background: var(--white);
  color: var(--text-dark);
  border: 2px solid #E5E7EB;
}

.btn-secondary:hover {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
}

.btn-large {
  padding: clamp(0.75rem, 1.5dvh, 1rem) 2.5rem;
  font-size: clamp(1rem, 2dvh, 1.125rem);
  width: 100%;
}

/* How to Vivi Section */
.how-to-vivi {
  padding: 6rem 5% 2.5rem;
  background: var(--bg-light);
}

.how-to-header {
  text-align: center;
  margin-bottom: 4rem;
}

.how-to-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  background: #fff;
  border: 2px solid #ddd;
  border-radius: 8px;
  padding: 25px 150px;
}

.how-to-header h2 {
  font-size: 5rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text-dark);
  line-height: 1;
  margin: 0;
}

.how-to-logo {
  height: 150px;
  width: auto;
}

.cta-section h2 {
  text-align: center;
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 3rem;
  letter-spacing: -0.5px;
}

.steps {
  display: flex;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: 0 auto;
}

.step {
  text-align: center;
  flex: 1;
  min-width: 230px;
  max-width: 260px;
  background: #fff;
  border: 2px solid #ddd;
  border-radius: 8px;
  padding: 1.5rem;
}

.step-number {
  font-size: 3rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0 auto 1.5rem auto;
  width: 80px;
  height: 80px;
  line-height: 76px;
  border: 3px solid var(--brand-primary);
  border-radius: 50%;
}

.step p {
  color: var(--text-light);
  font-size: 1.05rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

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

/* Download Section */
.download-section {
  padding: 1rem 5% 4rem;
  background: #ffffff;
  text-align: center;
}

.download-store-buttons {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.download-store-buttons .store-badge {
  position: relative;
}

.download-store-buttons .store-badge img {
  height: 60px;
  width: auto;
}

/* Footer */
.footer {
  background: var(--text-dark);
  color: var(--white);
  padding: 3rem 5%;
  text-align: center;
}

.footer-logo {
  height: 50px;
  width: auto;
  margin-bottom: 1.5rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: #9CA3AF;
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--white);
}

.copyright {
  color: #6B7280;
  font-size: 0.875rem;
}

/* ==================== */
/* Invite Pages Styles  */
/* ==================== */

.invite-page {
  min-height: 100vh;
  min-height: 100dvh; /* fallback above for older browsers */
  background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
  display: flex;
  padding: clamp(0.75rem, 3dvh, 2rem);
}

.invite-container {
  background: white;
  border-radius: 1.5rem;
  padding: clamp(1.25rem, 4dvh, 2.5rem);
  max-width: 440px;
  width: 100%;
  margin: auto; /* centers in flex parent; collapses gracefully on overflow */
  text-align: center;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

.invite-logo {
  width: 80px;
  height: auto;
  margin-bottom: 1.5rem;
}

.invite-logo-large {
  width: clamp(70px, 14dvh, 120px);
  height: auto;
  margin: clamp(0.125rem, 0.75dvh, 0.5rem) 0;
}

.inviter-avatar {
  width: clamp(60px, 13dvh, 100px);
  height: clamp(60px, 13dvh, 100px);
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: clamp(0.25rem, 0.75dvh, 0.5rem);
  border: 3px solid #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.invite-container h1 {
  font-size: clamp(1.1rem, 2.8dvh, 1.35rem);
  margin-bottom: 0.25rem;
  color: var(--text-dark);
}

.gathering-invite-heading {
  font-size: clamp(0.95rem, 2.2dvh, 1.125rem);
  color: #333;
  margin-bottom: clamp(0.5rem, 2dvh, 1.5rem);
  line-height: 1.5;
}

/* Gathering Card */
.gathering-card-styled {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 1rem;
  padding: clamp(0.75rem, 2dvh, 1.5rem);
  margin: 0 0 clamp(0.5rem, 1.5dvh, 1rem) 0;
  text-align: center;
}

.gathering-title-large {
  font-size: clamp(1.15rem, 2.5dvh, 1.4rem);
  color: #1a1a1a;
  margin: 0 0 0.25rem 0;
  font-weight: 600;
}

.gathering-datetime {
  color: #E68A00;
  font-size: 1rem;
  margin: 0 0 0.125rem 0;
  font-weight: 500;
}

.gathering-venue {
  color: #9B30FF;
  font-size: 1rem;
  margin: 0;
  font-weight: 500;
}

.gathering-posted-on {
  color: #666;
  font-size: 1rem;
  margin: 1.5rem 0 0.5rem 0;
}

.invite-logo-xlarge {
  width: clamp(70px, 14dvh, 120px);
  height: auto;
  margin: clamp(0.125rem, 0.75dvh, 0.5rem) 0 0 0;
}

.gathering-description-large {
  margin-top: 1rem;
  color: #999;
  font-size: 0.95rem;
  line-height: 1.5;
}

/* Pitch Text */
.personal-invite-pitch {
  color: #444;
  line-height: 1.6;
  margin: 0 0 clamp(0.25rem, 1.25dvh, 1rem) 0;
  font-size: clamp(0.9rem, 2.2dvh, 1.05rem);
}

.personal-invite-details {
  color: #666;
  line-height: 1.5;
  margin: 0 0 clamp(0.5rem, 2dvh, 1.5rem) 0;
  font-size: clamp(0.9rem, 2.2dvh, 1.05rem);
}

/* CTA Section */
.invite-cta {
  margin: clamp(0.5rem, 1.75dvh, 1.33rem) 0 0 0;
}

.login-link {
  margin-top: clamp(0.5rem, 1.25dvh, 1rem);
  color: #666;
  font-size: 0.9rem;
}

.login-link a {
  color: #008BFF;
  text-decoration: none;
  font-weight: 600;
}

.login-link a:hover {
  text-decoration: underline;
}

/* Forms */
.signup-subtitle {
  color: #666;
  margin-bottom: 1.5rem;
}

.signup-form {
  text-align: left;
}

.form-row {
  display: flex;
  gap: 1rem;
}

.form-row .form-group {
  flex: 1;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: #444;
  margin-bottom: 0.35rem;
}

.form-group input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #ddd;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus {
  outline: none;
  border-color: #008BFF;
  box-shadow: 0 0 0 3px rgba(0, 139, 255, 0.1);
}

.form-group input:disabled {
  background: #f5f5f5;
  cursor: not-allowed;
}

.error-message {
  background: #fee;
  color: #c00;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

/* Welcome/Success Page */
.success-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.success-details {
  color: #666;
  margin-bottom: 1rem;
}

.connection-message {
  background: #e8f4ff;
  color: #0066cc;
  padding: 1rem;
  border-radius: 0.75rem;
  margin: 1.5rem 0;
}

.download-section {
  margin: 2rem 0;
}

.download-prompt {
  color: #666;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.store-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: center;
}

.store-button {
  display: block;
  position: relative;
}

.store-button img {
  height: 48px;
  width: auto;
}

.store-button-disabled {
  opacity: 0.5;
  pointer-events: none;
}

.coming-soon-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: #F400FF;
  color: white;
  font-size: 0.65rem;
  padding: 0.2rem 0.4rem;
  border-radius: 0.25rem;
  font-weight: 600;
}

.learn-more-link {
  color: #008BFF;
  text-decoration: none;
  font-size: 0.9rem;
}

.learn-more-link:hover {
  text-decoration: underline;
}

/* Loading state */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .hero-logo {
    height: 120px;
  }

  .hero h1 {
    font-size: 2.25rem;
  }

  .hero-subtitle,
  .hero-details {
    font-size: 1rem;
  }

  .how-to-box {
    padding: 15px 30px;
  }

  .how-to-header h2 {
    font-size: 2.5rem;
  }

  .how-to-logo {
    height: 80px;
  }

  .how-to-header h2,
  .cta-section h2 {
    font-size: 2rem;
  }

  .steps {
    flex-direction: column;
    align-items: center;
  }

  .step {
    max-width: 100%;
  }
}

/* Phone Input Styles */
.phone-input-wrapper {
  display: flex;
  align-items: stretch;
  border: 1px solid #ddd;
  border-radius: 0.5rem;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.phone-input-wrapper:focus-within {
  border-color: #008BFF;
  box-shadow: 0 0 0 3px rgba(0, 139, 255, 0.1);
}

.country-code {
  display: flex;
  align-items: center;
  padding: 0 0.75rem;
  background: #f5f5f5;
  color: #666;
  font-weight: 500;
  border-right: 1px solid #ddd;
}

.phone-input-wrapper input {
  flex: 1;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.phone-input-wrapper input:focus {
  outline: none;
  box-shadow: none !important;
}

/* OTP Input Styles */
.otp-input {
  text-align: center;
  font-size: 1.75rem !important;
  letter-spacing: 0.5rem;
  font-weight: 600;
}

.otp-instructions {
  color: #666;
  margin-bottom: 1rem;
  text-align: center;
}

.otp-instructions span {
  font-weight: 600;
  color: #333;
}

/* Resend and Change Number Links */
.resend-link {
  text-align: center;
  margin-top: 1rem;
  font-size: 0.9rem;
}

.resend-link a {
  color: #008BFF;
  text-decoration: none;
}

.resend-link a:hover {
  text-decoration: underline;
}

#resend-countdown {
  color: #999;
}

.change-number {
  text-align: center;
  margin-top: 0.5rem;
  font-size: 0.9rem;
}

.change-number a {
  color: #666;
  text-decoration: none;
}

.change-number a:hover {
  color: #333;
  text-decoration: underline;
}

@media (max-width: 480px) {
  .invite-page {
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    overflow-y: auto;
  }

  .form-row {
    flex-direction: column;
    gap: 0;
  }
}
