body {
  background: #0c0c0d;
  color: #ededed;
  font-family: 'SF Pro Display', 'Segoe UI', 'Helvetica Neue', 'Arial', sans-serif;
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Font fallback - using system fonts since SF Pro Display files are not available */

.bg-full {
  width: 100vw;
  min-height: 100vh;
  background-image: url("./background.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  box-shadow: 0 0 38px 0 #000a, 0 0 38px 6px #fff3;
  border-radius: 0;
  position: relative;
  z-index: 0;
}
nav {
  width: 100%;
  background: rgba(24, 25, 27, 0.18);
  box-shadow: 0 2px 8px #1118;
  position: sticky;
  top: 0;
  left: 0;
  z-index: 100;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
}
.nav-links {
  display: flex;
  gap: 2.5rem;
  justify-content: center;
  align-items: center;
  height: 100%;
}
.nav-links a {
  color: #ededed;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.08rem;
  letter-spacing: 1px;
  transition: color 0.2s, border-bottom 0.2s, text-shadow 0.2s;
  border-bottom: 2px solid transparent;
  text-shadow: 0 0 10px #fff6, 0 0 2px #fff4;
  display: flex;
  align-items: center;
  height: 42px;
  padding-top: 4px;
}
.nav-links a.active {
  color: #fff;
  text-shadow: 0 0 12px #fff8, 0 0 2px #fff4;
  border-bottom: 2px solid #fff;
}
.nav-links a:hover {
  color: #fff;
  border-bottom: 2px solid #fff;
  text-shadow: 0 0 14px #fff, 0 0 2px #fff4;
}
main {
  width: 100vw;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.text-area {
  margin-top: 110px;
  margin-bottom: 120px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Increase Ronogamy text size and keep typing indicator aligned */
h1 {
  color: #fff;
  font-size: 8rem; /* Increased from 6.5rem */
  font-family: 'Quicksand', 'SF Pro Display', 'Segoe UI', 'Helvetica Neue', 'Arial', sans-serif;
  font-weight: 700;
  text-align: center;
  letter-spacing: 2px;
  display: inline-flex; /* Change to flex for cursor alignment */
  align-items: center;  /* Vertically align cursor with text */
  text-shadow:
    0 0 16px #fff7,
    0 2px 8px #000c,
    0 0 2px #000a;
}

/* Ensure .cursor is vertically aligned with Ronogamy text */
.cursor {
  display: inline-block;
  width: 0.09em;
  height: 1.08em;
  background: #fff;
  margin-left: 8px;
  vertical-align: middle;
  border-radius: 2px;
  box-shadow: 0 0 8px #fff;
  animation: blink 1s steps(1) infinite;
  /* Reduce the vertical offset for better bottom alignment */
  transform: translateY(-5px); /* Previously 0 or -2px, now slightly lower */
}
@keyframes blink {
  0%, 50% { opacity: 0.85; }
  51%, 100% { opacity: 0; }
}
/* Bottom section: quadrants grid */
.bottom-section {
  width: 100vw;
  min-height: 100vh;
  height: 100vh;
  background: #111214;
  box-shadow: 0 -4px 40px #000b, 0 -8px 30px #fff2;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 0;
  margin: 0;
}
.quadrant-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 48px;
  width: 94vw;
  max-width: 1400px;
  height: 86vh;
  min-height: 600px;
  align-items: stretch;
}
.quadrant {
  position: relative;
  background: linear-gradient(90deg, #23242a 0%, #222328 100%);
  border-radius: 18px;
  box-shadow: 0 0 20px #2226;
  overflow: hidden;
  transition: transform 0.28s cubic-bezier(.5,1.55,.41,1.01), box-shadow 0.23s;
  will-change: transform, box-shadow;
  display: flex;
  align-items: stretch;
}
.quadrant::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: var(--quad-bg);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: blur(24px) brightness(0.7);
  opacity: 0.7;
}
.quadrant:hover {
  transform: scale(1.035) translateY(-10px);
  box-shadow: 0 16px 44px #2229, 0 0 50px #fff2;
}
/* Image is always a perfect square, lined up top, left, bottom */
.quadrant-inner {
  height: 100%;
  width: 100%;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  position: relative;
  z-index: 1;
}
.quadrant-img {
  height: 100%;
  aspect-ratio: 1 / 1;
  width: auto;
  min-width: 0;
  flex: 0 0 auto;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
}
.img-link {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
}
.quadrant-img img {
  width: 100%;
  height: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 2px 10px #1116;
  background: #222;
  transition: transform 0.28s cubic-bezier(.5,1.55,.41,1.01), box-shadow 0.23s;
  margin: 0;
  display: block;
}
/* Better positioning for cinema image - crop out black edges */
.quadrant:nth-child(3) .quadrant-img img {
  object-position: center 45%;
  transform: scale(1.05);
}
.quadrant:nth-child(3):hover .img-link img {
  transform: scale(1.13);
}
.quadrant:hover .img-link img,
.img-link:hover img {
  transform: scale(1.08);
  box-shadow: 0 8px 32px #222a;
}
/* Content sits to the right, with padding */
.quadrant-content {
  flex: 1 1 0;
  padding: 48px 38px 48px 60px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #ededed;
  position: relative;
  z-index: 1;
  min-width: 0;
}
/* Bigger headings */
.quadrant-content h3 {
  margin: 0 0 22px 0;
  font-size: 3.2rem;
  color: #fff;
  text-shadow: 0 0 10px #fff4;
  font-weight: 700;
}
.quadrant-content p {
  margin: 0 0 18px 0;
  font-size: 1.25rem;
  color: #ededed;
  text-shadow: 0 0 8px #fff3;
}

/* Banner reveal swipe animation */
/* Banner Reveal: Arrow and swipe-connected banner */
.banner-reveal {
  position: relative;
  display: inline-block;
  margin-top: 18px;
  height: 38px;
  min-width: 38px;
  vertical-align: middle;
  overflow: visible;
  z-index: 2;
}
.banner-group {
  position: relative;
  display: flex;
  align-items: center;
  height: 38px;
}
.banner-arrow {
  width: 38px;
  height: 38px;
  background: #222;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 8px #0005;
  border: none;
  outline: none;
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  left: 0;
  top: 0;
  z-index: 3;
  transition:
    left 0.5s cubic-bezier(.59,.03,.27,1.41),
    background 0.18s;
}
.arrow-icon {
  display: block;
  margin: auto;
}
.banner-arrow:focus {
  outline: 2px solid #fff;
}
/* Button is attached, starts collapsed, expands right */
.banner-content {
  background: #21242a;
  color: #fff;
  font-weight: 600;
  border-radius: 22px;
  padding: 0 28px 0 16px; /* Increased right padding for extra space at right */
  height: 38px;
  font-size: 1.05rem;
  box-shadow: 0 2px 8px #0005;
  margin-left: 0;
  opacity: 0;
  width: 0;
  max-width: 140px;
  min-width: 0;
  transition:
    width 0.5s cubic-bezier(.59,.03,.27,1.41),
    opacity 0.18s cubic-bezier(.59,.03,.27,1.41);
  white-space: nowrap;
  position: relative;
  z-index: 2;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  overflow: hidden;
}

.banner-group .move-arrow {
  left: 146px;
  background: #444;
}
.banner-group .open-banner {
  opacity: 1;
  width: 150px;
  pointer-events: auto;
  max-width: 140px;
}

@media (max-width: 700px) {
  .banner-content {
    font-size: 1rem;
    width: 100px;
    max-width: 100px;
    padding: 0 18px 0 8px; /* extra right space for small screens */
  }
  .banner-group .move-arrow {
    left: 100px;
  }
  .banner-group .open-banner {
    width: 100px;
    max-width: 100px;
  }
}
/* Top button: rounded chevron SVG in a circle, glow, bottom right */
#toTopBtn {
  display: none;
  position: fixed;
  bottom: 36px;
  right: 36px;
  z-index: 200;
  width: 56px;
  height: 56px;
  background: rgba(24,24,24,0.98);
  border: none;
  outline: none;
  border-radius: 50%;
  box-shadow: 0 0 16px 0 #fff2, 0 0 10px 0 #0007;
  transition: background 0.2s, box-shadow 0.2s;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
#toTopBtn svg {
  display: block;
  margin: 0 auto;
  filter: drop-shadow(0 0 2px #fff);
}
#toTopBtn:hover {
  background: #181818;
  box-shadow: 0 0 24px 0 #fff3, 0 0 16px 0 #000c;

}
/* ========================================= */
/* =========== MELODY PAGE STYLES ========== */
/* ========================================= */

.melody-bg-blur {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  background-image: url('./assets/melody.jpg');
  background-size: cover;
  background-position: center;
  filter: blur(24px) brightness(0.5);
  opacity: 0.7;
  transform: scale(1.1);
}

.melody-content-wrapper {
  position: relative;
  z-index: 1;
  background: transparent;
}

.melody-main {
  padding-top: 60px;
  width: 100vw;
  overflow: hidden;
}

/* --- Floating Music Player Widget --- */
.music-player-widget {
  position: fixed;
  right: 40px;
  top: 120px;
  width: 280px;
  background: rgba(20, 40, 30, 0.3);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(47, 255, 127, 0.2);
  z-index: 90;
  transition: all 0.3s ease;
  border: 1px solid rgba(47, 255, 127, 0.2);
}

.music-player-widget:hover {
  box-shadow: 0 8px 40px rgba(47, 255, 127, 0.3), 0 0 0 1px rgba(47, 255, 127, 0.4);
  transform: translateY(-5px);
  border-color: rgba(47, 255, 127, 0.4);
}

.music-player-widget h3 {
  margin: 0 0 15px 0;
  font-size: 1.2rem;
  color: #b0f2c2;
  font-weight: 600;
  text-align: center;
  text-shadow: 0 0 10px rgba(47, 255, 127, 0.5);
}

.music-player-album {
  width: 100%;
  height: 240px;
  border-radius: 12px;
  margin-bottom: 15px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.music-player-album img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.music-player-info {
  text-align: center;
}

.music-player-track {
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 5px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.music-player-artist {
  font-size: 0.9rem;
  color: #b0f2c2;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #b0f2c2;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 1400px) {
  .music-player-widget {
    right: 20px;
    top: 100px;
    width: 240px;
  }

  .music-player-album {
    height: 200px;
  }
}

@media (max-width: 1100px) {
  .music-player-widget {
    display: none;
  }
}


/* --- Carousel General Styling --- */
.carousel-section {
  margin-bottom: 80px;
}

.carousel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 5vw;
  margin-bottom: 30px;
}

.carousel-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 0 15px rgba(47, 255, 127, 0.5);
  font-family: 'Quicksand', sans-serif;
}

.carousel-container {
  width: 100%;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 5%, black 95%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, black 5%, black 95%, transparent 100%);
}

.carousel-track {
  display: flex;
  width: max-content;
  animation: scroll-left 60s linear infinite;
}

@keyframes scroll-left {
  0% { transform: translateX(0%); }
  100% { transform: translateX(-50%); }
}

.carousel-container:hover .carousel-track {
  animation-play-state: paused;
}

.carousel-item {
  width: 280px;
  flex-shrink: 0;
  margin: 0 20px;
  background: rgba(20, 40, 30, 0.3);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 16px;
  border: 1px solid rgba(47, 255, 127, 0.2);
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.carousel-item:hover {
  transform: translateY(-10px) scale(1.05);
  border-color: rgba(47, 255, 127, 0.5);
  box-shadow: 0 15px 30px rgba(0,0,0,0.3);
}

.item-image img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  display: block;
}

.item-info {
  padding: 20px;
  text-align: center;
}

.item-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 5px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item-subtext {
  font-size: 0.9rem;
  color: #b0f2c2;
  margin: 0;
  opacity: 0.9;
}

/* Artist-specific styles (circular images) */
#top-artists-track .carousel-item {
  background: transparent;
  backdrop-filter: none;
  border: none;
}
#top-artists-track .item-image {
  width: 200px;
  height: 200px;
  margin: 0 auto 20px;
}
#top-artists-track .item-image img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 4px solid rgba(47, 255, 127, 0.4);
  box-shadow: 0 0 25px rgba(47, 255, 127, 0.3);
}
#top-artists-track .carousel-item:hover .item-image img {
  border-color: rgba(47, 255, 127, 0.8);
}

/* Time Filter Dropdown */
.time-filter-dropdown select {
  background: rgba(20, 40, 30, 0.5);
  color: #b0f2c2;
  border: 1px solid rgba(47, 255, 127, 0.3);
  border-radius: 8px;
  padding: 10px 15px;
  font-family: 'Quicksand', sans-serif;
  font-weight: 600;
  cursor: pointer;
  outline: none;
}
.time-filter-dropdown select:focus {
  border-color: rgba(47, 255, 127, 0.7);
}

/* --- Footer & Profile Quadrants --- */
.melody-footer {
  padding: 100px 20px 80px;
  background: rgba(10, 12, 11, 0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 -10px 40px rgba(0,0,0,0.5);
  margin-top: 50px;
}

.profile-quadrant-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  max-width: 1000px;
  margin: 0 auto;
}

.profile-quadrant {
  background: rgba(20, 40, 30, 0.3);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(47, 255, 127, 0.2);
  border-radius: 24px;
  padding: 40px;
  text-align: center;
  color: #fff;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.profile-quadrant:hover {
  transform: translateY(-10px);
  border-color: rgba(47, 255, 127, 0.5);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

.quadrant-logo-wrapper {
    width: 80px;
    height: 80px;
    margin: 0 auto 25px;
    background: rgba(0,0,0,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,0.1);
}

.quadrant-logo {
    width: 50%;
    height: 50%;
    opacity: 0.7;
}

.profile-quadrant h3 {
  margin: 0 0 10px;
  font-size: 2.2rem;
  font-weight: 700;
}

.profile-quadrant p {
  margin: 0 0 25px;
  color: #ccc;
  font-size: 1rem;
}

.profile-quadrant a {
  display: inline-block;
  padding: 14px 35px;
  background: linear-gradient(135deg, #1fa149, #2fff7f);
  color: #000;
  text-decoration: none;
  border-radius: 50px;
  font-weight: 700;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(47, 255, 127, 0.2);
}

.profile-quadrant a:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(47, 255, 127, 0.4);
}

/* Specific colors for spotify button */
.profile-quadrant:last-child a {
  background: linear-gradient(135deg, #1DB954, #1ED760);
}
