:root {
  /* Brand palette */
  --color-bg: #0f0f0f;
  --color-text: #eaeaea;
  --color-muted: #9aa0a6;
  --color-accent: #ffd401; /* match template yellow */
  --panel-radius: 14px;
  --panel-border: rgba(0, 0, 0, 0.35);
  --panel-border-light: rgba(0, 0, 0, 0.15);
}

/* Reference fonts from the original template */
/* Revert to previous type pairing (system + Google fonts) */

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  background: var(--color-bg);
  color: var(--color-text);
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.site-footer {
  color: var(--color-muted);
  text-align: center;
  padding: 12px 0 16px;
  align-self: end;
  z-index: 1;
}

/* Background image placeholder */
.background {
  position: fixed;
  inset: 0;
  /* Replace this URL by adding your own image under /images/wallpaper.jpg */
  filter: saturate(0.9) brightness(0.75);
  z-index: -1;
  /* Ensure smooth transitions */
  transition: opacity 0.8s ease-in-out;
  opacity: 1;
}

/* Yellow panel */
.panel {
  mix-blend-mode: exclusion;
  backdrop-filter: blur(30px);
  margin: 20px;
  background: var(--color-accent);
  color: #111;
  border-radius: var(--panel-radius);
  border: 0.1rem solid var(--panel-border-light);
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
  width: clamp(280px, 33.33%, 560px);
  display: grid;
  grid-template-rows: auto 1fr auto;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.panel:hover {
  mix-blend-mode: normal;
  transform: translateY(-2px);
  box-shadow: 0 15px 40px rgba(0,0,0,0.25);
}

.panel-header {
  padding: 20px 24px 0 24px;
  position: relative;
}

.panel-title {
  overflow: hidden;
  margin: 0;
  font-family: "Anton", system-ui, sans-serif;
  font-weight: 650;
  letter-spacing: -0.01em;
  font-size: clamp(36px, 13vw, 120px);
  line-height: 1;
  word-break: break-word;
}

.panel-title span { display: inline-block; }

/* For the second line of the panel title, set default margin-top */
.panel-title .line:nth-child(2) {
  overflow: hidden;
  margin-top: -25px;
}

/* Responsive: for screens with max-width 1000px, use margin-top -3vw */
@media (max-width: 1000px) {
  .panel-title .line:nth-child(2) {
    /* Use -3vw for margin-top on small screens */
    margin-top: -3vw;
  }
}

.hidden { display: none; }

.content-area {
  position: relative;
  overflow: hidden;
  /* Fixed height for scrollable content */
  height: 280px;
  min-height: 280px;
  max-height: 280px;
}

.panel-content-section {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  overflow-x: hidden;
  /* Swipe-like transition with mobile feel */
  transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
              opacity 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  transform-origin: center;
  /* Custom scrollbar for webkit browsers */
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
  /* Ensure smooth rendering */
  will-change: transform, opacity;
  backface-visibility: hidden;
}

.panel-content-section::-webkit-scrollbar {
  width: 4px;
}

.panel-content-section::-webkit-scrollbar-track {
  background: transparent;
}

.panel-content-section::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 2px;
}

.panel-content-section::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.3);
}

/* Swipe transitions - tracks section (initial state) */
.panel[data-mode="tracks"] #tracks {
  /* Tracks visible - centered position with full opacity */
  transform: translateX(0) translateZ(0);
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
  z-index: 2;
}

.panel[data-mode="tracks"] #about {
  /* About hidden - positioned to the right (ready to swipe in from right) */
  transform: translateX(100%) translateZ(0);
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  z-index: 1;
}

/* Swipe transitions - about section (swiped state) */
.panel[data-mode="about"] #tracks {
  /* Tracks hidden - swiped out to the left */
  transform: translateX(-100%) translateZ(0);
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  z-index: 1;
}

.panel[data-mode="about"] #about {
  /* About visible - swiped in from right, now centered */
  transform: translateX(0) translateZ(0);
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
  z-index: 2;
}

/* About mode hides tracks and CTAs; only header + about body stay */
.about { padding: 16px 24px 24px 24px; }

/* Panel modes - removed display:none to allow transitions */
.panel[data-mode="about"] .tracks,
.panel[data-mode="about"] .cta-row { display: grid; }

/* Note: #about and #tracks visibility is now controlled by the swipe transitions above */
/* No display:none rules needed as visibility and pointer-events handle the hiding */

.tracks {
  display: grid;
  gap: 0;
  padding: 12px 0 0 0;
  align-content: start;
}

.track {
  display: grid;
  grid-template-rows: auto auto;
  gap: 8px;
  padding: 16px 24px;
  border-top: 1px solid var(--panel-border-light);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  position: relative;
  border-radius: 0;
}

.track:hover {
  background: rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  border-top-color: rgba(0, 0, 0, 0.25);
}

.track-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 4px;
}

.track-meta {
  font-size: 13px;
  color: var(--color-text);
  font-weight: 400;
  margin: 0;
  transition: all 0.25s ease;
}

.track-actions-inline {
  display: flex;
  gap: 8px;
  align-items: center;
}

.track-title {
  margin: 0;
  font-size: 14px;
  color: #1e1e1e;
  font-weight: 700;
  line-height: 1.3;
  transition: all 0.25s ease;
}

.track:hover .track-title {
  color: #000;
  transform: translateX(4px);
}

.track-tag {
  color: #1e1e1e;
  font-weight: 700;
  justify-self: end;
}

/* Track actions (Listen & Download links) */
.track-actions {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-start;
}

.track-link {
  color: var(--color-muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 400;
  cursor: pointer;
  transition: all 0.25s ease;
  background: none;
  border: none;
  padding: 0;
  line-height: 1.4;
  display: flex;
  align-items: center;
  gap: 4px;
  position: relative;
}

.track-icon {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
}


.track-link:hover {
  color: #ffffff;
  text-decoration: underline;
}

.track-link:active {
  color: var(--color-accent);
}

.track-link:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.listen-link:hover {
  color: #ff6b35;
}

.download-link:hover {
  color: #28a745;
}

/* Subtle hover effects when hovering the entire track */
.track:hover .listen-link {
  color: #ff6b35;
  transform: translateY(-1px);
}

.track:hover .download-link {
  color: #28a745;
  transform: translateY(-1px);
}

.track:hover .track-icon {
  transform: scale(1.05);
}

.track:hover .track-meta {
  opacity: 0.9;
}

.track:hover .track-separator {
  opacity: 0.7;
}

/* Enhanced direct button hover */
.track-link:hover {
  transform: translateY(-2px) !important;
  color: var(--color-accent) !important;
}

.track-link:hover .track-icon {
  transform: scale(1.15) !important;
}

.track-separator {
  color: var(--color-muted);
  font-size: 13px;
  font-weight: 400;
  margin: 0 4px;
  transition: all 0.25s ease;
}

/* Spinning animation for loading state */
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.spinning {
  animation: spin 1s linear infinite;
}

/* Subtle glow animation for special elements */
@keyframes subtle-glow {
  0%, 100% { opacity: 0.8; }
  50% { opacity: 1; }
}

.cta-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12.5px;
  padding: 24px 24px 24px 24px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 44px;
  border-radius: 0.6rem;
  border: 0.1rem solid var(--panel-border-light);
  color: white;
  background: black;
  text-decoration: none;
  font-weight: 350;
  padding: 0.6rem 1rem;
  /* Smooth transitions for content changes */
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

.btn:hover {
  opacity: 0.92;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn:active {
  transform: translateY(0);
  transition-duration: 0.1s;
}

/* Button content styling */
.btn-text {
  flex-shrink: 1;
  min-width: 0;
  transition: all 0.2s ease;
}

.btn-icon {
  flex-shrink: 0;
  font-size: 16px;
  opacity: 0.9;
  transition: all 0.2s ease;
  margin-left: 4px;
}

.btn:hover .btn-icon {
  opacity: 1;
  transform: scale(1.1);
}


/* Floating social dock */
.social-dock {
  position: fixed;
  right: 16px;
  bottom: 16px;
  mix-blend-mode: exclusion;
  background: var(--color-accent);
  border: 0.1rem solid var(--panel-border-light);
  border-radius: 12px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 10;
  color: #111;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.social-dock:hover {
  mix-blend-mode: normal;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.dock-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: #111;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.dock-btn:hover { 
  background: rgba(0, 0, 0, 0.08);
  transform: scale(1.05);
}

.dock-btn svg {
  transition: all 0.2s ease;
}

.dock-btn:hover svg {
  transform: scale(1.1);
}

/* Mobile responsive dock */
@media (max-width: 768px) {
  .social-dock {
    right: 50%;
    transform: translateX(50%);
    bottom: 12px;
    flex-direction: row;
    padding: 8px 12px;
    gap: 12px;
    border-radius: 20px;
  }
  
  .dock-btn {
    width: 40px;
    height: 40px;
  }
}

/* Link strike style to mimic <s> */
.track-tag.strike { text-decoration: line-through; }

@media (min-width: 1100px) {
  .panel { margin: 28px; max-width: 33.33%; }
}

/* Responsive: keep content safe on small screens */
@media (max-width: 1100px) {
  .panel { margin: 12px; width: calc(100% - 24px); max-width: none; }
}

@media (max-width: 640px) {
  .panel {
    mix-blend-mode: normal; /* Use normal blend mode on mobile for better readability */
  }
  .panel-header { padding: 12px 16px 0 16px; }
  .track { padding: 12px 16px; }
  .track-header { 
    /* Keep same line layout on mobile */
    flex-direction: row; 
    align-items: flex-start; 
    gap: 8px; 
  }
 
  .track-link {
    font-size: 12px;
  }
  /* Hide text on mobile, show only icons */
  .track-text {
    display: none;
  }
  .track-separator {
    display: none;
  }
  .track-actions-inline {
    gap: 16px; /* More space between icons */
  }
  .cta-row { grid-template-columns: 1fr 1fr; gap: 12px; padding: 12px 16px 16px 16px; }
  .btn { width: 100%; }
  /* Fix footer positioning to avoid overlap with social dock */
  .site-footer {
    padding-bottom: 100px; /* More space for social dock on mobile */
    z-index: 0; /* Ensure footer is behind social dock on mobile */
  }
}


