/* ===== Global Styles - ZodiacQuest ===== */

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

:root {
  --primary: #c41e3a;
  --primary-dark: #8b0000;
  --gold: #d4a574;
  --gold-light: #f0d9b5;
  --bg: #faf7f2;
  --bg-card: #ffffff;
  --text: #2c1810;
  --text-light: #6b5344;
  --border: #e8dccf;
  --shadow: 0 4px 20px rgba(139, 0, 0, 0.08);
  --shadow-hover: 0 8px 32px rgba(139, 0, 0, 0.15);
  --radius: 16px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ===== Header ===== */
header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 1rem 0;
  box-shadow: 0 2px 12px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: white;
  font-size: 1.4rem;
  font-weight: 700;
}

.logo-icon {
  font-size: 1.8rem;
}

nav ul {
  display: flex;
  list-style: none;
  gap: 1.5rem;
}

nav a {
  color: rgba(255,255,255,0.9);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s;
  position: relative;
}

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

nav a.active::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gold);
  border-radius: 2px;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
}

/* ===== Container ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  flex: 1;
  width: 100%;
}

main.container {
  padding: 2rem 1.5rem;
}

/* ===== Hero ===== */
.hero {
  text-align: center;
  padding: 3rem 0 2rem;
  background: linear-gradient(180deg, rgba(196,30,58,0.05) 0%, transparent 100%);
}

.hero h1 {
  font-size: 2.5rem;
  color: var(--primary-dark);
  margin-bottom: 0.75rem;
}

.hero .subtitle {
  font-size: 1.15rem;
  color: var(--text-light);
  margin-bottom: 0.5rem;
}

.hero .tagline {
  font-size: 0.95rem;
  color: var(--gold);
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* ===== Card ===== */
.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  margin-bottom: 2rem;
  border: 1px solid var(--border);
}

.card-title {
  font-size: 1.4rem;
  color: var(--primary-dark);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

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

.form-group label {
  display: block;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

input[type="date"],
input[type="text"],
input[type="number"],
select {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 2px solid var(--border);
  border-radius: 10px;
  font-size: 1rem;
  font-family: inherit;
  color: var(--text);
  background: white;
  transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus, select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(196, 30, 58, 0.1);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s;
  font-family: inherit;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(196, 30, 58, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(196, 30, 58, 0.4);
}

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

.btn-secondary {
  background: white;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-secondary:hover {
  background: rgba(196, 30, 58, 0.05);
}

/* ===== Result ===== */
.result {
  display: none;
  margin-top: 1.5rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, #fef5f5 0%, #fff9f0 100%);
  border-radius: 12px;
  border: 1px solid #f5d5d5;
  animation: fadeIn 0.5s ease;
}

.result.show {
  display: block;
}

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

.result-emoji {
  font-size: 4rem;
  text-align: center;
  margin-bottom: 0.75rem;
}

.result-name {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary-dark);
  text-align: center;
  margin-bottom: 1rem;
}

.result-detail {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}

.detail-item {
  text-align: center;
  padding: 1rem;
  background: white;
  border-radius: 10px;
}

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

.detail-value {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
}

.traits {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 0.75rem;
}

.trait-tag {
  padding: 0.35rem 0.875rem;
  background: var(--gold-light);
  color: #7a5a30;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
}

/* ===== Zodiac Grid ===== */
.zodiac-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.zodiac-item {
  background: white;
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem 0.75rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  color: inherit;
  display: block;
}

.zodiac-item:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.zodiac-item .emoji {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.zodiac-item .name {
  font-weight: 600;
  color: var(--text);
  font-size: 0.95rem;
}

.zodiac-item .year-range {
  font-size: 0.8rem;
  color: var(--text-light);
  margin-top: 0.25rem;
}

/* ===== Compatibility ===== */
.compat-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin: 1.5rem 0;
  flex-wrap: wrap;
}

.compat-zodiac {
  text-align: center;
  flex: 1;
  min-width: 100px;
}

.compat-zodiac .emoji {
  font-size: 3rem;
  margin-bottom: 0.5rem;
}

.compat-zodiac .name {
  font-weight: 600;
  font-size: 1rem;
}

.compat-score {
  text-align: center;
  flex: 1;
  min-width: 120px;
}

.compat-number {
  font-size: 3rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.compat-level {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--primary-dark);
}

.compat-bar {
  height: 10px;
  background: var(--border);
  border-radius: 5px;
  margin: 0.75rem 0;
  overflow: hidden;
}

.compat-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--gold));
  border-radius: 5px;
  transition: width 1s ease;
}

/* ===== Countdown ===== */
.countdown-big {
  text-align: center;
  padding: 2rem;
}

.countdown-number {
  font-size: 5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.countdown-label {
  font-size: 1.2rem;
  color: var(--text-light);
  margin-bottom: 1rem;
}

.countdown-zodiac {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  font-size: 1.2rem;
  color: var(--primary-dark);
  font-weight: 600;
}

.countdown-zodiac .emoji {
  font-size: 2rem;
}

/* ===== Tools Grid ===== */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
  margin: 1.5rem 0;
}

.tool-card {
  background: white;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-decoration: none;
  color: inherit;
  transition: all 0.25s;
  display: block;
}

.tool-card:hover {
  border-color: var(--primary);
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.tool-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}

.tool-card h3 {
  font-size: 1.15rem;
  color: var(--primary-dark);
  margin-bottom: 0.5rem;
}

.tool-card p {
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.5;
}

/* ===== Footer ===== */
footer {
  background: #2c1810;
  color: rgba(255,255,255,0.7);
  padding: 2.5rem 0 1.5rem;
  margin-top: 3rem;
}

footer .container {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
}

footer h4 {
  color: white;
  margin-bottom: 1rem;
  font-size: 1rem;
}

footer a {
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  transition: color 0.2s;
}

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

.footer-bottom {
  text-align: center;
  padding-top: 1.5rem;
  margin-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.85rem;
}

/* ===== Ad Slots ===== */
.ad-slot {
  margin: 2rem 0;
  text-align: center;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ad-placeholder {
  color: var(--text-light);
  font-size: 0.85rem;
  opacity: 0.6;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  nav ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--primary-dark);
    flex-direction: column;
    padding: 1rem 1.5rem;
    gap: 0;
  }
  
  nav ul.show {
    display: flex;
  }
  
  nav ul li {
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }
  
  nav ul li:last-child {
    border-bottom: none;
  }
  
  .menu-toggle {
    display: block;
  }
  
  .hero h1 {
    font-size: 1.8rem;
  }
  
  .hero .subtitle {
    font-size: 1rem;
  }
  
  .card {
    padding: 1.25rem;
  }
  
  .countdown-number {
    font-size: 3.5rem;
  }
  
  .result-emoji {
    font-size: 3rem;
  }
  
  .result-name {
    font-size: 1.4rem;
  }
  
  footer .container {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .zodiac-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 0.75rem;
  }
  
  .zodiac-item {
    padding: 1rem 0.5rem;
  }
  
  .zodiac-item .emoji {
    font-size: 2rem;
  }
}
