:root {
    --primary-red: #FF0000;
    --primary-yellow: #FFFF00;
    --dark-background: #1A1A1A; /* Very dark for contrast */
    --medium-background: #2C2C2C; /* Slightly lighter for cards */
    --light-text: #FFFFFF;
    --dark-text: #000000; /* For text on yellow elements */
    --border-color: #444444;
    --shadow-color: rgba(0, 0, 0, 0.4);
}

/* Global Styles */
body {
    margin: 0;
    font-family: 'Arial', sans-serif;
    background-color: var(--dark-background);
    color: var(--light-text);
    overflow-x: hidden; /* Prevent horizontal scroll when menu is open */
    -webkit-tap-highlight-color: transparent;

    /* New: Centering the main content area */
    display: flex;
    justify-content: center; /* Center horizontally */
    align-items: flex-start; /* Align to the top vertically (content starts from top) */
    min-height: 100vh; /* Ensure body takes full height */
    position: relative; /* For z-index stacking context if needed */
}

/* Sidebar */
#sidebar {
    width: 280px; /* Slightly wider sidebar */
    background-color: var(--medium-background);
    color: var(--light-text);
    position: fixed; /* Fixed so it slides in from the left */
    height: 100%;
    left: -280px; /* Hidden by default (off-screen to the left) */
    transition: left 0.3s ease-in-out; /* Smooth transition for opening/closing */
    box-shadow: 2px 0 10px var(--shadow-color); /* Shadow on the right edge */
    z-index: 1001; /* Above everything else */
    display: flex;
    flex-direction: column;
}

#sidebar.active {
    left: 0; /* Show sidebar (slides into view) */
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: var(--primary-red);
    color: var(--light-text);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h3 {
    margin: 0;
    font-size: 1.4em;
    font-weight: bold;
}

#closeSidebarBtn {
    background: none;
    border: none;
    font-size: 2.5em; /* Larger 'X' for close button */
    color: var(--primary-yellow);
    cursor: pointer;
    line-height: 1; /* Helps with vertical alignment of the 'X' */
    padding: 0 5px;
    transition: color 0.2s ease;
}

#closeSidebarBtn:hover {
    color: var(--light-text);
}

.sidebar-links {
    list-style: none;
    padding: 0;
    margin: 0;
    flex-grow: 1; /* Allows links to take available space */
    overflow-y: auto; /* Enable scrolling if many links */
}

.sidebar-links li {
    border-bottom: 1px solid var(--border-color);
}

.sidebar-links li:last-of-type {
    border-bottom: none; /* No border on the very last list item */
}

.sidebar-links li.separator {
    height: 1px;
    background-color: var(--border-color);
    margin: 10px 0; /* Space for separator */
}

.sidebar-links a {
    display: flex; /* Use flexbox for alignment of text and icon */
    align-items: center; /* Vertically center icon and text */
    padding: 15px 20px;
    color: var(--light-text);
    text-decoration: none;
    font-size: 1.1em;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.sidebar-links a:hover,
.sidebar-links a:focus {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--primary-yellow);
}

/* NEW: Styling for sidebar icons (Font Awesome) */
.sidebar-links .sidebar-icon {
    font-size: 1.4em; /* Adjust size of Font Awesome icon */
    color: var(--light-text); /* Set icon color directly (will be white) */
    margin-right: 10px; /* Space between icon and text */
    /* Removed filter as Font Awesome icons are colored via 'color' property */
}

/* Main Content Area */
#main-content {
    display: flex;
    flex-direction: column;
    padding: 20px;
    box-sizing: border-box;
    position: relative; /* For hamburger menu positioning within main-content */
    z-index: 1; /* Ensure content is above body background */

    /* Adjustments for centering and responsiveness */
    width: 100%; /* Take full width on small screens */
    max-width: 500px; /* Limit content width on larger screens for better readability */
    flex-shrink: 0; /* Prevents it from shrinking too much within the body's flex container */
    padding-bottom: 80px; /* IMPORTANT: Space for fixed bottom player bar */
    transition: transform 0.3s ease-in-out; /* Smooth transition when sidebar pushes it */
}

#main-content.sidebar-open {
    /* When sidebar is open, push main content to the right */
    transform: translateX(280px);
    /* Adjust width to ensure it doesn't overlap the sidebar if it were static */
    /* For fixed sidebar, this transform creates the "push" effect */
}

.hamburger-menu {
    background: none;
    border: none;
    font-size: 2em;
    color: var(--primary-yellow);
    cursor: pointer;
    position: absolute; /* Positioned relative to #main-content */
    top: 15px;
    left: 15px; /* Stay fixed relative to main-content's top-left */
    z-index: 10; /* Above header img */
    padding: 5px 10px;
    border-radius: 5px;
    transition: background-color 0.2s ease;
}

.hamburger-menu:active {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Header */
header {
    text-align: center;
    margin-bottom: 20px;
    position: relative; /* For correct stacking with hamburger menu */
}

header img {
    width: 160px; /* Larger logo */
    height: 160px;
    border-radius: 50%;
    border: 5px solid var(--primary-yellow);
    box-shadow: 0 0 20px rgba(255, 255, 0, 0.6); /* More prominent glow */
    object-fit: cover;
}

/* Player Card */
.player-card {
    background-color: var(--medium-background);
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 15px var(--shadow-color);
    text-align: center;
    width: 100%; /* Ensures it fills main-content, up to max-width */
    margin: 0 auto 30px auto; /* Center within its parent and add bottom margin */
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.player-card h3 {
    color: var(--primary-red);
    font-size: 1.5em;
    margin-top: 0;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.slider-container {
    width: 100%;
    overflow: hidden; /* This hides images outside the current view */
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: inset 0 0 5px rgba(0,0,0,0.5);
    background-color: #000;
    height: 400px; /* Set height to 400px */
}

.slider {
    display: flex;
    transition: transform 0.5s ease-in-out;
    width: 300%; /* For 3 images, this means each image is 100% of the container's width */
    height: 100%; /* Make slider take full height of its container */
}

.slider img {
    width: calc(100% / 3); /* Each image takes 1/3rd of the total slider width (which is 300% of container) */
    height: 400px; /* Set image height to 400px */
    object-fit: cover; /* Ensures the image covers the area, cropping if necessary */
    display: block;
    border-radius: 10px; /* Match container border-radius */
    flex-shrink: 0; /* Prevents images from shrinking if space is constrained */
}

.now-playing {
    font-size: 1.3em;
    color: var(--primary-yellow);
    font-weight: bold;
    margin-bottom: 25px;
    min-height: 1.3em; /* Prevents layout shift when text changes */
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

.social-icons {
    margin-top: 20px;
}

.social-icons a {
    display: inline-block;
    margin: 0 10px;
    transition: transform 0.2s ease;
}

/* UPDATED: Styling for Font Awesome social icons */
.social-icons .social-icon { /* Targeting the new class */
    font-size: 40px; /* Make Font Awesome icon size 40px */
    color: var(--light-text); /* Set icon color to white */
    text-shadow: 0 0 5px rgba(255,255,0,0.5); /* Add yellow glow */
    /* Removed filter as Font Awesome icons are colored via 'color' property */
}

.social-icons a:hover .social-icon { /* Apply hover effect to the icon itself */
    transform: scale(1.1); /* Scale the icon on hover */
}

/* Footer */
footer {
    text-align: center;
    margin-top: auto; /* Pushes footer to the bottom of the main content area */
    padding: 20px 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9em;
}

/* Bottom Player Bar */
#bottom-player-bar {
    position: fixed; /* Reverted to fixed */
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--primary-red);
    color: var(--light-text);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    box-shadow: 0 -2px 10px var(--shadow-color); /* Shadow on the top edge */
    z-index: 1000; /* Above main content, below sidebar */
    box-sizing: border-box;
}

.player-info {
    display: flex;
    align-items: center;
    flex-grow: 1; /* Allows info to take most available width */
    overflow: hidden; /* Hide overflow text */
    white-space: nowrap; /* Keep text on single line */
}

.player-thumbnail {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    margin-right: 10px;
    object-fit: cover;
    border: 2px solid var(--primary-yellow);
    flex-shrink: 0; /* Prevent thumbnail from shrinking */
}

.player-title {
    font-weight: bold;
    margin-right: 5px;
    color: var(--light-text);
    flex-shrink: 0; /* Prevent title from shrinking */
}

.player-artist {
    font-size: 0.9em;
    color: var(--primary-yellow);
    text-overflow: ellipsis; /* Add ellipsis for long text */
    overflow: hidden;
    flex-grow: 1; /* Allow artist name to take available space and truncate */
}

.player-controls #bottomPlayBtn {
    background-color: var(--primary-yellow);
    color: var(--primary-red);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 2em; /* Larger icon */
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.player-controls #bottomPlayBtn:hover {
    background-color: #FFD700; /* Lighter yellow on hover */
}

.player-controls #bottomPlayBtn:active {
    transform: scale(0.95); /* Slight shrink on click */
}

#radio-bottom {
    display: none; /* Hide default audio controls */
}

/* Media Queries for Desktop/Tablet */
@media (min-width: 768px) {
    body {
        display: flex;
        justify-content: center;
        align-items: flex-start;
    }

    #sidebar {
        position: fixed;
        left: -280px;
        height: 100%;
        box-shadow: 2px 0 10px var(--shadow-color);
    }

    #main-content {
        max-width: 800px;
        padding: 40px;
        transition: transform 0.3s ease-in-out;
        width: 100%;
        padding-bottom: 80px; /* Keep space for fixed bottom player bar */
    }

    #main-content.sidebar-open {
        transform: translateX(280px);
    }

    .hamburger-menu {
        display: block;
        position: fixed;
        top: 15px;
        left: 15px;
        z-index: 1002;
    }

    #bottom-player-bar {
        position: fixed; /* Remains fixed on desktop too */
        bottom: 0;
        left: 0;
        width: 100%;
        margin: 0;
        border-radius: 0;
    }
}