/* Global Styles & Retro 80s Theme */
:root {
    --neon-purple: #b026ff;
    --neon-blue: #0ff0fc;
    --neon-pink: #ff2a6d;
    --neon-green: #05ffa1;
  }

  body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: 'Courier New', monospace;
    color: white;
    background: linear-gradient(to bottom, #333333, #000000);
    overflow-x: hidden;
  }

  /* Pixelated background gradient */
  body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="4" height="4" viewBox="0 0 4 4"><rect width="1" height="1" fill="rgba(0,0,0,0.3)" /><rect x="2" y="2" width="1" height="1" fill="rgba(0,0,0,0.3)" /></svg>');
    background-size: 4px 4px;
    opacity: 0.3;
    z-index: -1;
    pointer-events: none;
  }

  .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
  }

  header {
    margin-bottom: 30px;
    text-align: center;
  }

  h1 {
    font-size: 3em;
    text-transform: uppercase;
    margin-bottom: 0;
    text-shadow:
      0 0 5px var(--neon-blue),
      0 0 10px var(--neon-blue),
      0 0 20px var(--neon-blue);
    animation: neon-flicker 1.5s infinite alternate;
  }

  /* Cassette Container */
  .cassette-container {
    position: relative;
    max-width: 700px;
    width: 100%;
    margin: 0 auto 40px;
    text-align: center;
  }

  .cassette-image {
    width: 100%;
    max-width: 500px;
    filter: drop-shadow(0 0 10px var(--neon-green));
  }

  /* Search Box Styling */
  .search-area {
    position: absolute;
    top: 25%;
    left: 47.8%;
    transform: translate(-50%, -50%);
    width: 47%;
    z-index: 10;
  }

  .search-container {
    position: relative;
    width: 100%;
  }

  #package-search {
    width: 100%;
    padding: 10px 15px;
    border: 2px solid var(--neon-pink);
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    font-family: 'Courier New', monospace;
    font-size: 1em;
    border-radius: 0;
    outline: none;
    box-shadow: 0 0 10px var(--neon-pink);
    transition: all 0.3s ease;
  }

  #package-search:focus {
    box-shadow: 0 0 15px var(--neon-pink), 0 0 20px var(--neon-pink);
  }

  #suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    border: 1px solid var(--neon-blue);
    box-shadow: 0 0 10px var(--neon-blue);
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
  }

  .suggestion-item {
    padding: 8px 15px;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .suggestion-item:hover {
    background-color: rgba(11, 240, 252, 0.3);
  }

  /* Results Table Styling */
  .results-container {
    width: 100%;
    max-width: 800px;
    margin-top: 20px;
    overflow-x: auto;
  }

  table {
    width: 100%;
    border-collapse: collapse;
    background-color: rgba(0, 0, 0, 0.7);
    border: 2px solid var(--neon-purple);
    box-shadow: 0 0 15px var(--neon-purple);
  }

  th {
    background-color: rgba(176, 38, 255, 0.3);
    padding: 12px;
    text-align: left;
    font-weight: bold;
    text-transform: uppercase;
    border-bottom: 2px solid var(--neon-purple);
  }

  td {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  tr:hover {
    background-color: rgba(176, 38, 255, 0.2);
  }

  /* Ensure hyperlinks in the results are always white and underlined */
  .results-container a {
    color: white;
    text-decoration: none;
  }

  .results-container a:hover {
    text-decoration: underline;
  }

  /* Loading indicator */
  .loading {
    text-align: center;
    margin: 20px;
    font-size: 1.2em;
    color: var(--neon-blue);
    text-shadow: 0 0 5px var(--neon-blue);
    animation: neon-pulse 1.5s infinite;
  }

  /* Scanline effect */
  .scanlines {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background: linear-gradient(
      to bottom,
      rgba(255, 255, 255, 0),
      rgba(255, 255, 255, 0) 50%,
      rgba(0, 0, 0, 0.1) 50%,
      rgba(0, 0, 0, 0.1)
    );
    background-size: 100% 4px;
    z-index: 999;
    pointer-events: none;
    opacity: 0.3;
  }

  /* CRT flicker effect */
  @keyframes neon-flicker {
    0%, 19%, 21%, 23%, 25%, 54%, 56%, 100% {
      text-shadow:
        0 0 5px var(--neon-blue),
        0 0 10px var(--neon-blue),
        0 0 20px var(--neon-blue);
    }
    20%, 24%, 55% {
      text-shadow: none;
    }
  }

  @keyframes neon-pulse {
    0%, 100% {
      opacity: 1;
    }
    50% {
      opacity: 0.5;
    }
  }

  /* No results message */
  .no-results {
    text-align: center;
    padding: 20px;
    font-size: 1.2em;
    color: var(--neon-pink);
    border: 1px dashed var(--neon-pink);
    margin-top: 20px;
    animation: neon-pulse 1.5s infinite alternate;
  }

  /* Responsive adjustments */
  @media (max-width: 768px) {
    .search-area {
      width: 80%;
    }

    h1 {
      font-size: 2em;
    }
  }

  @media (max-width: 480px) {
    h1 {
      font-size: 1.5em;
    }
  }

/* Add this to styles.css */
/* Tracklist Styling */
.tracklist-container {
    display: flex;
    justify-content: space-between;
    max-width: 800px;
    width: 100%;
    margin: 0 auto 40px;
    background-color: rgba(0, 0, 0, 0.7);
    border: 2px solid var(--neon-purple);
    padding: 15px;
    box-shadow: 0 0 15px var(--neon-purple);
    transition: max-height 0.3s ease;
    overflow: hidden;
  }

  .tracklist-container.collapsed {
    max-height: 20px;
    cursor: pointer;
  }

  .tracklist-container.expanded {
    max-height: 380px; /* Adjusted to fit all items without scrolling */
  }

  .tracklist {
    height: auto;
    overflow: hidden;
  }

  .tracklist-side {
    width: 48%;
  }

  .tracklist-header {
    text-transform: uppercase;
    font-weight: bold;
    color: var(--neon-pink);
    text-shadow: 0 0 5px var(--neon-pink);
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid var(--neon-pink);
  }



  .track-item {
    padding: 6px 0;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .track-item:hover {
    color: var(--neon-green);
    text-shadow: 0 0 5px var(--neon-green);
    transform: translateX(5px);
  }

  .track-number {
    display: inline-block;
    width: 30px;
    color: var(--neon-blue);
    font-weight: bold;
  }

  /* Responsive adjustments for tracklist */
  @media (max-width: 600px) {
    .tracklist-container {
      flex-direction: column;
    }

    .tracklist-side {
      width: 100%;
    }

    .tracklist-side:first-child {
      margin-bottom: 20px;
    }
  }

  /* Clear Button Styling */
.clear-button {
  position: absolute;
  right: -26px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: white;
  font-size: 1.2em;
  cursor: pointer;
  outline: none;
}
