:root {
    --primary: #1DB954;
    --primary-light: #1ed760;
    --primary-dark: #1aa34a;
    --dark: #191414;
    --light: #FFFFFF;
    --gray: #121212;
    --light-gray: #282828;
    --transition-speed: 0.3s;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--dark);
    color: var(--light);
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

/* Welcome Panel */
.welcome-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--dark);
    z-index: 999;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.welcome-panel.show {
    opacity: 1;
    transform: translateY(0);
}

.welcome-panel.hidden {
    opacity: 0;
    transform: translateY(-100%);
    pointer-events: none;
}

.welcome-content {
    background-color: var(--gray);
    border-radius: 12px;
    padding: 30px;
    max-width: 800px;
    width: 100%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    text-align: center;
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.5s ease 0.2s, transform 0.5s ease 0.2s;
}

.welcome-panel.show .welcome-content {
    opacity: 1;
    transform: scale(1);
}

.welcome-logo {
    font-size: 32px;
    font-weight: bold;
    color: var(--primary);
    margin-bottom: 15px;
    text-shadow: 0 0 10px rgba(29, 185, 84, 0.5);
}

.welcome-subtitle {
    font-size: 18px;
    color: #b3b3b3;
    margin-bottom: 25px;
}

.welcome-about {
    text-align: left;
    margin: 20px 0;
    padding: 15px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border-left: 3px solid var(--primary);
}

.welcome-about p {
    margin-bottom: 10px;
    line-height: 1.6;
    color: #e0e0e0;
}

.welcome-thanks {
    text-align: left;
    margin: 25px 0;
}

.thanks-title {
    font-size: 18px;
    font-weight: bold;
    color: var(--primary);
    margin-bottom: 10px;
    border-bottom: 1px solid var(--primary-light);
    padding-bottom: 5px;
}

.thanks-list {
    list-style-type: none;
    padding-left: 0;
}

.thanks-list li {
    margin-bottom: 8px;
    color: #b3b3b3;
    padding-left: 20px;
    position: relative;
}

.thanks-list li:before {
    content: "•";
    color: var(--primary);
    font-weight: bold;
    position: absolute;
    left: 0;
}

.welcome-btn {
    background-color: var(--primary);
    color: var(--light);
    border: none;
    border-radius: 30px;
    padding: 12px 30px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.welcome-btn:hover {
    background-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.welcome-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

/* Header */
.header {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px 0;
    margin-bottom: 40px;
    position: relative;
}

.header:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--primary), transparent);
}

.logo {
    font-size: 42px;
    font-weight: bold;
    color: var(--primary);
    margin-bottom: 20px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s;
    position: relative;
    text-shadow: 0 0 15px rgba(29, 185, 84, 0.3);
}

.logo:hover {
    text-shadow: 0 0 20px rgba(29, 185, 84, 0.7);
}

.logo:after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: width 0.3s ease;
}

.logo:hover:after {
    width: 100%;
}

.site-description {
    color: #b3b3b3;
    font-size: 18px;
    text-align: center;
    max-width: 600px;
    margin-bottom: 30px;
    line-height: 1.5;
}

.search-container {
    width: 100%;
    max-width: 700px;
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    position: relative;
}

.search-input {
    flex: 1;
    padding: 16px 22px;
    border-radius: 30px;
    border: none;
    background-color: var(--light-gray);
    color: var(--light);
    font-size: 18px;
    transition: all 0.3s;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

.search-input:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--primary-light);
    background-color: rgba(40, 40, 40, 0.9);
}

.search-btn {
    padding: 16px 30px;
    border-radius: 30px;
    border: none;
    background-color: var(--primary);
    color: var(--light);
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
    font-size: 16px;
}

.search-btn:hover {
    background-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.search-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.search-btn i {
    margin-right: 8px;
}

/* History Section */
.history-section {
    margin-bottom: 40px;
    animation: slideUp 0.5s ease;
}

@keyframes slideUp {
    0% { transform: translateY(20px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

.section-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 20px;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-title i {
    font-size: 20px;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.history-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border-radius: 10px;
    background-color: var(--light-gray);
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

.history-item:hover {
    background-color: rgba(40, 40, 40, 0.9);
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.history-thumbnail {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    margin-right: 15px;
    flex-shrink: 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.history-info {
    flex: 1;
    min-width: 0; /* Important for text overflow to work */
}

.history-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 6px;
}

.history-artist {
    font-size: 14px;
    color: #b3b3b3;
}

.history-duration {
    color: #b3b3b3;
    font-size: 12px;
    margin-left: 10px;
    flex-shrink: 0;
}

.no-history {
    text-align: center;
    padding: 30px;
    color: #b3b3b3;
    background-color: rgba(40, 40, 40, 0.5);
    border-radius: 8px;
    border: 1px dashed var(--light-gray);
}

/* Results Section */
.results-section {
    display: none;
    margin-bottom: 40px;
    animation: fadeInUp 0.5s ease;
}

.results-section.active {
    display: block;
}

@keyframes fadeInUp {
    0% { transform: translateY(30px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

.results-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
    margin-top: 20px;
    padding-bottom: 80px;
}

.song-card {
    background-color: var(--light-gray);
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    position: relative;
}

.song-card:hover {
    transform: translateY(-7px) scale(1.02);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.song-card:active {
    transform: translateY(-3px) scale(1.01);
}

.song-thumbnail {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    transition: all 0.3s;
}

.song-card:hover .song-thumbnail {
    transform: scale(1.05);
    filter: brightness(1.1);
}

.song-card:after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent 70%, rgba(0, 0, 0, 0.8) 100%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
}

.song-card:hover:after {
    opacity: 1;
}

.song-info {
    padding: 12px;
    position: relative;
    z-index: 1;
}

.song-title {
    font-weight: bold;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.scrolling-text {
    white-space: nowrap;
    overflow: hidden;
    position: relative;
}

.scrolling-text-content {
    display: inline-block;
    animation: scroll-text 12s linear infinite;
    padding-right: 50px;
}

@keyframes scroll-text {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

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

.song-duration {
    color: #b3b3b3;
    font-size: 12px;
    margin-top: 5px;
}

/* Mini Player */
.player-minimized {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--gray);
    padding: 12px;
    display: flex;
    align-items: center;
    z-index: 90;
    cursor: pointer;
    border-top: 1px solid var(--light-gray);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.3s;
    animation: slideUp 0.4s ease;
}

.player-minimized.hidden {
    display: none;
}

.player-minimized:hover {
    background-color: rgba(25, 20, 20, 0.95);
}

.now-playing-mini {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.now-thumbnail-mini {
    width: 45px;
    height: 45px;
    object-fit: cover;
    border-radius: 6px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    transition: all 0.3s;
}

.player-minimized:hover .now-thumbnail-mini {
    transform: scale(1.05);
}

.mini-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.control-btn {
    background: none;
    border: none;
    color: var(--light);
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.control-btn:hover {
    color: var(--primary);
    background-color: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

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

.control-btn i {
    font-size: 18px;
}

/* Full Player */
.player-full {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, var(--dark), #0a0a0a);
    z-index: 100;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 30px 20px 80px;
    overflow-y: auto;
    animation: fadeIn 0.4s ease;
}

.player-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.back-btn {
    background: none;
    border: none;
    color: var(--light);
    font-size: 16px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.back-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--primary);
}

.player-title {
    font-size: 20px;
    color: var(--primary);
    font-weight: bold;
}

.player-content {
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.now-thumbnail-large {
    width: 100%;
    max-width: 320px;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 16px;
    margin-bottom: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    transition: all 0.5s;
    animation: pulse 2s infinite alternate;
}

@keyframes pulse {
    0% { transform: scale(1); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4); }
    100% { transform: scale(1.02); box-shadow: 0 15px 35px rgba(29, 185, 84, 0.2); }
}

.now-info-large {
    width: 100%;
    margin-bottom: 25px;
}

.now-title-large {
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 8px;
}

.now-artist-large {
    font-size: 16px;
    color: #b3b3b3;
}

.progress-container-large {
    width: 100%;
    margin-bottom: 20px;
}

.progress-bar-large {
    height: 6px;
    background-color: var(--light-gray);
    border-radius: 3px;
    overflow: hidden;
    cursor: pointer;
    margin-bottom: 10px;
    position: relative;
}

.progress-bar-large:hover:after {
    content: '';
    position: absolute;
    top: -2px;
    left: 0;
    width: 100%;
    height: 10px;
    background-color: transparent;
    cursor: pointer;
}

.progress-large {
    height: 100%;
    background-color: var(--primary);
    width: 0%;
    position: relative;
    transition: width 0.1s linear;
}

.progress-large:after {
    content: '';
    position: absolute;
    right: -6px;
    top: -3px;
    width: 12px;
    height: 12px;
    background-color: var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
    transform: scale(0);
    transition: transform 0.2s;
}

.progress-bar-large:hover .progress-large:after {
    transform: scale(1);
}

.time-display {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: #b3b3b3;
}

.controls-large {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 25px;
    margin-bottom: 25px;
    width: 100%;
}

.control-btn-large {
    background: none;
    border: none;
    color: var(--light);
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.control-btn-large:hover {
    color: var(--primary);
    background-color: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

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

.play-btn-large {
    font-size: 24px;
    color: var(--light);
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background-color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.play-btn-large:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
    background-color: var(--primary-light);
}

.play-btn-large:active {
    transform: scale(0.98);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.download-btn {
    background-color: var(--primary);
    color: var(--light);
    border: none;
    border-radius: 30px;
    padding: 12px 25px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.download-btn:hover {
    background-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.download-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.next-up-container {
    width: 100%;
    max-width: 500px;
    margin-top: 30px;
}

.next-up-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 12px;
}

.next-up-list {
    width: 100%;
}

.queue-item {
    display: flex;
    align-items: center;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 10px;
    background-color: var(--light-gray);
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.queue-item:hover {
    background-color: rgba(40, 40, 40, 0.9);
    transform: translateX(5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.queue-item:active {
    transform: translateX(2px);
}

.queue-thumbnail {
    width: 45px;
    height: 45px;
    object-fit: cover;
    border-radius: 6px;
    margin-right: 12px;
    flex-shrink: 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.queue-info {
    flex: 1;
    min-width: 0; /* Important for text overflow to work */
}

.queue-title {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 3px;
}

.queue-artist {
    font-size: 12px;
    color: #b3b3b3;
}

.queue-duration {
    color: #b3b3b3;
    font-size: 12px;
    margin-left: 10px;
    flex-shrink: 0;
}

.loading {
    display: none;
    justify-content: center;
    align-items: center;
    margin: 40px 0;
}

.loader {
    width: 40px;
    height: 40px;
    border: 4px solid var(--light-gray);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.loading-text {
    margin-left: 15px;
    color: #b3b3b3;
    font-size: 16px;
}

.no-results {
    display: none;
    text-align: center;
    padding: 30px;
    color: #b3b3b3;
    background-color: rgba(40, 40, 40, 0.5);
    border-radius: 8px;
    margin-top: 20px;
    border: 1px dashed var(--light-gray);
    animation: fadeIn 0.5s ease;
}

.no-results h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: var(--light);
}

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

/* Add responsiveness */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .welcome-content {
        padding: 20px;
    }
    
    .welcome-logo {
        font-size: 26px;
    }
    
    .welcome-subtitle {
        font-size: 16px;
    }
    
    .header {
        padding: 20px 0;
        margin-bottom: 30px;
    }
    
    .logo {
        font-size: 32px;
        margin-bottom: 15px;
    }
    
    .site-description {
        font-size: 16px;
        margin-bottom: 20px;
    }
    
    .search-container {
        margin-bottom: 10px;
    }
    
    .search-input {
        font-size: 16px;
        padding: 14px 18px;
    }
    
    .search-btn {
        padding: 14px 22px;
        font-size: 14px;
    }
    
    .results-container {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
        padding-bottom: 70px;
    }
    
    .song-info {
        padding: 10px;
    }
    
    .song-title {
        font-size: 14px;
    }
    
    .song-artist {
        font-size: 12px;
    }
    
    .section-title {
        font-size: 20px;
    }
    
    .history-item {
        padding: 12px;
    }
    
    .history-thumbnail {
        width: 50px;
        height: 50px;
    }
    
    .history-title {
        font-size: 15px;
    }
    
    .now-thumbnail-large {
        max-width: 250px;
    }
    
    .now-title-large {
        font-size: 18px;
    }
    
    .now-artist-large {
        font-size: 14px;
    }
    
    .controls-large {
        gap: 20px;
    }
    
    .play-btn-large {
        font-size: 20px;
        width: 56px;
        height: 56px;
    }
    
    .control-btn-large {
        font-size: 16px;
        width: 40px;
        height: 40px;
    }
    
    .next-up-title {
        font-size: 16px;
    }
    
    .queue-item {
        padding: 8px;
    }
    
    .queue-thumbnail {
        width: 40px;
        height: 40px;
    }
    
    .queue-title {
        font-size: 13px;
    }
    
    .queue-artist {
        font-size: 11px;
    }
    
    .queue-duration {
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .results-container {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 10px;
    }
    
    .now-thumbnail-large {
        max-width: 200px;
    }
    
    .controls-large {
        gap: 15px;
    }
    
    .play-btn-large {
        font-size: 18px;
        width: 50px;
        height: 50px;
    }
    
    .control-btn-large {
        font-size: 14px;
        width: 36px;
        height: 36px;
    }
    
    .welcome-content {
        padding: 15px;
    }
    
    .welcome-logo {
        font-size: 22px;
    }
    
    .welcome-subtitle {
        font-size: 14px;
    }
    
    .welcome-btn {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .logo {
        font-size: 28px;
    }
    
    .site-description {
        font-size: 14px;
    }
    
    .search-input {
        font-size: 14px;
        padding: 12px 16px;
    }
    
    .search-btn {
        padding: 12px 18px;
        font-size: 13px;
    }
}