/* Imports */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;800&family=Outfit:wght@300;400;500;600;700&display=swap');

/* Global Custom CSS Variables */
:root {
  --bg-deep-space: radial-gradient(circle at 50% 50%, #110935 0%, #060217 100%);
  --color-gold: #e2b755;
  --color-gold-glow: rgba(226, 183, 85, 0.4);
  --color-purple: #8e44ad;
  --color-nebula: #9b59b6;
  --color-cyan: #00e5ff;
  --color-cyan-glow: rgba(0, 229, 255, 0.3);
  --color-card-bg: rgba(15, 10, 36, 0.65);
  --color-text-primary: #f5f3f8;
  --color-text-secondary: #c5bfe2;
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
  --font-title: 'Cinzel', Georgia, serif;
  --font-body: 'Outfit', sans-serif;
  --transition-smooth: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* Base Styles & Resets */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  background: var(--bg-deep-space);
  background-color: #060217;
  color: var(--color-text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  line-height: 1.6;
}

/* Background Particle Canvas */
#starfield {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

/* Nebula decorative glows */
.nebula-glow-1 {
  position: fixed;
  top: -10%;
  right: -10%;
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, rgba(142, 68, 173, 0.15) 0%, rgba(0, 0, 0, 0) 70%);
  z-index: -2;
  pointer-events: none;
  filter: blur(80px);
}

.nebula-glow-2 {
  position: fixed;
  bottom: -10%;
  left: -10%;
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, rgba(0, 229, 255, 0.1) 0%, rgba(0, 0, 0, 0) 70%);
  z-index: -2;
  pointer-events: none;
  filter: blur(80px);
}

/* Main Container Layout */
.app-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
  position: relative;
  z-index: 1;
}

/* Header Styles */
header {
  text-align: center;
  margin-bottom: 3.5rem;
  animation: fadeInDown 1s ease-out;
}

header h1 {
  font-family: var(--font-title);
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  background: linear-gradient(135deg, #ffffff 30%, var(--color-gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.5rem;
  text-shadow: 0 0 30px rgba(226, 183, 85, 0.2);
}

header p {
  font-size: 1.1rem;
  color: var(--color-text-secondary);
  font-weight: 300;
  letter-spacing: 0.05em;
}

.decor-line {
  width: 150px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--color-gold), transparent);
  margin: 1.2rem auto;
  position: relative;
}

.decor-line::after {
  content: '✦';
  color: var(--color-gold);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: #0c0827;
  padding: 0 0.5rem;
  font-size: 0.8rem;
}

/* Grid & Glass Card Base */
.glass-panel {
  background: var(--color-card-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  box-shadow: var(--glass-shadow);
  padding: 2rem;
  transition: var(--transition-smooth);
}

/* Sign Selector Grid */
.zodiac-section {
  margin-bottom: 3rem;
}

.section-title {
  font-family: var(--font-title);
  font-size: 1.5rem;
  color: var(--color-gold);
  margin-bottom: 1.5rem;
  text-align: center;
  letter-spacing: 0.1em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.zodiac-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 1.2rem;
}

.zodiac-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1rem;
  cursor: pointer;
  background: rgba(20, 15, 45, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.zodiac-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at top right, rgba(226, 183, 85, 0.1), transparent 70%);
  opacity: 0;
  transition: var(--transition-smooth);
}

.zodiac-card:hover {
  transform: translateY(-5px);
  border-color: rgba(226, 183, 85, 0.4);
  box-shadow: 0 10px 25px rgba(226, 183, 85, 0.15);
  background: rgba(30, 20, 60, 0.7);
}

.zodiac-card.active {
  background: rgba(40, 25, 80, 0.85);
  border-color: var(--color-gold);
  box-shadow: 0 0 20px var(--color-gold-glow);
}

.zodiac-card.active::before {
  opacity: 1;
}

.zodiac-icon-wrapper {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.8rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 2rem;
  color: var(--color-text-secondary);
  transition: var(--transition-smooth);
}

.zodiac-card:hover .zodiac-icon-wrapper {
  color: var(--color-gold);
  border-color: rgba(226, 183, 85, 0.3);
  transform: scale(1.1);
  background: rgba(226, 183, 85, 0.05);
}

.zodiac-card.active .zodiac-icon-wrapper {
  color: var(--color-gold);
  border-color: var(--color-gold);
  background: rgba(226, 183, 85, 0.1);
  box-shadow: inset 0 0 10px rgba(226, 183, 85, 0.2);
}

.zodiac-card h3 {
  font-family: var(--font-title);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
  color: var(--color-text-primary);
  letter-spacing: 0.05em;
}

.zodiac-card span {
  font-size: 0.75rem;
  color: var(--color-text-secondary);
}

/* Horoscope Result Area */
.dashboard-container {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  margin-top: 2rem;
  opacity: 0;
  transform: translateY(20px);
  transition: var(--transition-smooth);
}

.dashboard-container.visible {
  opacity: 1;
  transform: translateY(0);
}

.main-report {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Header within report */
.report-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 1.2rem;
}

.selected-info {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.selected-icon {
  font-size: 3rem;
  color: var(--color-gold);
  background: rgba(226, 183, 85, 0.08);
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-gold);
  box-shadow: 0 0 15px var(--color-gold-glow);
}

.selected-name h2 {
  font-family: var(--font-title);
  font-size: 1.8rem;
  color: #fff;
  margin-bottom: 0.1rem;
}

.selected-name span {
  color: var(--color-text-secondary);
  font-size: 0.9rem;
}

/* Date Selector Controls */
.date-selector {
  display: flex;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 30px;
  padding: 0.3rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.date-btn {
  background: transparent;
  border: none;
  color: var(--color-text-secondary);
  padding: 0.5rem 1.2rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  cursor: pointer;
  border-radius: 20px;
  transition: var(--transition-smooth);
}

.date-btn:hover {
  color: #fff;
}

.date-btn.active {
  background: linear-gradient(135deg, var(--color-gold), #b89033);
  color: #0c0827;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(226, 183, 85, 0.3);
}

.custom-date-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: 0.5rem;
  position: relative;
}

.custom-date-input {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--color-text-primary);
  font-family: var(--font-body);
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  font-size: 0.85rem;
  cursor: pointer;
  outline: none;
  transition: var(--transition-smooth);
}

.custom-date-input::-webkit-calendar-picker-indicator {
  filter: invert(0.9) sepia(0.5) saturate(3) hue-rotate(330deg);
  cursor: pointer;
}

.custom-date-input:focus, .custom-date-input:hover {
  border-color: var(--color-gold);
  background: rgba(255, 255, 255, 0.1);
}

/* Horoscope Rating Breakdown */
.scores-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.score-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  padding: 1.2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.score-icon {
  font-size: 1.8rem;
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.03);
}

.score-card.overall .score-icon { color: var(--color-gold); background: rgba(226, 183, 85, 0.05); border: 1px solid rgba(226, 183, 85, 0.2); }
.score-card.love .score-icon { color: #ff4a7d; background: rgba(255, 74, 125, 0.05); border: 1px solid rgba(255, 74, 125, 0.2); }
.score-card.work .score-icon { color: var(--color-cyan); background: rgba(0, 229, 255, 0.05); border: 1px solid rgba(0, 229, 255, 0.2); }
.score-card.money .score-icon { color: #2ecc71; background: rgba(46, 204, 113, 0.05); border: 1px solid rgba(46, 204, 113, 0.2); }

.score-details {
  flex-grow: 1;
}

.score-details h4 {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  margin-bottom: 0.3rem;
  display: flex;
  justify-content: space-between;
}

.score-value-text {
  font-weight: 600;
  color: var(--color-text-primary);
}

.stars-container {
  display: flex;
  gap: 2px;
  color: #ffa800;
  font-size: 1rem;
}

.progress-bar-container {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  border-radius: 3px;
  width: 0;
  transition: width 1s cubic-bezier(0.1, 0.8, 0.2, 1);
}

.score-card.overall .progress-bar { background: linear-gradient(90deg, #d4af37, #ffe27a); }
.score-card.love .progress-bar { background: linear-gradient(90deg, #ff4a7d, #ff8da1); }
.score-card.work .progress-bar { background: linear-gradient(90deg, #00e5ff, #82f6ff); }
.score-card.money .progress-bar { background: linear-gradient(90deg, #2ecc71, #a3f4b8); }

/* Detailed Text Advice */
.advice-section {
  margin-top: 0.5rem;
}

.advice-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
}

.advice-card::before {
  content: '“';
  position: absolute;
  top: -10px;
  left: 10px;
  font-family: var(--font-title);
  font-size: 5rem;
  color: rgba(255, 255, 255, 0.03);
  line-height: 1;
}

.advice-card h4 {
  font-family: var(--font-title);
  color: var(--color-gold);
  font-size: 1.1rem;
  margin-bottom: 0.8rem;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.advice-text {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--color-text-primary);
  text-align: justify;
}

/* Sidebar: Lucky Elements */
.sidebar-panel {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.sidebar-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 16px;
  padding: 1.5rem;
}

.sidebar-card h3 {
  font-family: var(--font-title);
  font-size: 1.1rem;
  color: var(--color-gold);
  margin-bottom: 1.2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 0.6rem;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.lucky-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.lucky-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
}

.lucky-label {
  color: var(--color-text-secondary);
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.lucky-value {
  font-weight: 600;
  color: var(--color-text-primary);
}

.lucky-color-dot {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  vertical-align: middle;
  margin-right: 0.4rem;
}

/* Daily Tarot/Card Draw widget */
.tarot-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.card-container {
  perspective: 1000px;
  width: 140px;
  height: 220px;
  margin: 1.5rem auto;
  cursor: pointer;
}

.tarot-card {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.card-container:hover .tarot-card {
  transform: translateY(-8px) rotateY(10deg);
}

.tarot-card.flipped {
  transform: rotateY(180deg);
}

.tarot-card-face {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 12px;
  border: 2px solid var(--color-gold);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

/* Card Back Design */
.tarot-card-back {
  background: radial-gradient(circle, #241349 20%, #0d061f 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-back-pattern {
  width: 85%;
  height: 90%;
  border: 1px solid rgba(226, 183, 85, 0.3);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.card-back-pattern::before {
  content: '✦';
  font-size: 2.2rem;
  color: var(--color-gold);
  text-shadow: 0 0 10px var(--color-gold);
  animation: pulseStar 3s infinite ease-in-out;
}

.card-back-pattern::after {
  content: '';
  position: absolute;
  width: 70%;
  height: 80%;
  border: 1px dashed rgba(226, 183, 85, 0.15);
  border-radius: 6px;
}

/* Card Front Design */
.tarot-card-front {
  background: linear-gradient(135deg, #180d38 0%, #080315 100%);
  transform: rotateY(180deg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-around;
  padding: 1rem;
}

.tarot-card-symbol {
  font-size: 2rem;
  color: var(--color-gold);
  text-shadow: 0 0 10px rgba(226, 183, 85, 0.4);
}

.tarot-card-title {
  font-family: var(--font-title);
  font-size: 0.95rem;
  color: var(--color-text-primary);
  border-bottom: 1px solid rgba(226, 183, 85, 0.3);
  width: 80%;
  text-align: center;
  padding-bottom: 0.3rem;
  letter-spacing: 0.1em;
}

.tarot-card-advice {
  font-size: 0.75rem;
  color: var(--color-text-secondary);
  line-height: 1.4;
  text-align: center;
}

.tarot-instruction {
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  margin-top: 0.5rem;
}

.tarot-btn-reset {
  background: transparent;
  border: 1px solid rgba(226, 183, 85, 0.4);
  color: var(--color-gold);
  padding: 0.4rem 1rem;
  font-size: 0.8rem;
  border-radius: 20px;
  cursor: pointer;
  margin-top: 0.8rem;
  font-family: var(--font-body);
  transition: var(--transition-smooth);
  opacity: 0;
  pointer-events: none;
}

.tarot-btn-reset.visible {
  opacity: 1;
  pointer-events: auto;
}

.tarot-btn-reset:hover {
  background: rgba(226, 183, 85, 0.1);
  border-color: var(--color-gold);
  box-shadow: 0 0 10px rgba(226, 183, 85, 0.2);
}

/* Footer Section */
footer {
  text-align: center;
  margin-top: 4rem;
  color: var(--color-text-secondary);
  font-size: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 2rem;
  letter-spacing: 0.05em;
}

footer p {
  margin-bottom: 0.5rem;
}

/* Custom Prompt Banner when no sign selected */
.welcome-banner {
  text-align: center;
  padding: 3.5rem 2rem;
}

.welcome-banner .icon {
  font-size: 3.5rem;
  color: var(--color-gold);
  margin-bottom: 1rem;
  animation: floatIcon 4s infinite ease-in-out;
}

.welcome-banner h3 {
  font-family: var(--font-title);
  font-size: 1.4rem;
  color: var(--color-gold);
  margin-bottom: 0.5rem;
  letter-spacing: 0.05em;
}

.welcome-banner p {
  color: var(--color-text-secondary);
  font-size: 1rem;
  max-width: 400px;
  margin: 0 auto;
}

/* Keyframe Animations */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes floatIcon {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-10px) rotate(5deg);
  }
}

@keyframes pulseStar {
  0%, 100% {
    opacity: 0.4;
    transform: scale(0.9);
  }
  50% {
    opacity: 1;
    transform: scale(1.1);
  }
}

/* Media Queries for Responsiveness */
@media (max-width: 900px) {
  .dashboard-container {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  header h1 {
    font-size: 2rem;
  }
  
  .zodiac-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.8rem;
  }
  
  .zodiac-card {
    padding: 1rem 0.5rem;
  }
  
  .zodiac-icon-wrapper {
    width: 45px;
    height: 45px;
    font-size: 1.5rem;
  }
  
  .scores-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .report-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .date-selector {
    width: 100%;
    justify-content: space-around;
  }
}

@media (max-width: 400px) {
  .zodiac-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
