/* ============================================================
   STARCAST APP — Islamic Geometric Light Theme
   Inspired by Alhambra, Zellige, and Mosque Architecture
   ============================================================ */

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

:root {
  /* Light Palette */
  --cream: #FBF6EE;
  --ivory: #FFF8EF;
  --white: #FFFFFF;
  --gold: #B8860B;
  --gold-light: #D4A94E;
  --gold-muted: #C9A85C;
  --blue: #4A6FA5;
  --blue-light: #7BA0C9;
  --blue-muted: #A8C4DD;
  --teal: #5B8A8A;
  --text: #2A1F14;
  --text-secondary: #4A3828;
  --muted: #8B7B68;
  --card-bg: rgba(184, 134, 11, 0.03);
  --card-hover: rgba(184, 134, 11, 0.07);
  --border: rgba(184, 134, 11, 0.12);
  --border-hover: rgba(184, 134, 11, 0.25);
  --gradient-gold: linear-gradient(135deg, #B8860B, #D4A94E);
  --gradient-blue: linear-gradient(135deg, #4A6FA5, #7BA0C9);
  --shadow-sm: 0 1px 3px rgba(42, 31, 20, 0.06);
  --shadow-md: 0 4px 16px rgba(42, 31, 20, 0.08);
  --shadow-lg: 0 8px 32px rgba(42, 31, 20, 0.1);

  /* Element Colors */
  --fire: #C65D3E;
  --earth: #6B8E4E;
  --air: #4A6FA5;
  --water: #7B5EA7;

  /* Layout */
  --tab-height: 70px;
  --header-height: 60px;

  /* Islamic Geometric Pattern (8-pointed star tessellation) */
  --pattern-star: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cg fill='none' stroke='%23B8860B' stroke-width='0.4' opacity='0.08'%3E%3Cpath d='M40 8 L48 32 L72 40 L48 48 L40 72 L32 48 L8 40 L32 32 Z'/%3E%3Cpath d='M40 16 L46 32 L62 34 L48 42 L52 58 L40 48 L28 58 L32 42 L18 34 L34 32 Z'/%3E%3Crect x='26' y='26' width='28' height='28' transform='rotate(45 40 40)'/%3E%3C/g%3E%3C/svg%3E");

  /* Arabesque border pattern */
  --pattern-border: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='8' viewBox='0 0 40 8'%3E%3Cg fill='none' stroke='%23B8860B' stroke-width='0.6' opacity='0.2'%3E%3Cpath d='M0 4 Q5 0 10 4 Q15 8 20 4 Q25 0 30 4 Q35 8 40 4'/%3E%3C/g%3E%3C/svg%3E");

  /* Small tessellation for cards */
  --pattern-tile: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Cg fill='none' stroke='%23B8860B' stroke-width='0.3' opacity='0.06'%3E%3Cpath d='M20 4 L24 16 L36 20 L24 24 L20 36 L16 24 L4 20 L16 16 Z'/%3E%3C/g%3E%3C/svg%3E");

  /* Hexagonal geometric pattern */
  --pattern-hex: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='100' viewBox='0 0 56 100'%3E%3Cg fill='none' stroke='%23B8860B' stroke-width='0.3' opacity='0.05'%3E%3Cpath d='M28 0 L56 14 L56 42 L28 56 L0 42 L0 14 Z'/%3E%3Cpath d='M28 44 L56 58 L56 86 L28 100 L0 86 L0 58 Z'/%3E%3C/g%3E%3C/svg%3E");
}

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--cream);
  background-image: var(--pattern-star);
  color: var(--text);
  overflow-x: hidden;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5 {
  font-family: 'Space Grotesk', sans-serif;
  color: var(--text);
}

/* ============================================================
   GEOMETRIC DECORATION ELEMENTS
   ============================================================ */

/* Decorative geometric border */
.geo-border {
  height: 8px;
  background-image: var(--pattern-border);
  background-repeat: repeat-x;
  background-position: center;
}

/* ============================================================
   STARS → GEOMETRIC PATTERN BACKGROUND (replaces dark stars)
   ============================================================ */
.stars {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0;
  background-image: var(--pattern-hex);
  opacity: 1;
}

.stars::before, .stars::after {
  content: '';
  position: absolute;
  width: 100%; height: 100%;
  background-image:
    radial-gradient(circle at 15% 25%, rgba(184,134,11,0.03) 0%, transparent 50%),
    radial-gradient(circle at 85% 75%, rgba(74,111,165,0.03) 0%, transparent 50%),
    radial-gradient(circle at 50% 10%, rgba(184,134,11,0.02) 0%, transparent 40%);
}

.stars::after {
  background-image:
    radial-gradient(circle at 30% 80%, rgba(74,111,165,0.02) 0%, transparent 50%),
    radial-gradient(circle at 70% 20%, rgba(184,134,11,0.02) 0%, transparent 50%);
  animation: none;
}

/* ============================================================
   APP SHELL
   ============================================================ */
.app {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* HEADER */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  background: rgba(251, 246, 238, 0.92);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

/* Decorative geometric line under header */
.app-header::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 4px;
  background-image: var(--pattern-border);
  background-repeat: repeat-x;
  background-position: center;
  opacity: 0.5;
}

.app-logo {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--gold);
  text-decoration: none;
  letter-spacing: -0.5px;
  background: var(--white);
  padding: 6px 12px;
  border-radius: 8px;
}

.app-logo span { color: var(--blue); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lang-toggle {
  display: flex;
  align-items: center;
  background: rgba(184,134,11,0.06);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 2px;
}

.lang-toggle button {
  background: none;
  border: none;
  color: var(--muted);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.25s ease;
  letter-spacing: 0.5px;
}

.lang-toggle button.active {
  background: var(--gradient-gold);
  color: var(--white);
}

/* MAIN */
.app-main {
  flex: 1;
  padding: 20px 16px;
  padding-bottom: calc(var(--tab-height) + 24px);
  max-width: 600px;
  margin: 0 auto;
  width: 100%;
}

/* TAB BAR */
.tab-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--tab-height);
  display: flex;
  align-items: center;
  justify-content: space-around;
  background: rgba(251, 246, 238, 0.95);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  padding-bottom: env(safe-area-inset-bottom, 0);
  box-shadow: 0 -2px 16px rgba(42, 31, 20, 0.06);
}

/* Decorative geometric line above tab bar */
.tab-bar::before {
  content: '';
  position: absolute;
  top: -4px;
  left: 0;
  right: 0;
  height: 4px;
  background-image: var(--pattern-border);
  background-repeat: repeat-x;
  background-position: center;
  opacity: 0.5;
}

.tab-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 12px;
  transition: all 0.2s ease;
  font-family: 'DM Sans', sans-serif;
  min-width: 60px;
}

.tab-item:hover { color: var(--text-secondary); }

.tab-item.active {
  color: var(--gold);
}

.tab-icon {
  font-size: 1.4rem;
  line-height: 1;
}

.tab-label {
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.3px;
  background: var(--white);
  padding: 2px 6px;
  border-radius: 6px;
}

/* ============================================================
   VIEW: PAGE TITLES
   ============================================================ */
.page-title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 4px;
  color: var(--text);
  background: var(--white);
  padding: 0 4px;
  position: relative;
  z-index: 2;
}

.page-subtitle {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 20px;
  line-height: 1.5;
  background: var(--white);
  padding: 12px 16px;
  border-radius: 12px;
  position: relative;
  z-index: 2;
}

.page-date {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 8px 16px;
  font-size: 0.75rem;
  color: var(--gold);
  margin-bottom: 20px;
  font-weight: 500;
  position: relative;
  z-index: 2;
  box-shadow: var(--shadow-sm);
}

/* ============================================================
   VIEW: ZODIAC SIGN GRID (Today)
   ============================================================ */
.signs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.sign-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px 16px;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

/* Subtle geometric pattern overlay on cards */
.sign-card::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 80px;
  height: 80px;
  background-image: var(--pattern-tile);
  opacity: 0.6;
  pointer-events: none;
}

.sign-card:hover {
  border-color: var(--border-hover);
  background: var(--ivory);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.sign-card::before {
  content: '';
  position: absolute;
  top: -30px;
  right: -20px;
  font-size: 4rem;
  opacity: 0.05;
}

.sign-card-symbol {
  font-size: 2rem;
  margin-bottom: 8px;
  display: block;
}

.sign-card-name {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 2px;
  color: var(--text);
}

.sign-card-dates {
  font-size: 0.7rem;
  color: var(--muted);
  margin-bottom: 10px;
}

.sign-card-snippet {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 12px;
}

.sign-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.sign-card-mood {
  font-size: 0.7rem;
  color: var(--gold);
  font-weight: 500;
}

.intensity-bar {
  display: flex;
  gap: 2px;
  align-items: center;
}

.intensity-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(184,134,11,0.15);
}

.intensity-dot.active {
  background: var(--gold);
}

/* Element colors on cards */
.sign-card[data-element="fire"] { border-left: 3px solid var(--fire); }
.sign-card[data-element="earth"] { border-left: 3px solid var(--earth); }
.sign-card[data-element="air"] { border-left: 3px solid var(--air); }
.sign-card[data-element="water"] { border-left: 3px solid var(--water); }

/* ============================================================
   VIEW: SIGN DETAIL (Full Horoscope)
   ============================================================ */
.sign-detail {
  animation: fadeIn 0.3s ease;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--gold);
  font-size: 0.85rem;
  cursor: pointer;
  background: none;
  border: none;
  font-family: 'DM Sans', sans-serif;
  margin-bottom: 20px;
  padding: 6px 0;
}

.back-btn:hover { opacity: 0.7; }

.sign-hero {
  text-align: center;
  padding: 24px 20px;
  position: relative;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

/* Geometric mandala decoration behind sign hero - now subtle background */
.sign-hero::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 200px;
  height: 200px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200' viewBox='0 0 200 200'%3E%3Cg fill='none' stroke='%23B8860B' stroke-width='0.5' opacity='0.08'%3E%3Ccircle cx='100' cy='100' r='90'/%3E%3Ccircle cx='100' cy='100' r='70'/%3E%3Ccircle cx='100' cy='100' r='50'/%3E%3Cpath d='M100 10 L118 82 L190 100 L118 118 L100 190 L82 118 L10 100 L82 82 Z'/%3E%3Crect x='40' y='40' width='120' height='120' transform='rotate(45 100 100)'/%3E%3Cpath d='M100 30 L130 85 L185 85 L140 115 L155 170 L100 140 L45 170 L60 115 L15 85 L70 85 Z'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  pointer-events: none;
  z-index: 0;
}

.sign-hero > * {
  position: relative;
  z-index: 1;
}

.sign-hero-symbol {
  font-size: 4rem;
  display: block;
  margin-bottom: 12px;
}

.sign-hero-name {
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: -1px;
  margin-bottom: 4px;
  color: var(--text);
}

.sign-hero-dates {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 8px;
}

.sign-hero-element {
  display: inline-block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 4px 12px;
  border-radius: 100px;
  font-weight: 600;
}

.element-fire { background: rgba(198,93,62,0.1); color: var(--fire); }
.element-earth { background: rgba(107,142,78,0.1); color: var(--earth); }
.element-air { background: rgba(74,111,165,0.1); color: var(--air); }
.element-water { background: rgba(123,94,167,0.1); color: var(--water); }

/* Period tabs */
.period-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 4px;
  box-shadow: var(--shadow-sm);
}

.period-tab {
  flex: 1;
  text-align: center;
  padding: 10px 12px;
  font-size: 0.8rem;
  font-weight: 500;
  border: none;
  background: none;
  color: var(--muted);
  cursor: pointer;
  border-radius: 10px;
  transition: all 0.2s;
  font-family: 'DM Sans', sans-serif;
  position: relative;
}

.period-tab.active {
  background: var(--white);
  color: var(--gold);
  box-shadow: var(--shadow-sm);
}

.period-tab .lock-icon {
  font-size: 0.65rem;
  margin-left: 4px;
}

/* Horoscope content */
.horoscope-content {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

/* Subtle corner geometric decoration */
.horoscope-content::before {
  content: '';
  position: absolute;
  top: -1px;
  right: -1px;
  width: 60px;
  height: 60px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 60 60'%3E%3Cg fill='none' stroke='%23B8860B' stroke-width='0.5' opacity='0.12'%3E%3Cpath d='M60 0 L60 20 Q60 40 40 40 L20 40 Q0 40 0 60'/%3E%3Cpath d='M60 0 L60 12 Q60 28 44 28 L28 28 Q12 28 12 44 L12 60'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: no-repeat;
  pointer-events: none;
}

.horoscope-text {
  font-size: 0.95rem;
  line-height: 1.75;
  white-space: pre-line;
  color: var(--text-secondary);
}

.horoscope-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 20px;
}

.meta-card {
  background: var(--ivory);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  text-align: center;
}

.meta-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  margin-bottom: 6px;
}

.meta-value {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--gold);
}

/* ============================================================
   VIEW: MOON PHASE
   ============================================================ */
.moon-display {
  text-align: center;
  padding: 30px 20px;
  position: relative;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

/* Geometric circular frame around moon - subtle background */
.moon-display::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -60%);
  width: 180px;
  height: 180px;
  border: 1px solid rgba(184,134,11,0.08);
  border-radius: 50%;
  pointer-events: none;
  opacity: 0.4;
}

.moon-display::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -60%) rotate(45deg);
  width: 150px;
  height: 150px;
  border: 1px solid rgba(184,134,11,0.05);
  pointer-events: none;
  opacity: 0.4;
}

.moon-emoji {
  font-size: 6rem;
  display: block;
  margin-bottom: 8px;
  filter: drop-shadow(0 0 20px rgba(184,134,11,0.2));
  animation: moonGlow 3s ease-in-out infinite;
  position: relative;
  z-index: 1;
}

@keyframes moonGlow {
  0%, 100% { filter: drop-shadow(0 0 20px rgba(184,134,11,0.2)); }
  50% { filter: drop-shadow(0 0 35px rgba(184,134,11,0.35)); }
}

.moon-name {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 4px;
  color: var(--text);
  position: relative;
  z-index: 1;
}

.moon-illumination {
  font-size: 0.9rem;
  color: var(--gold);
  margin-bottom: 4px;
  position: relative;
  z-index: 1;
}

.moon-sign {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 24px;
  position: relative;
  z-index: 1;
}

.moon-meaning {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px 20px;
  margin-bottom: 16px;
  text-align: left;
  box-shadow: var(--shadow-sm);
}

.moon-meaning h3 {
  font-size: 0.85rem;
  color: var(--gold);
  margin-bottom: 10px;
  font-weight: 600;
}

.moon-meaning p {
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--muted);
}

.moon-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.moon-stat {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.moon-stat-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  margin-bottom: 6px;
}

.moon-stat-value {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

/* Illumination bar */
.illumination-bar {
  width: 100%;
  height: 6px;
  background: rgba(184,134,11,0.08);
  border-radius: 3px;
  margin: 16px 0;
  overflow: hidden;
  position: relative;
  z-index: 1;
}

.illumination-fill {
  height: 100%;
  background: var(--gradient-gold);
  border-radius: 3px;
  transition: width 1s ease;
}

/* ============================================================
   VIEW: BIRTH CHART
   ============================================================ */
.chart-form {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

/* Geometric corner decoration on form */
.chart-form::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 100px;
  height: 100px;
  background-image: var(--pattern-tile);
  opacity: 0.8;
  pointer-events: none;
}

.form-group {
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}

.form-group:last-child { margin-bottom: 0; }

.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 6px;
  letter-spacing: 0.3px;
  background: var(--white);
  padding: 2px 4px;
  position: relative;
  z-index: 2;
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  background: var(--ivory);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(184,134,11,0.08);
}

.form-input::placeholder {
  color: rgba(139, 123, 104, 0.5);
}

/* Color scheme for date/time inputs */
.form-input::-webkit-calendar-picker-indicator {
  filter: none;
  opacity: 0.6;
}

.btn-primary {
  width: 100%;
  padding: 14px 24px;
  background: var(--gradient-gold);
  color: var(--white);
  border: none;
  border-radius: 12px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s;
  letter-spacing: -0.3px;
  margin-top: 8px;
  position: relative;
  z-index: 3;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(184, 134, 11, 0.3);
}

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

/* Chart results */
.chart-results {
  animation: fadeIn 0.3s ease;
}

.chart-placement {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 10px;
  transition: border-color 0.2s;
  box-shadow: var(--shadow-sm);
}

.chart-placement:hover {
  border-color: var(--border-hover);
}

.placement-planet {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  min-width: 60px;
}

.placement-sign-symbol {
  font-size: 1.5rem;
}

.placement-sign-name {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  color: var(--text);
}

.placement-element {
  font-size: 0.7rem;
  color: var(--muted);
  margin-left: auto;
  padding: 2px 8px;
  border-radius: 100px;
  font-weight: 500;
}

.big-three {
  background: linear-gradient(135deg, rgba(184,134,11,0.04), rgba(74,111,165,0.03));
  border-color: rgba(184,134,11,0.2);
}

/* ============================================================
   VIEW: COMPATIBILITY
   ============================================================ */
.match-selectors {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 24px;
  justify-content: center;
  background: var(--white);
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
}

.match-sign-select {
  flex: 1;
  max-width: 200px;
}

.sign-select {
  width: 100%;
  padding: 12px 16px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  outline: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238B7B68' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}

.sign-select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(184,134,11,0.08);
}

.sign-select option {
  background: var(--white);
  color: var(--text);
}

.match-heart {
  font-size: 1.5rem;
  color: var(--gold);
  flex-shrink: 0;
}

/* Compatibility result */
.compat-result {
  animation: fadeIn 0.3s ease;
}

.compat-score-display {
  text-align: center;
  padding: 30px 20px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.compat-signs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-bottom: 16px;
}

.compat-sign-badge {
  text-align: center;
}

.compat-sign-badge .symbol {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 4px;
}

.compat-sign-badge .name {
  font-size: 0.8rem;
  color: var(--muted);
}

.compat-vs {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 600;
}

.compat-score {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 3.5rem;
  font-weight: 700;
  background: var(--gradient-gold);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 4px;
}

.compat-score-label {
  font-size: 0.8rem;
  color: var(--muted);
}

/* Category bars */
/* ============================================================
   PAGE HEADER WRAPPER — White background for titles & subtitles
   ============================================================ */
.page-header {
  background: var(--white);
  padding: 16px;
  border-radius: 12px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
  position: relative;
  z-index: 2;
}

.page-header .page-title {
  background: transparent;
  padding: 0;
  margin-bottom: 8px;
}

.page-header .page-subtitle {
  background: transparent;
  padding: 0;
  margin-bottom: 0;
  border-radius: 0;
}

.compat-categories {
  margin: 20px 0;
  background: var(--white);
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
}

.compat-category {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.compat-cat-label {
  font-size: 0.8rem;
  color: var(--muted);
  min-width: 100px;
  text-align: right;
}

.compat-bar {
  flex: 1;
  height: 8px;
  background: rgba(184,134,11,0.06);
  border-radius: 4px;
  overflow: hidden;
}

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

.compat-bar-fill.love { background: linear-gradient(90deg, #C65D3E, #D4836B); }
.compat-bar-fill.communication { background: linear-gradient(90deg, #4A6FA5, #7BA0C9); }
.compat-bar-fill.trust { background: linear-gradient(90deg, #6B8E4E, #8FB36E); }
.compat-bar-fill.passion { background: linear-gradient(90deg, #7B5EA7, #A387C5); }

.compat-cat-value {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  min-width: 36px;
  text-align: right;
  color: var(--text);
}

/* Compat summary */
.compat-summary {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
}

.compat-summary h3 {
  font-size: 0.85rem;
  color: var(--gold);
  margin-bottom: 8px;
}

.compat-summary p {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--muted);
}

.compat-list {
  list-style: none;
  padding: 0;
}

.compat-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 8px;
}

.compat-list .bullet {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 6px;
}

.bullet-green { background: var(--earth); }
.bullet-orange { background: var(--gold); }

/* ============================================================
   PREMIUM OVERLAY
   ============================================================ */
.premium-lock {
  position: relative;
}

.premium-overlay {
  background: linear-gradient(135deg, rgba(184,134,11,0.06), rgba(74,111,165,0.04));
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Geometric pattern on premium overlay */
.premium-overlay::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: var(--pattern-star);
  opacity: 0.5;
  pointer-events: none;
}

.premium-overlay > * {
  position: relative;
  z-index: 1;
}

.premium-overlay .lock-emoji {
  font-size: 2rem;
  margin-bottom: 12px;
  display: block;
}

.premium-overlay h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
  background: var(--white);
  padding: 8px 12px;
  border-radius: 8px;
  display: inline-block;
}

.premium-overlay p {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 16px;
  line-height: 1.5;
  background: var(--white);
  padding: 10px 14px;
  border-radius: 8px;
}

.btn-premium {
  display: inline-block;
  padding: 12px 28px;
  background: var(--gradient-gold);
  color: var(--white);
  border: none;
  border-radius: 100px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s;
  text-decoration: none;
}

.btn-premium:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(184, 134, 11, 0.25);
}

.premium-price {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 8px;
}

/* ============================================================
   LOADING & ANIMATIONS
   ============================================================ */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 0;
}

.loading-dots {
  display: flex;
  gap: 6px;
}

.loading-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  animation: bounce 1.4s infinite ease-in-out;
}

.loading-dots span:nth-child(1) { animation-delay: -0.32s; }
.loading-dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes bounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}

/* Skeleton loading */
.skeleton {
  background: linear-gradient(90deg, rgba(184,134,11,0.04) 25%, rgba(184,134,11,0.08) 50%, rgba(184,134,11,0.04) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* ============================================================
   TRANSIT CARDS
   ============================================================ */
.transit-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
}

.transit-header {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 6px;
  color: var(--gold);
}

.transit-desc {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.6;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (min-width: 768px) {
  .app-main {
    max-width: 640px;
    padding: 28px 24px;
    padding-bottom: calc(var(--tab-height) + 32px);
  }

  .signs-grid {
    grid-template-columns: 1fr 1fr 1fr;
  }

  .tab-bar {
    max-width: 480px;
    margin: 0 auto;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 20px 20px 0 0;
  }
}

@media (max-width: 360px) {
  .signs-grid {
    grid-template-columns: 1fr;
  }

  .sign-card { padding: 16px 14px; }

  .match-selectors {
    flex-direction: column;
    gap: 12px;
  }

  .match-sign-select {
    max-width: 100%;
  }

  .match-heart {
    transform: rotate(90deg);
  }
}

/* Ensure select options are visible */
select option {
  background: #FFFFFF;
  color: #2A1F14;
}
