* {
margin: 0;
padding: 0;
box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, monospace, sans-serif;
    background: #0a0a0a;
    color: #e0e0e0;
    min-height: 100vh;
    padding: 20px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

h1 {
    color: #ffffff;
    text-align: center;
    margin-bottom: 40px;
    font-size: 2.5em;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    border-bottom: 3px solid #3a3a3a;
    padding-bottom: 20px;
}

/* Search Bar Styles */
.search-container {
    position: relative;
    max-width: 600px;
    margin: 0 auto 40px;
}

.search-input {
    width: 100%;
    padding: 18px 50px 18px 20px;
    font-size: 1.1em;
    font-weight: 600;
    background: #1a1a1a;
    color: #e0e0e0;
    border: 2px solid #3a3a3a;
    outline: none;
    transition: all 0.3s;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, monospace, sans-serif;
    -webkit-appearance: none;
    border-radius: 8px;
}

.search-input:focus {
    background: #252525;
    color: #ffffff;
    border-color: #5a5a5a;
    box-shadow: 0 0 0 3px rgba(90, 90, 90, 0.2);
}

.search-input::placeholder {
    color: #666;
}

.search-input:focus::placeholder {
    color: #888;
}

.clear-search {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 2em;
    color: #666;
    cursor: pointer;
    padding: 0 10px;
    font-weight: 700;
    transition: all 0.2s;
    -webkit-tap-highlight-color: transparent;
}

.search-input:focus ~ .clear-search {
    color: #e0e0e0;
}

.clear-search:hover {
    transform: translateY(-50%) scale(1.2);
    color: #fff;
}

.no-results {
    text-align: center;
    padding: 60px 20px;
    font-size: 1.3em;
    color: #666;
    font-weight: 600;
}

/* Song Results Dropdown */
.song-results {
    max-width: 600px;
    margin: -30px auto 30px;
    background: #1a1a1a;
    border: 2px solid #3a3a3a;
    border-radius: 8px;
    max-height: 400px;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    -webkit-overflow-scrolling: touch;
}

.song-result-item {
    padding: 15px 20px;
    border-bottom: 1px solid #2a2a2a;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: block;
    color: #e0e0e0;
    -webkit-tap-highlight-color: transparent;
    min-height: 60px;
}

.song-result-item:last-child {
    border-bottom: none;
}

.song-result-item:hover,
.song-result-item:active {
    background: #252525;
    color: #ffffff;
}

.song-result-title {
    font-weight: 900;
    font-size: 1.1em;
    margin-bottom: 5px;
}

.song-result-meta {
    font-size: 0.9em;
    opacity: 0.6;
    font-family: monospace;
}

.song-result-item:hover .song-result-meta,
.song-result-item:active .song-result-meta {
    opacity: 0.8;
}

.song-results-header {
    padding: 12px 20px;
    background: #252525;
    color: #fff;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-size: 0.9em;
    border-bottom: 1px solid #3a3a3a;
}

/* Highlight for search matches */
.highlight {
    background: #ffa500;
    color: #000;
    padding: 2px 4px;
    font-weight: 900;
    border-radius: 3px;
}

/* Grid Layout for Artist Cards */
#artistsList {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
gap: 15px;
padding: 10px;
position: relative;
}

#artistsList.focused .artist-card:not(.expanded) {
opacity: 0.3;
pointer-events: none;
}

/* Compact Artist Cards */
.artist-card {
    background: #1a1a1a;
    color: #e0e0e0;
    border: 2px solid #2a2a2a;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    position: relative;
    -webkit-tap-highlight-color: transparent;
}

.artist-card.hidden {
    display: none;
}

.artist-card:hover,
.artist-card:active {
    background: #252525;
    color: #fff;
    border-color: #4a4a4a;
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.artist-card.expanded {
    grid-column: 1 / -1;
    opacity: 1 !important;
    border-radius: 12px;
}

.artist-header {
    padding: 15px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    min-height: 80px;
    border-bottom: 1px solid #2a2a2a;
    transition: all 0.3s;
    -webkit-tap-highlight-color: transparent;
}

.artist-card.expanded .artist-header {
    position: absolute;
    top: 0;
    left: 0;
    border-bottom: none;
    border-right: 2px solid #3a3a3a;
    padding: 20px 30px;
    min-height: auto;
    background: #252525;
    color: #fff;
    z-index: 10;
    align-items: flex-start;
    text-align: left;
    border-radius: 12px 0 0 0;
}

.artist-card:hover .artist-header,
.artist-card:active .artist-header {
    border-bottom-color: #4a4a4a;
}

.artist-card.expanded:hover .artist-header,
.artist-card.expanded:active .artist-header {
    border-right-color: #4a4a4a;
}

.artist-name {
    font-size: 1.1em;
    font-weight: 700;
    color: inherit;
    word-break: break-word;
    line-height: 1.2;
}

.artist-card.expanded .artist-name {
    font-size: 1.3em;
    text-align: left;
}

.close-btn {
    display: none;
}

.artist-card.expanded .close-btn {
    display: block;
    position: absolute;
    top: 0;
    right: 0;
    background: #252525;
    color: #e0e0e0;
    border: none;
    border-left: 2px solid #3a3a3a;
    border-bottom: 2px solid #3a3a3a;
    padding: 20px 30px;
    font-size: 1.5em;
    font-weight: 900;
    cursor: pointer;
    z-index: 11;
    transition: all 0.3s;
    -webkit-tap-highlight-color: transparent;
    min-height: 60px;
    min-width: 60px;
    border-radius: 0 12px 0 0;
}

.artist-card.expanded .close-btn:hover,
.artist-card.expanded .close-btn:active {
    background: #333;
    color: #fff;
    border-left-color: #5a5a5a;
    border-bottom-color: #5a5a5a;
}

.albums-container {
    display: none;
    padding: 80px 30px 30px 30px;
    background: #1a1a1a;
    color: #e0e0e0;
    max-height: none;
    overflow-y: auto;
    min-height: 300px;
    -webkit-overflow-scrolling: touch;
}

.artist-card.expanded .albums-container {
    display: block;
}

/* Album Simple List */
.album-item {
    padding: 12px 15px;
    margin: 8px 0;
    display: inline-block;
    width: calc(33.333% - 10px);
    margin-right: 10px;
    text-decoration: none;
    color: #e0e0e0;
    transition: all 0.2s;
    font-weight: 600;
    line-height: 1.4;
    border: 2px solid #2a2a2a;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    min-height: 60px;
    background: #1f1f1f;
    border-radius: 6px;
}

.album-item.hidden {
    display: none;
}

.album-item:hover,
.album-item:active {
    background: #2a2a2a;
    color: #fff;
    border-color: #4a4a4a;
    transform: translateX(5px);
}

.album-header {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.album-title {
    font-weight: 700;
    font-size: 1em;
    line-height: 1.3;
}

.album-meta {
    font-size: 0.85em;
    opacity: 0.6;
    font-family: monospace;
}

/* ═══════════════════════════════════════════
 *  ALBUM PAGE HEADER
 * ═══════════════════════════════════════════ */
.album-header {
    background: linear-gradient(135deg, #1a1a1a 0%, #252525 100%);
    color: #ffffff;
    border: 2px solid #3a3a3a;
    border-radius: 12px;
    padding: 40px;
    margin-bottom: 40px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.album-header .artist-name {
    font-size: 1.15em;
    font-weight: 700;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    opacity: 0.7;
    color: #aaa;
}

.album-header .album-title {
    font-size: 2.8em;
    font-weight: 900;
    margin-bottom: 18px;
    line-height: 1.15;
    color: #ffffff;
}

.album-header .album-info {
    font-family: monospace;
    font-weight: 900;
    font-size: 1.45em;
    letter-spacing: 1.2px;
    color: #ffa500;
    margin-top: 10px;
    opacity: 1;
}

/* ═══════════════════════════════════════════
 *  TRACKS TABLE
 * ═══════════════════════════════════════════ */
.tracks-container {
    background: #1a1a1a;
    color: #e0e0e0;
    border: 2px solid #2a2a2a;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 40px;
    -webkit-overflow-scrolling: touch;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.tracks-table {
    width: 100%;
    border-collapse: collapse;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, monospace, sans-serif;
    font-weight: 700;
    font-size: 1.08em;
    letter-spacing: 0.4px;
}

.tracks-table thead {
    background: #252525;
    color: #ffffff;
}

.tracks-table th {
    padding: 16px 18px;
    text-align: left;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1.4px;
    font-size: 0.98em;
    border: 1px solid #1a1a1a;
    white-space: nowrap;
}

.track-row {
    transition: all 0.18s;
    border-bottom: 1px solid #1f1f1f;
    cursor: pointer;
}

.track-row:hover,
.track-row:active {
    background: #252525;
    color: #ffffff;
}

.tracks-table td {
    padding: 14px 18px;
    border: 1px solid #1f1f1f;
    vertical-align: middle;
    font-weight: 700;
}

.track-number {
    font-weight: 900;
    text-align: center;
    font-size: 1.18em;
    width: 90px;
    color: #888;
}

.track-row:hover .track-number,
.track-row:active .track-number {
    color: #ffa500;
}

.track-title-cell {
    min-width: 340px;
}

.track-title {
    font-weight: 900;
    font-size: 1.14em;
    margin-bottom: 4px;
    color: #e0e0e0;
}

.track-row:hover .track-title,
.track-row:active .track-title {
    color: #ffffff;
}

.track-artist {
    font-size: 0.96em;
    font-weight: 600;
    opacity: 0.6;
    color: #aaa;
}

.track-row:hover .track-artist,
.track-row:active .track-artist {
    color: #ccc;
    opacity: 0.8;
}

.track-spec {
    text-align: center;
    font-weight: 900;
    white-space: nowrap;
    font-size: 1.02em;
    color: #888;
}

.track-row:hover .track-spec,
.track-row:active .track-spec {
    color: #aaa;
}

.disc-header {
    background: #252525;
    color: #ffffff;
    padding: 14px 28px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 2.2px;
    margin-top: 40px;
    margin-bottom: 20px;
    font-size: 1.3em;
    border-radius: 8px;
    border: 2px solid #3a3a3a;
}

.disc-header:first-child {
    margin-top: 0;
}

/* Scrollbar styling */
.tracks-container::-webkit-scrollbar,
.song-results::-webkit-scrollbar,
.albums-container::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

.tracks-container::-webkit-scrollbar-track,
.song-results::-webkit-scrollbar-track,
.albums-container::-webkit-scrollbar-track {
    background: #1a1a1a;
}

.tracks-container::-webkit-scrollbar-thumb,
.song-results::-webkit-scrollbar-thumb,
.albums-container::-webkit-scrollbar-thumb {
    background: #3a3a3a;
    border-radius: 5px;
}

.tracks-container::-webkit-scrollbar-thumb:hover,
.song-results::-webkit-scrollbar-thumb:hover,
.albums-container::-webkit-scrollbar-thumb:hover {
    background: #4a4a4a;
}

/* Back button */
.back-btn {
    background: #252525;
    color: #e0e0e0;
    border: 2px solid #3a3a3a;
    border-radius: 8px;
    padding: 14px 36px;
    font-size: 1.1em;
    font-weight: 900;
    margin-bottom: 40px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    transition: all 0.3s;
    -webkit-tap-highlight-color: transparent;
    min-height: 60px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.back-btn:hover,
.back-btn:active {
    background: #333;
    color: #ffffff;
    border-color: #5a5a5a;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

/* ═══════════════════════════════════════════
 *  SONG DETAIL PAGE
 * ═══════════════════════════════════════════ */
.navigation-buttons {
    display: flex;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.song-header {
    background: linear-gradient(135deg, #1a1a1a 0%, #252525 100%);
    color: #ffffff;
    border: 2px solid #3a3a3a;
    border-radius: 12px;
    padding: 40px;
    margin-bottom: 40px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.song-title {
    font-size: 2.8em;
    font-weight: 900;
    margin-bottom: 15px;
    line-height: 1.15;
    color: #ffffff;
}

.song-artist {
    font-size: 1.5em;
    font-weight: 700;
    margin-bottom: 10px;
    opacity: 0.8;
    color: #e0e0e0;
}

.song-album {
    font-size: 1.2em;
    font-weight: 600;
    opacity: 0.6;
    font-family: monospace;
    color: #aaa;
}

.metadata-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.metadata-section {
    background: #1a1a1a;
    color: #e0e0e0;
    border: 2px solid #2a2a2a;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.metadata-section h2 {
    font-size: 1.3em;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 20px;
    border-bottom: 2px solid #3a3a3a;
    padding-bottom: 10px;
    color: #ffffff;
}

.metadata-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #2a2a2a;
    font-family: monospace;
}

.metadata-row:last-child {
    border-bottom: none;
}

.metadata-label {
    font-weight: 700;
    color: #888;
    min-width: 140px;
}

.metadata-value {
    font-weight: 600;
    color: #e0e0e0;
    text-align: right;
    word-break: break-word;
    flex: 1;
}

/* ═══════════════════════════════════════════
 *  TABLET RESPONSIVE (768px - 1024px)
 * ═══════════════════════════════════════════ */
@media (max-width: 1024px) and (min-width: 769px) {
    body {
        padding: 15px;
    }

    h1 {
        font-size: 2.2em;
        margin-bottom: 30px;
    }

    #artistsList {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    }

    .album-item {
        width: calc(50% - 10px);
    }

    .album-header .album-title {
        font-size: 2.5em;
    }
}

/* ═══════════════════════════════════════════
 *  MOBILE RESPONSIVE (481px - 768px)
 * ═══════════════════════════════════════════ */
@media (max-width: 768px) {
    body {
        padding: 15px;
    }

    #artistsList {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    }

    .artist-name {
        font-size: 1em;
    }

    .artist-card.expanded .artist-name {
        font-size: 1.2em;
    }

    h1 {
        font-size: 1.8em;
        margin-bottom: 30px;
        padding-bottom: 15px;
    }

    .search-input {
        font-size: 1em;
        padding: 16px 50px 16px 16px;
    }

    .clear-search {
        font-size: 1.8em;
        padding: 0 8px;
    }

    .album-header {
        padding: 30px 20px;
    }

    .album-header .album-title {
        font-size: 2.2em;
    }

    .album-header .album-info {
        font-size: 1.3em;
    }

    .album-item {
        width: calc(50% - 10px);
        font-size: 0.95em;
        padding: 14px;
        min-height: 70px;
    }

    .albums-container {
        padding: 70px 20px 20px 20px;
    }

    .artist-card.expanded .artist-header {
        padding: 18px 22px;
    }

    .artist-card.expanded .close-btn {
        padding: 18px 25px;
        font-size: 1.4em;
    }

    .tracks-table th:nth-child(5),
    .tracks-table td:nth-child(5) {
        display: none;
    }

    .tracks-table {
        font-size: 1em;
    }

    .track-title-cell {
        min-width: 200px;
    }

    .back-btn {
        padding: 16px 30px;
        font-size: 1em;
        width: 100%;
        margin-bottom: 30px;
    }

    /* Song detail page mobile styles */
    .metadata-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .song-title {
        font-size: 2em;
    }

    .song-artist {
        font-size: 1.2em;
    }

    .metadata-section {
        padding: 20px;
    }

    .metadata-row {
        flex-direction: column;
        gap: 5px;
    }

    .metadata-label {
        min-width: auto;
    }

    .metadata-value {
        text-align: left;
    }
}

/* ═══════════════════════════════════════════
 *  SMALL MOBILE (≤480px)
 * ═══════════════════════════════════════════ */
@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    #artistsList {
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 10px;
    padding: 5px;
    }

    .artist-header {
        padding: 12px 10px;
        min-height: 70px;
    }

    .artist-name {
        font-size: 0.9em;
    }

    .artist-card.expanded .artist-name {
        font-size: 1.1em;
    }

    h1 {
        font-size: 1.5em;
        margin-bottom: 25px;
        padding-bottom: 12px;
        letter-spacing: 1px;
    }

    .search-container {
        margin-bottom: 25px;
    }

    .search-input {
        font-size: 0.95em;
        padding: 14px 45px 14px 14px;
        border: 2px solid #3a3a3a;
    }

    .clear-search {
        font-size: 1.6em;
        right: 8px;
    }

    .song-results {
        margin: -20px auto 25px;
        border: 2px solid #3a3a3a;
        max-height: 300px;
    }

    .song-result-item {
        padding: 12px 15px;
        min-height: 65px;
    }

    .song-result-title {
        font-size: 1em;
    }

    .song-result-meta {
        font-size: 0.85em;
    }

    .album-item {
        width: 100%;
        margin-right: 0;
        padding: 12px;
        min-height: 65px;
        font-size: 0.9em;
    }

    .artist-card.expanded .artist-header {
        position: relative;
        border-right: none;
        border-bottom: 2px solid #3a3a3a;
        padding: 15px;
        align-items: center;
        text-align: center;
        width: 100%;
        border-radius: 12px 12px 0 0;
    }

    .artist-card.expanded .close-btn {
        position: relative;
        border-left: none;
        border-bottom: none;
        border-top: 2px solid #3a3a3a;
        width: 100%;
        padding: 15px;
        font-size: 1.3em;
        border-radius: 0;
    }

    .albums-container {
        padding: 15px !important;
    }

    .album-header {
        padding: 25px 15px;
        border: 2px solid #3a3a3a;
        margin-bottom: 25px;
    }

    .album-header .artist-name {
        font-size: 1em;
        margin-bottom: 10px;
    }

    .album-header .album-title {
        font-size: 1.8em;
        margin-bottom: 12px;
    }

    .album-header .album-info {
        font-size: 1.15em;
    }

    .tracks-container {
        border: 2px solid #3a3a3a;
        margin-bottom: 25px;
    }

    .tracks-table {
        font-size: 0.9em;
    }

    .tracks-table th,
    .tracks-table td {
        padding: 10px 8px;
        border: 1px solid #1f1f1f;
    }

    .tracks-table th:nth-child(3),
    .tracks-table td:nth-child(3),
    .tracks-table th:nth-child(4),
    .tracks-table td:nth-child(4),
    .tracks-table th:nth-child(5),
    .tracks-table td:nth-child(5),
    .tracks-table th:nth-child(6),
    .tracks-table td:nth-child(6) {
        display: none;
    }

    .track-title-cell {
        min-width: auto;
    }

    .track-number {
        width: 50px;
        font-size: 1em;
    }

    .track-title {
        font-size: 1em;
        margin-bottom: 3px;
    }

    .track-artist {
        font-size: 0.85em;
    }

    .disc-header {
        padding: 12px 15px;
        font-size: 1.1em;
        margin-top: 25px;
        margin-bottom: 15px;
    }

    .back-btn {
        padding: 14px 24px;
        font-size: 0.95em;
        border: 2px solid #3a3a3a;
        margin-bottom: 25px;
        width: 100%;
    }

    .no-results {
        padding: 40px 15px;
        font-size: 1.1em;
    }

    /* Song detail page small mobile */
    .song-header {
        padding: 25px 15px;
        border: 2px solid #3a3a3a;
    }

    .song-title {
        font-size: 1.6em;
    }

    .song-artist {
        font-size: 1.1em;
    }

    .song-album {
        font-size: 1em;
    }

    .metadata-section {
        padding: 15px;
    }
}

/* ═══════════════════════════════════════════
 *  EXTRA SMALL MOBILE (≤360px)
 * ═══════════════════════════════════════════ */
@media (max-width: 360px) {
    body {
        padding: 8px;
    }

    #artistsList {
    grid-template-columns: repeat(auto-fit, minmax(95px, 1fr));
    gap: 8px;
    }

    .artist-header {
        padding: 10px 8px;
        min-height: 65px;
    }

    .artist-name {
        font-size: 0.85em;
    }

    h1 {
        font-size: 1.3em;
        margin-bottom: 20px;
    }

    .search-input {
        font-size: 0.9em;
        padding: 12px 40px 12px 12px;
    }

    .album-header .album-title {
        font-size: 1.6em;
    }

    .album-item {
        padding: 10px;
        font-size: 0.85em;
    }

    .tracks-table {
        font-size: 0.85em;
    }

    .tracks-table th,
    .tracks-table td {
        padding: 8px 6px;
    }

    .song-title {
        font-size: 1.4em;
    }
}

/* ═══════════════════════════════════════════
 *  TOUCH DEVICE IMPROVEMENTS
 * ═══════════════════════════════════════════ */
@media (hover: none) and (pointer: coarse) {
    .artist-header {
        min-height: 80px;
    }

    .album-item {
        min-height: 70px;
        padding: 15px;
    }

    .song-result-item {
        min-height: 70px;
    }

    .back-btn {
        min-height: 65px;
    }

    .clear-search {
        padding: 0 15px;
    }

    .artist-card:hover {
        transform: none;
    }

    .artist-card:active {
        transform: translateY(-3px);
    }
}

/* ═══════════════════════════════════════════
 *  LANDSCAPE ORIENTATION FIXES
 * ═══════════════════════════════════════════ */
@media (max-height: 500px) and (orientation: landscape) {
    .albums-container {
        max-height: 300px;
        overflow-y: auto;
    }

    .song-results {
        max-height: 250px;
    }

    h1 {
        font-size: 1.5em;
        margin-bottom: 20px;
    }
}
