/* Enhanced global styles for better performance and consistency */
:root {
  --bg: #0f1724;
  --surface: #0b1220;
  --text: #e6eef8;
  --muted: #9fb0c6;
  --accent: #A0353A; /* Plum red */
  --redshaw-red: #732435;
  --radius: 10px;
  --max-width: 1100px;
  --transition-fast: 0.2s ease;
  --transition-medium: 0.3s ease;
  --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-light: 0 4px 15px rgba(0, 0, 0, 0.2);
  --shadow-medium: 0 8px 25px rgba(0, 0, 0, 0.3);
  --shadow-heavy: 0 20px 40px rgba(0, 0, 0, 0.6);
}

/* Optimized font loading and body styles */
body {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--bg);
  color: var(--text);
  margin: 0;
  padding: 0;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Screen reader only class for accessibility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Base reset and tokens */
*{box-sizing:border-box}

/* Disable text selection site-wide (keeps form controls selectable) with fallbacks */
html, body, * {
  -webkit-user-select: none; /* Safari/Chrome */
  -moz-user-select: none;    /* Firefox */
  -ms-user-select: none;     /* IE10+ */
  user-select: none;         /* Standard */
}

/* Allow selection in form controls and editable regions */
input, textarea, select, button, [contenteditable="true"] {
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
  user-select: text;
}

html,body{height:100%}

/* Initial non-animated background to avoid heavy painting on first load with fallbacks */
body{
  background: var(--bg); /* Fallback */
  background:url(https://github.com/ecemgo/mini-samples-great-tricks/assets/13468728/8727c9b1-be21-4932-a221-4257b59a74dd) center / cover no-repeat fixed;
  background-repeat:no-repeat;
  background-attachment:scroll; /* defer fixed attachment until loaded to reduce reflows */
  backdrop-filter:none;
  -webkit-backdrop-filter:none;
  animation:none;
  overflow:hidden; /* Hide scrollbars during splash */
}

/* After load, enable the richer background animation and filters for the splash */
body.is-ready{
  background-attachment:fixed;
  backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px);
  animation:slidein 120s forwards infinite alternate;
}
/* Re-enable scrolling after splash is dismissed */
body.splash-dismissed{
  overflow:auto;
}
/* Reduce expensive backdrop-filter while the user is actively scrolling to avoid jank */
body.is-scrolling {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
@keyframes slidein{
  0%, 100%{background-position:20% 0%;background-size:3400px}
  50%{background-position:100% 0%;background-size:2400px}
}
.container{max-width:var(--max-width);margin:0 auto;padding:0.5rem}

/* --- Enhanced Three.js Splash Screen --- */
.splash-screen-3d{
  position:fixed;
  top:0;
  left:0;
  width:100%;
  height:100%;
  z-index:1000;
  background:linear-gradient(135deg, var(--surface), var(--bg)); /* Gradient background */
  color: var(--text); /* Consistent text color */
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}
.splash-screen-3d.hidden{
  opacity:0;
  visibility:hidden;
  pointer-events:none;
}

  /* Splash Content Layout Fix */
  .splash-content {
    position: relative;
    z-index: 1001;
    text-align: center;
  }

  .splash-title {
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 700;
    font-family: 'Dosis', 'Poppins', sans-serif;
    color: #fff;
    margin-bottom: 0.5em;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-shadow: 0 4px 32px rgba(0,0,0,0.4);
  }

  .splash-subtitle {
    font-size: 1.3rem;
    color: var(--accent);
    margin-bottom: 2em;
    font-family: 'Nunito', sans-serif;
    opacity: 0.85;
  }

  .splash-button {
    background: var(--accent);
    border: none;
    border-radius: var(--radius);
    padding: 0.75rem 1.5rem;
    color: #fff;
    cursor: pointer;
    transition: background 0.3s ease;
  }
  .splash-button:hover {
    background: var(--redshaw-red);
  }
  .splash-button__arrow {
    display: inline-block;
    vertical-align: middle;
    stroke: currentColor;
    width: 1.5em;
    height: 1.5em;
  }

/* Three.js Canvas */
.canvas-webgl{
  display:inline-block;
  vertical-align:baseline;
  position:absolute;
  right:0;
  bottom:0;
  left:0;
  top:0;
}

/* Content Overlay */
.splash-header{
  position:absolute;
  top:0;
  right:0;
  bottom:0;
  left:0;
  padding:0 5%;
  text-align:center;
  z-index:1001;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
}

.splash-title-3d{
  display:inline-block;
  opacity:0;
  padding-top:10vh;
  text-transform:uppercase;
  letter-spacing:.1em;
  margin:0 0 .8em;
  padding-left:.43em;
  font-size:clamp(3rem,10vw,7rem);
  font-weight:100;
  font-family:'Dosis', 'Poppins', sans-serif;
  color:white;
  animation:fadeInTitle 2.2s ease-out .4s forwards;
  will-change: opacity, transform;
}

.splash-title-3d span{
  color:white;
  background:rgba(115, 36, 53, .6);
  border-radius:8vh;
  letter-spacing:.05em;
  padding:.666rem .700rem;
  margin-left:-.5rem;
  border-radius:50%;
  font-size:0.75em;
  font-weight:400;
}

.splash-links{
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  margin-bottom:2rem;
}

.splash-source{
  display:inline-block;
  opacity:0;
  font-size:clamp(.9rem,2vw,1.2rem);
  font-weight:100;
  letter-spacing:.1em;
  font-family:'Roboto', sans-serif;
  color:rgba(255,255,255,0.7);
  animation:fadeInSource 2.2s ease-out 3.4s forwards;
}

.splash-source a{
  color:#ffd700;
  font-weight:100;
  background-color:transparent;
  text-decoration:none;
  position:relative;
}

.splash-source a:after{
  width:100%;
  height:1px;
  content:'';
  background-color:#ffd700;
  display:block;
  margin-top:2px;
  animation-name:none;
}

.splash-source a:hover:after{
  animation-name:crossUnderline;
  animation-duration:.4s;
  animation-iteration-count:1;
  animation-fill-mode:both;
  animation-timing-function:cubic-bezier(.215, .61, .355, 1);
}

.splash-button {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: linear-gradient(135deg, rgba(115, 36, 53, 0.9), rgba(163, 53, 58, 0.9));
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.2);
  padding: 1rem 2rem;
  font-size: 1.1rem;
  font-weight: 600;
  font-family: 'Poppins', sans-serif;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 
    0 4px 20px rgba(115, 36, 53, 0.4),
    0 0 40px rgba(115, 36, 53, 0.2);
  position: relative;
  overflow: hidden;
  text-decoration: none;
  outline: none;
}

.splash-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.splash-button:hover::before {
  left: 100%;
}

.splash-button:hover {
  background: linear-gradient(135deg, rgba(115, 36, 53, 1), rgba(163, 53, 58, 1));
  transform: translateY(-3px) scale(1.05);
  box-shadow: 
    0 8px 30px rgba(115, 36, 53, 0.6),
    0 0 50px rgba(115, 36, 53, 0.3);
  border-color: rgba(255, 255, 255, 0.4);
}

.splash-button:active {
  transform: translateY(-1px) scale(1.02);
  transition: all 0.1s ease;
}

.splash-button:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.5);
  outline-offset: 4px;
  box-shadow: 
    0 0 0 6px rgba(115, 36, 53, 0.3),
    0 8px 30px rgba(115, 36, 53, 0.6);
}

.splash-button__arrow {
  transition: transform 0.3s ease;
}

.splash-button:hover .splash-button__arrow {
  transform: translateX(4px);
}

/* Splash quote styling */
.splash-quote { max-width: 450px; padding: 0 1rem; }
.quote-text { font-family: 'Dosis', 'Poppins', sans-serif; font-size: clamp(1.4rem, 4vw, 2.6rem); color: #ffffff; line-height: 1.2; margin: 0 0 0.75rem; text-shadow: 0 6px 30px rgba(0,0,0,0.6); }
.quote-author { font-family: 'Nunito', sans-serif; font-size: 1rem; color: var(--accent); opacity: 0.95; margin-bottom: 1.25rem; }

/* Ensure splash button remains visible on the quote */
.splash-button { margin-top: 0.5rem; }

/* Fade-in Animations */
@keyframes fadeInTitle{
  from{opacity:0;transform:translateY(-20px)}
  to{opacity:.85;transform:translateY(0)}
}

@keyframes fadeInSource{
  from{opacity:0;transform:translateY(10px)}
  to{opacity:1;transform:translateY(0)}
}

@keyframes fadeInButton{
  from{opacity:0;transform:scale(0.8)}
  to{opacity:1;transform:scale(1)}
}

/* Cross Underline Animation */
@keyframes crossUnderline{
  0%{
    transform:scaleX(1);
    transform-origin:right center;
  }
  49.9%{
    transform:scaleX(0);
    transform-origin:right center;
  }
  50%{
    transform:scaleX(0);
    transform-origin:left center;
  }
  100%{
    transform:scaleX(1);
    transform-origin:left center;
  }
}

/* Responsive adjustments */
@media screen and (max-width:720px){
  .splash-title-3d{
    font-size:3rem;
    padding-top:5vh;
  }
  .splash-header{
    padding:0 8%;
  }
}

.btn{display:inline-block;padding:0.6rem 1rem;border-radius:0.6rem;border:1px solid transparent;text-decoration:none;color:inherit;cursor:pointer}
.btn.primary{background:linear-gradient(90deg,var(--accent),#6d2628);color:#fff;font-weight:600}
.btn.ghost{border-color:rgba(255,255,255,0.06);background:transparent}
.site-footer{padding:1rem 0;color:var(--muted);font-size:0.95rem}
/* Accessibility helpers */
.visually-hidden{position:absolute!important;height:1px;width:1px;overflow:hidden;clip:rect(1px,1px,1px,1px);white-space:nowrap}

/* --- Album Cover Carousel (Swiper) --- */
.album-cover{
  width:90%;
  max-width:1200px;
  margin:0 auto;
  padding-top:2rem;
}
.album-cover .swiper{
  width:100%;
  padding:40px 0 100px;
}
.album-cover .swiper-slide{
  position:relative;
  max-width:200px;
  aspect-ratio:1/1;
  border-radius:10px;
}
.album-cover .swiper-slide img{
  object-fit:cover;
  width:100%;
  height:100%;
  border-radius:inherit;
  -webkit-box-reflect:below -5px linear-gradient(transparent, transparent, rgba(0, 0, 0, 0.4));
  pointer-events:none;
  user-select:none;
}
.album-cover .swiper-slide .overlay{
  display:flex;
  align-items:center;
  justify-content:center;
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  background-color:rgba(28, 22, 37, 0.6);
  border-radius:inherit;
  opacity:0;
  transition:all 0.4s linear;
}
.album-cover .swiper-slide:hover .overlay{
  opacity:1;
}
.album-cover .swiper-slide .overlay ion-icon{
  font-size:4rem;
  color:#eb0b0b;
  cursor:pointer;
  transition:opacity 0.3s;
}
.album-cover .swiper-slide:not(.swiper-slide-active) .overlay ion-icon{
  opacity:0;
}

/* Loading overlay improvements */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 36, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.3s ease;
}

.loading-spinner {
  text-align: center;
  color: var(--text);
}

.spinner {
  width: 50px;
  height: 50px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  border-top-color: var(--accent);
  animation: spin 1s ease-in-out infinite;
  margin: 0 auto 1rem;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loading-spinner p {
  font-size: 1.1rem;
  font-weight: 500;
  margin: 0;
  opacity: 0.9;
}

/* Player error overlay */
.player-error-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  transition: opacity 0.3s ease;
}

.player-error {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 2rem;
  max-width: 400px;
  text-align: center;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}

.player-error__message {
  color: var(--text);
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.player-error__actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.player-error__retry,
.player-error__dismiss {
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  font-family: inherit;
}

.player-error__retry {
  background: var(--accent);
  color: white;
}

.player-error__retry:hover {
  background: #b8444a;
  transform: translateY(-1px);
}

.player-error__dismiss {
  background: transparent;
  color: var(--muted);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.player-error__dismiss:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}
.player-section{
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 70vh;
}

.wrapper{
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: auto;
}
.player{
  background:linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
  width: min(430px, 95%);
  min-height: 380px;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 18px 40px -8px rgba(0,0,0,0.6);
  border: 1px solid rgba(255,255,255,0.04);
  will-change: transform, opacity;
  margin: 0 auto;
}
.player__top{display:flex;align-items:flex-start;position:relative}
.player-cover{width:300px;height:300px;margin-left:-70px;flex-shrink:0;border-radius:15px;position:relative}
.player-cover__item{background-repeat:no-repeat;background-position:center;background-size:cover;width:100%;height:100%;border-radius:15px;position:absolute;left:0;top:0}
.player-controls{flex:1;padding-left:20px;display:flex;flex-direction:column;align-items:center}
.player-controls__item{display:inline-flex;font-size:30px;padding:6px;margin-bottom:10px;color:#cfe3f7;cursor:pointer;width:54px;height:54px;align-items:center;justify-content:center;position:relative;transition:all .18s}
.player-controls__item.-xl{font-size:95px;color:#fff}
.progress{width:100%;margin-top:-15px}
.progress__top{display:flex;align-items:flex-end;justify-content:space-between}
.progress__duration{color:#71829e;font-weight:700;font-size:20px;opacity:.5}
.progress__time{margin-top:2px;color:#71829e;font-weight:700;font-size:16px;opacity:.7}
.progress__bar{height:6px;width:100%;cursor:pointer;background-color:#d0d8e6;display:inline-block;border-radius:10px}
.progress__current{height:inherit;width:0%;background-color:#a3b3ce;border-radius:10px}
.album-info{color:#71829e;flex:1;padding-right:60px}
.album-info__name{font-size:20px;font-weight:bold;margin-bottom:12px}
.album-info__track{font-weight:400;font-size:20px;opacity:.7;min-height:52px}

/* ============================================
   Vanilla JS Player Specific Styles
   ============================================ */
.player__top {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.player__img {
  width: 120px;
  height: 120px;
  border-radius: var(--radius);
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.player__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
  display: block; /* avoid inline-replaced sizing oddities */
  background-color: rgba(255,255,255,0.02);
}

/* Hide images with empty or missing src to avoid an empty box showing in the player
   (JS also marks the wrapper with .player__img--fallback on image error or missing src) */
.player__img img[src=""], .player__img img:not([src]) {
  display: none;
}

.player__img:hover img {
  transform: scale(1.05);
}

/* If the <img> fails to load we'll show a simple fallback glyph inside the wrapper */
.player__img.player__img--fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(0,0,0,0.06));
}
.player__img.player__img--fallback::after {
  content: '';
  width: 46px;
  height: 46px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff' opacity='0.9'><path d='M7 7v10a1 1 0 0 0 1.4.9L15 15V9L8.4 6.1A1 1 0 0 0 7 7z'/></svg>");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.player__info {
  flex: 1;
  min-width: 0;
}

.player__info h4 {
  margin: 0 0 0.5rem 0;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  /* allow title to occupy up to 2 lines before truncating */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
}

.player__info p {
  margin: 0;
  font-size: 1rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player__buttons {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.player__btn {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.player__btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  transition: all 0.5s ease;
  transform: translate(-50%, -50%);
  z-index: 0;
}

.player__btn:hover::before {
  width: 100%;
  height: 100%;
}

.player__btn svg {
  position: relative;
  z-index: 1;
}

.player__btn--small {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  display: inline-grid;
  place-items: center;
}

.player__btn--play {
  background: linear-gradient(135deg, var(--accent), #b8444a);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 4px 15px rgba(163, 53, 58, 0.3);
}

.player__btn:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 
    0 8px 25px rgba(0, 0, 0, 0.3),
    0 0 20px rgba(163, 53, 58, 0.2);
}

.player__btn:active {
  transform: translateY(-1px) scale(1.02);
  transition: all 0.1s ease;
}

.player__btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  box-shadow: 
    0 0 0 4px rgba(163, 53, 58, 0.2),
    0 8px 25px rgba(0, 0, 0, 0.3);
}

.player__btn--play:hover {
  background: linear-gradient(135deg, #b8444a, #c54d53);
  box-shadow: 
    0 8px 25px rgba(163, 53, 58, 0.4),
    0 0 20px rgba(163, 53, 58, 0.3);
}

.player__btn--play svg {
  transition: transform 0.2s ease;
}

.player__btn--play:hover svg {
  transform: scale(1.1);
}

.player__progressbar-container {
  margin-top: 2rem;
}

.player__progressbar {
  position: relative;
  height: 8px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  cursor: pointer;
  margin-bottom: 0.5rem;
}

.player__progressbar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #e96b6f);
  border-radius: 6px;
  width: 0%;
  transition: width 0.12s linear;
  position: relative;
}

.player__dot {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 16px;
  height: 16px;
  background: #fff;
  border: 3px solid var(--accent);
  border-radius: 50%;
  box-shadow: 0 6px 18px rgba(0,0,0,0.45);
  left: 0%;
  transition: left 0.12s linear, transform 0.2s ease;
  cursor: grab;
}

.player__dot:hover {
  transform: translate(-50%, -50%) scale(1.2);
}

.player__times {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.5rem;
}

/* Responsive adjustments for player */
@media (max-width: 768px) {
  .player__top {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  
  .player__img {
    width: 100px;
    height: 100px;
  }
  
  .player__info h4 {
    font-size: 1.25rem;
  }
  
  .player__buttons {
    gap: 0.5rem;
  }
  
  .player__btn--small {
    width: 40px;
    height: 40px;
  }
  
  .player__progressbar-container {
    margin-top: 1.5rem;
  }
}

/* Extra small screens */
@media (max-width: 480px) {
  .player {
    width: 100%;
    max-width: 350px;
    padding: 20px;
  }
  
  .player__img {
    width: 80px;
    height: 80px;
  }
  
  .player__info h4 {
    font-size: 1.1rem;
  }
  
  .player__info p {
    font-size: 0.9rem;
  }
  
  .player__btn--small {
    width: 36px;
    height: 36px;
  }
  
  .player__times {
    font-size: 0.8rem;
  }
}

/* Tablet optimizations */
@media (max-width: 1024px) {
  .disc-container { gap: clamp(1.5rem, 6vw, 3.5rem); }
  .vinyl-record { width: clamp(160px, 28vw, 280px); height: clamp(160px, 28vw, 280px); }
  .splash-title { font-size: clamp(2rem, 6.5vw, 3.8rem); }
  .credits-marquee .credits-track-wrapper { animation-duration: 24s; }
}

/* transitions */
.scale-out-enter-active, .scale-in-enter-active, .scale-out-leave-active, .scale-in-leave-active{transition:all .35s ease-in-out}
.scale-out-enter{transform:scale(.55);pointer-events:none;opacity:0}
.scale-out-leave-to{transform:scale(1.2);pointer-events:none;opacity:0}
.scale-in-enter{transform:scale(1.2);pointer-events:none;opacity:0}
.scale-in-leave-to{transform:scale(.55);pointer-events:none;opacity:0}

/* --- Credits marquee --- */
.credits{background:rgba(255,255,255,0.02);padding:1rem 0;overflow:hidden;border-top:1px solid rgba(255,255,255,0.05);border-bottom:1px solid rgba(255,255,255,0.05);margin-top:2rem}
.credits-marquee{width:100%;overflow:hidden;position:relative}
.credits-track{display:flex;white-space:nowrap;gap:2rem;align-items:center;font-size:0.9rem;color:var(--muted);flex:0 0 auto}

/* Marquee: ensure seamless loop by animating a container that holds two tracks */
.credits-marquee {
  position: relative;
  width: 100%;
  overflow: hidden;
}

/* Container that wraps both tracks for consistent animation */
.credits-marquee .credits-track-wrapper {
  display: flex;
  width: max-content;
  align-items: center;
  animation: marquee-2 28s linear infinite;
  will-change: transform;
}

/* Primary and duplicate track styles */
.credits-track, .credits-track--dup {
  display: flex;
  gap: 2rem;
  align-items: center;
  white-space: nowrap;
  font-size: 0.9rem;
  color: var(--muted);
  flex: 0 0 auto;
}

/* Pause marquee on hover for readability */
.credits-marquee:hover .credits-track-wrapper { animation-play-state: paused; }

@keyframes marquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-100%);
  }
}

@keyframes marquee-2 {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Navigation Buttons */
.album-cover .swiper-button-next,
.album-cover .swiper-button-prev {
  color: var(--accent);
  background: rgba(15, 23, 36, 0.8);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
  opacity: 0;
  transform: scale(0.8);
}

.album-cover:hover .swiper-button-next,
.album-cover:hover .swiper-button-prev {
  opacity: 1;
  transform: scale(1);
}

.album-cover .swiper-button-next:hover,
.album-cover .swiper-button-prev:hover {
  color: var(--text);
  background: rgba(15, 23, 36, 0.95);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.album-cover .swiper-button-next::after,
.album-cover .swiper-button-prev::after {
  font-size: 16px;
  font-weight: bold;
}

.album-cover .swiper-button-disabled {
  opacity: 0.3 !important;
  cursor: not-allowed;
}

/* Pagination */
.album-cover .swiper-pagination {
  bottom: -40px !important;
}

.album-cover .swiper-pagination-bullet {
  background: rgba(255, 255, 255, 0.3);
  opacity: 1;
  width: 8px;
  height: 8px;
  margin: 0 4px;
  transition: all 0.3s ease;
}

.album-cover .swiper-pagination-bullet-active {
  background: var(--accent);
  transform: scale(1.2);
  box-shadow: 0 0 12px rgba(160,53,58,0.35);
}

.album-cover .swiper-pagination-bullet-active-main {
  background: var(--accent);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .album-cover .swiper-button-next,
  .album-cover .swiper-button-prev {
    width: 36px;
    height: 36px;
  }

  .album-cover .swiper-button-next::after,
  .album-cover .swiper-button-prev::after {
    font-size: 14px;
  }

  .album-cover .swiper-pagination {
    bottom: -35px !important;
  }
}

/* Mobile optimizations */
@media (max-width: 600px) {
  .container { padding: 0.75rem; }

  /* Splash */
  .splash-title { font-size: clamp(1.6rem, 8vw, 2.6rem); }
  .splash-subtitle { font-size: 1rem; margin-bottom: 1rem; }
  .splash-button { padding: 0.6rem 1rem; width: 90%; max-width: 320px; }

  /* Reduce heavy background to improve performance on mobile */
  body { background-attachment: scroll; backdrop-filter: none; -webkit-backdrop-filter: none; }

  /* Keep vinyl discs horizontal on small/vertical screens, allow horizontal scroll if needed */
  .disc-container { gap: 0.875rem; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 1rem; -webkit-overflow-scrolling: touch; }
  .vinyl-disc { transform: none !important; flex: 0 0 auto; }
  .vinyl-record { width: clamp(120px, 28vw, 180px); height: clamp(120px, 28vw, 180px); }
  .vinyl-label { width: 42%; height: 42%; }
  .vinyl-disc { padding: 0.25rem; }

  /* Marquee smaller on mobile */
  .credits-track, .credits-track--dup { font-size: 0.8rem; gap: 1rem; }
  .credits-marquee .credits-track-wrapper { animation-duration: 20s; }

  /* Make footer links easier to tap */
  .site-footer a { padding: 8px 6px; display: inline-block; }
}

/* Splash icons (music svg + logo) */
.splash-quote { display:flex; flex-direction:column; align-items:center; gap:0.6rem; max-width:900px; }
.splash-icon { display:flex; align-items:center; justify-content:center; }
.splash-icon svg { width:96px; height:96px; fill: var(--accent); opacity:0.95; }
.splash-icon--logo img { width:220px; height:auto; display:block; margin-top:-6px; }

/* Scale down for smaller screens */
@media (max-width: 600px) {
  .splash-icon svg { width:56px; height:56px; }
  .splash-icon--logo img { width:140px; }
  .quote-text { font-size: clamp(0.85rem, 3.8vw, 1.1rem); }
  .splash-button { width: 85%; max-width: 260px; }
}

/* Screen reader only text */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.player-error-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 36, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  border-radius: var(--radius);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.player-error-overlay[style*="display:flex"] {
  opacity: 1;
  visibility: visible;
}

.player-error {
  text-align: center;
  color: var(--text);
  max-width: 300px;
  padding: 1rem;
}

.player-error__message {
  margin-bottom: 1rem;
  font-size: 1rem;
  line-height: 1.5;
}

.player-error__actions {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
}

.player-error__retry,
.player-error__dismiss {
  padding: 0.5rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: var(--surface);
  color: var(--text);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.player-error__retry:hover,
.player-error__dismiss:hover {
  background: var(--accent);
  border-color: var(--accent);
  transform: translateY(-1px);
}

/* ============================================
   Skeleton Loading States
   ============================================ */

.skeleton {
  background: linear-gradient(90deg, rgba(255,255,255,0.1) 25%, rgba(255,255,255,0.2) 50%, rgba(255,255,255,0.1) 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: 4px;
}

@keyframes skeleton-loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.player__img--skeleton {
  width: 120px;
  height: 120px;
  border-radius: var(--radius);
  background: rgba(255,255,255,0.1);
}

.player__info--skeleton h4 {
  height: 1.5rem;
  margin-bottom: 0.5rem;
  background: rgba(255,255,255,0.1);
  border-radius: 4px;
}

.player__info--skeleton p {
  height: 1rem;
  background: rgba(255,255,255,0.1);
  border-radius: 4px;
  width: 80%;
}

.loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 36, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  border-radius: var(--radius);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.loading-overlay[style*="display: flex"] {
  opacity: 1;
  visibility: visible;
}

.loading-spinner {
  text-align: center;
  color: var(--text);
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top: 3px solid var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading-spinner p {
  margin: 0;
  font-size: 0.9rem;
  opacity: 0.8;
  font-family: 'Nunito', sans-serif;
}

a { color: var(--accent); }
a:hover { color: #fff; }

/* Toast Notifications */
.toast-container {
  position: fixed;
  top: 2rem;
  right: 2rem;
  z-index: 10001;
  max-width: 350px;
  pointer-events: none;
}

.toast {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin-bottom: 0.75rem;
  color: var(--text);
  box-shadow: 
    0 8px 25px rgba(0, 0, 0, 0.4),
    0 0 40px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  pointer-events: auto;
  opacity: 0;
  transform: translateX(100%);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.toast.toast--show {
  opacity: 1;
  transform: translateX(0);
}

.toast.toast--success {
  border-left: 4px solid #4ade80;
}

.toast.toast--error {
  border-left: 4px solid #f87171;
}

.toast.toast--info {
  border-left: 4px solid var(--accent);
}

.toast__content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.toast__icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.toast__message {
  font-size: 0.9rem;
  line-height: 1.4;
  margin: 0;
}

.toast__close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 4px;
  transition: color 0.2s ease;
}

.toast__close:hover {
  color: var(--text);
}

/* Auto-hide animation */
.toast::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  background: var(--accent);
  animation: toast-progress 4s linear;
}

@keyframes toast-progress {
  from { width: 100%; }
  to { width: 0%; }
}

@media (max-width: 768px) {
  .toast-container {
    top: 1rem;
    right: 1rem;
    left: 1rem;
    max-width: none;
  }
  
  .toast {
    margin-bottom: 0.5rem;
  }
}

