/* Dashboard Styles */
.dashboard-container {
  min-height: 100vh;
  background: var(--color-cream);
}

.main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-6) var(--space-6);
}

.greeting {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  font-weight: 600;
  color: var(--color-charcoal);
  white-space: nowrap;
}


.recent-stories-section {
  margin-top: var(--space-10);
  padding: 0 var(--space-6);
}

.recent-stories-section .section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-6);
}

.recent-stories-section .section-title {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  color: var(--color-charcoal);
  margin: 0;
}

.recent-stories-section .view-all-link {
  font-size: var(--text-sm);
  color: var(--color-sage);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.recent-stories-section .view-all-link:hover {
  color: var(--color-charcoal);
}

.recent-stories-carousel {
  display: flex;
  overflow-x: auto;
  gap: var(--space-4);
  padding-bottom: var(--space-4); /* For scrollbar */
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Firefox */
}

.recent-stories-carousel::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

/* Recent Stories Grid - Dashboard */
#recentStoriesCarousel {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--space-6);
  padding: var(--space-1);
}

@media (max-width: 768px) {
  .main-content {
    padding: var(--space-4) var(--space-4);
  }
  
  .greeting {
    font-size: var(--text-mobile-hero);
    line-height: var(--leading-tight-mobile);
    margin-bottom: var(--space-6);
  }
  
  .recent-stories-section {
    margin-top: var(--space-8);
    padding: 0 var(--space-2);
  }
  
  .recent-stories-section .section-title {
    font-size: var(--text-xl);
    margin-bottom: var(--space-5);
  }
  
  #recentStoriesCarousel {
    grid-template-columns: 1fr;
    gap: var(--space-5);
  }
}



.card-background {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
}

.ocean-gradient {
  width: 100%;
  height: 100%;
  background-color: rgb(9, 11, 16);
  background-image: url('/static/images/dashboard-hero2.png');
  background-size: 120% auto;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
  filter: brightness(0.6);
}


@keyframes gradientShift {
  0% {
    filter: hue-rotate(0deg) saturate(1.1);
  }
  25% {
    filter: hue-rotate(15deg) saturate(1.2);
  }
  50% {
    filter: hue-rotate(10deg) saturate(1.15);
  }
  75% {
    filter: hue-rotate(-10deg) saturate(1.1);
  }
  100% {
    filter: hue-rotate(0deg) saturate(1.1);
  }
}

.hero-card {
  position: relative;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-2xl);
  overflow: hidden;
  box-shadow: 
    0 1px 3px rgba(0, 0, 0, 0.1),
    0 1px 2px rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
}

.hero-card:hover {
  box-shadow: 
    0 10px 25px rgba(0, 0, 0, 0.15),
    0 4px 10px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

.hero-card .card-content {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: var(--space-10);
  color: white;
}

.hero-section {
  flex: 1;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--space-8);
}

.hero-text {
  flex: 1;
  max-width: 400px;
  background: rgba(139, 69, 19, 0.3);
  backdrop-filter: blur(10px) saturate(1.2);
  padding: var(--space-6);
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255, 223, 77, 0.2);
  box-shadow: 0 8px 32px rgba(139, 69, 19, 0.15);
}

.hero-title {
  font-family: 'Playfair Display', serif;
  font-size: var(--text-4xl);
  font-weight: 600;
  margin-bottom: var(--space-3);
  line-height: 1.2;
  text-shadow: 
    2px 2px 4px rgba(0, 0, 0, 0.5),
    0 0 20px rgba(0, 0, 0, 0.3);
}

.hero-description {
  font-size: var(--text-lg);
  opacity: 0.9;
  font-weight: 300;
  line-height: 1.5;
  text-shadow: 
    1px 1px 3px rgba(0, 0, 0, 0.5),
    0 0 15px rgba(0, 0, 0, 0.3);
}

/* Story Orrery Component */
.story-orrery {
  display: flex;
  align-items: center;
  gap: var(--space-8);
}

.orrery-visual {
  position: relative;
  width: 200px;
  height: 200px;
  transition: transform 0.3s ease;
  cursor: pointer;
  animation: orreryBreathe 6s ease-in-out infinite;
  animation-delay: 0.5s;
  background: radial-gradient(circle at center, 
    rgba(255, 223, 77, 0.2) 0%, 
    rgba(255, 183, 77, 0.1) 40%, 
    transparent 100%);
  padding: var(--space-4);
  border-radius: 50%;
  filter: drop-shadow(0 0 20px rgba(255, 223, 77, 0.15));
}

.orrery-visual:hover {
  transform: scale(1.05);
}

.orrery-visual:hover .star-glow {
  animation: glowPulse 2s ease-in-out infinite;
}

.orrery-visual:hover .star-bright {
  animation: twinkle 3s ease-in-out infinite;
}

.orrery-constellation {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 20px rgba(102, 126, 234, 0.3));
}

.constellation-lines {
  opacity: 0.5;
  transition: opacity 0.3s ease;
}

.orrery-visual:hover .constellation-lines {
  opacity: 0.8;
}

.star-group {
  transition: all 0.3s ease;
}

.star-bright {
  filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.8));
}

.star-dim {
  transition: opacity 0.5s ease;
}

/* Removed star pulse animation */

@keyframes twinkle {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.6;
    transform: scale(0.8);
  }
}

@keyframes glowPulse {
  0%, 100% {
    opacity: 0.6;
  }
  50% {
    opacity: 0.9;
  }
}

/* Removed starPulse animation */

@keyframes orreryBreathe {
  0%, 100% {
    transform: translateY(0px) scale(1);
  }
  50% {
    transform: translateY(-3px) scale(1.02);
  }
}

/* Orrery Info Section */
.orrery-info {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  background: rgba(139, 69, 19, 0.25);
  backdrop-filter: blur(12px) saturate(1.2);
  padding: var(--space-5);
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255, 223, 77, 0.2);
  box-shadow: 0 8px 32px rgba(139, 69, 19, 0.15);
}

.orrery-count {
  font-family: var(--font-heading);
  font-size: clamp(3.5rem, 5vw, 4.5rem); /* Increased for better prominence */
  font-weight: 700;
  line-height: 1;
  color: white;
  text-shadow: 
    2px 2px 4px rgba(0, 0, 0, 0.7),
    0 0 30px rgba(0, 0, 0, 0.5),
    0 0 60px rgba(255, 255, 255, 0.1);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.orrery-count.unlimited {
  font-size: clamp(4rem, 6vw, 5.5rem); /* Even larger for unlimited */
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 20px rgba(102, 126, 234, 0.5));
}

.orrery-label {
  font-size: var(--text-lg);
  font-weight: 500;
  color: white;
  opacity: 0.95;
  letter-spacing: 0.5px;
  text-shadow: 
    1px 1px 3px rgba(0, 0, 0, 0.6),
    0 0 10px rgba(0, 0, 0, 0.4);
}

.orrery-context {
  font-size: var(--text-sm);
  color: white;
  opacity: 0.8;
  font-weight: 300;
  margin-top: var(--space-1);
  text-shadow: 
    1px 1px 3px rgba(0, 0, 0, 0.6),
    0 0 10px rgba(0, 0, 0, 0.4);
}

.orrery-cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-3);
  padding: var(--space-2) var(--space-4);
  background: rgba(139, 69, 19, 0.4);
  backdrop-filter: blur(12px) saturate(1.5);
  border: 1px solid rgba(255, 223, 77, 0.3);
  border-radius: var(--radius-full);
  color: white;
  font-size: var(--text-sm);
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s ease;
  letter-spacing: 0.5px;
  box-shadow: 
    0 4px 16px rgba(139, 69, 19, 0.2),
    inset 0 1px 0 rgba(255, 223, 77, 0.1);
}

.orrery-cta:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.orrery-cta.hidden {
  display: none;
  letter-spacing: 0.5px;
  transition: opacity 0.3s ease;
}

.hero-actions {
  display: flex;
  gap: var(--space-4);
  align-items: center;
}

/* Dashboard hero buttons with white text and outline */
.dashboard-container .hero-actions .btn-secondary {
  background: transparent;
  color: white;
  border-color: rgba(255, 255, 255, 0.7);
}

.dashboard-container .hero-actions .btn-secondary:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border-color: white;
  transform: translateY(-2px);
}

.primary-cta, .secondary-cta {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-6);
  border-radius: var(--radius-lg);
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
  font-size: var(--text-base);
}

.primary-cta {
  background: rgba(139, 69, 19, 0.4);
  backdrop-filter: blur(12px) saturate(1.2);
  color: white;
  border: 1px solid rgba(255, 223, 77, 0.4);
  box-shadow: 
    0 4px 12px rgba(139, 69, 19, 0.15),
    0 8px 24px rgba(255, 223, 77, 0.08);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.primary-cta:hover {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  transform: translateY(-2px);
  box-shadow: 
    0 8px 24px rgba(0, 0, 0, 0.15),
    0 16px 48px rgba(0, 0, 0, 0.1),
    0 0 0 2px rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
}

.primary-cta:active {
  transform: translateY(0);
  box-shadow: 
    0 1px 4px rgba(0, 0, 0, 0.1),
    0 2px 8px rgba(0, 0, 0, 0.08);
}

.secondary-cta {
  background: rgba(139, 69, 19, 0.3);
  color: white;
  backdrop-filter: blur(10px) saturate(1.2);
  border: 1px solid rgba(255, 223, 77, 0.25);
}

.secondary-cta:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

.cta-icon {
  font-size: var(--text-lg);
}

/* Override story-viewer.css gray text for dashboard hero buttons */
.hero-actions .cta-text,
.hero-actions .cta-icon {
  color: inherit;
}

/* Mobile responsive styles for Orrery */
@media (max-width: 768px) {
  .hero-card .card-content {
    padding: var(--space-6) var(--space-5);
  }
  
  .hero-section {
    flex-direction: column;
    gap: var(--space-6);
    align-items: center;
    text-align: center;
    margin-bottom: var(--space-6);
  }
  
  .hero-text {
    max-width: 100%;
    padding: var(--space-4);
  }
  
  .hero-title {
    font-size: var(--text-mobile-hero);
    line-height: var(--leading-tight-mobile);
  }
  
  .hero-description {
    font-size: var(--text-mobile-body);
    line-height: var(--leading-normal-mobile);
  }
  
  .story-orrery {
    flex-direction: column;
    gap: var(--space-5);
    text-align: center;
  }
  
  .orrery-visual {
    width: 140px;
    height: 140px;
  }
  
  .orrery-count {
    font-size: clamp(2.5rem, 8vw, 3.5rem);
  }
  
  .orrery-count.unlimited {
    font-size: clamp(3rem, 10vw, 4rem);
  }
  
  .orrery-label {
    font-size: var(--text-mobile-body);
    line-height: var(--leading-normal-mobile);
  }
  
  .orrery-context {
    font-size: var(--text-mobile-caption);
    line-height: var(--leading-relaxed-mobile);
  }
  
  .orrery-cta {
    margin: var(--space-4) auto 0;
    padding: var(--space-3) var(--space-5);
    min-height: 48px;
  }
  
  .hero-actions {
    flex-direction: column;
    width: 100%;
    gap: var(--space-3);
  }
  
  .primary-cta, 
  .secondary-cta {
    width: 100%;
    min-height: 56px;
    padding: var(--space-4) var(--space-6);
    font-size: var(--text-mobile-button);
    justify-content: center;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .orrery-constellation {
    filter: none;
  }
  
  .star-bright {
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 1));
  }
  
  .star-dim {
    opacity: 0.5;
  }
  
  .constellation-lines {
    stroke: rgba(255, 255, 255, 0.4);
    stroke-width: 2;
  }
  
  .orrery-count {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
  }
  
  .orrery-cta {
    background: rgba(255, 255, 255, 0.25);
    border: 2px solid rgba(255, 255, 255, 0.5);
  }
}
