/*  PAGE NAME: public/css/app.css
    SECTION: Core Styles
------------------------------------------------------------*/

:root {
  /* Dark theme defaults */
  --tb-bg: #020617;
  --tb-bg-elevated: #020617;
  --tb-card: #020617;
  --tb-highlight: #f97316;
  --tb-accent: #22c55e;
  --tb-accent-soft: rgba(250, 204, 21, 0.15);
  --tb-text: #e5e7eb;
  --tb-muted: #6b7280;
  --tb-border: rgba(148, 163, 184, 0.35);
  --tb-radius-xl: 1.5rem;
  --tb-radius-lg: 1rem;
  --tb-shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.8);
  --tb-body-bg: #FFFFFF;
  --black: #020202;
  --pink: #ec5b8b;
  --light-blue: #cceaf3;
  --light-green: #86d17d;
  --orange: #f4a64a;
  --white: #ffffff;
}

@font-face {
  font-family: 'Titty Bingo';
  src: url('../fonts/titty-bingo.woff2') format('woff2'),
       url('../fonts/titty-bingo.woff') format('woff');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}



/* Light theme overrides */
.tb-theme-light {
  --tb-bg: #f8fafc;
  --tb-bg-elevated: #ffffff;
  --tb-card: #ffffff;
  --tb-highlight: #2563eb;
  --tb-accent: #16a34a;
  --tb-accent-soft: rgba(34, 197, 94, 0.1);
  --tb-text: #1e293b;
  --tb-muted: #64748b;
  --tb-border: rgba(100, 116, 139, 0.25);
  --tb-body-bg: #FFFFFF;
  --tb-shadow-soft: 0 12px 30px rgba(0, 0, 0, 0.05);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}



body.tb-body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
  color: var(--tb-text);
  background: var(--tb-body-bg);
}

body.tb-body.tb-home-body {ackground:#000000;}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Titty Bingo', 'Barlow Condensed', sans-serif;
  text-transform: lowercase;
}

h2.tb-card-title  {font-family:'Barlow Condensed', sans-serif !important;  text-transform:none !important;}

h1 {
  font-weight: normal;
  margin-bottom: 15px;
  font-size: 50px;
}

.tb-home-body {
  background: var(--white);
  color: var(--black);
}

.tb-home-body h1 {
  margin-bottom: 0;
}

/*  SECTION: Photos Page  */

.tb-photos-page {
  padding: 0 0 4rem;
  position: relative;
  overflow: hidden;
}

.tb-photos-title {
  font-size: clamp(2.6rem, 5vw, 4.8rem);
  margin: 0 auto calc(clamp(1.5rem, 4vw, 2.5rem) + 15px);
  text-shadow: 0 0 20px rgba(244, 164, 74, 0.35);
  text-align: center;
  color: #91c955;
}

.tb-photos-grid {
  width: min(1200px, 92%);
  margin: 0 auto;
  columns: 3 240px;
  column-gap: 1.5rem;
  position: relative;
  z-index: 1;
}

.tb-photo-card {
  margin: 0 0 1.5rem;
  padding: 0;
  border: none;
  background: transparent;
  position: relative;
  display: inline-block;
  width: 100%;
  border-radius: 1.5rem;
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
  cursor: pointer;
  break-inside: avoid;
}

.tb-photo-card img {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
  filter: saturate(120%);
  transition: transform 0.35s ease, filter 0.35s ease;
}

.tb-photo-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.1), rgba(2, 6, 23, 0.65));
  opacity: 0;
  transition: opacity 0.35s ease;
}

.tb-photo-card:focus-visible {
  outline: 2px solid var(--tb-highlight);
  outline-offset: 4px;
}

@media (hover: hover) and (pointer: fine) {
  .tb-photo-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 30px 60px rgba(244, 164, 74, 0.25);
  }

  .tb-photo-card:hover img {
    transform: scale(1.05);
    filter: saturate(135%);
  }

  .tb-photo-card:hover::after {
    opacity: 1;
  }
}

@media (hover: none) and (pointer: coarse) {
  .tb-photo-card:active {
    transform: translateY(4px) scale(0.97);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
  }
}

.tb-photos-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.85);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 200;
}

.tb-photos-modal.is-open {
  opacity: 1;
  visibility: visible;
}

.tb-photos-modal__overlay {
  position: absolute;
  inset: 0;
}

.tb-photos-modal__content {
  position: relative;
  background: #000;
  border: 2px solid #111;
  border-radius: 1.5rem;
  padding: 1.5rem;
  max-width: min(92vw, 960px);
  max-height: 88vh;
  box-shadow: 0 35px 80px rgba(0, 0, 0, 0.6);
  z-index: 1;
}

.tb-photos-modal__image {
  display: block;
  width: 100%;
  height: auto;
  max-height: 75vh;
  object-fit: contain;
}

.tb-photos-modal__close {
  position: absolute;
  top: 0.4rem;
  right: 0.6rem;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  cursor: pointer;
}

.container {
  width: min(1200px, 90%);
  margin-inline: auto;
}

@media (max-width: 768px) {
  .container {
    width: 100%;
  }
}

/*  SECTION: App Shell  */

.tb-app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.tb-standalone .tb-app-shell {
  padding-bottom: 90px;
}

@media (display-mode: standalone), (display-mode: fullscreen) {
  .tb-app-shell {
    padding-bottom: 90px;
  }
}

header.tb-site-header {
  background-color: var(--black);
  padding-block: 1rem;
  position: relative;
  z-index: 50;
}

.header-container {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.logo {
  text-decoration: none;
}

.logo img {
  display: block;
  width: 280px;
  height: auto;
  margin-bottom: 0.5rem;
}

#hamburger {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border: none;
  background: url('../../assets/home/images/mobile-menu.svg') no-repeat center/contain;
  cursor: pointer;
}

#mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.95);
  transform: translateX(-100%);
  transition: transform 0.4s ease;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 2rem;
  padding-top: 4rem;
  z-index: 100;
}

#mobile-menu.open {
  transform: translateX(0);
}

#mobile-menu .close-btn {
  position: absolute;
  top: 2.8rem;
  right: 1rem;
  width: 1.4rem;
  height: 1.4rem;
  background: url('../../assets/home/images/menu-close.svg') no-repeat center/contain;
  border: none;
  cursor: pointer;
  padding: 0;
  margin: 0;
  display: block;
  z-index: 101;
}

#mobile-menu ul {
  list-style: none;
  width: 100%;
  text-align: left;
  margin: 0;
  padding: 0;
}

#mobile-menu li {
  margin-bottom: 0;
  opacity: 0;
  transform: translateY(20px);
}

#mobile-menu a {
  font-family: 'Titty Bingo', cursive;
  font-size: 10vw;
  line-height: 1.1;
  text-decoration: none;
  color: var(--white);
  text-transform: lowercase;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
}

.tb-menu-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.2em;
  height: 1.2em;
  padding: 0 0.35em;
  border: 2px solid currentColor;
  border-radius: 999px;
  font-size: 0.35em;
  line-height: 1;
  transform: translateY(-0.2em);
}

#mobile-menu li:nth-child(1) a { color: var(--pink); }
#mobile-menu li:nth-child(2) a { color: var(--light-blue); }
#mobile-menu li:nth-child(3) a { color: var(--light-green); }
#mobile-menu li:nth-child(4) a { color: var(--light-pink, #ffb6c1); }
#mobile-menu li:nth-child(5) a { color: var(--pink); }
#mobile-menu li:nth-child(6) a { color: var(--orange); }

#mobile-menu.open li {
  animation: menuItemSlideIn 0.5s forwards ease-out;
}

#mobile-menu.open li:nth-child(1) { animation-delay: 0s; }
#mobile-menu.open li:nth-child(2) { animation-delay: 0.05s; }
#mobile-menu.open li:nth-child(3) { animation-delay: 0.1s; }
#mobile-menu.open li:nth-child(4) { animation-delay: 0.15s; }
#mobile-menu.open li:nth-child(5) { animation-delay: 0.2s; }
#mobile-menu.open li:nth-child(6) { animation-delay: 0.25s; }

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

.torn-wrapper {
  position: relative;
  width: 100%;
  overflow: hidden;
  margin-top: -20px;
  pointer-events: none;
  z-index: 50;
}

.torn-wrapper img {
  width: 110%;
  margin-left: -5%;
  display: block;
}

.torn-wrapper + section,
.torn-wrapper + footer {
  margin-top: -40px;
}

.torn-video img {
  transform: scaleX(-1);
}

footer.tb-site-footer {
  background-color: var(--black);
  padding-block: 2rem;
  text-align: center;
  position: relative;
  z-index: 30;
  margin-top: -3vw;
}

.footer-logo img {
  max-width: 320px;
  width: 100%;
  height: auto;
  display: block;
  margin-inline: auto;
}

.footer-logo {
  font-family: 'Titty Bingo', cursive;
  font-size: 2.2rem;
  display: flex;
  justify-content: center;
  gap: 0.1rem;
  margin-bottom: 1rem;
}

.footer-logo span {
  line-height: 1;
}

.social-icons {
  display: flex;
  justify-content: center;
  gap: 1.2rem;
  margin-top: 1rem;
}

.social-icons a {
  color: var(--white);
  font-size: 1.6rem;
  transition: color 0.2s;
}

.social-icons a:hover {
  color: var(--pink);
}

.tb-footer-text {
  margin-top: 1.2rem;
  color: var(--white);
  font-family: 'Barlow Condensed', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.4;
}

.tb-footer-text a {  color: var(--white);}

@media (max-width: 768px) {
  #hamburger {
    width: 40px;
    height: 30px;
  }

  .logo img {
    width: 60%;
    margin: 0 auto 0.5rem;
  }

  #mobile-menu a {
    font-size: 16vw;
    line-height: 18vw;
  }

  .torn-wrapper {
    margin-top: -1.7vw;
  }

  .torn-wrapper.torn-product {
    margin-top: -4.7vw;
  }

  footer.tb-site-footer {
    margin-top: -3vw;
  }
}

@media (min-width: 769px) {
  #mobile-menu {
    left: auto;
    right: 0;
    width: 35vw;
    height: 100vh;
    transform: translateX(100%);
    align-items: flex-start;
    padding: 2rem;
    padding-top: 4rem;
  }

  #mobile-menu.open {
    transform: translateX(0);
  }

  #mobile-menu ul {
    width: 100%;
    text-align: left;
    margin-top: 6vw;
    margin-left: 3vw;
  }

  #mobile-menu a {
    font-size: 5vw;
    line-height: 6vw;
  }

  #mobile-menu li {
    margin-bottom: 0;
  }

  #mobile-menu .close-btn {
    top: 6rem;
    right: 8.2rem;
    width: 2rem;
    height: 2rem;
  }

  .logo img {
    width: 420px;
  }

  .torn-wrapper.torn-video {
    margin-top: -2vw;
  }
}

.tb-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--tb-bg-elevated);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--tb-border);
}

.tb-menu-btn {
  border: none;
  /* Use elevated background for both themes */
  background: var(--tb-bg-elevated);
  color: var(--tb-text);
  border-radius: 999px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  /* Removed heavy shadow from the menu button */
  box-shadow: none;
}

.tb-menu-btn i {
  font-size: 1.1rem;
}

.tb-logo-wrap {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.tb-logo {
  height: 32px;
  width: auto;
  /* Remove drop shadow from the logo so it sits flush */
  filter: none;
}

.tb-logo-tag {
  font-size: 0.75rem;
  letter-spacing: 0.19em;
  text-transform: uppercase;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  border: 1px solid rgba(148,163,184,0.4);
  color: var(--tb-accent);
  background: radial-gradient(circle at top, rgba(22, 163, 74, .25) 0, transparent 60%);
}

.tb-header-spacer {
  flex: 1;
}

.tb-header-profile {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--tb-text);
}

.tb-header-avatar {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 2px solid var(--tb-border);
  background: var(--tb-bg);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.tb-header-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tb-header-name {
  font-weight: 600;
}

/*  SECTION: Side Nav  */

.tb-sidenav {
  position: fixed;
  inset: 0 auto 0 0;
  width: 260px;
  max-width: 80vw;
  background: var(--tb-bg-elevated);
  box-shadow: var(--tb-shadow-soft);
  transform: translateX(-100%);
  transition: transform 0.25s ease-out;
  z-index: 40;
  display: flex;
  flex-direction: column;
}

.tb-sidenav.open {
  transform: translateX(0);
}

.tb-sidenav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--tb-border);
}

.tb-sidenav-header h2 {
  margin: 0;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: .18em;
}

.tb-close-btn {
  border: none;
  background: transparent;
  color: var(--tb-text);
  font-size: 1.1rem;
}

.tb-sidenav-links {
  padding: 0.75rem 0.5rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.tb-sidenav-links a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  text-decoration: none;
  color: var(--tb-muted);
  font-size: 0.9rem;
}

.tb-sidenav-links a i {
  width: 18px;
  text-align: center;
}

.tb-sidenav-links a.active,
.tb-sidenav-links a:hover {
  background: rgba(15, 118, 110, 0.32);
  color: var(--tb-text);
}

/*  SECTION: Main Content  */

.tb-main {
  flex: 1;
  padding: 1.25rem 1rem 1.5rem;
  max-width: 1400px;
  margin: 0 auto;
}

.tb-section {
  padding: 1.25rem;
  border-radius: var(--tb-radius-xl);
}

.tb-shop-section {
  background: #ffffff;
  border: none;
  box-shadow: none;
  border-radius: 0;
  padding: 0;
}

.tb-title {
  font-size: 1.35rem;
  margin: 0 0 calc(0.25rem + 15px);
}

.tb-music-title {
  font-size: 50px;
  text-align: center;
  color: #f0588a;
}

.tb-videos-title {
  font-size: 50px;
  text-align: center;
  color: #faa951;
}

.tb-subtitle {
  margin: 0 0 1rem;
  color: var(--tb-muted);
  font-size: 0.9rem;
}

/*  SECTION: Band Page  */
.tb-band {
  background: var(--white);
  color: var(--black);
  padding: 2.5rem 2.75rem;
  border-radius: 0;
  box-shadow: none;
  border: none;
}

.tb-band-inner {
  max-width: 1080px;
  margin: 0 auto;
}

.tb-band-title {
  font-size: 50px;
  color: var(--light-blue);
  margin: 0 0 calc(1.5rem + 15px);
  text-align: center;
}

.tb-band-content {
  display: flex;
  gap: 2.5rem;
  align-items: flex-start;
}

.tb-band-story {
  flex: 1 1 68%;
  font-size: 1rem;
  line-height: 1.7;
}

.tb-band-story p {
  margin: 0 0 1.5rem;
}

.tb-band-players {
  flex: 0 0 220px;
  font-size: 1rem;
}

.tb-band-players h2 {
  margin: 0 0 0.75rem;
  font-size: 30px;
  text-transform: lowercase;
  font-family: 'Titty Bingo', 'Barlow Condensed', sans-serif;
}

.tb-band-players ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.tb-band-players li {
  margin-bottom: 0.6rem;
}

@media (max-width: 900px) {
  .tb-band {
    padding: 2rem 1.5rem;
  }

  .tb-band-content {
    flex-direction: column;
  }

  .tb-band-players {
    flex: 1 1 auto;
  }
}

/*  SECTION: Cards / Grids  */

.tb-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px,1fr));
  gap: 1rem;
}

@media (min-width: 1024px) {
  .tb-card-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .tb-collection-grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  }
}

.tb-card {
  background: var(--tb-card);
  border-radius: var(--tb-radius-lg);
  overflow: hidden;
  border: 1px solid var(--tb-border);
  box-shadow: var(--tb-shadow-soft);
  display: flex;
  flex-direction: column;
}

.tb-card-thumb {
  width: 100%;
  display: block;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.tb-card-body {
  padding: 0.75rem 0.9rem 0.9rem;
}

.tb-card-title {
  margin: 0;
  font-size: 0.95rem;
}

.tb-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.tb-card-title-link {
  font-size: 1rem;
  color: var(--tb-text);
  text-decoration: none;
  font-weight: 600;
}

.tb-card-title-link:hover {
  color: var(--tb-highlight);
}

.tb-collection-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  justify-items: center;
}

.tb-collection-card {
  width: 100%;
  max-width: 360px;
}

.tb-collection-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.tb-collection-comment-trigger {
  border: none;
  background: rgba(148, 163, 184, 0.15);
  color: var(--tb-text);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.tb-collection-comment-trigger:hover {
  background: rgba(148, 163, 184, 0.3);
  transform: translateY(-1px);
}

.tb-card-link {
  margin-top: 0.4rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(248, 113, 113, 0.75);
  text-decoration: none;
  font-size: 0.8rem;
  color: #fecaca;
  background: rgba(127, 29, 29, 0.65);
}

.tb-card-link i {
  color: #f97373;
}

.tb-collection-create {
  background: var(--tb-bg-elevated);
  border: 1px solid var(--tb-border);
  border-radius: var(--tb-radius-lg);
  padding: 1.1rem;
  margin-top: 1.5rem;
  gap: 0.8rem;
}

.tb-collection-form .tb-collection-create {
  background: transparent;
  border: none;
  padding: 0;
  margin-top: 0.75rem;
}

.tb-collection-create button {
  justify-self: flex-start;
}

.tb-collection-create-header h3 {
  margin: 0;
  font-size: 1rem;
}

.tb-collection-create-header p {
  margin: 0.3rem 0 0;
  color: var(--tb-muted);
  font-size: 0.85rem;
}

@media (min-width: 768px) {
  .tb-collection-create {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr) auto;
    align-items: end;
  }

  .tb-collection-create-header {
    grid-column: 1 / -1;
  }

  .tb-collection-create button {
    justify-self: end;
  }
}

/*  SECTION: Songs List  */

.tb-card-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.tb-song-card {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.7rem;
  border-radius: var(--tb-radius-lg);
  border: 1px solid var(--tb-border);
  background: var(--tb-card);
}

.tb-song-media {
  /* Provide a fixed square area for album art; it will shrink on
     smaller screens but maintain a consistent aspect ratio. */
  flex: 0 0 50px;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  border-radius: 8px;
}

/* Album covers now use the full area of the media container while
   maintaining their aspect ratio. If the image is not square it will
   be contained without cropping. We also minimize corner rounding and
   remove heavy shadows. */
.tb-song-cover {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: none;
}

.tb-song-cover--placeholder {
  display: grid;
  place-items: center;
  border: 1px dashed rgba(148,163,184,0.6);
  background: #000;
}

.tb-song-cover--placeholder i {
  color: var(--tb-muted);
  font-size: 1.4rem;
}

/* Increase the size of the song titles to stand out next to smaller
   album art. Only applies inside song cards. */
.tb-song-card .tb-card-title {
  font-size: 1.1rem;
  font-weight: 600;
}

/* The song body aligns its contents vertically so that the title and
   play/link buttons sit centered relative to the album art.  On
   narrow screens the elements will wrap if necessary. */
.tb-song-body {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.tb-audio {
  width: 100%;
}

.tb-empty {
  margin-top: 0.5rem;
  color: var(--tb-muted);
  font-size: 0.9rem;
}

/*  SECTION: Bottom Mobile Nav  */

.tb-bottom-nav {
  position: fixed;
  inset: auto 0 0 0;
  height: 90px;
  background: var(--tb-bg-elevated);
  border-top: 1px solid var(--tb-border);
  display: none;
  justify-content: space-around;
  align-items: center;
  z-index: 30;
  backdrop-filter: blur(12px);
}

.tb-standalone .tb-bottom-nav {
  display: flex;
}

@media (display-mode: standalone), (display-mode: fullscreen) {
  .tb-bottom-nav {
    display: flex;
  }
}

.tb-bottom-item {
  flex: 1;
  text-align: center;
  text-decoration: none;
  color: var(--tb-muted);
  font-size: 0.7rem;
}

.tb-bottom-item i {
  display: block;
  font-size: 1.1rem;
  margin-bottom: 0.1rem;
}

.tb-bottom-item.active {
  color: #f97316;
}

@media (min-width: 769px) {
  .tb-bottom-nav {
    display: none;
  }
}

/*  SECTION: Toggle Pills  */

.tb-toggle-pill {
  display: inline-flex;
  padding: 0.2rem;
  border-radius: 999px;
  background: var(--tb-bg-elevated);
  border: 1px solid rgba(148,163,184,0.4);
  margin-bottom: 0.9rem;
}

.tb-toggle-pill button,
.tb-toggle-pill a {
  border: none;
  background: transparent;
  color: var(--tb-muted);
  font-size: 0.8rem;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
}

.tb-toggle-pill button.active,
.tb-toggle-pill a.active {
  background: linear-gradient(135deg, #f97316, #22c55e);
  color: #020617;
}

/*  SECTION: Tracklist Player  */

.tb-tracklist {
  margin-top: 1rem;
  padding-bottom: 10.5rem;
}

.tb-tracklist-header {
  display: grid;
  grid-template-columns: minmax(96px, 140px) 1fr;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1.2rem;
}

.tb-tracklist-cover {
  width: 100%;
  border-radius: 14px;
  object-fit: cover;
  aspect-ratio: 1 / 1;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.35);
  background: #000;
}

.tb-tracklist-meta .tb-title {
  margin-bottom: 0.35rem;
}

.tb-tracklist-count {
  margin: 0 0 0.4rem;
  color: var(--tb-muted);
  font-size: 0.9rem;
}

.tb-tracklist-rows {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.tb-tracklist-pane .tb-tracklist-rows {
  display: grid;
}

.tb-track-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.8rem;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: var(--tb-bg-elevated);
  color: var(--tb-text);
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.tb-track-cover-wrap {
  width: 50px;
  height: 50px;
  border-radius: 10px;
  overflow: hidden;
  background: #000;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.tb-track-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tb-track-cover.is-placeholder {
  object-fit: contain;
  padding: 8px;
}

.tb-track-main {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex: 1;
  min-width: 0;
}

.tb-track-row:hover {
  border-color: rgba(249, 115, 22, 0.6);
  transform: translateY(-1px);
}

.tb-track-row.is-playing {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.25), rgba(249, 115, 22, 0.2));
  border-color: rgba(34, 197, 94, 0.6);
}

.tb-track-number {
  font-weight: 600;
  color: var(--tb-muted);
  font-size: 0.85rem;
  min-width: 2.5rem;
  text-align: left;
}

.tb-track-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--tb-text);
  text-align: left;
}

.tb-track-player.is-hidden {
  display: none;
}

.tb-track-links {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
  justify-content: flex-end;
}

.tb-track-links a {
  color: var(--tb-muted);
  font-size: 1.4rem;
  transition: color 0.2s ease;
}

.tb-track-links a:hover {
  color: #f97316;
}

.tb-track-actions {
  display: inline-flex;
  align-items: center;
  margin-left: auto;
  justify-content: flex-end;
  gap: 0.35rem;
}

.tb-track-comment-trigger {
  border: none;
  background: transparent;
  color: var(--tb-muted);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease;
}

.tb-track-comment-trigger:hover {
  color: var(--tb-text);
  background: rgba(148, 163, 184, 0.15);
}

.tb-track-version-toggle {
  border: none;
  background: rgba(148, 163, 184, 0.12);
  color: var(--tb-muted);
  font-size: 0.95rem;
  cursor: pointer;
  padding: 0.35rem 0.55rem;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.tb-track-version-toggle:hover {
  color: var(--tb-text);
  background: rgba(148, 163, 184, 0.2);
}

.tb-track-version-toggle i {
  transition: transform 0.2s ease;
}

.tb-track-version-toggle.is-open {
  color: #f97316;
  background: rgba(249, 115, 22, 0.15);
}

.tb-track-version-toggle.is-open i {
  transform: rotate(180deg);
}

.tb-track-versions {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-4px);
  transition: max-height 0.25s ease, opacity 0.2s ease, transform 0.2s ease;
}

.tb-track-versions.is-open {
  max-height: 600px;
  opacity: 1;
  transform: translateY(0);
}

.tb-tracklist-versions {
  margin-top: 0.35rem;
  padding-bottom: 0;
}

.tb-track-row.tb-track-row--sub {
  background: rgba(15, 23, 42, 0.35);
  border: 1px solid rgba(148, 163, 184, 0.18);
  padding: 0.6rem 0.85rem;
  margin-left: 2.5rem;
}

.tb-track-row.tb-track-row--sub .tb-track-number {
  min-width: 2rem;
}

.tb-track-row.tb-track-row--sub .tb-track-title {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--tb-muted);
}

.tb-track-player {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.6rem 1rem;
  background: var(--tb-bg-elevated);
  border-top: 1px solid var(--tb-border);
  box-shadow: 0 -8px 20px rgba(15, 23, 42, 0.35);
  z-index: 35;
}

.tb-standalone .tb-track-player {
  bottom: 90px;
}

@media (display-mode: standalone), (display-mode: fullscreen) {
  .tb-track-player {
    bottom: 90px;
  }
}

.tb-track-player-info {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
}

.tb-track-player-cover {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  background: #000;
}

.tb-track-player-label {
  font-size: 0.7rem;
  color: var(--tb-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.15rem;
}

.tb-track-player-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--tb-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 45vw;
}

.tb-track-player-file {
  font-size: 0.7rem;
  color: var(--tb-muted);
  margin-top: 0.15rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 45vw;
}

.tb-track-player-controls {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: nowrap;
}

.tb-track-control {
  border: none;
  background: rgba(148, 163, 184, 0.12);
  color: var(--tb-text);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.tb-track-control svg {
  width: 16px;
  height: 16px;
}

.tb-track-control:hover {
  background: rgba(249, 115, 22, 0.2);
  transform: translateY(-1px);
}

.tb-track-control.tb-track-close {
  background: rgba(148, 163, 184, 0.18);
}

.tb-track-control.tb-track-close:hover {
  background: rgba(239, 68, 68, 0.2);
}

.tb-track-play {
  background: linear-gradient(135deg, #f97316, #22c55e);
  color: #020617;
}

.tb-track-play:hover {
  background: linear-gradient(135deg, #fb923c, #4ade80);
}

@media (max-width: 640px) {
  .tb-tracklist-header {
    grid-template-columns: 1fr;
    padding: 0.5rem 0 0.75rem;
  }

  .tb-tracklist-cover {
    max-width: 120px;
    margin: 0 auto;
  }

  .tb-track-player {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 0.75rem;
  }

  .tb-track-player-info {
    min-width: 0;
  }

  .tb-track-player-title {
    max-width: 100%;
  }

  .tb-track-player-file {
    max-width: 100%;
  }

  .tb-track-player-controls {
    justify-content: flex-end;
  }
}

.tb-theme-light .tb-tracklist-cover,
.tb-theme-light .tb-track-cover-wrap,
.tb-theme-light .tb-track-player-cover,
.tb-theme-light .tb-song-cover--placeholder {
  background: #e2e8f0;
}

.tb-theme-light .tb-track-row.tb-track-row--sub {
  background: rgba(148, 163, 184, 0.15);
  border-color: rgba(148, 163, 184, 0.35);
}

/*  SECTION: Admin Styles  */

.tb-body--admin {
  background: radial-gradient(circle at top, #1f2937 0, #020617 55%, #000 100%);
}

.tb-admin-shell {
  max-width: 900px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.tb-admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid rgba(15,23,42,0.9);
  background: var(--tb-bg-elevated);
}

.tb-admin-header h1 {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: .16em;
}

.tb-admin-back,
.tb-admin-logout {
  color: var(--tb-muted);
  text-decoration: none;
  font-size: 1.1rem;
}

.tb-admin-main {
  padding: 1.25rem 1rem 1.5rem;
  flex: 1;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
}

.tb-form-card {
  max-width: 380px;
  margin: 2rem auto;
  background: var(--tb-bg-elevated);
  border-radius: var(--tb-radius-xl);
  padding: 1.25rem 1.25rem 1.4rem;
  box-shadow: var(--tb-shadow-soft);
  border: 1px solid var(--tb-border);
}

.tb-form-card h2 {
  margin: 0 0 0.75rem;
}

.tb-form-card label {
  display: block;
  font-size: 0.8rem;
  margin-bottom: 0.6rem;
}

.tb-form-card input {
  width: 100%;
  padding: 0.45rem 0.6rem;
  border-radius: 0.6rem;
  border: 1px solid var(--tb-border);
  background: var(--tb-bg-elevated);
  color: var(--tb-text);
}

.tb-btn-primary {
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, #f97316, #22c55e);
  color: #020617;
  font-weight: 600;
  cursor: pointer;
}

.tb-error {
  background: rgba(127,29,29,0.8);
  border-radius: 0.6rem;
  padding: 0.4rem 0.6rem;
  font-size: 0.8rem;
  margin-bottom: 0.6rem;
}

.tb-admin-tabs {
  margin-bottom: 1rem;
  position: relative;
}

.tb-admin-tabs a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.tb-admin-tabs-toggle {
  display: none;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  border: 1px solid rgba(148,163,184,0.35);
  background: var(--tb-bg-elevated);
  color: var(--tb-text);
  border-radius: 999px;
  padding: 0.55rem 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

.tb-admin-tabs-menu {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tb-admin-tab-icon {
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
}

.tb-admin-tab-label {
  font-weight: 600;
}

.tb-admin-tabs a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.tb-admin-tab-icon {
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
}

.tb-admin-tab-label {
  font-weight: 600;
}

@media (max-width: 640px) {
  .tb-admin-tabs {
    margin-bottom: 1.25rem;
  }

  .tb-admin-tabs-toggle {
    display: inline-flex;
  }

  .tb-admin-tabs-menu {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 0.5rem);
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
    padding: 0.6rem;
    border-radius: 1rem;
    background: var(--tb-bg-elevated);
    border: 1px solid var(--tb-border);
    box-shadow: var(--tb-shadow-soft);
    opacity: 0;
    transform: translateY(-6px);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 5;
  }

  .tb-admin-tabs.is-open .tb-admin-tabs-menu {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .tb-admin-tabs a {
    flex-direction: column;
    text-align: center;
    padding: 0.55rem 0.45rem;
    font-size: 0.7rem;
    border-radius: 0.9rem;
    min-height: 64px;
  }

  .tb-admin-tab-icon {
    font-size: 1rem;
  }
}

.tb-admin-section {
  background: var(--tb-bg-elevated);
  border-radius: var(--tb-radius-xl);
  padding: 1rem;
  border: 1px solid var(--tb-border);
  box-shadow: var(--tb-shadow-soft);
}

.tb-admin-section h2 {
  margin-top: 0;
  margin-bottom: 0.75rem;
}

.tb-form-inline {
  display: grid;
  grid-template-columns: minmax(0,1fr);
  gap: 0.4rem;
  margin-bottom: 0.9rem;
}

.tb-form-inline label {
  font-size: 0.75rem;
}

.tb-form-inline input {
  width: 100%;
  padding: 0.4rem 0.55rem;
  border-radius: 0.55rem;
  border: 1px solid var(--tb-border);
  background: var(--tb-bg-elevated);
  color: var(--tb-text);
}


.tb-homepage-form {
  margin-bottom: 0;
}

.tb-homepage-rows {
  display: grid;
  gap: 0.65rem;
}

.tb-homepage-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: 0.65rem;
  align-items: end;
  padding: 0.65rem 0.7rem;
  border: 1px solid var(--tb-border);
  border-radius: 0.75rem;
  background: rgba(15, 23, 42, 0.28);
}

.tb-homepage-handle {
  align-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  margin: 0;
  border: 1px dashed var(--tb-border);
  border-radius: 0.55rem;
}

.tb-homepage-main-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.65rem;
}

.tb-homepage-time-fields {
  display: flex;
  gap: 0.5rem;
  align-items: end;
}

.tb-homepage-time-fields label {
  min-width: 4.5rem;
}

.tb-homepage-input-short {
  width: 5.25rem !important;
  text-align: center;
}

.tb-homepage-remove-btn {
  align-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  border: 1px solid rgba(252, 165, 165, 0.35);
}

.tb-homepage-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}

@media (max-width: 900px) {
  .tb-homepage-row {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .tb-homepage-main-fields {
    grid-template-columns: minmax(0, 1fr);
    grid-column: 2 / 4;
  }

  .tb-homepage-time-fields {
    grid-column: 2 / 3;
  }

  .tb-homepage-remove-btn {
    grid-column: 3 / 4;
    justify-self: end;
  }
}

.tb-admin-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.tb-admin-list li {
  display: flex;
  align-items: center;
  padding: 0.45rem 0.3rem;
  border-bottom: 1px solid rgba(15,23,42,0.9);
  font-size: 0.85rem;
}

/* Drag handle for sortable lists */
.tb-handle {
  cursor: move;
  margin-right: 0.5rem;
  color: var(--tb-muted);
}

/* Title area grows to fill space */
.tb-item-title {
  flex: 1;
}

/* Delete button in admin lists */
.tb-inline-delete-btn {
  border: none;
  background: transparent;
  color: #fca5a5;
  cursor: pointer;
  font-size: 0.9rem;
}

.tb-inline-delete {
  margin: 0;
}

.tb-inline-delete button {
  border: none;
  background: transparent;
  color: #fca5a5;
  cursor: pointer;
  font-size: 0.9rem;
}

/* Edit button in admin list */
.tb-edit-item {
  border: none;
  background: transparent;
  color: var(--tb-accent);
  cursor: pointer;
  font-size: 0.9rem;
  margin-left: 0;
  padding: 0;
  text-decoration: none;
}
.tb-edit-item i {
  pointer-events: none;
}

/* When .tb-edit-item is used as a link, ensure it has no underline and appears clickable */
.tb-edit-item:hover {
  text-decoration: underline;
}

/*
 * Editing panel styles for admin edit forms
 */
.tb-edit-container {
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid var(--tb-border);
  border-radius: var(--tb-radius-lg);
  background: var(--tb-bg);
  box-shadow: var(--tb-shadow-soft);
}

.tb-edit-container h3 {
  margin-top: 0;
  margin-bottom: 0.75rem;
  font-size: 1.1rem;
}

.tb-edit-container form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.7rem;
}

.tb-edit-container input[type="text"],
.tb-edit-container input[type="url"],
.tb-edit-container input[type="file"],
.tb-edit-container select {
  width: 100%;
  padding: 0.45rem 0.6rem;
  border-radius: 0.6rem;
  border: 1px solid var(--tb-border);
  background: var(--tb-bg-elevated);
  color: var(--tb-text);
  font-size: 0.85rem;
}

.tb-edit-container .tb-form-checkbox {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.tb-edit-container .tb-btn-primary,
.tb-edit-container .tb-btn-secondary {
  width: auto;
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
}

.tb-btn-secondary {
  background: var(--tb-bg-elevated);
  border: 1px solid var(--tb-border);
  color: var(--tb-text);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.tb-btn-secondary:hover {
  background: rgba(148,163,184,0.15);
}

/*
 * Modal backdrop and container used for editing videos and songs in admin
 */
.tb-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 200;
}

.tb-modal {
  background: var(--tb-bg-elevated);
  border-radius: var(--tb-radius-xl);
  padding: 1.2rem;
  max-width: 90vw;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--tb-shadow-soft);
}

.tb-modal h3 {
  margin-top: 0;
  margin-bottom: 0.8rem;
  font-size: 1.2rem;
}

.tb-modal form {
  display: grid;
  gap: 0.7rem;
}

.tb-modal-close {
  margin-top: 0.6rem;
  display: inline-block;
}

@media (min-width: 640px) {
  .tb-form-inline {
    grid-template-columns: repeat(3, minmax(0,1fr)) auto;
    align-items: end;
  }
}

/*  SECTION: Responsive  */

@media (min-width: 768px) {
  .tb-main {
    padding-inline: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .tb-main {
    max-width: 1200px;
  }
}

/*  SECTION: Videos Toggle and Modal  */

.tb-videos-pane {
  /* By default hide the pane; grid layout will be applied on active state */
  display: none;
}

/* When a videos pane is active, display it as a responsive grid.  On
   smaller screens the grid will automatically reduce the number of
   columns and on wider screens (>=1024px) it will show up to four
   videos per row. */
.tb-videos-pane.active {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 1rem;
}

@media (min-width: 640px) {
  .tb-videos-pane.active {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .tb-videos-pane.active {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1200px) {
  .tb-videos-pane.active {
    grid-template-columns: repeat(4, 1fr);
  }
}

.tb-video-card {
  position: relative;
  background: var(--tb-card);
  border-radius: var(--tb-radius-lg);
  overflow: hidden;
  border: 1px solid var(--tb-border);
  box-shadow: var(--tb-shadow-soft);
  display: flex;
  flex-direction: column;
}

.tb-video-media {
  position: relative;
}

.tb-video-card .tb-card-body {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.tb-video-card .tb-card-thumb {
  aspect-ratio: 16 / 9;
}

.tb-video-card img {
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.tb-video-card .tb-play-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  border: none;
  /* Dark overlay across the entire video card */
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
  /* Remove default font-size to allow custom icon sizing */
  font-size: 0;
}

.tb-video-card:hover .tb-play-overlay {
  background: transparent;
}

/* Style the play icon inside the overlay as a circular button */
.tb-video-card .tb-play-overlay i {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 3px solid #ffffff;
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  font-size: 3rem;
  line-height: 1;
  transition: background 0.2s;
}

.tb-video-card .tb-play-overlay:hover i {
  background: rgba(255, 255, 255, 0.25);
}

.tb-video-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 50;
}

.tb-video-modal.active {
  display: flex;
}

.tb-video-modal-content {
  width: min(96vw, 1200px);
  max-width: 1200px;
}

/*  SECTION: Songs Pane */
/* Hide songs panes by default; they will be activated as a responsive grid.
   On large screens the grid will display up to four items per row. */
.tb-songs-pane {
  display: none;
}

.tb-songs-pane.active {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.tb-tracklist-pane.tb-songs-pane.active {
  display: block;
}

.tb-song-list-pane.tb-songs-pane.active {
  display: block;
}

@media (min-width: 1024px) {
  .tb-songs-pane.active {
    grid-template-columns: repeat(4, 1fr);
  }

  .tb-tracklist-pane .tb-tracklist-rows {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 1.5rem;
  }
}

.tb-modal-content {
  position: relative;
  background: var(--tb-bg-elevated);
  border-radius: var(--tb-radius-lg);
  width: 90%;
  max-width: 700px;
  max-height: 90vh;
  overflow: hidden;
}

.tb-modal-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: transparent;
  border: none;
  font-size: 1.5rem;
  color: var(--tb-text);
  cursor: pointer;
  line-height: 1;
}

.tb-modal-iframe-container {
  width: 100%;
  padding-top: 56.25%;
  position: relative;
}

.tb-modal-iframe-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.tb-video-comment-trigger {
  border: none;
  background: transparent;
  color: var(--tb-text);
  font-size: 1.15rem;
  cursor: pointer;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease;
}

.tb-video-comment-trigger:hover {
  color: var(--tb-accent);
  background: rgba(249, 115, 22, 0.1);
}

.tb-video-comment-modal .tb-video-comment-content {
  max-width: 520px;
  width: 90%;
  padding: 1.5rem;
  display: grid;
  gap: 1rem;
}

.tb-video-comment-header h3 {
  margin: 0;
  font-size: 1.1rem;
}

.tb-song-comment-modal .tb-song-comment-content {
  max-width: 520px;
  width: 90%;
  padding: 1.5rem;
  display: grid;
  gap: 1rem;
}

.tb-song-comment-header h3 {
  margin: 0;
  font-size: 1.1rem;
}

/*  SECTION: Song Play Button & Links  */

.tb-song-play-btn {
  border: none;
  background: transparent;
  color: var(--tb-accent);
  font-size: 1.6rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.2rem;
}

.tb-song-links {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.2rem;
  /* push the link container to the right in the song row */
  margin-left: auto;
}

.tb-song-links a {
  color: var(--tb-highlight);
  font-size: 1.6rem;
  text-decoration: none;
}

/*  SECTION: Theme Toggle Button  */

.tb-theme-toggle {
  flex: 0 0 auto;
  text-align: center;
  color: var(--tb-muted);
  font-size: 0.8rem;
}

/* Inline edit inputs used in the Music and Videos pages when editing
   existing records from the front end.  These inputs use the
   elevated background and border colours so they fit with both
   dark and light themes. */
.tb-inline-edit {
  width: 100%;
  padding: 0.35rem 0.5rem;
  border-radius: 0.4rem;
  border: 1px solid var(--tb-border);
  background: var(--tb-bg-elevated);
  color: var(--tb-text);
  margin-bottom: 0.4rem;
  font-size: 0.85rem;
}

.tb-theme-toggle button {
  border: none;
  background: transparent;
  color: var(--tb-muted);
  font-size: 1.3rem;
  cursor: pointer;
}

.tb-theme-toggle button.active {
  color: var(--tb-highlight);
}
/*  SECTION: Settings Switch Styles  */
.tb-settings-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.tb-form-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.tb-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
}
.tb-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.tb-slider {
  width: 48px;
  height: 24px;
  border-radius: 999px;
  background: var(--tb-muted);
  position: relative;
  transition: background 0.3s;
}
.tb-slider::before {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--tb-bg-elevated);
  transition: transform 0.3s;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.tb-switch input:checked + .tb-slider {
  background: var(--tb-highlight);
}
.tb-switch input:checked + .tb-slider::before {
  transform: translateX(24px);
}
.tb-switch-label {
  font-size: 0.85rem;
  color: var(--tb-text);
}
.tb-btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--tb-border);
  background: var(--tb-bg-elevated);
  color: var(--tb-text);
  text-decoration: none;
  font-size: 0.9rem;
}
.tb-btn-secondary:hover {
  background: rgba(34, 197, 94, 0.1);
}
.tb-btn-secondary i {
  font-size: 1rem;
}
.tb-settings-card {
  padding: 1rem;
  border-radius: 12px;
  border: 1px solid var(--tb-border);
  background: var(--tb-bg-elevated);
}
.tb-status-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.2);
  color: var(--tb-muted);
  font-size: 0.85rem;
  font-weight: 600;
}
.tb-status-pill.is-active {
  background: rgba(34, 197, 94, 0.15);
  color: var(--tb-highlight);
}
.tb-back-link {
  margin-bottom: 0.75rem;
  align-self: flex-start;
}

/*  SECTION: Loading State  */
.tb-loading {
  padding: 1.25rem;
  text-align: center;
  color: var(--tb-muted);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.tb-loading-spinner {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 3px solid rgba(148, 163, 184, 0.3);
  border-top-color: var(--tb-accent);
  animation: tb-spin 0.9s linear infinite;
}

.tb-loading-text {
  letter-spacing: 0.01em;
}

@keyframes tb-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.tb-loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.72);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 60;
}

.tb-loading-overlay.active {
  display: flex;
}

/* Feed */
.tb-feed-form,
.tb-feed-card {
  background: var(--tb-card);
  border: 1px solid var(--tb-border);
  border-radius: var(--tb-radius-lg);
  padding: 1rem;
  box-shadow: var(--tb-shadow-soft);
}
.tb-feed-form {
  margin-bottom: 1.5rem;
}
.tb-feed-form-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.5rem;
}
.tb-feed-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--tb-border);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  background: transparent;
  color: var(--tb-text);
  cursor: pointer;
  font-size: 0.85rem;
}
.tb-feed-toggle.active {
  background: rgba(15, 118, 110, 0.25);
  border-color: rgba(15, 118, 110, 0.6);
}
.tb-feed-form-body[hidden] {
  display: none;
}
.tb-feed-form form {
  display: grid;
  gap: 0.75rem;
}
.tb-feed-form label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.9rem;
}

.tb-feed-form input,
.tb-feed-form textarea,
.tb-feed-comment-form textarea {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--tb-border);
  background: var(--tb-bg-elevated);
  color: var(--tb-text);
  padding: 0.65rem 0.85rem;
  font-size: 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.tb-feed-form input:focus,
.tb-feed-form textarea:focus,
.tb-feed-comment-form textarea:focus {
  outline: none;
  border-color: rgba(249, 115, 22, 0.65);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.2);
}

.tb-feed-form input[type="file"] {
  padding: 0.5rem 0.75rem;
  font-size: 0.95rem;
}
.tb-feed-list {
  display: grid;
  gap: 1.25rem;
}
.tb-feed-card header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.tb-feed-card time {
  font-size: 0.8rem;
  color: var(--tb-muted);
}
.tb-feed-body {
  margin: 0 0 0.75rem;
}
.tb-feed-media iframe,
.tb-feed-media video {
  width: 100%;
  min-height: 280px;
  border: 0;
  border-radius: var(--tb-radius-md);
  background: #000;
}
.tb-feed-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.5rem;
  margin-top: 0.75rem;
}
.tb-feed-image {
  border: none;
  padding: 0;
  background: none;
  cursor: pointer;
}
.tb-feed-gallery img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: var(--tb-radius-md);
}
.tb-feed-comments {
  margin-top: 1rem;
  border-top: 1px solid var(--tb-border);
  padding-top: 0.75rem;
}
.tb-feed-comments ul {
  list-style: none;
  padding: 0;
  margin: 0 0 0.75rem;
  display: grid;
  gap: 0.5rem;
}
.tb-feed-comment-form {
  display: grid;
  gap: 0.5rem;
}
.tb-feed-comment-form textarea {
  width: 100%;
  min-height: 90px;
}
.tb-feed-comment-form button {
  justify-self: flex-end;
}
.tb-feed-comment-form textarea {
  resize: vertical;
}
.tb-alert {
  padding: 0.75rem 1rem;
  border-radius: var(--tb-radius-md);
  background: rgba(45, 212, 191, 0.12);
  color: var(--tb-accent);
  margin-bottom: 1rem;
}

.tb-upload-status {
  margin-bottom: 0;
}

.tb-alert.tb-alert-success {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.tb-alert.tb-alert-error {
  background: rgba(248, 113, 113, 0.12);
  color: #f87171;
  border: 1px solid rgba(248, 113, 113, 0.3);
}
.tb-muted {
  color: var(--tb-muted);
}

.tb-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}
.tb-stats-grid.tb-stats-grid--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.tb-stat-card {
  background: var(--tb-card);
  border: 1px solid var(--tb-border);
  border-radius: var(--tb-radius-lg);
  padding: 1rem;
  box-shadow: var(--tb-shadow-soft);
}
.tb-stat-card h3 {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
}
.tb-stat-card .tb-stat-value {
  font-size: 1.35rem;
  font-weight: 600;
}
.tb-stat-meta {
  margin-top: 0.35rem;
  font-size: 0.85rem;
  color: var(--tb-muted);
}
.tb-stat-card.tb-stat-card--highlight .tb-stat-value {
  font-size: 1.6rem;
  font-weight: 700;
}
.tb-stat-card.tb-stat-card--large .tb-stat-value {
  font-size: 1.9rem;
  font-weight: 700;
}
.tb-stat-card.tb-stat-card--large h3 {
  font-size: 1rem;
}
.tb-stat-card.is-disabled {
  opacity: 0.45;
  filter: grayscale(0.9);
}
.tb-coming-soon {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--tb-muted);
}

.tb-shop-summary {
  margin-top: 1.25rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.tb-order-section {
  margin-top: 1.5rem;
}
.tb-order-list {
  margin-top: 0.75rem;
  background: var(--tb-card);
  border: 1px solid var(--tb-border);
  border-radius: var(--tb-radius-lg);
  overflow: hidden;
}
.tb-order-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid var(--tb-border);
}
.tb-order-row:last-child {
  border-bottom: none;
}
.tb-order-title {
  font-weight: 600;
  font-size: 0.95rem;
}
.tb-order-sub {
  font-size: 0.8rem;
  color: var(--tb-muted);
}
.tb-order-meta {
  text-align: right;
}
.tb-order-amount {
  font-weight: 600;
  font-size: 0.9rem;
}
.tb-order-date {
  font-size: 0.75rem;
  color: var(--tb-muted);
}

@media (max-width: 900px) {
  .tb-stats-grid.tb-stats-grid--three {
    grid-template-columns: 1fr;
  }
}

.tb-feed-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.8);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  z-index: 2000;
}
.tb-feed-modal.is-open {
  display: flex;
}
.tb-feed-modal-content {
  position: relative;
  max-width: 900px;
  width: 100%;
}
.tb-feed-modal-content img {
  width: 100%;
  height: auto;
  border-radius: var(--tb-radius-lg);
  box-shadow: var(--tb-shadow-soft);
}
.tb-feed-modal-close {
  position: absolute;
  top: -12px;
  right: -12px;
  background: var(--tb-card);
  border: 1px solid var(--tb-border);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
}

@media (min-width: 901px) {
  .tb-feed-modal-content {
    max-height: 100vh;
  }

  .tb-feed-modal-content img {
    max-height: 100vh;
    object-fit: contain;
  }
}
.tb-collection-cover {
  background: #000;
}

.tb-collection-cover.is-placeholder {
  object-fit: contain;
  padding: 12px;
}

.tb-collection-comments {
  margin-top: 2rem;
}

/*  SECTION: Photos  */

.tb-photos {
  position: relative;
}

.tb-photos-hero {
  position: relative;
  padding: clamp(2rem, 4vw, 3.5rem);
  border-radius: clamp(1.5rem, 3vw, 2.5rem);
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.18), rgba(59, 130, 246, 0.18));
  border: 1px solid rgba(249, 115, 22, 0.35);
  overflow: hidden;
  box-shadow: 0 30px 70px rgba(15, 23, 42, 0.55);
}

.tb-photos-hero-content {
  position: relative;
  z-index: 2;
  max-width: 720px;
}

.tb-photos-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.35em;
  font-size: 0.75rem;
  color: var(--tb-accent);
  margin: 0 0 0.75rem;
}

.tb-photos-title {
  font-size: clamp(2.8rem, 5vw, 4.6rem);
  margin: 0 0 calc(1rem + 15px);
  color: #91c955;
}

.tb-photos-subtitle {
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  color: rgba(226, 232, 240, 0.85);
  max-width: 520px;
}

.tb-photos-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.tb-photos-badge {
  background: rgba(2, 6, 23, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.4);
  color: var(--tb-text);
  padding: 0.45rem 1rem;
  border-radius: 999px;
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.tb-photos-badge--accent {
  border-color: rgba(249, 115, 22, 0.6);
  color: #fdba74;
}

.tb-photos-orbit {
  position: absolute;
  inset: -25% -10% auto auto;
  width: 320px;
  height: 320px;
  z-index: 1;
}

.tb-photos-orbit-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px dashed rgba(148, 163, 184, 0.3);
  animation: tb-photos-spin 18s linear infinite;
}

.tb-photos-orbit-ring:nth-child(2) {
  inset: 30px;
  animation-duration: 26s;
}

.tb-photos-orbit-ring:nth-child(3) {
  inset: 60px;
  animation-duration: 34s;
}

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

.tb-photos-meta {
  margin: 2.5rem 0 1.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2rem;
  align-items: center;
}

.tb-photos-kicker {
  margin: 0 0 0.5rem;
  font-size: 1.6rem;
}

.tb-photos-stats {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.tb-photos-stat {
  min-width: 100px;
  padding: 0.75rem 1rem;
  border-radius: 1rem;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.3);
  text-align: center;
}

.tb-photos-stat-value {
  display: block;
  font-size: 1.7rem;
  font-weight: 600;
}

.tb-photos-stat-label {
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  color: var(--tb-muted);
}

.tb-photos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.tb-photo-card {
  position: relative;
  margin: 0;
  border-radius: 1.4rem;
  overflow: hidden;
  background: rgba(2, 6, 23, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.2);
  box-shadow: 0 20px 40px rgba(2, 6, 23, 0.6);
  transform: translateY(0);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tb-photo-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 25px 60px rgba(15, 23, 42, 0.7);
}

.tb-photo-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 4;
}

.tb-photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(1.1);
  transition: transform 0.4s ease;
}

.tb-photo-card:hover .tb-photo-frame img {
  transform: scale(1.05);
}

.tb-photo-glow {
  position: absolute;
  inset: auto 0 0 0;
  height: 45%;
  background: linear-gradient(180deg, rgba(249, 115, 22, 0), rgba(249, 115, 22, 0.25));
  pointer-events: none;
}

@media (max-width: 720px) {
  .tb-photos-hero {
    padding: 2rem 1.5rem;
  }

  .tb-photos-orbit {
    display: none;
  }

  .tb-photos-meta {
    margin-top: 2rem;
  }

  .tb-photos-grid {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  }
}
