/* ═══════════════════════════════════════════════════════════════
   Love is in the Stars — App Styles
   Extends the cosmic landing page design tokens
   ═══════════════════════════════════════════════════════════════ */

/* ─── Navigation ─────────────────────────────────────────────── */

.app-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background: rgba(10, 10, 26, 0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--card-border);
}

.nav-logo {
  font-family: 'Syne', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.15em;
  text-decoration: none;
}

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

.nav-links a {
  color: var(--lavender);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--gold-light);
}

.nav-btn {
  padding: 0.5rem 1.2rem !important;
  background: linear-gradient(135deg, var(--gold), #c49640) !important;
  color: var(--deep) !important;
  border-radius: 8px;
  font-weight: 600 !important;
  font-size: 0.8rem !important;
}

.nav-btn:hover {
  color: var(--deep) !important;
  filter: brightness(1.1);
}

.nav-btn-ghost {
  padding: 0.45rem 1rem !important;
  border: 1px solid var(--card-border) !important;
  border-radius: 8px;
}

/* ─── Main App Container ─────────────────────────────────────── */

.app-main {
  padding-top: 80px;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

/* ─── Hero CTA (landing page enhancement) ────────────────────── */

.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 2.5rem;
  flex-wrap: wrap;
}

.cta-btn {
  display: inline-block;
  padding: 0.9rem 2.2rem;
  background: linear-gradient(135deg, var(--gold), #c49640);
  color: var(--deep);
  text-decoration: none;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: all 0.3s;
  letter-spacing: 0.02em;
}

.cta-btn:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(212, 168, 83, 0.3);
}

.cta-btn.full-width {
  width: 100%;
  text-align: center;
  padding: 1rem;
  font-size: 1rem;
}

.cta-btn-secondary {
  display: inline-block;
  padding: 0.9rem 2.2rem;
  background: transparent;
  color: var(--lavender);
  text-decoration: none;
  font-family: 'Syne', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 12px;
  border: 1px solid var(--card-border);
  cursor: pointer;
  transition: all 0.3s;
}

.cta-btn-secondary:hover {
  border-color: var(--gold);
  color: var(--gold-light);
  background: rgba(212, 168, 83, 0.05);
}

/* ─── Form Pages ─────────────────────────────────────────────── */

.form-page {
  max-width: 580px;
  margin: 2rem auto;
  padding: 0 1.5rem 4rem;
}

.check-page {
  max-width: 640px;
}

.form-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.form-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  opacity: 0.7;
}

.form-header h1 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 700;
  margin-bottom: 0.6rem;
}

.form-subtitle {
  color: var(--lavender);
  font-size: 1rem;
  font-weight: 300;
  max-width: 400px;
  margin: 0 auto;
}

.cosmic-form {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group label {
  font-family: 'Syne', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--lavender);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.form-group label .optional {
  color: var(--muted);
  font-weight: 400;
  text-transform: none;
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 0.8rem 1rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  color: var(--soft-white);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  transition: border-color 0.3s, background 0.3s;
  outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--gold);
  background: rgba(212, 168, 83, 0.04);
}

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

.form-group select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%237a7498' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

.form-group select option {
  background: var(--navy);
  color: var(--soft-white);
}

.form-hint {
  font-size: 0.75rem;
  color: var(--muted);
  font-style: italic;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-error {
  padding: 0.8rem 1rem;
  background: rgba(255, 80, 80, 0.1);
  border: 1px solid rgba(255, 80, 80, 0.3);
  border-radius: 10px;
  color: #ff8080;
  font-size: 0.9rem;
}

.form-footer {
  text-align: center;
  margin-top: 1.5rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.form-footer a {
  color: var(--gold);
  text-decoration: none;
}

.form-footer a:hover {
  color: var(--gold-light);
}

/* ─── Check Page ─────────────────────────────────────────────── */

.check-person {
  padding: 1.5rem;
  border: 1px solid var(--card-border);
  border-radius: 14px;
  background: var(--card-bg);
}

.check-person h3 {
  font-family: 'Syne', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 1rem;
}

.check-divider {
  text-align: center;
  font-size: 1.5rem;
  color: var(--gold);
  opacity: 0.5;
  padding: 0.5rem 0;
}

.check-result-card {
  margin-top: 2rem;
  padding: 2rem;
  border: 1px solid var(--card-border);
  border-radius: 16px;
  background: var(--card-bg);
  backdrop-filter: blur(10px);
}

/* ─── Profile Page ───────────────────────────────────────────── */

.profile-page {
  max-width: 600px;
  margin: 2rem auto;
  padding: 0 1.5rem 4rem;
  text-align: center;
}

.chart-card {
  padding: 2.5rem 2rem;
  border: 1px solid var(--card-border);
  border-radius: 20px;
  background: var(--card-bg);
  backdrop-filter: blur(10px);
}

.chart-card h1 {
  font-family: 'Syne', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 2rem;
}

.chart-placements {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  margin-bottom: 2rem;
}

.placement {
  text-align: center;
}

.placement-symbol {
  font-size: 2.5rem;
  margin-bottom: 0.3rem;
}

.placement-label {
  font-family: 'Syne', sans-serif;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--muted);
  margin-bottom: 0.2rem;
}

.placement-sign {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--gold);
}

.chart-summary {
  color: var(--lavender);
  font-size: 0.95rem;
  line-height: 1.7;
  font-weight: 300;
}

.chart-summary strong {
  color: var(--gold-light);
  font-weight: 600;
}

.profile-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
  flex-wrap: wrap;
}

/* ─── Matches Grid ───────────────────────────────────────────── */

.matches-page {
  max-width: 700px;
  margin: 2rem auto;
  padding: 0 1.5rem 4rem;
}

.page-header {
  text-align: center;
  margin-bottom: 2rem;
}

.page-header h1 {
  font-family: 'Syne', sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.page-header p {
  color: var(--muted);
  font-size: 0.9rem;
}

.matches-grid {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.match-card {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  padding: 1.2rem 1.5rem;
  border: 1px solid var(--card-border);
  border-radius: 14px;
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  text-decoration: none;
  color: var(--soft-white);
  transition: all 0.3s;
}

.match-card:hover {
  border-color: rgba(212, 168, 83, 0.3);
  transform: translateX(4px);
  background: rgba(255, 255, 255, 0.05);
}

.match-score-ring {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: conic-gradient(
    var(--gold) calc(var(--score) * 1%),
    rgba(255, 255, 255, 0.06) calc(var(--score) * 1%)
  );
  position: relative;
}

.match-score-ring::after {
  content: '';
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: var(--deep);
}

.score-number {
  position: relative;
  z-index: 1;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 0.75rem;
  color: var(--gold);
}

.match-info {
  flex: 1;
}

.match-info h3 {
  font-family: 'Syne', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}

.match-signs {
  display: flex;
  gap: 0.8rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.match-arrow {
  color: var(--muted);
  font-size: 1.2rem;
  transition: color 0.3s;
}

.match-card:hover .match-arrow {
  color: var(--gold);
}

/* ─── Match Detail Page ──────────────────────────────────────── */

.match-detail-page {
  max-width: 700px;
  margin: 2rem auto;
  padding: 0 1.5rem 4rem;
}

.back-link {
  display: inline-block;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
  transition: color 0.2s;
}

.back-link:hover {
  color: var(--gold);
}

.match-hero {
  text-align: center;
  margin-bottom: 2.5rem;
}

.match-hero-score {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  margin: 0 auto 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: conic-gradient(
    var(--gold) calc(var(--score) * 1%),
    rgba(255, 255, 255, 0.06) calc(var(--score) * 1%)
  );
  position: relative;
}

.match-hero-score::after {
  content: '';
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  background: var(--deep);
}

.match-hero-score span {
  position: relative;
  z-index: 1;
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--gold);
}

.match-hero h1 {
  font-family: 'Syne', sans-serif;
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 0.4rem;
}

.match-tagline {
  color: var(--lavender);
  font-style: italic;
  font-weight: 300;
}

/* ─── Chart Comparison ───────────────────────────────────────── */

.chart-comparison {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 2.5rem;
  padding: 1.5rem;
  border: 1px solid var(--card-border);
  border-radius: 16px;
  background: var(--card-bg);
}

.chart-col {
  text-align: center;
  flex: 1;
}

.chart-col h3 {
  font-family: 'Syne', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
}

.mini-placements {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.85rem;
  color: var(--lavender);
}

.chart-vs {
  font-size: 1.5rem;
  color: var(--gold);
  opacity: 0.5;
}

/* ─── Score Breakdown ────────────────────────────────────────── */

.score-breakdown {
  margin-bottom: 2.5rem;
}

.score-breakdown h2 {
  font-family: 'Syne', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 1.2rem;
}

.score-bars {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.score-bar-row {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.score-bar-label {
  width: 140px;
  font-size: 0.85rem;
  color: var(--lavender);
  flex-shrink: 0;
}

.score-bar-track {
  flex: 1;
  height: 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  overflow: hidden;
}

.score-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.8s ease-out;
}

.score-bar-value {
  width: 40px;
  text-align: right;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--soft-white);
}

/* ─── Reading ────────────────────────────────────────────────── */

.reading-section {
  padding: 2rem;
  border: 1px solid var(--card-border);
  border-radius: 16px;
  background: var(--card-bg);
}

.reading-section h2 {
  font-family: 'Syne', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 1.2rem;
  color: var(--gold);
}

.reading-text p {
  color: var(--lavender);
  font-size: 0.95rem;
  line-height: 1.8;
  margin-bottom: 1rem;
  font-weight: 300;
}

.reading-text p:last-child {
  margin-bottom: 0;
  font-style: italic;
  color: var(--gold-light);
}

/* ─── Empty State ────────────────────────────────────────────── */

.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  border: 1px solid var(--card-border);
  border-radius: 16px;
  background: var(--card-bg);
}

.empty-icon {
  font-size: 3rem;
  opacity: 0.4;
  margin-bottom: 1rem;
}

.empty-state h2 {
  font-family: 'Syne', sans-serif;
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}

.empty-state p {
  color: var(--lavender);
  font-size: 0.9rem;
  font-weight: 300;
  max-width: 400px;
  margin: 0 auto;
}

/* ─── Loading ────────────────────────────────────────────────── */

.loading-stars {
  text-align: center;
  padding: 3rem;
  color: var(--muted);
  font-style: italic;
  animation: pulse 2s ease-in-out infinite;
}

/* ─── Mobile ─────────────────────────────────────────────────── */

@media (max-width: 768px) {
  .app-nav {
    flex-direction: column;
    gap: 0.8rem;
    padding: 0.8rem 1rem;
  }

  .nav-links {
    gap: 0.8rem;
    flex-wrap: wrap;
    justify-content: center;
  }

  .nav-links a {
    font-size: 0.78rem;
  }

  .app-main {
    padding-top: 100px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .chart-placements {
    gap: 1.5rem;
  }

  .placement-symbol {
    font-size: 2rem;
  }

  .chart-comparison {
    flex-direction: column;
    gap: 1rem;
  }

  .chart-vs {
    transform: rotate(90deg);
  }

  .score-bar-label {
    width: 100px;
    font-size: 0.75rem;
  }

  .match-signs {
    flex-wrap: wrap;
    gap: 0.4rem;
  }
}

@media (max-width: 480px) {
  .form-page {
    padding: 0 1rem 3rem;
  }

  .match-card {
    padding: 1rem;
  }

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