:root {
    --primary-color: #d6201f;
    --secondary-color: #d54f3c;
    --bg-color: white;
    --text-color: #333;
    --light-gray: #e0e0e0;
    --card-bg: white;
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    font-size: 16px;
    line-height: 1.5;
}

.container {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    padding: 0;
    position: relative;
    height: 100vh;
    overflow: hidden;
}

.app-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 70px); 
    overflow: hidden;
}

.app-header {
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    height: 56px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}


.app-header h1 {
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin: 0;
    position: relative;
    display: inline-block; 
}

.app-header h1:after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%; 
    height: 2px;
    background: rgba(255,255,255,0.7);
    border-radius: 2px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 6px; 
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

#user-name {
    font-size: 0.9rem;
    max-width: 120px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.radio-container {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: #666;
}

.spinner {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 3px solid var(--light-gray);
    border-top-color: var(--primary-color);
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.error-message {
    text-align: center;
    padding: 24px;
    color: #d32f2f;
}

.error-message i {
    font-size: 36px;
    margin-bottom: 16px;
}

.button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    margin-top: 16px;
}

.track-card {
    background-color: var(--bg-color); /* Match the overall background color */
    border-radius: 8px;
    margin-bottom: 6px; 
    overflow: hidden;
    display: flex;
    align-items: center;
    transition: transform 0.2s, background-color 0.2s;
    padding-right: 8px;
    box-shadow: none; /* Explicitly remove any shadow */
}

.track-card:hover {
    background-color: #e8e8e8; /* Light gray on hover */
    box-shadow: none; /* Ensure no shadow on hover */
}


.track-card:active {
    transform: scale(0.98);
}

.track-card.active {
    background-color: #e0e0e0; 
    border-color: #d0d0d0;
}

.track-img-container {
    margin: 6px 0 6px 6px; 
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    width: 56px; 
    height: 56px;
    box-shadow: none;
}

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

.track-info {
    padding: 10px; 
    flex: 1;
}

.track-title {
    font-weight: 600;
    font-size: 14px;
    /* margin-bottom: 4px; */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.track-artist {
    font-size: 12px;
    color: #666;
    /* white-space: nowrap; */
    overflow: hidden;
    text-overflow: ellipsis;
}

.track-duration {
    font-size: 10px;
    color: #999;
    margin-top: 4px;
}

.player-container {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: white;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    padding: 8px 16px;
    z-index: 100;
}

.now-playing {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.now-playing-img {
    width: 48px;
    height: 48px;
    border-radius: 4px;
    margin-right: 12px;
    object-fit: cover;
}

.now-playing-title {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

.player-controls {
    display: flex;
    flex-direction: column;
}

.progress-container {
    width: 100%;
    height: 8px;
    background-color: var(--light-gray);
    border-radius: 4px;
    margin-bottom: 4px;
}

.progress-bar {
    height: 100%;
    background-color: var(--primary-color);
    border-radius: 4px;
    width: 0;
}

.time-info {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #666;
    margin-bottom: 8px;
}

.control-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 24px;
}

.control-button {
    background: none;
    border: none;
    font-size: 27px;
    cursor: pointer;
    color: #444;
}

.play-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;   
    display: flex;
    align-items: center;
    justify-content: center;
}

.hidden {
    display: none !important;
}

.disabled {
    pointer-events: none;
    opacity: 0.6;
}

.player-spacer {
    height: 90px; /* Adjust based on your player height */
    width: 100%;
}

/* Gesture overlay */
#gesture-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

#gesture-overlay .overlay-box {
    background: var(--bg-color);
    padding: 32px 24px;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    max-width: 320px;
    width: 90%;
    text-align: center;
}

#gesture-overlay .overlay-box p {
    margin-bottom: 24px;
    font-size: 1.2rem;
    color: var(--text-color);
    font-weight: 500;
    line-height: 1.5;
}

#gesture-overlay .gesture-button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: block;
    margin: 0 auto;
    width: 80%;
    max-width: 200px;
    transition: transform 0.2s, background-color 0.2s;
}

#gesture-overlay .gesture-button:hover {
    background-color: var(--secondary-color);
}

#gesture-overlay .gesture-button:active {
    transform: scale(0.98);
}