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

:root {
  --saffron: #e8731a;
  --deep-red: #8b1a1a;
  --gold: #c9972b;
  --cream: #faf5eb;
  --dark: #2c1810;
  --warm-bg: #fdf8f0;
  --border: #e6d5c3;
  --text: #3d2b1f;
  --text-light: #7a6555;
  --card-bg: #fffcf7;
}

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

body {
  font-family: 'Inter', sans-serif;
  background: var(--warm-bg);
  color: var(--text);
  min-height: 100vh;
}

.header {
  background: linear-gradient(135deg, var(--deep-red) 0%, #6b1515 100%);
  color: var(--cream);
  text-align: center;
  padding: 2.5rem 1rem 2rem;
  position: relative;
  overflow: hidden;
}

.header::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 20px,
    rgba(255,255,255,0.02) 20px,
    rgba(255,255,255,0.02) 40px
  );
}

.header h1 {
  font-family: 'Crimson Pro', serif;
  font-size: 2.2rem;
  font-weight: 700;
  position: relative;
  letter-spacing: 0.5px;
}

.header p {
  font-size: 0.95rem;
  opacity: 0.8;
  margin-top: 0.4rem;
  position: relative;
}

.ornament {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.75rem;
  position: relative;
}

.ornament span {
  display: block;
  height: 1px;
  width: 60px;
  background: var(--gold);
  opacity: 0.6;
}

.ornament-dot {
  width: 6px;
  height: 6px;
  background: var(--gold);
  border-radius: 50%;
  opacity: 0.8;
}

.container {
  max-width: 700px;
  margin: 0 auto;
  padding: 2rem 1rem 3rem;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 2px 12px rgba(44,24,16,0.06);
}

.card h2 {
  font-family: 'Crimson Pro', serif;
  font-size: 1.5rem;
  color: var(--deep-red);
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--border);
}

/* Form */
.form-group {
  margin-bottom: 1.25rem;
}

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

label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-light);
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

input, select {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  font-family: 'Inter', sans-serif;
  color: var(--text);
  background: #fff;
  transition: border-color 0.2s;
}

input:focus, select:focus {
  outline: none;
  border-color: var(--saffron);
  box-shadow: 0 0 0 3px rgba(232,115,26,0.1);
}

.btn {
  display: block;
  width: 100%;
  padding: 0.85rem;
  background: linear-gradient(135deg, var(--saffron) 0%, #d4681a 100%);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  margin-top: 0.5rem;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(232,115,26,0.3);
}

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

/* Results */
#results {
  display: none;
  animation: fadeIn 0.4s ease;
}

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

.birth-info {
  text-align: center;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  color: var(--text-light);
}

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

/* Result badges */
.result-badges {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 2rem;
}

.badge {
  padding: 1.25rem;
  background: #fef6ee;
  border-radius: 10px;
  border-left: 4px solid var(--saffron);
  text-align: center;
}

.badge-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-light);
  margin-bottom: 0.4rem;
}

.badge-tamil {
  font-family: 'Crimson Pro', serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--deep-red);
}

.badge-en {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-top: 0.15rem;
}

/* Personality sections */
.section-title {
  font-family: 'Crimson Pro', serif;
  font-size: 1.2rem;
  color: var(--deep-red);
  margin: 1.75rem 0 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.trait-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.trait {
  padding: 0.75rem 1rem;
  background: var(--warm-bg);
  border-radius: 8px;
  border-left: 3px solid var(--gold);
}

.trait-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-light);
  margin-bottom: 0.2rem;
}

.trait-value {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
}

.description {
  font-size: 0.92rem;
  line-height: 1.65;
  color: var(--text);
  margin: 0.75rem 0;
  padding: 1rem 1.25rem;
  background: var(--warm-bg);
  border-radius: 8px;
  border-left: 3px solid var(--gold);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.75rem 0;
}

.tag {
  padding: 0.3rem 0.75rem;
  background: #fef6ee;
  border: 1px solid #f0d9c0;
  border-radius: 20px;
  font-size: 0.8rem;
  color: var(--text);
}

.recalc-btn {
  display: block;
  margin: 2rem auto 0;
  padding: 0.6rem 1.5rem;
  background: transparent;
  color: var(--saffron);
  border: 1px solid var(--saffron);
  border-radius: 8px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.recalc-btn:hover {
  background: var(--saffron);
  color: #fff;
}

.disclaimer {
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-light);
  margin-top: 1.5rem;
  font-style: italic;
}

/* Timezone picker */
.tz-picker {
  position: relative;
}

.tz-search {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  font-family: 'Inter', sans-serif;
  color: var(--text);
  background: #fff;
  transition: border-color 0.2s;
}

.tz-search:focus {
  outline: none;
  border-color: var(--saffron);
  box-shadow: 0 0 0 3px rgba(232,115,26,0.1);
}

.tz-detected {
  display: none;
  margin-top: 0.4rem;
  padding: 0.5rem 0.75rem;
  background: #eef7ee;
  border: 1px solid #c5e1c5;
  border-radius: 6px;
  font-size: 0.8rem;
  color: #2d5a2d;
  cursor: pointer;
  transition: background 0.15s;
}

.tz-detected:hover {
  background: #ddf0dd;
}

.tz-detected.visible {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tz-detected .detect-icon {
  font-size: 0.9rem;
}

.tz-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: 260px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 8px 24px rgba(44,24,16,0.12);
  z-index: 100;
}

.tz-dropdown.open {
  display: block;
}

.tz-group-label {
  padding: 0.5rem 0.75rem 0.3rem;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-light);
  background: var(--cream);
  position: sticky;
  top: 0;
}

.tz-option {
  padding: 0.55rem 0.75rem;
  font-size: 0.88rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.1s;
}

.tz-option:hover, .tz-option.highlighted {
  background: #fef6ee;
}

.tz-option .tz-city {
  color: var(--text);
}

.tz-option .tz-offset {
  font-size: 0.75rem;
  color: var(--text-light);
  white-space: nowrap;
  margin-left: 0.75rem;
}

.tz-selected-display {
  font-weight: 500;
  color: var(--text);
}

.tz-no-results {
  padding: 1rem 0.75rem;
  font-size: 0.85rem;
  color: var(--text-light);
  text-align: center;
}

/* About section */
.about-section {
  margin-top: 2rem;
}

.about-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem 1.75rem;
  margin-bottom: 1rem;
  box-shadow: 0 1px 6px rgba(44,24,16,0.04);
}

.about-card h3 {
  font-family: 'Crimson Pro', serif;
  font-size: 1.15rem;
  color: var(--deep-red);
  margin-bottom: 0.6rem;
}

.about-card p {
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--text);
  margin-bottom: 0.5rem;
}

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

.optional-label {
  font-weight: 400;
  font-size: 0.75rem;
  color: var(--text-light);
  text-transform: none;
  letter-spacing: 0;
}

@media (max-width: 500px) {
  .form-row { grid-template-columns: 1fr; }
  .result-badges { grid-template-columns: 1fr; }
  .trait-grid { grid-template-columns: 1fr; }
  .header h1 { font-size: 1.7rem; }
  .card { padding: 1.25rem; }
}
