@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');

:root {
    --primary-color: #667eea;
    --primary-color-dark: #5a6fd8;
    --secondary-color: #7f8c8d;
    --background-color: #f4f7f6;
    --text-color: #333;
    --card-background: #ffffff;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --border-radius: 15px;
}

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

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 2rem 2rem 6rem;
    display: flex;
    flex-direction: column;
}

.main-content {
    /* flex-grow: 1; */ /* This was pushing the player down */
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

h1 {
    font-size: 2.5rem; /* Slightly smaller */
    font-weight: 700;
    color: var(--primary-color);
    cursor: pointer;
    transition: all 0.3s ease;
}

h1:hover {
    color: var(--primary-color-dark);
    transform: scale(1.02);
}

.search-container {
    background: none;
    box-shadow: none;
    padding: 0;
    margin-bottom: 0;
    min-width: 600px;
}

.search-box {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.search-input-wrapper {
    position: relative;
    flex: 1;
}

.search-input {
    width: 100%;
    padding: 1rem 3rem 1rem 1rem;
    border: 2px solid #e1e5e9;
    border-radius: 30px;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

.search-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.search-btn {
    padding: 1rem 2rem;
    background: linear-gradient(45deg, var(--primary-color), var(--primary-color-dark));
    color: white;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.clear-btn {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.9rem;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.clear-btn:hover {
    background: #c82333;
    transform: translateY(-50%) scale(1.1);
}

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

.column {
    background: var(--card-background);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

.column.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.column.disabled .list-container {
    pointer-events: auto;
}

.column h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #f0f0f0;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.list-container {
    height: 400px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.item {
    padding: 0.8rem 1rem;
    margin-bottom: 0.5rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.item:hover {
    background: rgba(102, 126, 234, 0.08);
}

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

.item.active .count {
    color: var(--primary-color);
    background: white;
}

.item.active .station-info {
    color: white;
}

.count {
    color: var(--secondary-color);
    font-size: 0.8rem;
    background: #eef2f7;
    padding: 0.3rem 0.6rem;
    border-radius: 8px;
    min-width: 40px;
    text-align: center;
    font-weight: 600;
}

.radio-item .station-info {
    font-size: 0.8rem;
    color: var(--secondary-color);
}

.play-btn {
    background: #28a745;
    color: white;
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.play-btn:hover {
    background: #218838;
    transform: scale(1.1);
}

.player {
    background: var(--card-background);
    border-radius: var(--border-radius);
    padding: 1.5rem 2rem;
    box-shadow: var(--shadow);
    position: sticky;
    bottom: 20px;
    width: 100%;
    max-width: 800px;
    margin: 2rem auto 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    z-index: 1000;
    transition: all 0.5s ease-in-out;
}

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

.station-logo {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    background-color: #eef2f7;
    display: flex;
    justify-content: center;
    align-items: center;
}

.station-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}

.station-logo i {
    font-size: 2.5rem;
    color: var(--primary-color);
}

.now-playing {
    font-weight: 600;
    font-size: 1.1rem;
}

.metadata {
    font-size: 0.9rem;
    color: var(--secondary-color);
    font-style: italic;
    margin-top: 0.5rem;
}

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

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

.control-btn:hover {
    background: var(--primary-color-dark);
    transform: scale(1.1);
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 150px;
}

.volume-slider {
    width: 100%;
}

.loading, .error, .placeholder {
    text-align: center;
    padding: 2rem;
    color: var(--secondary-color);
    font-style: italic;
}

.error {
    color: #e74c3c;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color-dark);
}

@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    .search-box {
        flex-direction: column;
    }

    .search-input-wrapper {
        width: 100%;
    }
    
    .search-btn {
        width: 100%;
    }

    .player {
        flex-direction: column;
        padding: 1rem;
        bottom: 10px;
        width: calc(100% - 20px);
    }

    .player-controls {
        width: 100%;
        justify-content: center;
    }
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    text-align: center;
    padding: 1rem;
    font-size: 0.85rem;
    color: var(--secondary-color);
    opacity: 0.7;
    z-index: -1;
}

.heart {
    color: #e74c3c;
}