/* === Player Page Styles === */
body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    background-color: black;
    overflow: hidden;
  }
  .content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
  }
  .image-content {
    position: absolute;
    width: 100%;
    height: 100%;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    display: none;
    opacity: 0;
  }
  .library-item {
    position: absolute;
    width: 100%;
    height: 100%;
    border: none;
    display: none;
  }
  video {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
  }
  /* --- Loading Screen (updated to look like the pairing page) --- */
  .loading {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: radial-gradient(circle, rgba(255,255,255,1) 0%, rgba(200,200,200,1) 100%);
    font-family: monospace;
    z-index: 1000;
  }
  .loading .player {
    text-align: center;
    color: #000;
  }
  .loading .player img {
    width: 650px;
  }
  .loading .player p {
    font-size: 2em;
    margin: 0.5em 0 0 0;
  }
  #downloadStatus, #downloadProgress {
    font-size: 1.5em;
    color: rgb(185 28 28);
    font-family: monospace;
  }
  /* Debug bar (optional) */
  #debugBar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 20%;
    background-color: rgba(255, 255, 255, 0.9);
    color: rgb(255, 0, 0);
    font-family: monospace;
    font-size: 12px;
    z-index: 2147483647;
    padding: 4px 8px;
    box-sizing: border-box;
    overflow-y: scroll;
    box-shadow: 0px 0px 36px 0px rgba(0,0,0,0.75);
  }
  #debugBar .debug-message { margin: 0; }
  #debugBar span:first-of-type { font-weight: bold; font-size: 1.5em; margin-top: 10px; }
  #debugBar p:first-of-type { font-weight: bold; font-size: 1.3em; margin-top: 10px; }
  #debugBar::after {
    content: "";
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40px;
    background: linear-gradient(to bottom, transparent, white);
    pointer-events: none;
  }
  #pairingCode {
    font-size: 1.5em;
    margin-top: 10px;
    margin-right: 10px;
    position: absolute;
    top: 0;
    right: 0;
    font-weight: bold;
    letter-spacing: 5px;
  }
  #debugProgress {
    position: absolute;
    top: 0;
    left: 0;
    height: 4px;
    background-color: rgba(255, 0, 0, 0.8);
    width: 0%;
    transition: width linear;
  }

  /* === Pairing Overlay Styles === */
  #pairingOverlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255,255,255,1) 0%, rgba(200,200,200,1) 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 3000;
  }
  #pairingOverlay .player {
    text-align: center;
    color: #000;
    font-family: monospace;
  }
  #pairingOverlay .player-code {
    font-size: 6rem;
    font-family: monospace;
    letter-spacing: 50px;
    padding-left: 25px;
    margin: 0;
  }
  .network-error {
    position: absolute;
    bottom: 10px;
    right: 10px;
    z-index: 99999;
    width: 60px;
    height: 60px;
    opacity: 0.5;
  }
  .shimmer {
    text-align: center;
    color: rgba(255, 255, 255, 0.1);
    background: linear-gradient(to right, #111 0%, #444 50%, #111 100%);
    background-size: 125px 100%;
    -webkit-background-clip: text;
    background-clip: text;
    animation: shimmer 6s infinite;
  }
  @keyframes shimmer {
    0% { background-position: 0 0; }
    50% { background-position: 125px 0; }
    100% { background-position: 0 0; }
  }
  .spinner {
    animation: rotate 2s linear infinite;
  }
  .path {
    stroke: #4fa6b7;
    stroke-dasharray: 187;
    stroke-dashoffset: 0;
    transform-origin: center;
    animation: dash 1.5s ease-in-out infinite, color 6s ease-in-out infinite;
  }
  @keyframes rotate {
    100% { transform: rotate(360deg); }
  }
  @keyframes dash {
    0% { stroke-dasharray: 1, 187; stroke-dashoffset: 0; }
    50% { stroke-dasharray: 100, 187; stroke-dashoffset: -55; }
    100% { stroke-dasharray: 187, 187; stroke-dashoffset: -187; }
  }
  @keyframes color {
    0% { stroke: #ba1c1b; }
    33% { stroke: #8f1111; }
    66% { stroke: #ba1c1b; }
    100% { stroke: #8f1111; }
  }