/* ===== COSMIC HOROSCOPE STYLES ===== */
:root {
  --bg: #0b0521;
  --card-bg: #30106c;
  --card-glass: rgba(115, 90, 195, 0.3);
  --card-glass-inactive: rgba(46, 31, 94, 0.3);
  --gold: #ffd792;
  --gold-dark: #493511;
  --btn: #f1c482;
  --purple: #735ac3;
  --text-src: #9c89da;
  --white: #fff;
  --r: 16px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Montserrat', sans-serif;
  background: var(--bg);
  background-image:
    radial-gradient(ellipse at 20% 50%, rgba(48, 16, 108, 0.6) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(60, 30, 120, 0.4) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 80%, rgba(30, 10, 80, 0.5) 0%, transparent 60%);
  color: var(--white);
  min-height: 100vh;
  overflow-x: hidden;
  padding-bottom: 70px;
}

/* Stars canvas */
#stars {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* Container */
.container {
  position: relative;
  z-index: 1;
  max-width: 880px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== ADS ===== */
.ad-desktop { display: block; text-align: center; }
.ad-mobile { display: none; text-align: center; }
@media (max-width: 767px) { .ad-desktop { display: none; } .ad-mobile { display: block; } }
.ad-center { max-width: 880px; margin: 4px auto; }
.sticky-bottom {
  position: fixed; bottom: 0; left: 0; width: 100%; z-index: 9999;
  text-align: center; background: rgba(11, 5, 33, 0.95);
  backdrop-filter: blur(8px);
  border-top: 1px solid rgba(115, 90, 195, 0.2);
}

/* Fullscreen ad */
#fs-ad {
  display: none; position: fixed; inset: 0; z-index: 99999;
  background: rgba(0,0,0,0.88); align-items: center; justify-content: center;
}
.fs-inner { position: relative; }
.fs-close {
  position: absolute; top: -48px; right: 0;
  background: none; border: none; color: var(--gold); font-size: 36px; cursor: pointer;
  transition: transform 0.2s;
}
.fs-close:hover { transform: scale(1.2); }

/* ===== HERO (INDEX) ===== */
.hero {
  text-align: center;
  padding: 28px 0 28px;
  position: relative;
}
.zodiac-circle {
  position: absolute;
  width: 600px; height: 600px;
  top: -200px; left: 50%; transform: translateX(-50%);
  border-radius: 50%;
  border: 1px solid rgba(115, 90, 195, 0.12);
  opacity: 0.15;
  animation: spin 120s linear infinite;
}
@keyframes spin { to { transform: translateX(-50%) rotate(360deg); } }

.hero-title {
  font-weight: 800; font-size: 42px;
  letter-spacing: 4px; text-transform: uppercase;
  color: var(--gold);
  text-shadow: 0 0 60px rgba(255, 215, 146, 0.3);
  animation: fadeDown 0.6s ease;
}
.hero-sub {
  font-weight: 400; font-size: 16px; color: var(--gold);
  margin-top: 8px; opacity: 0.8;
  animation: fadeDown 0.6s ease 0.1s both;
}
.hero-date {
  font-size: 13px; color: var(--text-src); margin-top: 12px;
  animation: fadeDown 0.6s ease 0.2s both;
}

@keyframes fadeDown { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: translateY(0); } }

/* ===== ZODIAC GRID ===== */
.zodiac-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  padding-bottom: 32px;
}

.zodiac-card {
  position: relative;
  background: var(--card-glass);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--r);
  padding: 20px 12px 16px;
  text-align: center;
  text-decoration: none;
  display: flex; flex-direction: column; align-items: center;
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s;
  opacity: 0;
  animation: cardIn 0.5s ease forwards;
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(24px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.card-glow {
  position: absolute; top: -40%; left: -40%;
  width: 180%; height: 180%;
  background: radial-gradient(circle, rgba(115, 90, 195, 0.15) 0%, transparent 70%);
  opacity: 0; transition: opacity 0.4s;
  pointer-events: none;
}
.zodiac-card:hover .card-glow { opacity: 1; }
.zodiac-card:hover {
  transform: translateY(-6px) scale(1.03);
  box-shadow: 0 12px 40px rgba(115, 90, 195, 0.4);
  border-color: var(--gold);
}

.card-icon {
  width: 110px; height: 110px;
  margin-bottom: 10px;
  display: flex; align-items: center; justify-content: center;
  filter: drop-shadow(0 4px 16px rgba(212, 163, 74, 0.35));
  transition: transform 0.3s;
}
.zodiac-card:hover .card-icon { transform: scale(1.12); }
.card-icon img { max-width: 100%; max-height: 100%; object-fit: contain; }

.card-name {
  font-weight: 700; font-size: 17px;
  letter-spacing: 3px; text-transform: uppercase;
  color: var(--gold); margin-bottom: 4px;
}
.card-dates { font-weight: 400; font-size: 12px; color: var(--gold); opacity: 0.75; }

/* ===== SIGN DETAIL ===== */
.btn-back {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--card-glass); backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 30px; padding: 0 28px 0 18px; height: 50px;
  color: var(--gold); font-weight: 700; font-size: 14px;
  letter-spacing: 1.4px; text-transform: uppercase;
  text-decoration: none;
  transition: background 0.2s, transform 0.2s;
  margin-top: 24px;
}
.btn-back:hover { background: rgba(115,90,195,0.5); transform: translateX(-2px); }
.btn-back svg { width: 14px; height: 14px; }

.sign-hero {
  text-align: center; padding: 24px 0 20px;
  animation: fadeDown 0.5s ease;
}
.sign-icon-large {
  width: 160px; height: 160px; margin: 0 auto 16px;
  display: flex; align-items: center; justify-content: center;
  filter: drop-shadow(0 8px 24px rgba(212, 163, 74, 0.35));
  animation: float 6s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
.sign-icon-large img { max-width: 100%; max-height: 100%; object-fit: contain; }

.sign-name {
  font-weight: 800; font-size: 32px;
  letter-spacing: 5px; text-transform: uppercase;
  color: var(--gold);
  text-shadow: 0 0 40px rgba(255, 215, 146, 0.25);
}
.sign-dates { font-weight: 400; font-size: 16px; color: var(--gold); margin-top: 4px; opacity: 0.8; }

/* ===== PERIOD TABS ===== */
.period-tabs {
  display: flex; gap: 0; margin-bottom: 0;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.period-tabs::-webkit-scrollbar { display: none; }

.period-tab {
  flex-shrink: 0;
  padding: 14px 24px;
  font-family: inherit; font-size: 15px; font-weight: 400;
  color: var(--gold);
  background: var(--card-glass-inactive);
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255,255,255,0.12);
  border-bottom: none;
  border-radius: var(--r) var(--r) 0 0;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
  cursor: pointer;
  white-space: nowrap;
}
.period-tab:hover { background: rgba(80, 60, 160, 0.35); }
.period-tab.active {
  background: var(--card-glass);
  font-weight: 700;
  border-color: rgba(255,255,255,0.2);
}

/* ===== HOROSCOPE CARD ===== */
.horoscope-card {
  background: var(--card-glass);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 0 var(--r) var(--r) var(--r);
  padding: 32px;
  margin-bottom: 24px;
  position: relative; overflow: hidden;
  animation: fadeUp 0.4s ease;
}
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }

.horoscope-card::before {
  content: '';
  position: absolute; top: 0; right: 0;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(115, 90, 195, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.horoscope-text {
  font-weight: 500; font-size: 15px; line-height: 1.75;
  color: var(--white); position: relative; z-index: 1;
}
.horoscope-text p { margin-bottom: 14px; }
.horoscope-text p:last-child { margin-bottom: 0; }
.horoscope-text h3 {
  font-size: 16px; font-weight: 700; color: var(--gold);
  margin: 20px 0 8px; letter-spacing: 0.5px;
}
.horoscope-text h3:first-child { margin-top: 0; }
.horoscope-text strong { color: var(--gold); font-weight: 700; }
.horoscope-date {
  margin-top: 16px; font-size: 12px; color: var(--text-src);
  position: relative; z-index: 1;
}

/* ===== ACTION BUTTONS ===== */
.share-row {
  display: flex; gap: 20px; justify-content: center;
  margin: 24px 0;
  flex-wrap: wrap;
}
.btn-gold {
  min-width: 220px; height: 50px;
  background: var(--btn); backdrop-filter: blur(5px);
  border: 1px solid var(--white); border-radius: 30px;
  font-family: inherit; font-weight: 700; font-size: 14px;
  letter-spacing: 1.4px; text-transform: uppercase;
  color: var(--gold-dark); cursor: pointer;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}
.btn-gold:hover {
  background: #e6b76e;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(241, 196, 130, 0.3);
}

/* ===== MINI NAV (other signs) ===== */
.signs-mini-nav {
  display: flex; gap: 8px; justify-content: center;
  padding: 20px 0 32px;
  flex-wrap: wrap;
}
.mini-sign {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: var(--card-glass-inactive);
  border: 1px solid rgba(255,255,255,0.08);
  transition: all 0.2s;
  overflow: hidden;
}
.mini-sign:hover, .mini-sign.active {
  background: var(--card-glass);
  border-color: var(--gold);
  transform: scale(1.1);
}
.mini-sign img { width: 30px; height: 30px; object-fit: contain; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .zodiac-grid { grid-template-columns: repeat(3, 1fr); gap: 14px; }
  .hero-title { font-size: 32px; letter-spacing: 2px; }
  .hero { padding: 40px 0 28px; }
  .card-icon { width: 90px; height: 90px; }
  .card-name { font-size: 14px; letter-spacing: 2px; }
  .sign-name { font-size: 26px; }
  .horoscope-card { padding: 24px 20px; }
  .period-tab { padding: 12px 16px; font-size: 13px; }
  .sign-icon-large { width: 120px; height: 120px; }
  .share-row { gap: 12px; }
  .btn-gold { min-width: 160px; height: 46px; font-size: 12px; }
}

@media (max-width: 480px) {
  .zodiac-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .card-icon { width: 72px; height: 72px; }
  .card-name { font-size: 12px; letter-spacing: 1.5px; }
  .card-dates { font-size: 10px; }
  .hero-title { font-size: 26px; }
  .hero-sub { font-size: 13px; }
  .container { padding: 0 12px; }
  .share-row { flex-direction: column; align-items: center; }
  .btn-gold { width: 100%; max-width: 280px; }
  .sign-name { font-size: 22px; letter-spacing: 3px; }
  .horoscope-text { font-size: 14px; }
}

/* ===== SEO TEXT ===== */
.seo-text {
  margin: 32px 0;
  padding: 28px 32px;
  background: rgba(30, 15, 70, 0.4);
  border-radius: var(--r);
  border: 1px solid rgba(115, 90, 195, 0.12);
}
.seo-text h2 {
  font-size: 20px; color: var(--gold);
  margin-bottom: 14px; font-weight: 700;
}
.seo-text p {
  font-size: 14px; line-height: 1.7;
  color: rgba(224, 218, 240, 0.8);
  margin-bottom: 10px;
}
.seo-text p:last-child { margin-bottom: 0; }
.seo-link {
  color: var(--btn); text-decoration: none;
  font-weight: 600; transition: color 0.2s;
}
.seo-link:hover { color: var(--gold); }
.section-title {
  font-size: 22px; color: var(--gold);
  margin: 24px 0 16px; font-weight: 700; text-align: center;
}

/* ===== COMPATIBILITY ===== */
.compat-selector {
  background: var(--card-glass);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--r);
  padding: 28px;
  margin-bottom: 28px;
  text-align: center;
}
.compat-label { color: var(--gold); font-size: 15px; margin-bottom: 16px; font-weight: 600; }
.compat-row {
  display: flex; align-items: center; justify-content: center;
  gap: 12px; flex-wrap: wrap;
}
.compat-select {
  padding: 12px 16px;
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(115,90,195,0.3);
  border-radius: 12px;
  color: var(--gold); font-size: 15px; font-family: inherit;
  cursor: pointer; min-width: 160px;
}
.compat-select:focus { outline: none; border-color: var(--gold); }
.compat-heart { font-size: 24px; }

.compat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
  margin-bottom: 28px;
}
.compat-card {
  background: var(--card-glass);
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 12px;
  text-decoration: none;
  display: flex; align-items: center; gap: 10px;
  transition: transform 0.2s, border-color 0.2s;
}
.compat-card:hover { transform: translateY(-2px); border-color: var(--gold); }
.compat-icons {
  display: flex; align-items: center; gap: 4px; flex-shrink: 0;
}
.compat-icons span { color: var(--text-src); font-size: 12px; }
.compat-icons img { border-radius: 50%; overflow: hidden; object-fit: cover; }
.compat-names { font-size: 13px; color: var(--gold); font-weight: 600; }

.compat-detail-hero { text-align: center; padding: 16px 0 24px; }
.compat-detail-icons {
  display: flex; align-items: center; justify-content: center; gap: 24px;
}
.compat-detail-sign {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.compat-detail-sign img { border-radius: 50%; overflow: hidden; object-fit: cover; }
.compat-detail-sign span { font-size: 16px; color: var(--gold); font-weight: 700; text-transform: uppercase; letter-spacing: 2px; }
.compat-detail-heart { font-size: 36px; }

@media (max-width: 480px) {
  .compat-grid { grid-template-columns: repeat(2, 1fr); }
  .compat-select { min-width: 120px; font-size: 13px; }
}
