:root {
    /* New Color Palette */
    --primary-color: #E4004B;
    --secondary-color: #ED7755;
    --tertiary-color: #FAD691;
    
    /* Neutral Colors */
    --bg-primary: #121212;
    --bg-secondary: #181818;
    --bg-tertiary: #282828;
    --bg-quaternary: #404040;
    --text-primary: #ffffff;
    --text-secondary: #b3b3b3;
    --text-muted: #666666;
    --border-color: #535353;
}

* {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    margin: 0;
    padding: 0;
    padding-bottom: 120px;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
        max-width: 100%;
        width: 100%;
        overflow-x: hidden;
        box-sizing: border-box;
    }
}

.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--bg-tertiary);
}

.title-section {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.beta-badge {
    background: rgba(250, 214, 145, 0.15);
    color: var(--tertiary-color);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid rgba(250, 214, 145, 0.3);
}

@media (max-width: 768px) {
    .app-header {
        flex-direction: column;
        gap: 15px;
        margin-bottom: 20px;
    }
}

.main-title {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 50%, var(--tertiary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 2rem;
    margin: 0;
    font-weight: 700;
}

@media (max-width: 768px) {
    .main-title {
        font-size: 1.5rem;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .main-title {
        font-size: 1.5rem;
    }
}

.auth-section {
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 16px;
}

@media (max-width: 768px) {
    .user-profile {
        justify-content: center;
        flex-wrap: wrap;
    }
}

.profile-image {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 600;
    font-size: 14px;
}

.user-followers {
    font-size: 12px;
    color: #b3b3b3;
}

.auth-buttons {
    display: flex;
    gap: 10px;
}

.login-section {
    text-align: center;
}

.login-section p {
    margin-bottom: 16px;
    color: #b3b3b3;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 24px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-spotify {
    background-color: var(--primary-color);
    color: white;
}

.btn-spotify:hover {
    background-color: var(--secondary-color);
    box-shadow: 0 0 16px rgba(237, 119, 85, 0.4);
    transform: scale(1.02);
}

.btn-secondary {
    background-color: var(--bg-tertiary);
    color: white;
}

.btn-secondary:hover {
    background-color: var(--bg-quaternary);
}

.btn-outline {
    background-color: transparent;
    color: #b3b3b3;
    border: 1px solid var(--border-color);
}

.btn-outline:hover {
    background-color: var(--bg-tertiary);
    color: white;
}

.welcome-content {
    text-align: center;
    padding: 60px 20px;
}

.welcome-content h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.welcome-content p {
    font-size: 1.2rem;
    color: #b3b3b3;
    margin-bottom: 30px;
}

.features {
    list-style: none;
    padding: 0;
    max-width: 500px;
    margin: 0 auto;
}

.features li {
    padding: 12px 0;
    font-size: 1.1rem;
    color: #ffffff;
}

.features li::before {
    content: "♪";
    color: var(--primary-color);
    margin-right: 12px;
    font-size: 1.2rem;
}

.content-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--bg-tertiary);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

@media (min-width: 480px) {
    .content-tabs {
        gap: 8px;
        margin-bottom: 24px;
    }
}

.tab-btn {
    background: none;
    border: none;
    color: #b3b3b3;
    padding: 10px 0;
    margin-right: 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
    white-space: nowrap;
}

@media (min-width: 480px) {
    .tab-btn {
        padding: 12px 0;
        margin-right: 32px;
        font-size: 16px;
    }
}

#search-tab {
    font-size: 14px !important;
}

@media (min-width: 480px) {
    #search-tab {
        font-size: 16px !important;
    }
}

.tab-btn:hover {
    color: #ffffff;
}

.tab-btn.active {
    color: #ffffff;
    border-bottom-color: var(--primary-color);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.music-list {
    display: grid;
    gap: 12px;
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .music-list {
        gap: 16px;
    }
}

.music-item {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, rgba(237, 119, 85, 0.02) 100%);
    border: 1px solid rgba(228, 0, 75, 0.05);
    padding: 8px 10px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s ease;
    cursor: pointer;
    width: 100%;
    box-sizing: border-box;
    min-width: 0;
    overflow: hidden;
}

@media (min-width: 480px) {
    .music-item {
        padding: 12px;
        gap: 12px;
    }
}

/* Mobile music item improvements */
@media (max-width: 480px) {
    .music-item {
        padding: 16px 12px;
        gap: 8px;
        margin-bottom: 12px;
    }
    
    .like-btn {
        padding: 4px;
        margin-right: -4px;
    }
    
    .play-btn-small {
        margin-left: -4px;
        padding: 4px;
    }
    
    .add-to-queue-btn {
        padding: 8px;
        min-width: 36px;
        height: 36px;
        border-radius: 6px;
        justify-content: center;
    }
    
    .add-to-queue-btn span {
        display: none;
    }
}

.music-item:hover {
    background: linear-gradient(135deg, var(--bg-tertiary) 0%, rgba(237, 119, 85, 0.12) 100%);
    border-color: rgba(237, 119, 85, 0.25);
    box-shadow: 0 2px 12px rgba(237, 119, 85, 0.2);
    transform: translateY(-1px);
}

.music-item-cover {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    overflow: hidden;
    background-color: var(--bg-quaternary);
    flex-shrink: 0;
}

@media (min-width: 480px) {
    .music-item-cover {
        width: 48px;
        height: 48px;
    }
}

.music-item-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.music-item-info {
    flex: 1;
    min-width: 0; /* Allows text truncation */
    overflow: hidden;
}

.music-item-title {
    font-weight: 600;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 14px;
}

@media (min-width: 480px) {
    .music-item-title {
        font-size: 16px;
    }
}

.music-item-artist {
    color: #b3b3b3;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (min-width: 480px) {
    .music-item-artist {
        font-size: 13px;
    }
}

.music-item-duration {
    color: #b3b3b3;
    font-size: 12px;
    font-weight: 500;
    flex-shrink: 0;
    margin-left: auto;
    padding-right: 4px;
    display: none;
}

@media (min-width: 480px) {
    .music-item-duration {
        display: block;
        font-size: 13px;
        padding-right: 8px;
    }
}

.loading {
    text-align: center;
    color: #b3b3b3;
    padding: 40px 20px;
    font-style: italic;
}

/* Spotify Player Styles */
.spotify-player {
    background: linear-gradient(135deg, rgba(228, 0, 75, 0.1) 0%, rgba(237, 119, 85, 0.05) 50%, rgba(40, 40, 40, 0.75) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(228, 0, 75, 0.2);
    border-radius: 12px 12px 0 0;
    padding: 16px 24px;
    box-shadow: 0 -4px 20px rgba(237, 119, 85, 0.15);
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.player-controls-center {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1001;
}

.control-btn {
    background: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: black;
}

.control-btn:hover {
    background: #f0f0f0;
    color: black;
    transform: scale(1.1);
}

.play-btn {
    background: white;
    color: black;
    width: 38px;
    height: 38px;
}

.play-btn:hover {
    background: #f0f0f0;
    transform: scale(1.15);
}

.progress-and-volume {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 32px;
}

.now-playing-info {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 220px;
    max-width: calc(50% - 280px);
    flex-shrink: 1;
    margin-top: -24px;
    overflow: hidden;
}

.track-image {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    object-fit: cover;
    background-color: var(--bg-quaternary);
    flex-shrink: 0;
}

.track-details {
    flex: 1;
    min-width: 0;
    position: relative;
    overflow: hidden;
}

.track-name {
    font-size: 14px;
    font-weight: 600;
    color: white;
    margin-bottom: 1px;
    white-space: nowrap;
    overflow: hidden;
    position: relative;
}

.track-name {
    -webkit-mask-image: linear-gradient(to right, white 0%, white 70%, transparent 100%);
    mask-image: linear-gradient(to right, white 0%, white 70%, transparent 100%);
}

.track-name::after {
    display: none;
}

.track-artist {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    white-space: nowrap;
    overflow: hidden;
    position: relative;
}

.track-artist {
    -webkit-mask-image: linear-gradient(to right, white 0%, white 70%, transparent 100%);
    mask-image: linear-gradient(to right, white 0%, white 70%, transparent 100%);
}

.track-artist::after {
    display: none;
}

.progress-container {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 480px;
    justify-content: center;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 48%;
    max-width: 1200px;
}

.time {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    min-width: 40px;
}

/* Custom Progress Bar */
.progress-bar-wrapper {
    flex: 1;
    max-width: 1080px;
    min-width: 360px;
    cursor: pointer;
    position: relative;
}

.progress-track {
    position: relative;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
}

.progress-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 2px;
    width: 0%;
    transition: none;
}

.progress-thumb {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    left: 0%;
    transition: none;
    z-index: 2;
}

.progress-thumb:hover {
    transform: translate(-50%, -50%) scale(1.2);
    box-shadow: 0 0 8px rgba(237, 119, 85, 0.6);
}

.progress-bar-wrapper.dragging .progress-thumb {
    transform: translate(-50%, -50%) scale(1.3);
    box-shadow: 0 0 12px rgba(237, 119, 85, 0.8);
}

.volume-container {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 140px;
    max-width: calc(50% - 280px);
    flex-shrink: 1;
    position: absolute;
    right: 24px;
}

.autoplay-toggle {
    background: none;
    border: none;
    color: #b3b3b3;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.autoplay-toggle:hover {
    color: #ffffff;
}

.autoplay-toggle.active {
    color: var(--primary-color);
    filter: drop-shadow(0 0 6px rgba(237, 119, 85, 0.5));
}

.autoplay-toggle.active:hover {
    color: var(--secondary-color);
    filter: drop-shadow(0 0 8px rgba(237, 119, 85, 0.8));
}

.volume-bar-wrapper {
    flex: 1;
    min-width: 80px;
    max-width: 100px;
    display: flex;
    align-items: center;
}

.volume-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
    -webkit-appearance: none;
}

.volume-bar::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
}

.volume-bar::-moz-range-thumb {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    border: none;
}

.play-btn-small {
    background: transparent;
    color: #b3b3b3;
    border: none;
    width: 28px;
    height: 28px;
    min-width: 28px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.1s ease;
    padding: 0;
}

@media (min-width: 480px) {
    .play-btn-small {
        width: 32px;
        height: 32px;
        min-width: 32px;
    }
}

.music-item:hover .play-btn-small {
    color: white;
    transform: scale(1.2);
}

.play-btn-small:active {
    transform: scale(1.0);
}

.play-btn-small.playing {
    color: var(--primary-color);
    filter: drop-shadow(0 0 8px rgba(237, 119, 85, 0.7));
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--secondary-color);
    box-shadow: 0 0 12px rgba(237, 119, 85, 0.5);
}

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 500;
}

.load-more-container {
    text-align: center;
    padding: 24px 0;
    border-top: 1px solid var(--bg-tertiary);
    margin-top: 16px;
}

.load-more-info {
    color: #b3b3b3;
    font-size: 14px;
    margin-bottom: 12px;
}

.load-more-btn {
    padding: 12px 32px;
    font-size: 14px;
    font-weight: 600;
    background-color: var(--bg-tertiary);
    color: white;
    border: none;
    border-radius: 24px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.load-more-btn:hover {
    background-color: var(--bg-quaternary);
    transform: translateY(-2px);
}


@media (max-width: 1024px) {
    .now-playing-info {
        max-width: calc(50% - 220px);
    }
    
    .volume-container {
        max-width: calc(50% - 220px);
        width: 120px;
    }
}

@media (max-width: 480px) {
    .app-header {
        flex-direction: column;
        gap: 16px;
        text-align: center;
        padding-bottom: 16px;
    }
    
    body {
        padding-bottom: 160px;
    }
    
    .user-content {
        padding: 0;
    }
}

@media (max-width: 768px) {
    .app-header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .title-section {
        align-items: center;
    }
    
    .beta-badge {
        font-size: 11px;
        padding: 3px 10px;
    }
    
    .welcome-content {
        padding: 40px 15px;
    }
    
    .welcome-content h2 {
        font-size: 2rem;
    }
    
    .welcome-content p {
        font-size: 1.1rem;
    }
    
    .user-profile {
        flex-direction: column;
        gap: 12px;
    }
    
    .auth-buttons {
        justify-content: center;
    }
    
    .spotify-player {
        padding: 12px 16px;
    }
    
    .player-controls-center {
        top: 6px;
        gap: 12px;
    }
    
    .control-btn {
        width: 36px;
        height: 36px;
    }
    
    .play-btn {
        width: 44px;
        height: 44px;
    }
    
    .progress-and-volume {
        flex-direction: column;
        gap: 8px;
        margin-top: 24px;
        position: relative;
    }
    
    .now-playing-info {
        width: 100%;
        max-width: none;
        justify-content: center;
        margin-top: -12px;
    }
    
.progress-container {
        min-width: 180px;
        width: 57%;
        position: static;
        transform: none;
        left: auto;
        max-width: none;
        align-self: center;
    }
    
    .progress-bar-wrapper {
        max-width: 480px;
        min-width: 150px;
    }
    
    .volume-container {
        width: 120px;
        max-width: none;
        align-self: center;
        position: static;
        right: auto;
    }
    
    body {
        padding-bottom: 100px !important;
        overflow-x: hidden !important;
        width: 100% !important;
        max-width: 100vw !important;
    }
}

/* Back Button Styles */
.back-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: rgba(255, 255, 255, 0.8);
    flex-shrink: 0;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    transform: scale(1.1);
}

.back-btn:active {
    transform: scale(0.95);
}

/* Analysis Button Styles */
.like-btn {
    background: transparent;
    color: #b3b3b3;
    border: none;
    padding: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.like-btn:hover {
    color: var(--secondary-color);
    transform: scale(1.1);
}

.like-btn.liked {
    color: var(--tertiary-color);
}

.like-btn .heart-icon {
    transition: all 0.2s ease;
}

.analyze-btn {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    color: #ffffff;
    border: 1px solid var(--primary-color);
    border-radius: 6px;
    padding: 6px 8px;
    font-size: 11px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: 8px;
    flex-shrink: 0;
    white-space: nowrap;
    box-shadow: 0 0 16px rgba(237, 119, 85, 0.6);
}

@media (min-width: 480px) {
    .analyze-btn {
        padding: 8px 12px;
        font-size: 12px;
        gap: 6px;
        margin-left: auto;
    }
}

.analyze-btn:hover {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    color: #ffffff;
    border-color: var(--primary-color);
    box-shadow: 0 0 20px rgba(237, 119, 85, 0.8);
    transform: translateY(-1px) scale(1.02);
}

.analyze-btn svg {
    width: 14px;
    height: 14px;
}

/* Main Layout with Analysis Panel */
.main-layout {
    display: flex;
    gap: 0;
    height: calc(100vh - 200px); /* Adjust for header and player */
}

.content-area {
    flex: 1;
    transition: margin-right 0.3s ease;
}

/* Fallback for browsers without :has() support */
.content-area.panel-open {
    margin-right: 500px;
}

/* Playlist Selection Header */
.playlist-selection-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
    gap: 20px;
}

.playlist-selection-text {
    flex: 1;
}

.playlist-selection-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: start;
}

.playlist-checkboxes {
    flex: 1;
}

/* Integrated Progress Panel */
.progress-panel {
    width: 320px;
    background-color: var(--bg-secondary);
    border: 1px solid #404040;
    border-radius: 8px;
    flex-shrink: 0;
    align-self: flex-start;
    max-height: 500px;
    overflow-y: auto;
}

.progress-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid #404040;
}

.progress-panel-header h4 {
    margin: 0;
    color: #ffffff;
    font-size: 16px;
}

.close-progress-btn {
    background: none;
    border: none;
    color: #b3b3b3;
    cursor: pointer;
    padding: 4px;
    transition: color 0.2s ease;
}

.close-progress-btn:hover {
    color: #ffffff;
}

.progress-panel-content {
    padding: 16px;
}

.progress-stats {
    color: #b3b3b3;
    font-size: 14px;
    margin-bottom: 12px;
    text-align: center;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background-color: var(--bg-quaternary);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 16px;
}

.progress-fill {
    height: 100%;
    background-color: var(--secondary-color);
    box-shadow: 0 0 8px rgba(237, 119, 85, 0.4);
    transition: width 0.3s ease;
    width: 0%;
}

.current-song {
    margin-bottom: 16px;
}

.current-song-label {
    color: #b3b3b3;
    font-size: 12px;
    display: block;
    margin-bottom: 4px;
}

.current-song-info {
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
}

.completed-songs {
    max-height: 200px;
    overflow-y: auto;
}

.completed-song {
    display: flex;
    align-items: center;
    padding: 4px 0;
    font-size: 12px;
    border-bottom: 1px solid #2a2a2a;
}

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

.completed-song-status {
    width: 16px;
    margin-right: 8px;
    flex-shrink: 0;
    text-align: center;
    font-weight: bold;
}

.completed-song.success .completed-song-status {
    color: var(--primary-color);
}

.completed-song.failed .completed-song-status {
    color: var(--secondary-color);
}

.completed-song-info {
    flex: 1;
    overflow: hidden;
}

.completed-song-name {
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.completed-song-artist {
    color: #b3b3b3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 11px;
}

/* Tablet responsive design */
@media (max-width: 1024px) and (min-width: 769px) {
    .playlist-selection-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* Mobile responsive design */
@media (max-width: 768px) {
    .playlist-selection-header {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }
    
    .playlist-selection-content {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .progress-panel {
        width: 100%;
    }
    
    .playlist-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    
    .delete-playlist-btn {
        justify-content: center;
    }
}

/* Analysis Panel Styles */
.analysis-panel {
    position: fixed;
    top: 0; /* Fill from top */
    right: -500px; /* Hidden by default */
    width: 500px;
    height: 100vh; /* Full height */
    background-color: #1a1a1a;
    border-left: 1px solid #404040;
    transition: right 0.3s ease;
    z-index: 100;
    display: flex;
    flex-direction: column;
}

.analysis-panel.active {
    right: 0;
}

.analysis-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #404040;
    background-color: var(--bg-tertiary);
}

.analysis-panel-header h3 {
    margin: 0;
    color: #ffffff;
    font-size: 18px;
    font-weight: 600;
}

.close-panel-btn {
    background: transparent;
    border: none;
    color: #b3b3b3;
    cursor: pointer;
    padding: 6px;
    border-radius: 4px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-panel-btn:hover {
    background-color: var(--bg-quaternary);
    color: #ffffff;
}

.analysis-panel-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.analysis-placeholder {
    text-align: center;
    color: #b3b3b3;
    padding: 40px 20px;
}

.analysis-placeholder p {
    margin: 0;
    font-style: italic;
}

.song-info {
    margin-bottom: 16px;
    text-align: center;
    border-bottom: 1px solid #404040;
    padding-bottom: 12px;
}

.song-info h4 {
    margin: 0 0 2px 0;
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
}

.song-info p {
    margin: 0;
    color: #b3b3b3;
    font-size: 13px;
}

.analysis-loading {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #b3b3b3;
    font-size: 14px;
}

.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid var(--bg-quaternary);
    border-top: 2px solid var(--secondary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.analysis-results {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.analysis-section h4 {
    margin: 0 0 6px 0;
    font-size: 13px;
    font-weight: 600;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.key-result {
    background-color: var(--primary-color);
    color: white;
    font-weight: 700;
    font-size: 15px;
    padding: 6px 10px;
    border-radius: 4px;
    display: inline-block;
    letter-spacing: 0.5px;
}

.progressions-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.progression-item {
    background-color: var(--bg-tertiary);
    padding: 8px 10px;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 3px solid var(--primary-color);
}

.progression {
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
    font-weight: 600;
    color: #ffffff;
    font-size: 14px;
}

.count {
    color: #b3b3b3;
    font-size: 12px;
    font-weight: 500;
}

.analysis-error {
    text-align: center;
    padding: 20px;
}

.analysis-error h4 {
    margin: 0 0 8px 0;
    color: #ff6b6b;
    font-size: 16px;
}

.analysis-error p {
    margin: 0;
    color: #b3b3b3;
    font-size: 14px;
}

/* Tab Button and Content Styles */
.tab-toggle-btn {
    background: var(--bg-tertiary);
    color: #ffffff;
    border: 1px solid #404040;
    border-radius: 6px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    justify-content: center;
    margin-top: 8px;
}

.tab-toggle-btn:hover {
    background-color: var(--bg-quaternary);
    border-color: var(--secondary-color);
    box-shadow: 0 0 8px rgba(237, 119, 85, 0.4);
    transform: translateY(-1px);
}

.tab-content-container {
    margin-top: 12px;
    border-radius: 6px;
    overflow: hidden;
    background-color: #0a0a0a;
    border: 1px solid #404040;
}

.tab-display-toggle {
    display: flex;
    gap: 20px;
    padding: 12px 15px;
    background-color: #1a1a1a;
    border-bottom: 1px solid #333;
}

.toggle-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    color: #999;
    transition: color 0.2s;
    font-size: 14px;
}

.toggle-label:hover {
    color: #fff;
}

.toggle-label input[type="radio"] {
    margin-right: 6px;
    cursor: pointer;
    accent-color: var(--secondary-color);
}

.toggle-label:has(input[type="radio"]:checked) {
    color: var(--secondary-color);
    font-weight: 500;
}

.tab-content-wrapper {
    max-height: 600px;
    overflow-y: auto;
    padding: 16px;
}

.tab-content-text {
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
    font-size: 16px;
    line-height: 1.8;
    color: #ffffff;
    margin: 0;
    font-weight: 500;
}

/* Tab formatting styles */
.tab-section-header {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 18px;
    margin: 24px 0 12px 0;
    padding: 8px 0;
    border-bottom: 2px solid var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 1px;
}

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

.tab-line {
    margin: 4px 0;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.tab-chord-line {
    color: #ffffff;
    font-weight: 500;
}

.tab-lyric-line {
    color: #b3b3b3;
    font-weight: 400;
    margin-left: 0;
}

.tab-chord {
    color: var(--primary-color);
    font-weight: 700;
    background: rgba(228, 0, 75, 0.1);
    padding: 2px 4px;
    border-radius: 3px;
    font-size: 15px;
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
    white-space: pre;
}

/* Custom scrollbar for tab content */
.tab-content-wrapper::-webkit-scrollbar {
    width: 8px;
}

.tab-content-wrapper::-webkit-scrollbar-track {
    background: #1a1a1a;
    border-radius: 4px;
}

.tab-content-wrapper::-webkit-scrollbar-thumb {
    background: var(--bg-quaternary);
    border-radius: 4px;
}

.tab-content-wrapper::-webkit-scrollbar-thumb:hover {
    background: #535353;
}

/* Responsive adjustments for analysis panel */
@media (max-width: 768px) {
    .main-layout {
        flex-direction: column;
        height: auto;
    }
    
    .content-area {
        margin-right: 0 !important;
    }
    
    .content-area.panel-open {
        margin-right: 0 !important;
    }
    
    .analysis-panel {
        position: fixed;
        top: auto;
        bottom: 120px; /* Above player */
        left: 0;
        right: 0;
        width: 100%;
        height: 60vh;
        border-left: none;
        border-top: 1px solid #404040;
        transform: translateY(100%);
        transition: transform 0.3s ease;
    }
    
    .analysis-panel.active {
        transform: translateY(0);
        right: 0;
    }
    
    .analyze-btn {
        padding: 6px;
        font-size: 10px;
        margin-left: 4px;
        width: 36px;
        height: 36px;
        min-width: 36px;
        max-width: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 6px;
    }
    
    .analyze-btn span {
        display: none;
    }
    
    .analyze-btn svg {
        width: 16px !important;
        height: 16px !important;
    }
    
    .progression-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .count {
        align-self: flex-end;
    }
    
    .tab-toggle-btn {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .tab-content-wrapper {
        max-height: 300px;
        padding: 12px;
    }
    
    .tab-content-text {
        font-size: 15px;
        line-height: 1.7;
    }
    
    .tab-section-header {
        font-size: 16px;
        margin: 20px 0 10px 0;
    }
    
    .tab-chord {
        font-size: 14px;
        padding: 1px 3px;
    }
    
    /* Additional mobile optimizations */
    .content-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    
    .content-tabs::-webkit-scrollbar {
        display: none;
    }
    
    .tab-btn {
        flex-shrink: 0;
        min-width: fit-content;
    }
    
    .music-list {
        max-height: calc(100vh - 250px);
        grid-template-columns: 1fr;
        padding: 8px;
        width: 100%;
        overflow-x: hidden;
        box-sizing: border-box;
    }
    
    .song-item {
        border-radius: 6px;
    }
    
    .analysis-panel {
        position: fixed !important;
        top: 0 !important;
        right: 0 !important;
        left: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        height: 100% !important;
        max-width: none !important;
        z-index: 1000;
        border-radius: 0 !important;
        transform: translateX(100%);
        transition: transform 0.3s ease;
    }
    
    .analysis-panel.active {
        transform: translateX(0);
    }
    
    .analysis-panel-header {
        position: sticky;
        top: 0;
        background: #121212;
        z-index: 10;
        border-bottom: 1px solid #333;
    }
    
    .close-panel-btn {
        padding: 12px;
    }
    
    /* Mobile player controls - compact layout */
    .music-player {
        padding: 8px 12px;
        height: auto;
        min-height: 70px;
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        z-index: 100;
        background: var(--bg-tertiary);
        border-top: 1px solid #404040;
        display: flex;
        flex-direction: column;
        gap: 6px;
    }
    
    /* Hide volume control on mobile */
    .volume-container {
        display: none !important;
    }
    
    /* Top row: album cover + track info + play button */
    .progress-and-volume {
        display: flex !important;
        flex-direction: column !important;
        gap: 6px !important;
        margin-top: 0 !important;
        position: relative !important;
    }
    
    .now-playing-info {
        display: flex !important;
        align-items: center !important;
        gap: 12px !important;
        width: 100% !important;
        max-width: none !important;
        margin-top: 0 !important;
        position: relative !important;
    }
    
    .track-image {
        width: 40px !important;
        height: 40px !important;
        flex-shrink: 0;
        border-radius: 4px;
    }
    
    .track-details {
        flex: 1;
        min-width: 0;
        padding-right: 50px;
    }
    
    .track-name, .track-artist {
        text-align: left !important;
        position: static !important;
    }
    
    .track-name::after, .track-artist::after {
        display: none !important;
    }
    
    .current-track h4 {
        font-size: 14px;
        line-height: 1.2;
        margin: 0 0 2px 0;
        font-weight: 600;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .current-track p {
        font-size: 12px;
        margin: 0;
        opacity: 0.8;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    @media (max-width: 768px) {
        .spotify-player .player-controls-center {
            position: absolute !important;
            right: 12px !important;
            top: 50% !important;
            left: auto !important;
            transform: translateY(-50%) !important;
            display: flex !important;
            align-items: center !important;
            gap: 0 !important;
            z-index: 1001 !important;
        }
    }
    
    /* Hide forward/back buttons on mobile */
    .player-controls-center .control-btn:not(.play-btn) {
        display: none !important;
    }
    
    /* Style play/pause button for mobile */
    .player-controls-center .control-btn {
        background: transparent !important;
        color: white !important;
        border: none !important;
        width: 40px !important;
        height: 40px !important;
        border-radius: 0 !important;
        box-shadow: none !important;
    }
    
    .player-controls-center .play-btn {
        background: transparent !important;
        color: white !important;
        border: none !important;
        width: 48px !important;
        height: 48px !important;
        border-radius: 0 !important;
        box-shadow: none !important;
    }
    
    .player-controls-center .control-btn:hover {
        background: transparent !important;
        transform: none !important;
    }
    
    .player-controls-center .play-btn:hover {
        background: transparent !important;
        transform: none !important;
    }
    
    .player-controls-center .play-btn svg {
        width: 28px !important;
        height: 28px !important;
    }
    
    .player-controls-center .control-btn:not(.play-btn) svg {
        width: 24px !important;
        height: 24px !important;
    }
    
    .player-controls-right {
        display: none !important;
    }
    
    /* Progress bar - bottom row without time display */
    .progress-container {
        display: flex !important;
        width: 100% !important;
        align-items: center;
        gap: 0;
        position: static !important;
        left: auto !important;
        transform: none !important;
        min-width: auto !important;
        max-width: none !important;
        justify-content: stretch !important;
    }
    
    .progress-container .time {
        display: none !important;
    }
    
    .progress-bar-wrapper {
        flex: 1;
        width: 100%;
        max-width: none !important;
        min-width: auto !important;
    }
    
    .volume-control {
        gap: 8px;
    }
    
    .volume-bar-wrapper {
        width: 80px;
    }
    
    /* Additional font and spacing adjustments for mobile */
    .btn {
        padding: 10px 16px;
        font-size: 14px;
        min-height: 44px;
        min-width: 44px;
    }
    
    .btn-primary {
        font-weight: 600;
    }
    
    .btn-outline {
        border-width: 2px;
    }
    
    /* Make touch targets larger */
    button, .btn, input, select {
        min-height: 44px;
        min-width: 44px;
    }
    
    input[type="range"] {
        min-height: 44px;
    }
    
    /* Improve text readability */
    body {
        font-size: 16px;
        line-height: 1.5;
    }
    
    h1, h2, h3, h4, h5, h6 {
        line-height: 1.3;
    }
    
    /* Loading states */
    .loading {
        padding: 20px;
        font-size: 16px;
    }
    
    /* Better spacing for small screens */
    .music-list {
        padding: 12px;
    }
    
    .song-item + .song-item {
        margin-top: 8px;
    }
    
    /* Critical: Prevent horizontal scrolling on mobile */
    *, *::before, *::after {
        box-sizing: border-box !important;
    }
    
    .user-content, .music-list, .tab-content, .music-item {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
    }
    
    html {
        overflow-x: hidden !important;
    }
    }
    
    /* Mobile tab content optimizations */
    .analysis-panel {
        bottom: 100px !important;
        height: calc(100% - 100px) !important;
        overflow-y: auto;
    }
    
    .tab-content-wrapper {
        max-height: calc(100vh - 250px) !important;
        min-height: 50vh !important;
        padding: 8px !important;
    }
    
    .tab-display-toggle {
        padding: 6px 10px !important;
        gap: 15px !important;
    }
    
    .toggle-label {
        font-size: 13px !important;
    }
    
    .toggle-label input[type="radio"] {
        transform: scale(0.8) !important;
        margin-right: 4px !important;
    }
}

/* Search Interface Styles */
.search-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 0;
}

.search-input-container {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--bg-tertiary);
    border-radius: 500px;
    border: 2px solid var(--bg-quaternary);
    transition: all 0.2s ease;
    margin-bottom: 8px;
}

.search-input-container:focus-within {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 2px rgba(237, 119, 85, 0.3);
}

.search-icon {
    position: absolute;
    left: 16px;
    color: #b3b3b3;
    pointer-events: none;
    z-index: 1;
}

.search-input {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    padding: 14px 50px 14px 50px;
    color: #ffffff;
    font-size: 16px;
    border-radius: 500px;
}

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

.clear-search-btn {
    position: absolute;
    right: 16px;
    background: transparent;
    border: none;
    color: #b3b3b3;
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.clear-search-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

.search-placeholder {
    text-align: center;
    color: #b3b3b3;
    padding: 60px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.search-placeholder p {
    margin: 0;
    font-size: 16px;
    font-weight: 400;
}

.search-loading {
    text-align: center;
    padding: 40px 20px;
    color: #b3b3b3;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.search-no-results {
    text-align: center;
    padding: 40px 20px;
    color: #b3b3b3;
}

.search-no-results h4 {
    margin: 0 0 8px 0;
    color: #ffffff;
    font-size: 18px;
}

.search-no-results p {
    margin: 0;
    font-size: 14px;
}

/* Search Results Items */
.search-results .song-item {
    position: relative;
    background: var(--bg-secondary);
    border-radius: 8px;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s ease;
    cursor: pointer;
    border: 1px solid transparent;
}

.search-results .song-item:hover {
    background: var(--bg-tertiary);
    border-color: #404040;
}

.search-results .song-item .album-image {
    width: 48px;
    height: 48px;
    border-radius: 4px;
    object-fit: cover;
    flex-shrink: 0;
}

.search-results .song-details {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.search-results .song-name {
    font-weight: 600;
    color: #ffffff;
    font-size: 16px;
    line-height: 1.3;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-results .song-artist {
    color: #b3b3b3;
    font-size: 14px;
    line-height: 1.3;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-results .song-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* Mobile optimizations for search */
@media (max-width: 768px) {
    .search-input-container {
        margin: 0 8px 16px 8px;
    }
    
    .search-input {
        padding: 16px 50px;
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    .search-icon {
        left: 20px;
    }
    
    .clear-search-btn {
        right: 20px;
    }
    
    .search-placeholder {
        padding: 40px 16px;
    }
    
    .search-results .song-item {
        margin: 0 8px 8px 8px;
        padding: 14px 12px;
    }
    
    .search-results .song-item .album-image {
        width: 44px;
        height: 44px;
    }
    
    .search-results .song-name {
        font-size: 15px;
    }
    
    .search-results .song-artist {
        font-size: 13px;
    }
    
    /* Improve touch targets */
    .clear-search-btn {
        padding: 8px;
        min-width: 40px;
        min-height: 40px;
    }
}

/* Auth Error Styles */
.auth-error {
    background: #2a1a1a;
    border: 1px solid #ff6b6b;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
    text-align: center;
}

.auth-error h4 {
    margin: 0 0 8px 0;
    color: #ff6b6b;
    font-size: 16px;
    font-weight: 600;
}

.auth-error p {
    margin: 0;
    color: #ffffff;
    font-size: 14px;
    line-height: 1.4;
}

/* Chord Analysis Styles */
.chord-analysis-container {
    padding: 0 0 120px 0; /* Add bottom padding to prevent overlap with player */
}

.playlist-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 300px;
    overflow-y: auto;
    overflow-x: hidden;
}

.playlist-checkbox-item {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 8px;
    transition: background-color 0.2s ease;
    margin: -2px;
}

.playlist-checkbox-item:hover {
    background: rgba(255, 255, 255, 0.15);
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    gap: 12px;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkbox-custom {
    width: 20px;
    height: 20px;
    border: 2px solid #b3b3b3;
    border-radius: 4px;
    position: relative;
    transition: all 0.2s ease;
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 0 8px rgba(237, 119, 85, 0.5);
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.playlist-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.playlist-name {
    color: #ffffff;
    font-weight: 500;
    font-size: 14px;
}

.playlist-count {
    color: #b3b3b3;
    font-size: 12px;
}

/* Analysis Queue Styles */
.analysis-queue-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.analysis-queue {
    margin-bottom: 24px;
    background: linear-gradient(135deg, rgba(228, 0, 75, 0.03) 0%, rgba(237, 119, 85, 0.02) 50%, rgba(255, 255, 255, 0.02) 100%);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid rgba(228, 0, 75, 0.1);
}

.queue-empty-state {
    text-align: center;
    padding: 28px 4px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    border: 1px dashed rgba(255, 255, 255, 0.1);
}

.queue-items {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 16px;
}

.queue-summary {
    padding: 8px 12px;
    background: rgba(228, 0, 75, 0.1);
    border-radius: 8px;
    margin-bottom: 16px;
    color: var(--primary-color);
    font-size: 14px;
    font-weight: 500;
}

.queue-section {
    margin-bottom: 20px;
}

.queue-section:last-child {
    margin-bottom: 0;
}

.queue-section h5 {
    color: #b3b3b3;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 12px 0;
    font-weight: 600;
}

.queue-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    margin-bottom: 8px;
    transition: background-color 0.2s ease;
}

.queue-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.queue-item-info {
    flex: 1;
    min-width: 0;
}

.queue-item-title {
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.queue-item-artist,
.queue-item-type {
    color: #b3b3b3;
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.remove-queue-btn {
    background: none;
    border: none;
    color: #b3b3b3;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.remove-queue-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--secondary-color);
}

.quick-add-section {
    /* Remove top margin and padding since grid handles spacing */
    background: linear-gradient(135deg, rgba(237, 119, 85, 0.03) 0%, rgba(250, 214, 145, 0.02) 50%, rgba(255, 255, 255, 0.02) 100%);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid rgba(237, 119, 85, 0.1);
}

/* Queue Notification Styles */
.queue-notification {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--primary-color);
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 10000;
    font-size: 14px;
}

.queue-notification.info {
    background: #535353;
}

.queue-notification.show {
    transform: translateY(0);
    opacity: 1;
}

/* In Queue Indicators */
.in-queue-indicator {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(228, 0, 75, 0.9);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.in-queue-badge {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 8px;
}

/* Add to Queue Button Styles */
.add-to-queue-btn {
    background: rgba(228, 0, 75, 0.1);
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.add-to-queue-btn:hover {
    background: var(--primary-color);
    color: white;
}

.add-to-queue-btn.in-queue {
    background: rgba(228, 0, 75, 0.1);
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    cursor: default;
    transition: all 0.2s ease;
    display: inline-flex;
    box-shadow: 0 0 6px rgba(237, 119, 85, 0.3);
    align-items: center;
    gap: 6px;
}

.add-to-queue-btn.in-queue:hover {
    background: rgba(228, 0, 75, 0.1);
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
}

.progression-group {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
}

.progression-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.progression-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.progression-title {
    color: var(--primary-color);
    font-size: 18px;
    margin: 0;
    font-weight: 600;
}

.song-count {
    background: rgba(228, 0, 75, 0.2);
    color: var(--primary-color);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.progression-songs {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.no-results {
    text-align: center;
    padding: 40px 20px;
}

.no-results p {
    color: #b3b3b3;
    margin: 8px 0;
}

.error-message {
    text-align: center;
    padding: 20px;
}

.error-message p {
    color: #ff6b6b;
    margin: 0;
}

.no-playlists {
    text-align: center;
    padding: 20px;
}

.no-playlists p {
    color: #b3b3b3;
    margin: 0;
}

@media (max-width: 768px) {
    .progression-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .progression-info {
        width: 100%;
        justify-content: space-between;
    }
    
    .progression-title {
        font-size: 16px;
    }
    
    .create-playlist-btn {
        width: 100%;
        justify-content: center;
    }
}

.analysis-controls {
    margin-bottom: 40px !important;
}

.music-item-key {
    color: var(--primary-color);
    font-size: 12px;
    font-weight: 500;
    margin-top: 2px;
}

.create-playlist-btn {
    background: var(--primary-color);
    color: #ffffff;
    border: none;
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.create-playlist-btn:hover {
    background: var(--secondary-color);
    box-shadow: 0 0 16px rgba(237, 119, 85, 0.6);
    transform: scale(1.05);
}

.create-playlist-btn:active {
    background: var(--primary-color);
    transform: scale(0.95);
}

.create-playlist-btn:disabled {
    background: #535353;
    cursor: not-allowed;
    transform: none;
}

.playlist-success-msg {
    background: rgba(228, 0, 75, 0.1);
    border: 1px solid rgba(228, 0, 75, 0.3);
    border-radius: 8px;
    padding: 12px;
    margin-top: 12px;
    color: var(--primary-color);
    font-size: 14px;
}

.playlist-success-msg p {
    margin: 0 0 8px 0;
}

.playlist-success-msg a {
    color: var(--primary-color);
    text-decoration: underline;
    font-weight: 500;
}

.playlist-success-msg a:hover {
    color: var(--secondary-color);
}

.playlist-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 12px;
}

.delete-playlist-btn {
    background: rgba(255, 68, 68, 0.1);
    border: 1px solid #ff4444;
    color: var(--secondary-color);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.delete-playlist-btn:hover {
    background: #ff4444;
    color: white;
}

.delete-playlist-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}


.search-input-container {
    position: relative;
    display: flex;
    align-items: center;
    background: #121212;
    border-radius: 8px;
    border: 1px solid #404040;
    padding: 12px 16px;
    gap: 12px;
    transition: border-color 0.2s ease;
    margin-bottom: 24px;
}

.search-input-container:focus-within {
    border-color: var(--secondary-color);
}

.search-input {
    background: transparent;
    border: none;
    outline: none;
    color: #ffffff;
    font-size: 14px;
    flex: 1;
    padding: 0;
}

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

.clear-search-btn {
    background: transparent;
    border: none;
    color: #b3b3b3;
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.clear-search-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}




/* Utility Classes for Common Styles */
.text-primary { color: var(--text-primary) !important; }
.text-secondary { color: var(--text-secondary) !important; }
.text-muted { color: var(--text-muted) !important; }
