/* === Global === */
html, body {
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', Arial, sans-serif;
  color: white;
  scroll-behavior: smooth;
  background: url('../images/home-bg.png') no-repeat center center fixed;
  background-size: cover;
  overflow-x: hidden;
}

/* === Cosmic Background Canvas === */
#cosmic-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
}

/* === Navbar === */
header {
  position: fixed;           /* keep navbar at top */
  top: 0;
  left: 0;
  width: 100%;
  padding: 0.8rem 2vw;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 10000;           /* very high to stay above everything */
  box-sizing: border-box;
}

.logo img {
  height: 90px;
  cursor: pointer;
  transition: transform 0.3s ease;
}
.logo img:hover { transform: scale(1.05); }

nav {
  display: flex;
  gap: 1.5rem;
}
nav a {
  text-decoration: none;
  color: #fff;
  font-weight: 500;
  position: relative;
}
nav a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 0;
  height: 2px;
  background: #fff;
  transition: width 0.3s ease;
}
nav a:hover::after { width: 100%; }

/* === Section Base === */
.section {
  position: relative;
  z-index: 1;
  padding: 8rem 5vw;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: transparent;
  box-sizing: border-box;
}

/* === Hero === */
.hero {
  height: 100vh;
  position: relative;
}
.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.hero h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 6rem;
  margin: 0;
  text-shadow: 0 0 20px black;
}
.hero-subtitle {
  font-family: 'Cormorant Garamond', serif;
  font-size: 3rem;
  opacity: 0.9;
  text-shadow: 0 0 10px black;
  font-style: italic;
}

.hero-content .quote {
  font-size: 1.5rem;  /* smaller text */
  max-width: 800px;
  margin: 1.5rem auto 2rem auto;
  line-height: 1.4;
  text-align: center;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-style: italic;
}


.explore-btn {
  margin-top: 2rem;
  padding: 0.6rem 2.5rem;
  background: white;
  color: black;
  border: none;
  border-radius: 30px;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.6rem;
  cursor: pointer;
  transition: all 0.3s ease;
}
.explore-btn:hover {
  background: black;
  color: white;
  transform: scale(1.05);
}

/* === Video Section === */
.video-section {
  padding-top: 10rem;
}
.quote {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  max-width: 900px;
  margin-bottom: 5rem;
  text-shadow: 0 0 10px black;
}
.video-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  max-width: 1200px;
  align-items: center;
  justify-items: center; /* centers grid items horizontally */
}
.video-left {
  border-radius: 50%;
  overflow: hidden;
  width: 650px;
  height: 650px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: auto;
}
.video-left video {
  width: 160%;
  height: 160%;
  object-fit: cover;
}

.video-circular {
	border-radius: 50%;
	overflow: hidden;
	width: 650px;
	height: 650px;
	display: flex;
	justify-content: center;
	align-items: center;
	margin: auto;
}

.video-circular video {
	width: 160%;
	height: 160%;
	object-fit: cover;
	border-radius: 50%;
}
	
	


/* === Description Section === */
.description-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 8rem 8rem;
  max-width: 1200px;
  margin: auto;
  align-items: center;
}

/* --- Override grid for the 3-image layout --- */
.first-description {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto auto;
  text-align: center;
  justify-items: center;
  width: 100vw;       /* 👈 full viewport width */
  max-width: none;    /* remove inherited 1200px limit */
  margin: 0;          /* remove centering */
  padding: 0 5vw;     /* optional: a bit of breathing room on sides */
  box-sizing: border-box;
  margin-bottom: 0rem;   /* 👈 Adds vertical space below the 3 images */

}

.first-description .image-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  flex-wrap: nowrap; /* keep all three in one line */
  margin-top: 0.1rem;
  height: 680px;  /* matches the row height */
  width: auto;    /* keeps their aspect ratio */
  object-fit: cover;
}

.description-center-block {
  width: 100%;
  text-align: center;
  margin: 1rem;  /* spacing top & bottom */
}

/* Button matches your hero "Skymap" button */
.description-center-block .center-button {
  padding: 0.7rem 2.5rem;
  background: white;
  color: black;
  border: none;
  border-radius: 30px;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.description-center-block .center-button:hover {
  background: black;
  color: white;
  transform: scale(1.05);
}

/* Add spacing before the second block */
.description-grid:not(.first-description) {
  margin-top: 16rem;   /* adjust this value if needed */
}

.first-description .description-right h2 {
  margin-bottom: 0.1rem; /* default is usually ~1.5rem */
}

.first-description .description-right p {
  margin-top: 0.1rem;
  margin-bottom: 0.1rem; /* tighten paragraph spacing */
}

.first-description {
  row-gap: 2rem; /* was 8rem */
}

.magnifier-container {
  position: relative;
  width: 33%;  /* Each image takes 1/3 of available space */
  min-width: 600px; /* keep them decently large */
  height: auto;
}



/* Lens styling (same as your previous single-lens setup) */
.magnifier-lens {
  display: none;
  position: absolute;
  border: 2px solid rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  overflow: hidden;
  width: 150px;
  height: 150px;
  pointer-events: none;
  z-index: 10;
}


.magnifier-container-cosmic {
  position: relative;
  display: inline-block;
  max-width: 1000px;
  max-height: 600px;
  margin: 0 auto;
}





.first-description .description-right {
  order: 1;                     /* text first */
  max-width: 1200px;
}

.first-description .description-left {
  order: 2;
  width: 100%;
  max-width: none; /* remove the 600px limit */
}

.description-left {
  position: relative;
  overflow: hidden;
  border-radius: 15px;
}
.description-left img {
  width: 100%;
  height: auto;
  display: block;
}


/* Centered image */
.hero-image {
  width: 80%;              /* responsive width */
  max-width: 800px;       /* do not exceed 1000px horizontally */
  max-height: 800px;      /* do not exceed 1000px vertically */
  height: auto;            /* keep aspect ratio */
  border-radius: 12px;
  margin-bottom: 2rem;
  box-shadow: 0 0 25px rgba(0,0,0,0.45);
}


/* Magnifier */
.magnifier-lens-cosmic {
  position: absolute;
  width: 200px;
  height: 200px;
  border: 3px solid #fff;
  border-radius: 50%;
  overflow: hidden;
  display: none;
  pointer-events: none;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 15px rgba(255,255,255,0.7);
}
.magnifier-lens-cosmic img {
  position: absolute;
  width: 800%;
  height: auto;
}

/* Image Hover */
.image-hover-container {
  position: relative;
}
.image-hover-container img {
  width: 100%;
  border-radius: 15px;
  transition: opacity 0.5s ease-in-out;
}
.hover-hover {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
}
.image-hover-container:hover .hover-hover { opacity: 1; }
.image-hover-container:hover .hover-base { opacity: 0; }




/* Text */
.description-right h2 {
  font-size: 2rem;
  text-shadow: 0 0 10px black;
  margin-bottom: 1rem;
}
.description-right p {
  font-size: 1.2rem;
  line-height: 1.6;
  text-shadow: 0 0 5px black;
}

.description-block {
  display: flex;
  flex-direction: column;   /* Stack text above image */
  align-items: center;      /* Center horizontally */
  text-align: center;
  margin: 80px auto;
  max-width: 800px;
}




/* === Other Sections === */
.about, .contact, .login {
  background: transparent;
}
.content-center {
  max-width: 800px;
  margin: auto;
}
.content-center h2 {
  font-size: 2.5rem;
  text-shadow: 0 0 10px black;
  margin-bottom: 1rem;
}
.content-center p {
  font-size: 1.2rem;
  line-height: 1.6;
  text-shadow: 0 0 5px black;
}

/* === Footer === */
footer {
  text-align: center;
  padding: 1rem;
  background: rgba(0,0,0,0.8);
  color: #aaa;
  font-size: 0.9rem;
}

/* === Responsive === */
@media (max-width: 900px) {
  .video-grid, .description-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .video-left {
    width: 250px;
    height: 250px;
  }
  .hero h1 { font-size: 4rem; }
  .hero-subtitle { font-size: 1.5rem;}
  .explore-btn { font-size: 1.2rem; }
  .magnifier-lens-cosmic {
    width: 100px;
    height: 100px;
  }
}




/* === Poster Viewer === */
.viewerWrapper {
  display:flex;
  justify-content:center;
  align-items:flex-start;
  position: relative;
  width:100%;
  max-width:1100px;
  padding:16px;
  box-sizing:border-box;
  margin-top:120px; /* leave space for navbar */
}

.container {
  position: relative;
  width:700px;
  border-radius:10px;
  box-shadow:0 12px 40px rgba(0,0,0,0.6);
  margin:0 auto;
}

.zoomWrapper {
  position: relative;
  display: inline-block;
  transition: transform 0.6s ease;
  transform-origin: center center;
}

.container img {
  width:100%;
  height:auto;
  display:block;
  user-select:none;
  cursor:pointer;
}

.overlaySvg {
  position:absolute;
  top:0; left:0;
  width:100%;
  height:100%;
  pointer-events:none;
  z-index:10;
  display:none;
}

.infoBox {
  width: 260px;
  max-height: 0;
  overflow: hidden;
  padding: 12px;
  pointer-events: auto;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 220ms, transform 220ms, max-height 0.3s ease, box-shadow 220ms, background 220ms;
  position: absolute;
  top: 20px;
  left: calc(50% + 350px + 20px);
  background: rgba(0,0,0,0.85);
  border: 2px solid white;
  border-radius: 8px;
  box-shadow: 0 0 20px rgba(255,255,255,0.6);
}

.infoBox.visible {
  opacity:1;
  transform:none;
  max-height:1000px;
}

.infoTitle { font-weight:600; margin:0 0 6px 0; font-size:14px; }
.infoText { margin:0; font-size:13px; line-height:1.3; }

h1 { margin:16px 0; font-size:20px; font-weight:600; text-align:center; }

/* Hover image hidden by default */
.hover-hover {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  pointer-events: none; /* <-- KEY: keeps magnifier working */
}


/* === DEMO PAGE ONLY STYLING === */
.demo-page .viewerWrapper {
  display: flex;
  justify-content: center !important;
  align-items: center !important;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  position: relative;
  padding-top: 0px; /* space for header */
}

.demo-page .container {
  width: 700px;
  margin: 0 auto !important;
  border-radius: 10px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.6);
}

.demo-page #home,
.demo-page .hero {
  display: block !important; /* override grid only on demo page */
}

/* Raise poster position on DEMO PAGE only */
.demo-page .viewerWrapper {
  margin-top: 80px !important; /* was ~120-150px before */
  padding-top: 0 !important;
}


/* ---------- GALLERY ---------- */

.gallery-section {
  padding: 80px 10%;
  text-align: center;
  color: white;
  position: relative;
  z-index: 3;
}

.gallery-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 3rem;
  margin-bottom: 40px;
}

/* Tabs */
.gallery-tabs {
  margin-bottom: 30px;
}

.tab-button {
  background: transparent;
  border: 1px solid white;
  padding: 10px 25px;
  margin: 0 8px;
  cursor: pointer;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.2rem;
  border-radius: 20px;
  transition: 0.3s;
  color: white;
}

.tab-button.active,
.tab-button:hover {
  background: white;
  color: black;
}

/* Grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.gallery-grid img,
.gallery-grid video {
  width: 100%;
  height: auto;
  border-radius: 10px;
  transition: transform 0.3s ease;
}

/* Hover zoom */
.gallery-grid img:hover,
.gallery-grid video:hover {
  transform: scale(1.05);
}

/* Hide inactive tabs */
.tab-content {
  display: none;
}
.tab-content.active {
  display: block;
}


/* Spacing so the page scrolls */
#more-images {
  margin-top: 60px;
  padding-bottom: 60px; /* ensures scroll space */
}

/* Center + layout images */
.extra-images {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 60px; /* space between the two images */
}

/* Image style */
.extra-images img {
  width: 60%;
  max-width: 800px;
  border-radius: 8px;
  box-shadow: 0 0 20px rgba(255,255,255,0.3);
}


.image-text-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    max-width: 1400px;
    margin: 0 auto;
}

.cosmic-text {
    width: 400px;
    height: 120px;
    padding: 1rem;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.4rem;
    line-height: 1.6;
    text-align: center;
    background: transparent;
    border: none;
    box-shadow: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.text-content {
    white-space: pre-line;
    display: inline;
}

.image-wrapper {
  position: relative;
  display: inline-block;
}

/* Hidden until shown */
.loader-overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.55);
  display: flex;
  justify-content: center;
  align-items: center;
  visibility: hidden;
}

/* Spinner visuals */
.spinner {
  width: 55px;
  height: 55px;
  border: 6px solid #ffffff;
  border-top: 6px solid transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* === Instant Magnifier Lens Styles (NO TRANSITIONS) === */
.magnifier-container {
  position: relative;
  display: inline-block;
  width: 33%;
  min-width: 600px;
  height: auto;
  overflow: hidden;
  border-radius: 1rem;
  /* NO TRANSITION */
}

/* Base and hover images positioning */
.magnifier-image {
  width: 100%;
  height: auto;
  border-radius: 1rem;
  cursor: none;
  display: block;
  /* NO TRANSITION */
}

/* Fix for hover images */
.magnifier-container .hover-base {
  position: relative;
  width: 100%;
  height: auto;
  /* NO TRANSITION */
}

.magnifier-container .hover-hover {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: auto;
  opacity: 0;
  pointer-events: none;
  /* NO TRANSITION */
}

/* Instant hover effects - NO TRANSITIONS */
.magnifier-container:hover .hover-hover {
  opacity: 1;
}

.magnifier-container:hover .hover-base {
  opacity: 0;
}

/* Remove any scaling effects */
.magnifier-container:hover {
  transform: none; /* Remove scaling */
}

.magnifier-container:hover .magnifier-image {
  transform: none; /* Remove scaling */
  box-shadow: none; /* Remove shadow changes */
}

/* === Instant Magnifier Lens === */
.magnifier-lens {
  position: absolute;
  width: 200px;
  height: 200px;
  border: 3px solid #fff;
  border-radius: 50%;
  overflow: hidden;
  display: none;
  pointer-events: none;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
  z-index: 1000;
  transform: translate(-50%, -50%);
  /* NO TRANSITION */
}

.magnifier-lens img {
  position: absolute;
  width: 800%;
  height: auto;
  transform-origin: 0 0;
  /* NO TRANSITION */
}

.magnifier-container-special .magnifier-image {
  width: 100%;         /* scale relative to container */
  height: auto;
  border-radius: 10px;
}

.magnifier-container-special .hover-hover {
  width: 100%;
  height: auto;
}

.magnifier-container-special .magnifier-lens {
  width: 250px;        /* independent lens size */
  height: 250px;
}

.magnifier-container-special {
  position: relative; /* ensures lens uses this as reference */
  width: 100%;
  max-width: 1500px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
}

.magnifier-container-special .magnifier-lens {
  position: absolute;
  pointer-events: none;
  transform: translate(50%, 50%);
}

/* === SkyMap Special Image === */
.magnifier-container-special {
  width: auto;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 4rem;
}

.sky-map-img {
  width: 80%;      /* adjust this to resize */
  max-width: 900px;
  height: auto;
  object-fit: contain;
}

/* === Rectangular Second Video === */
.video-rectangular {
  border-radius: 0;
  overflow: visible;
  width: 100%;
  max-width: 650px;
  height: auto;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: auto;
}

.video-rectangular video {
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 0;
}


/* Basic tab styles */
    .tabs {
        display: flex;
        justify-content: center;
        margin-top: 15px;
        margin-bottom: 15px;
    }
    .tab {
        padding: 10px 20px;
        cursor: pointer;
        font-family: 'Cormorant Garamond', serif;
        font-size: 16px;
        background: rgba(255,255,255,0.12);
        margin: 0 3px;
        border-radius: 8px;
        color: white;
        transition: 0.2s ease;
    }
    .tab:hover {
        background: rgba(255,255,255,0.25);
    }
    .tab.active {
        background: rgba(255,255,255,0.3);
        font-weight: bold;
    }
    .tab-content {
        padding: 0;
        color: white;
        font-family: 'Cormorant Garamond', serif;
        display: none;
    }
    .tab-content.active {
        display: block;
    }
    .disabled {
        opacity: 0.4;
        pointer-events: none;
    }

    /* Daily Sky Map specific styles - LARGER IMAGE LAYOUT */
    .sky-map-container {
        display: grid;
        grid-template-columns: minmax(0, 1000px) 1fr; /* Use minmax to prevent overflow */
        gap: 30px;
        align-items: start;
        min-height: 800px;
        width: 100%;
        box-sizing: border-box;
        overflow-x: hidden; /* Prevent horizontal scroll on container */
    }
    .sky-map-image {
        text-align: center;
        width: 100%;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        overflow: hidden; /* No overflow in left column */
    }
    .image-container {
        width: 100%;
        height: 750px;
        position: relative;
        background: rgba(255,255,255,0.05);
        border-radius: 12px;
        border: 2px dashed rgba(255,255,255,0.1);
        display: flex;
        justify-content: center;
        align-items: center;
        overflow: hidden;
        box-sizing: border-box;
    }
    .sky-map-image img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        border-radius: 12px;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
        max-width: 100%; /* Ensure image doesn't overflow */
    }
    .sky-map-controls {
        display: flex;
        flex-direction: column;
        gap: 20px;
        height: 100%;
        min-width: 0; /* Allow controls to shrink */
        overflow: visible; /* Allow content to flow naturally */
    }
    .controls-row {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
        align-items: start;
    }
    .control-section {
        background: rgba(255, 255, 255, 0.08);
        padding: 20px;
        border-radius: 8px;
        border: 1px solid rgba(255, 255, 255, 0.1);
        height: fit-content;
        min-width: 0; /* Allow sections to shrink */
        overflow: visible;
    }
    .control-section h3 {
        margin-top: 0;
        margin-bottom: 15px;
        color: #fff;
        font-size: 1.3em;
        display: flex;
        align-items: center;
        gap: 8px;
    }
    .form-group {
        margin-bottom: 15px;
    }
    .form-group label {
        display: block;
        margin-bottom: 5px;
        color: rgba(255, 255, 255, 0.9);
        font-size: 0.9em;
    }
    .form-group input, .form-group select {
        width: 100%;
        padding: 10px;
        border: 1px solid rgba(255, 255, 255, 0.2);
        border-radius: 4px;
        background: rgba(255, 255, 255, 0.1);
        color: white;
        font-family: inherit;
        font-size: 0.9em;
        box-sizing: border-box;
    }
    .form-group input::placeholder {
        color: rgba(255, 255, 255, 0.6);
    }
    .form-group input:invalid {
        border-color: #ff6b6b;
        background: rgba(255, 107, 107, 0.1);
    }
    .form-group .error-message {
        color: #ff6b6b;
        font-size: 0.8em;
        margin-top: 5px;
        display: none;
    }
    .btn {
        background: linear-gradient(45deg, #667eea 0%, #764ba2 100%);
        color: white;
        border: none;
        padding: 10px 16px;
        border-radius: 6px;
        cursor: pointer;
        font-family: inherit;
        font-size: 14px;
        transition: all 0.3s ease;
        margin: 3px 0;
        width: 100%;
        box-sizing: border-box;
    }
    .btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    }
    .btn:disabled {
        opacity: 0.6;
        cursor: not-allowed;
        transform: none;
    }
    .btn-secondary {
        background: rgba(255, 255, 255, 0.2);
    }
	/* Replace the existing .location-info, .time-info styles with: */
	.location-info, .time-info {
		margin-top: 10px;
		padding: 8px;
		background: rgba(255, 255, 255, 0.05);
		border-radius: 4px;
		font-size: 0.8em;
		line-height: 1.4; /* Add line height for better readability */
		white-space: normal; /* Allow text to wrap */
		word-wrap: break-word; /* Break long words if needed */
	}
	
	/* Specific styling for the coordinates display */
	.location-info span, .time-info span {
		display: block; /* Make each coordinate display block */
		margin-top: 2px;
	}

	/* For the coordinates with city/country */
	.location-info strong, .time-info strong {
		display: block;
		margin-bottom: 4px;
		color: rgba(255, 255, 255, 0.9);
	}
    .hidden {
        display: none;
    }
    .loading {
        opacity: 0.7;
        pointer-events: none;
    }
    #generatedImage {
        transition: opacity 0.3s ease;
    }

    /* Remove background from image container when image is shown */
    .image-container.has-image {
        background: transparent !important;
        border: none !important;
    }

    /* Time inputs grid */
    .time-inputs-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        margin-bottom: 15px;
    }
    .time-inputs-grid .form-group {
        margin-bottom: 8px;
    }

    /* Generate button section */
    .generate-section {
        text-align: center;
        margin-top: 10px;
    }
    .generate-section .btn {
        width: auto;
        padding: 15px 30px;
        font-size: 16px;
    }

	/* Download Sky Chart Button - Matches other button styles */
	.download-section {
		margin-top: 15px;
		margin-bottom: 20px;
		text-align: center;
	}
	.download-section .btn {
		width: auto; /* Sizes to content */
		padding: 10px 16px; /* Same as other buttons */
		background: linear-gradient(45deg, #4CAF50 0%, #45a049 100%);
		font-size: 14px; /* Same as other buttons */
		display: inline-block;
		margin: 3px 0; /* Same as other buttons */
	}
    .download-section .btn:hover {
        background: linear-gradient(45deg, #45a049 0%, #4CAF50 100%);
    }

    /* Celestial Objects Styles */
    .celestial-objects-container {
        width: 100%; /* Changed from fixed 1000px */
        margin-top: 20px;
    }
    .celestial-objects-content {
        background: rgba(255,255,255,0.05);
        padding: 15px;
        border-radius: 8px;
        width: 100%;
        box-sizing: border-box;
        overflow: visible; /* No overflow */
    }
    .celestial-objects-content h3 {
        margin-top: 0;
        color: #fff;
        border-bottom: 1px solid rgba(255,255,255,0.2);
        padding-bottom: 8px;
        font-size: 1.1em;
    }
    .objects-text {
        color: rgba(255,255,255,0.9);
        line-height: 1.6;
        font-size: 0.95em;
        min-height: 80px;
        padding: 10px;
        background: rgba(0,0,0,0.2);
        border-radius: 4px;
        width: 100%;
        box-sizing: border-box;
        overflow-y: visible; /* No vertical scroll */
        overflow-x: hidden; /* No horizontal scroll */
        max-height: none;
        word-wrap: break-word; /* Handle long text */
        overflow-wrap: break-word;
    }

    /* Typewriter effect for celestial objects */
    .typewriter-paragraph {
        margin: 0;
        padding: 0;
        white-space: normal;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    .typewriter-text {
        display: inline;
    }
    .typewriter-cursor {
        display: inline-block;
        width: 2px;
        background-color: #87ceeb;
        animation: blink-caret 0.75s step-end infinite;
        margin-left: 2px;
    }
    @keyframes blink-caret {
        from, to { opacity: 0 }
        50% { opacity: 1 }
    }
    .empty-message {
        color: rgba(255, 255, 255, 0.6);
        font-style: italic;
        font-size: 0.9em;
        text-align: center;
        padding: 20px;
    }

    /* Image placeholder styling */
    #imagePlaceholder {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        background: rgba(255,255,255,0.05);
        border-radius: 12px;
        z-index: 2;
    }

    /* Compact header and title styling */
    .page-header {
        text-align: center;
        padding: 20px 0 10px 0;
    }
    .page-title {
        color: white;
        font-size: 32px;
        margin-bottom: 5px;
    }
    section.hero {
        padding-top: 200px !important;
    }
    section.hero .page-header .page-title {
        font-size: 24px;
    }
    .token-info {
        color: white;
        font-size: 16px;
        margin-bottom: 10px;
    }

    /* Music Player Styles */
    .music-player {
        margin-top: 10px;
    }

    .music-controls {
        display: flex;
        gap: 10px;
        align-items: center;
        margin-top: 10px;
    }

    #celestialAudio {
        border-radius: 6px;
        background: rgba(255,255,255,0.1);
        width: 100%;
        margin-bottom: 10px;
    }

    /* Music metadata styling */
    .music-metadata-item {
        margin: 5px 0;
        font-size: 0.9em;
        color: rgba(255,255,255,0.9);
    }

    .music-metadata-label {
        font-weight: bold;
        color: #87ceeb;
    }

    /* Results container - NO SCROLLING */
    .results-container {
        overflow: hidden; /* Remove all scrolling from left column */
        width: 100%;
        box-sizing: border-box;
    }

    /* MAIN FIX: Prevent any scrolling in the left column */
    .sky-map-image,
    .results-container,
    .celestial-objects-container,
    .celestial-objects-content,
    .objects-text {
        overflow: visible !important; /* Override any overflow settings */
        overflow-x: hidden !important; /* Specifically hide horizontal scroll */
    }

    /* NEW: Circular Progress Tracker Styles */
    .circular-progress-container {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        z-index: 10;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    .circular-progress {
        width: 80px;
        height: 80px;
        position: relative;
    }

    .circular-progress-background {
        width: 100%;
        height: 100%;
        border-radius: 50%;
        background: rgba(0, 0, 0, 0.5);
        position: relative;
    }

    .circular-progress-fill {
        width: 100%;
        height: 100%;
        border-radius: 50%;
        position: absolute;
        top: 0;
        left: 0;
        background: conic-gradient(
            rgba(102, 126, 234, 0.9) 0%,
            rgba(118, 75, 162, 0.9) 100%
        );
        mask: radial-gradient(transparent 60%, black 61%);
        -webkit-mask: radial-gradient(transparent 60%, black 61%);
        transition: transform 0.3s ease;
        transform: rotate(0deg);
    }

    .circular-progress-inner {
        width: 60px;
        height: 60px;
        border-radius: 50%;
        background: rgba(0, 0, 0, 0.8);
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .circular-progress-text {
        color: white;
        font-size: 14px;
        font-weight: bold;
        font-family: 'Cormorant Garamond', serif;
    }

    .circular-progress-message {
        margin-top: 10px;
        color: white;
        font-size: 14px;
        text-align: center;
        max-width: 200px;
        font-family: 'Cormorant Garamond', serif;
    }

    /* NEW: In-page Confirmation Message Styles */
    .confirmation-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.8);
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 1000;
        backdrop-filter: blur(5px);
    }

    .confirmation-box {
        background: linear-gradient(135deg, rgba(30, 30, 60, 0.95), rgba(20, 20, 40, 0.95));
        border-radius: 12px;
        padding: 30px;
        max-width: 500px;
        width: 90%;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
        border: 1px solid rgba(102, 126, 234, 0.3);
    }

    .confirmation-header {
        text-align: center;
        margin-bottom: 20px;
    }

    .confirmation-icon {
        font-size: 40px;
        margin-bottom: 10px;
        display: block;
    }

    .confirmation-title {
        color: white;
        font-size: 24px;
        margin-bottom: 5px;
        font-family: 'Cormorant Garamond', serif;
    }

    .confirmation-subtitle {
        color: rgba(255, 255, 255, 0.7);
        font-size: 16px;
        margin-bottom: 20px;
    }

    .confirmation-details {
        background: rgba(255, 255, 255, 0.05);
        border-radius: 8px;
        padding: 15px;
        margin-bottom: 25px;
    }

    .confirmation-detail-row {
        display: flex;
        justify-content: space-between;
        margin-bottom: 8px;
        padding-bottom: 8px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .confirmation-detail-row:last-child {
        margin-bottom: 0;
        padding-bottom: 0;
        border-bottom: none;
    }

    .confirmation-detail-label {
        color: rgba(255, 255, 255, 0.7);
        font-size: 14px;
    }

    .confirmation-detail-value {
        color: white;
        font-size: 14px;
        font-weight: bold;
        text-align: right;
    }

    .confirmation-token-info {
        background: rgba(102, 126, 234, 0.2);
        border-radius: 8px;
        padding: 10px 15px;
        margin-bottom: 25px;
        text-align: center;
        border: 1px solid rgba(102, 126, 234, 0.3);
    }

    .confirmation-token-text {
        color: white;
        font-size: 16px;
        font-weight: bold;
    }

    .confirmation-token-remaining {
        color: rgba(255, 255, 255, 0.8);
        font-size: 14px;
        margin-top: 5px;
    }

    .confirmation-buttons {
        display: flex;
        gap: 15px;
        justify-content: center;
    }

    .confirmation-btn {
        padding: 12px 25px;
        border-radius: 6px;
        border: none;
        font-family: 'Cormorant Garamond', serif;
        font-size: 16px;
        cursor: pointer;
        transition: all 0.3s ease;
        min-width: 120px;
    }

    .confirmation-btn.confirm {
        background: linear-gradient(45deg, #4CAF50 0%, #45a049 100%);
        color: white;
    }

    .confirmation-btn.confirm:hover {
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(76, 175, 80, 0.4);
    }

    .confirmation-btn.cancel {
        background: linear-gradient(45deg, #6c757d 0%, #495057 100%);
        color: white;
    }

    .confirmation-btn.cancel:hover {
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(108, 117, 125, 0.4);
    }

    .confirmation-btn:disabled {
        opacity: 0.6;
        cursor: not-allowed;
        transform: none !important;
        box-shadow: none !important;
    }

    /* Responsive design */
    @media (max-width: 1400px) {
        .sky-map-container {
            grid-template-columns: 1fr;
            gap: 20px;
            overflow-x: hidden;
        }
        .sky-map-image {
            width: 100%;
            max-width: 1000px;
            margin: 0 auto;
        }
        .image-container {
            width: 100%;
            max-width: 1000px;
            height: 600px;
        }
        .celestial-objects-container {
            width: 100%;
            max-width: 1000px;
            margin: 20px auto 0;
        }
        .controls-row {
            grid-template-columns: 1fr;
        }
        
        .confirmation-box {
            max-width: 90%;
            padding: 20px;
        }
    }
    @media (max-width: 1024px) {
        .sky-map-container {
            grid-template-columns: 1fr;
            gap: 20px;
            overflow-x: hidden;
        }
        .sky-map-image {
            width: 100%;
            max-width: 800px;
            margin: 0 auto;
        }
        .image-container {
            width: 100%;
            max-width: 800px;
            height: 500px;
        }
        .celestial-objects-container {
            width: 100%;
            max-width: 800px;
            margin: 20px auto 0;
        }
        .controls-row {
            grid-template-columns: 1fr;
        }
    }
    @media (max-width: 768px) {
        .tabs {
            flex-wrap: wrap;
            margin-top: 10px;
            margin-bottom: 10px;
        }
        .tab {
            margin-bottom: 5px;
            padding: 8px 16px;
            font-size: 14px;
        }
        .page-title {
            font-size: 28px;
        }
        .token-info {
            font-size: 14px;
        }
        .control-section {
            padding: 15px;
        }
        .time-inputs-grid {
            grid-template-columns: 1fr;
        }
        .image-container {
            width: 100%;
            max-width: 400px;
            height: 300px;
        }
        .sky-map-image img {
            max-width: 100%;
        }
        .music-controls {
            flex-direction: column;
            gap: 8px;
        }
        .results-container {
            max-height: none; /* Remove any max-height on mobile */
        }
        
        .circular-progress {
            width: 60px;
            height: 60px;
        }
        
        .circular-progress-inner {
            width: 40px;
            height: 40px;
        }
        
        .circular-progress-text {
            font-size: 12px;
        }
        
        .circular-progress-message {
            font-size: 12px;
            max-width: 150px;
        }
        
        .confirmation-box {
            padding: 15px;
        }
        
        .confirmation-title {
            font-size: 20px;
        }
        
        .confirmation-buttons {
            flex-direction: column;
            gap: 10px;
        }
        
        .confirmation-btn {
            width: 100%;
            min-width: auto;
        }
    }
	/* FIX: Keep tabs fixed and expand only downward */
.tabs {
    position: relative !important; /* Change from sticky to relative */
    top: auto !important;
    background: transparent !important; /* Remove background */
    backdrop-filter: none !important;
    z-index: 10 !important;
    padding: 0 !important;
    margin-top: 15px !important;
    margin-bottom: 15px !important;
}

/* Make the hero section handle expansion properly */
section.hero {
    position: relative !important;
    padding-bottom: 50px !important;
    min-height: auto !important; /* Remove fixed min-height */
    height: auto !important;
}

/* Fix the grid to prevent upward expansion */
.sky-map-container {
    align-items: start !important;
    min-height: 0 !important; /* Remove fixed min-height */
    grid-template-rows: auto 1fr !important; /* Allow content to grow downward */
}

/* Ensure left column expands only downward */
.sky-map-image {
    display: flex !important;
    flex-direction: column !important;
    height: auto !important;
    min-height: 0 !important;
}

/* Keep image container fixed height */
.image-container {
    width: 100% !important;
    min-height: 750px !important;
    max-height: 750px !important;
    height: 750px !important;
    flex-shrink: 0 !important; /* Prevent shrinking */
}

/* Allow celestial objects to expand below the image */
.celestial-objects-container {
    margin-top: 20px !important;
    margin-bottom: 0 !important;
    width: 100% !important;
    position: relative !important;
}

/* Keep music player below celestial objects */
#musicPlayer {
    margin-top: 20px !important;
}

/* Make sure the page title stays in place */
.page-header {
    position: relative !important;
    z-index: 5 !important;
}

/* Ensure results container flows naturally */
.results-container {
    width: 100% !important;
    display: block !important;
    height: auto !important;
}

/* Update responsive styles */
@media (max-width: 1400px) {
    .sky-map-container {
        grid-template-columns: 1fr !important;
        grid-template-rows: auto !important;
    }
    
    .image-container {
        min-height: 600px !important;
        max-height: 600px !important;
        height: 600px !important;
    }
}

@media (max-width: 1024px) {
    .image-container {
        min-height: 500px !important;
        max-height: 500px !important;
        height: 500px !important;
    }
}

@media (max-width: 768px) {
    .image-container {
        min-height: 300px !important;
        max-height: 300px !important;
        height: 300px !important;
    }
}

/* Size button styles */
.size-presets {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 10px;
}

.size-preset-btn {
    padding: 8px;
    text-align: center;
    font-size: 0.85em;
    transition: all 0.3s ease;
    min-width: 0;
}

.size-preset-btn.active {
    background: linear-gradient(45deg, #4CAF50 0%, #45a049 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Custom size input */
#portrait_custom_size {
    font-family: inherit;
    font-size: 14px;
}

#portrait_custom_size:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

/* Progress indicator */
#portraitProgressIndicator {
    transition: all 0.3s ease;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .size-presets {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 480px) {
    .size-presets {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Display Options Styles */
.display-options-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 10px;
}

.display-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.05);
    padding: 10px 15px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: all 0.3s ease;
    min-height: 44px; /* Minimum touch target size */
}

.display-option:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
}

.checkbox-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    cursor: pointer;
    user-select: none;
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.95em;
    gap: 15px;  /* Space between text and checkbox */
}

.checkbox-label:hover {
    color: white;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkbox-custom {
    /* 1. FORCE PERFECT SQUARE DIMENSIONS */
    width: 24px;
    height: 24px;
    
    /* 2. RESET ALL TEXT PROPERTIES (CRITICAL!) */
    font-size: 0 !important;
    line-height: 0 !important;
    text-align: center;
    
    /* 3. BLOCK DISPLAY - NOT INLINE */
    display: block;
    
    /* 4. FLEX PROTECTION */
    flex: none !important;  /* Not 0 0 auto, but NONE */
    flex-shrink: 0;
    flex-grow: 0;
    align-self: center;
    
    /* 5. BOX MODEL */
    box-sizing: border-box;
    padding: 0;
    margin-left: 15px;
    
    /* 6. VISUAL STYLING */
    border: 2px solid rgba(255, 255, 255, 0.6);
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.1);
    
    /* 7. POSITIONING */
    position: relative;
    order: 2;
    
    /* 8. REMOVE ALL TEXT EFFECTS */
    text-decoration: none;
    text-transform: none;
    letter-spacing: normal;
    word-spacing: normal;
    white-space: normal;
    
    /* 9. SQUARE ENFORCEMENT */
    aspect-ratio: 1 / 1;
}

.checkbox-custom:hover {
    border-color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.15);
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom {
    background: linear-gradient(45deg, #667eea 0%, #764ba2 100%);
    border-color: #8a6be8;
    box-shadow: 0 0 12px rgba(102, 126, 234, 0.5);
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 16px;
    font-weight: bold;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.option-text {
    order: 1;           /* First in order = left side */
    flex: 1;            /* Takes available space */
    font-weight: 500;
    letter-spacing: 0.3px;
    text-align: left;   /* Ensure text aligns left */
}

/* Active state for selected options */
.display-option.active {
    background: rgba(102, 126, 234, 0.25);  /* Much more visible */
    border-color: #8a6be8;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

/* Selection buttons container */
.display-options-buttons {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    justify-content: center;
}

#selectAllOptionsBtn,
#deselectAllOptionsBtn {
    padding: 10px 16px;  /* Reduced width */
    font-size: 0.9em;
    border-radius: 6px;
    background: linear-gradient(45deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    letter-spacing: 0.5px;
    min-width: 100px;  /* Minimum width */
    max-width: 120px;  /* Maximum width */
    width: auto;  /* Auto width based on content */
    white-space: nowrap;  /* Keep text on one line */
}

#selectAllOptionsBtn:hover,
#deselectAllOptionsBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
    background: linear-gradient(45deg, #7284ff 0%, #8a5bba 100%);
}

#selectAllOptionsBtn:active,
#deselectAllOptionsBtn:active {
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(102, 126, 234, 0.3);
}

/* Button active state for feedback */
#selectAllOptionsBtn:focus,
#deselectAllOptionsBtn:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}



/* Add subtle pulse animation for active options */
@keyframes pulse {
    0% {
        box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    }
    50% {
        box-shadow: 0 2px 12px rgba(102, 126, 234, 0.5);
    }
    100% {
        box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    }
}

.display-option.active {
    animation: pulse 2s infinite ease-in-out;
}

/* Slider Toggle Layout */
.slider-label {
    display: grid;
    grid-template-columns: 1fr 46px; /* ✅ text left, toggle right */
    align-items: center;
    width: 100%;
    cursor: pointer;
    user-select: none;
    column-gap: 15px;   /* ✅ horizontal spacing only */
    row-gap: 0;        /* ✅ PREVENTS vertical stacking */
    color: rgba(255, 255, 255, 0.95);
}


/* OFF State (default) — dark muted */
.slider-toggle {
    width: 46px;
    height: 24px;
    background: linear-gradient(45deg, #1a1628, #2a2340);
    border-radius: 50px;
    position: relative;
    transition: all 0.3s ease;
    box-shadow:
        inset 0 0 10px rgba(0,0,0,0.8),
        0 0 4px rgba(0,0,0,0.6);
}

/* Add these styles to your CSS */
.image-preview-container {
    width: 200px;
    height: 200px;
    margin: 10px auto;
    border: 2px dashed rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

.image-preview-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.file-info {
    font-size: 0.9em;
    color: rgba(255, 255, 255, 0.8);
    margin: 10px 0;
    text-align: center;
}

.file-info div {
    margin: 3px 0;
}

.hidden {
    display: none !important;
}

.btn-secondary {
    background: linear-gradient(45deg, #6c757d 0%, #495057 100%);
    border: none;
    color: white;
    cursor: pointer;
    font-size: 0.9em;
    border-radius: 6px;
    padding: 8px 16px;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: linear-gradient(45deg, #5a6268 0%, #343a40 100%);
    transform: translateY(-1px);
}

/* Fix for Cosmic Timelapse tab width issues */
#timelapse .controls-row {
    grid-template-columns: 1fr 1fr !important; /* Right column is 40% wider */
    gap: 20px;
    align-items: start;
}

/* Make sure both columns fill their space */
#timelapse .control-section {
    width: 100%;
    min-width: 0; /* Allow shrinking */
    overflow: visible;
    box-sizing: border-box;
}

/* Left column (Location) - should be narrower */
#timelapse .control-section:first-child {
    max-width: 100%; /* Don't limit too much */
}

/* Right column (Time Range) - should use more space */
#timelapse .control-section:last-child {
    flex-grow: 1;
}

/* Reduce padding in control sections if needed */
#timelapse .control-section {
    padding: 18px; /* Slightly less than 20px */
}

/* Make sure buttons don't have extra width */
#timelapse .btn {
    min-width: 0; /* Allow buttons to shrink */
    width: 100%;
    box-sizing: border-box;
	text-align: center !important;
}

/* Specifically target the file upload button to not be too wide */
#timelapse .control-section .btn[style*="Choose File"] {
    width: auto !important;
    min-width: 120px;
    padding: 8px 12px;
}

/* Ensure inputs don't overflow */
#timelapse .form-control {
    width: 100%;
    box-sizing: border-box;
}

/* Adjust font sizes for better fit */
#timelapse .control-section h3 {
    font-size: 1.2em; /* Slightly smaller */
    margin-bottom: 12px;
}

/* Reduce margins between form groups */
#timelapse .form-group {
    margin-bottom: 12px; /* Instead of 15px */
}

/* Make the time range headers more compact */
#timelapse .control-section div[style*="Start:"] {
    margin-bottom: 6px;
}

#timelapse .control-section div[style*="End:"] {
    margin-bottom: 6px;
}

/* Adjust spacing between sections */
#timelapse .control-section > div[style*="margin-bottom"] {
    margin-bottom: 12px !important;
}

/* Make the image upload section more compact */
#timelapse .control-section > div[style*="border-top"] {
    margin-top: 15px;
    padding-top: 12px;
}

/* Video settings box - more compact */
#timelapse .control-section div[style*="Video Settings"] {
    padding: 8px 10px;
    font-size: 0.8em;
    margin-top: 8px;
}

/* Responsive adjustments */
@media (max-width: 1400px) {
    #timelapse .controls-row {
        grid-template-columns: 1fr !important;
    }
}

/* Add this to your CSS section */
.celestial-object-link {
    color: #ffffff !important;
    text-decoration: none !important;
    cursor: pointer !important;
    position: relative !important;
    display: inline-block !important;
    margin-right: 5px !important;
    padding-bottom: 3px !important;
}

.celestial-object-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(90deg, transparent, #ffffff, #ffffff, #ffffff, transparent);
    background-size: 200% 100%;
    transition: width 0.4s ease, background-position 0.4s ease;
    border-radius: 2px;
    box-shadow: 0 0 8px rgba(157, 124, 255, 0.5);
}

.celestial-object-link:hover::after {
    width: 100%;
    background-position: 100% 0;
}


/* Email Modal Styles */
.email-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.email-modal {
    background: linear-gradient(135deg, rgba(30, 30, 60, 0.95), rgba(20, 20, 40, 0.95));
    border-radius: 12px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(102, 126, 234, 0.3);
}

.email-modal-header {
    text-align: center;
    margin-bottom: 20px;
}

.email-modal-icon {
    font-size: 40px;
    margin-bottom: 10px;
    display: block;
}

.email-modal-title {
    color: white;
    font-size: 24px;
    margin-bottom: 5px;
    font-family: 'Cormorant Garamond', serif;
}

.email-modal-subtitle {
    color: rgba(255, 255, 255, 0.7);
    font-size: 16px;
    margin-bottom: 20px;
}

.email-form-group {
    margin-bottom: 20px;
}

.email-form-group label {
    display: block;
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95em;
}

.email-form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-family: inherit;
    font-size: 1em;
    box-sizing: border-box;
}

.email-form-group input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.email-form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

.email-modal-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 25px;
}

.email-modal-btn {
    padding: 12px 25px;
    border-radius: 6px;
    border: none;
    font-family: 'Cormorant Garamond', serif;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

.email-modal-btn.send {
    background: linear-gradient(45deg, #4CAF50 0%, #45a049 100%);
    color: white;
}

.email-modal-btn.send:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.4);
}

.email-modal-btn.cancel {
    background: linear-gradient(45deg, #6c757d 0%, #495057 100%);
    color: white;
}

.email-modal-btn.cancel:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(108, 117, 125, 0.4);
}

.email-modal-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* Download button container */
.download-section {
    display: flex;
    gap: 10px;
    justify-content: center;
    align-items: center;
    margin-top: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.download-section .btn {
    width: auto; /* Sizes to content */
    padding: 10px 16px; /* Same as other buttons */
    font-size: 14px; /* Same as other buttons */
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin: 3px 0; /* Same as other buttons */
}

/* Email status message */
.email-status-message {
    text-align: center;
    margin-top: 15px;
    padding: 10px;
    border-radius: 6px;
    font-size: 0.9em;
    display: none;
}

.email-status-message.success {
    background: rgba(76, 175, 80, 0.2);
    color: #4CAF50;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.email-status-message.error {
    background: rgba(244, 67, 54, 0.2);
    color: #ff6b6b;
    border: 1px solid rgba(244, 67, 54, 0.3);
}


/* Add this to your CSS section */
#buyTokensBtn {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

/* Buy Tokens button styling - Matching "Use my current location" button */
.buy-tokens-btn {
    width: auto !important;
    padding: 10px 16px !important;  /* Same as other buttons */
    margin: 3px 0 !important;       /* Same as other buttons */
    background: linear-gradient(45deg, #667eea 0%, #764ba2 100%) !important;  /* Same gradient */
    color: white !important;
    border: none !important;
    border-radius: 6px !important;  /* Same radius */
    cursor: pointer !important;
    font-family: inherit !important;
    font-size: 14px !important;     /* Same font size */
    font-weight: normal !important;
    transition: all 0.3s ease !important;
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 10 !important;
    line-height: 1.2 !important;
    height: auto !important;
    min-height: unset !important;
    box-sizing: border-box !important;  /* Same as other buttons */
}

.buy-tokens-btn:hover {
    transform: translateY(-2px) !important;  /* Same hover effect */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;  /* Same shadow */
    background: linear-gradient(45deg, #667eea 0%, #764ba2 100%) !important;
}

/* FIX FOR COSMIC TIMELAPSE BUTTON WIDTH AND VISIBILITY */
#timelapse #videoDownloadSection {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    flex-direction: row !important; /* Ensure side-by-side layout */
    flex-wrap: wrap !important;
    gap: 10px !important;
    margin: 15px auto 20px auto !important;
    width: fit-content !important;
    max-width: 100% !important;
}

#timelapse #videoDownloadSection.hidden {
    display: none !important;
}

#timelapse #downloadVideoBtn,
#timelapse #emailVideoBtn {
    width: auto !important;
    min-width: 180px !important;
    padding: 10px 10px !important;
    flex: 0 0 auto !important;
    display: inline-flex !important;
	text-align: center !important;
    justify-content: center !important;
}

/* Make sure buttons are side by side, not stacked */
#timelapse .download-section {
    flex-direction: row !important; /* This is key */
    display: flex !important;
    gap: 10px !important;
}

/* Ensure the download section is hidden by default */
#videoDownloadSection {
    display: none !important;
}

#videoDownloadSection.hidden {
    display: none !important;
}

#videoDownloadSection:not(.hidden) {
    display: flex !important;
}

/* For responsive design - stack on mobile */
@media (max-width: 768px) {
    #timelapse .download-section {
        flex-direction: column !important;
        width: 100% !important;
    }
    
    #timelapse #downloadVideoBtn,
    #timelapse #emailVideoBtn {
        width: 100% !important;
        min-width: unset !important;
    }
}

/* Add to your dashboard.html or a separate CSS file */
.subscription-info {
    font-size: 0.9em;
    margin-top: 5px;
    padding: 3px 8px;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.1);
    display: inline-block;
}

.token-info {
    position: relative;
    padding: 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    margin-bottom: 15px;
}

.token-info span {
    font-size: 1.2em;
    font-weight: bold;
    color: #fff;
    display: block;
    margin-bottom: 5px;
}

/* Button disabled states */
button.btn:disabled {
    cursor: not-allowed !important;
    pointer-events: none !important;
    opacity: 0.5 !important;
}

/* Specifically for generating state - keep purple but faded */
button.btn.generating {
    cursor: progress !important;
    opacity: 0.7 !important;
    /* Keep the original gradient but make it look faded */
    background: linear-gradient(45deg, rgba(102, 126, 234, 0.7) 0%, rgba(118, 75, 162, 0.7) 100%) !important;
}

/* For already-generated state - keep original color but faded */
button.btn.already-generated {
    cursor: not-allowed !important;
    opacity: 0.5 !important;
    /* Keep original gradient but faded */
    background: linear-gradient(45deg, rgba(102, 126, 234, 0.5) 0%, rgba(118, 75, 162, 0.5) 100%) !important;
}

/* Normal buttons - ensure pointer cursor */
button.btn:not(:disabled):not(.generating):not(.already-generated) {
    cursor: pointer !important;
}

/* Custom cursor for disabled states */
button.btn:disabled,
button.btn.already-generated {
    cursor: not-allowed !important;
}

/* Generating state gets a progress cursor */
button.btn.generating {
    cursor: progress !important;
}