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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    min-height: 100vh;
    background: linear-gradient(135deg, #FF6B35 0%, #004E89 100%);
    color: white;
    padding: 1.5rem;
}

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

header {
    text-align: center;
    margin-bottom: 2rem;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
}

.stats {
    font-size: 0.9rem;
    opacity: 0.7;
    margin-top: 0.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.hearts-link {
    cursor: pointer;
    background: rgba(255, 255, 255, 0.15);
    padding: 0.4rem 0.8rem;
    border-radius: 1rem;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.hearts-link:active {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(0.95);
}

.loading {
    text-align: center;
    font-size: 1.25rem;
    opacity: 0.8;
    margin: 3rem 0;
}

.keyboard-hints {
    text-align: center;
    font-size: 0.75rem;
    opacity: 0.5;
    margin-top: 1.5rem;
    display: none;
}

@media (min-width: 768px) {
    .keyboard-hints {
        display: block;
    }
}

kbd {
    background: rgba(255, 255, 255, 0.15);
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
    font-family: monospace;
    font-size: 0.7rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Genre List */
.genre-list {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 1rem;
    overflow: hidden;
}

.genre-item {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.genre-item:active {
    background: rgba(255, 255, 255, 0.2);
}

.genre-name {
    font-size: 1.1rem;
    font-weight: 500;
}

.genre-count {
    background: rgba(255, 255, 255, 0.25);
    padding: 0.3rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.9rem;
    font-weight: 600;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #FF6B35 0%, #004E89 100%);
    z-index: 1000;
    overflow-y: auto;
}

.modal.active {
    display: block;
}

.modal-header {
    position: sticky;
    top: 0;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    padding: 1rem 1.5rem;
    z-index: 1001;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
}

.modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    max-width: 600px;
    margin: 0 auto;
    padding: 1rem;
    padding-bottom: 5rem;
}

.artist-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.artist-card {
    background: rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
}

.artist-card:last-child {
    border-bottom: none;
}

.artist-card img {
    width: 60px;
    height: 60px;
    border-radius: 0.5rem;
    object-fit: cover;
    flex-shrink: 0;
}

.artist-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.artist-name-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.4rem;
}

.heart-button {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0 0 0 0.3rem;
    line-height: 1;
    transition: all 0.2s;
    vertical-align: baseline;
}

.heart-button.hearted {
    color: #FF6B35;
}

.heart-button:active {
    transform: scale(1.2);
}

.streaming-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.4rem;
}

.streaming-link {
    color: white;
    text-decoration: none;
    padding: 0.3rem 0.6rem;
    border-radius: 0.4rem;
    font-size: 0.7rem;
    font-weight: 600;
    white-space: nowrap;
    transition: opacity 0.2s;
}

.streaming-link:active {
    opacity: 0.8;
}

.streaming-link.spotify {
    background: #1DB954;
}

.streaming-link.deezer {
    background: #FF0092;
}

.streaming-link.youtube {
    background: #FF0000;
}

.streaming-link.apple {
    background: #FA243C;
}

.streaming-link.tidal {
    background: #000000;
}

.artist-card h3 {
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.artist-card .fans {
    font-size: 0.85rem;
    opacity: 0.7;
}

.artist-bio {
    font-size: 0.8rem;
    opacity: 0.75;
    margin-top: 0.4rem;
    line-height: 1.3;
    font-style: italic;
}

.artist-genres {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.5rem;
}

.genre-tag {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.2rem 0.6rem;
    border-radius: 1rem;
    font-size: 0.7rem;
    opacity: 0.8;
    white-space: nowrap;
}

.play-button {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.4);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s;
}

.play-button:active {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(0.95);
}

.play-button.playing {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(255, 255, 255, 0.9);
}

.play-button svg {
    fill: white;
}

.play-button.playing svg {
    fill: #333;
}

.no-preview {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.3;
    font-size: 0.75rem;
}

/* Player Controls */
.player-controls {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1001;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.modal.active .player-controls {
    opacity: 1;
    pointer-events: all;
}

.player-buttons {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.player-button {
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.4);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.player-button:active {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(0.95);
}

.player-button.play-pause {
    width: 64px;
    height: 64px;
    background: rgba(255, 255, 255, 0.9);
}

.player-button.play-pause svg {
    fill: #333;
}

.player-button:not(.play-pause) svg {
    fill: white;
}

.player-info {
    flex: 1;
    text-align: left;
    min-width: 0;
    padding: 0 1rem;
}

.player-artist-name {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.2rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-track-info {
    font-size: 0.75rem;
    opacity: 0.7;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-heart-button {
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.4);
    color: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.5rem;
    transition: all 0.2s;
    flex-shrink: 0;
}

.player-heart-button.hearted {
    color: #FF6B35;
    background: rgba(255, 107, 53, 0.2);
    border-color: rgba(255, 107, 53, 0.4);
}

.player-heart-button:active {
    transform: scale(0.95);
}
