/*
 * StarSense Premium Cosmic Theme
 *
 * This stylesheet gives the Starsense site a luxurious, cosmic aesthetic.
 * It replaces the previous light theme with a dark starry background,
 * golden accents and refined typography.  All colours are controlled
 * via CSS variables defined in :root.  The layout classes (container,
 * flex utilities, form groups, cards, buttons) remain compatible with
 * existing markup, so no changes to your PHP templates are needed.
 */

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

:root {
  --background: #0d0630;
  --surface: rgba(255, 255, 255, 0.05);
  --primary: #f5f4fa;
  --secondary: #b0aeca;
  --gold: #e6b800;
  --gold-dark: #f0c819;
  --border: rgba(255, 255, 255, 0.15);
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--background);
  /* Starfield effect: layered radial gradients produce subtle speckles */
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,0.08) 1px, transparent 2px),
    radial-gradient(circle at 80% 70%, rgba(255,255,255,0.06) 1px, transparent 2px),
    radial-gradient(circle at 50% 50%, rgba(255,255,255,0.04) 1px, transparent 2px);
  background-size: 400px 400px, 600px 600px, 800px 800px;
  color: var(--primary);
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
}

/* Utility classes (unchanged from previous version) */
.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1rem;
}
.flex { display: flex; }
.justify-between { justify-content: space-between; }
.items-center { align-items: center; }
.space-x-2 > * + * { margin-left: 0.5rem; }
.space-x-4 > * + * { margin-left: 1rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-10 { margin-top: 2.5rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }

/* Typography */
h1, h2, h3, h4, h5, h6 {
  color: var(--primary);
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-weight: 700;
  font-family: 'Playfair Display', serif;
}
p {
  margin-top: 0;
  margin-bottom: 1rem;
  color: var(--secondary);
}
a {
  color: var(--gold);
  text-decoration: none;
  transition: color 0.3s ease;
}
a:hover {
  color: var(--gold-dark);
  text-decoration: underline;
}

/* Header */
.site-header {
  background: linear-gradient(135deg, #11002a, #1b0d38);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}
.logo a {
  color: var(--primary);
  text-decoration: none;
  font-size: 1.75rem;
  font-weight: 700;
  font-family: 'Playfair Display', serif;
}
.logo .text-gold { color: var(--gold); }
nav a {
  margin-left: 1rem;
  color: var(--primary);
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
  padding-bottom: 0.25rem;
}
nav a:hover {
  color: var(--gold);
}
nav a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--gold);
  transition: width 0.3s ease;
}
nav a:hover::after {
  width: 100%;
}

/* Hero */
.hero-title {
  color: var(--gold);
  font-size: 2.5rem;
  font-family: 'Playfair Display', serif;
  margin-bottom: 1rem;
}

/* Buttons */
.btn-primary,
.btn-secondary {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  border-radius: 6px;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
  font-weight: 600;
}
.btn-primary {
  background-color: var(--gold);
  color: var(--background);
  border: none;
  box-shadow: 0 4px 12px rgba(230, 184, 0, 0.3);
}
.btn-primary:hover {
  background-color: var(--gold-dark);
  box-shadow: 0 6px 16px rgba(230, 184, 0, 0.4);
}
.btn-secondary {
  background-color: transparent;
  color: var(--gold);
  border: 2px solid var(--gold);
}
.btn-secondary:hover {
  background-color: var(--gold);
  color: var(--background);
  box-shadow: 0 4px 12px rgba(230, 184, 0, 0.3);
}

/* Cards */
.card {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
}

/* Forms */
form {
  max-width: 640px;
  margin: 0 auto;
}
.form-group {
  margin-bottom: 1rem;
}
.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: var(--primary);
}
.form-group input,
.form-group select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--primary);
  font-size: 1rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(230, 184, 0, 0.3);
}
.form-group small {
  display: block;
  color: var(--secondary);
  margin-top: 0.25rem;
}
.error {
  color: #e53e3e;
  margin-bottom: 1rem;
  font-weight: 600;
}

/* Footer */
footer {
  background: linear-gradient(135deg, #1b0d38, #11002a);
  border-top: 1px solid var(--border);
  margin-top: 2rem;
  padding: 1rem 0;
  text-align: center;
  font-size: 0.875rem;
  color: var(--secondary);
}
footer a {
  margin-left: 0.5rem;
  margin-right: 0.5rem;
  color: var(--gold);
}
footer a:hover {
  color: var(--gold-dark);
}

/* Responsive tweaks */
@media (max-width: 768px) {
  nav a { margin-left: 0.5rem; font-size: 0.9rem; }
  .hero-title { font-size: 2rem; }
  .btn-primary, .btn-secondary { padding: 0.6rem 1.25rem; font-size: 0.9rem; }
}

/* Additional mobile responsiveness */
@media (max-width: 600px) {
  nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  nav a {
    margin: 0;
    flex: 1 1 100%;
    padding: 0.5rem 0;
    text-align: center;
  }
  .container {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
  form {
    width: 100%;
    padding: 0 0.5rem;
  }
  .card {
    padding: 1.5rem;
  }
}