/* General Body and Font Styles */
body, html {
    margin: 0;
    padding: 0;
    font-family: 'Arial', sans-serif;
    background-color: #000;
    color: #f0f0f0;
    line-height: 1.6;
    height: 100%;
    display: flex;
    flex-direction: column;
    overscroll-behavior-y: contain;
    /* Set a base font size for rem calculations */
    font-size: 16px;
}

/* New rule to hide search form when body has the .search-hidden class */
body.search-hidden .search-form {
    display: none;
}

/* Site Header - Streamlined */
.site-header {
    width: 100%;
    background-color: #000;
    color: #fff;
    border-bottom: 1px solid #333;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1001;
    box-sizing: border-box;
    height: 6.25rem; /* 100px */
    display: flex;
    flex-direction: column;
}

/* Top Utility Navigation */
.top-utility-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.625rem 1.875rem; /* 10px 30px */
    height: 3.75rem; /* 60px */
    flex-shrink: 0;
}

.top-utility-nav .logo {
    font-weight: bold;
    font-size: 1.2rem;
    color: #cc4e01;
}

.top-utility-nav .top-right-nav span {
    margin-left: 1rem;
    font-size: 0.9rem;
    cursor: pointer;
    transition: color 0.2s ease;
}

.top-utility-nav .top-right-nav span:hover {
    color: #cc4e01;
}

.top-utility-nav .top-right-nav span[data-action="login"]::before {
    content: "";
    margin: 0 0.5rem;
    color: inherit;
}


/* Redeemed Code Button */
.redeem-code {
    background-color: #cc4e01;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s ease;
    text-transform: uppercase;
}

.redeem-code:hover {
    background-color: #a03f00;
}

/* Main Top Navigation */
.main-top-nav {
    background-color: #0d0d0d;
    padding: 0 1.875rem; /* 30px */
    height: 2.5rem; /* 40px */
    flex-shrink: 0;
    display: flex;
    align-items: center;
    border-top: 1px solid #333;
    box-sizing: border-box;
}

.main-top-nav .main-nav-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    width: 100%;
    gap: 1.5rem; /* 25px */
}

/* This rule is cleared to allow search to sit on the left */
.main-top-nav .main-nav-links li:first-child {
    /* No margin needed anymore */
}

.main-top-nav .main-nav-links li:last-child {
    margin-left: auto; /* This still pushes the redeem button to the far right */
}

.main-top-nav .main-nav-links li a {
    color: #f0f0f0;
    text-decoration: none;
    font-weight: bold;
    font-size: 1rem;
    padding: 0.3rem 0; /* 5px */
    transition: color 0.2s ease;
}

.main-top-nav .main-nav-links li a:hover,
.main-top-nav .main-nav-links li a.active {
    color: #cc4e01;
}

/* Search Form Styles */
.search-form {
    display: flex;
    align-items: center;
    gap: 0.625rem; /* 10px */
}
.search-input {
    background-color: #333;
    color: #fff;
    border: 1px solid #555;
    border-radius: 5px;
    padding: 0.375rem 0.75rem; /* 6px 12px */
    font-size: 0.9rem;
}
.search-input:focus {
    outline: none;
    border-color: #cc4e01;
}
.btn-search {
    background-color: #3a3a3a;
    color: #f0f0f0;
    border: 1px solid #555;
    padding: 0.375rem 1rem; /* 6px 15px */
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: bold;
    transition: background-color 0.2s ease;
}
.btn-search:hover {
    background-color: #cc4e01;
}

/* Main Content Wrapper - CORRECTED */
.main-content-wrapper {
    display: flex;
    position: fixed;
    top: 6.25rem; /* 100px Header height */
    left: 0;
    width: 100%;
    height: calc(100dvh - 6.25rem - 4.375rem); /* Fill space between header & player */
    box-sizing: border-box;
    background-color: #000000;
}

/* Content Area - Scrollable region */
.content-area {
    flex-grow: 1; /* Allow this area to grow and fill space */
    padding: 1.25rem; /* 20px */
    overflow-y: auto; /* This will now work correctly */
    position: relative;
    box-sizing: border-box;
    scrollbar-width: thin;
    scrollbar-color: #333333 #000000;
}

.content-area::-webkit-scrollbar {
    width: 0.75rem; /* 12px */
}

.content-area::-webkit-scrollbar-track {
    background: #000000;
}

.content-area::-webkit-scrollbar-thumb {
    background-color: #333333;
    border-radius: 1.25rem; /* 20px */
    border: 3px solid #000000;
}

.content-area::-webkit-scrollbar-thumb:hover {
    background-color: #444444;
}

/* --- Fixed Bottom Player --- */
.fixed-bottom-player {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4.375rem; /* 70px */
    background-color: #000;
    border-top: 1px solid #333;
    z-index: 1000;
    box-sizing: border-box;
}

.player-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    padding: 0 1.25rem; /* 20px */
}

.now-playing-info {
    display: flex;
    align-items: center;
    gap: 1rem; /* 15px */
    flex-shrink: 1;
    min-width: 0;
    max-width: 300px;
}

.now-playing-info img {
    width: 3.125rem; /* 50px */
    height: 3.125rem; /* 50px */
    border-radius: 5px;
    object-fit: cover;
}

.now-playing-info .song-details p {
    margin: 0;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.now-playing-info .song-details .song-title {
    font-weight: bold;
    color: #fff;
}

.now-playing-info .song-details .artist-album {
    color: #bbb;
    font-size: 0.8rem;
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 1.5rem; /* 25px */
    flex-grow: 1;
    justify-content: center;
}

.player-button {
    background: none;
    border: none;
    color: #f0f0f0;
    font-size: 1.1rem;
    cursor: pointer;
    transition: color 0.2s ease, transform 0.1s ease;
    padding: 0.3rem; /* 5px */
}

.player-button:hover {
    color: #cc4e01;
    transform: scale(1.05);
}

.player-button.large-play-pause {
    font-size: 1.8rem;
    color: #cc4e01;
}

.player-button.large-play-pause:hover {
    color: #ff7700;
}

.player-actions {
    display: flex;
    gap: 1rem; /* 15px */
    flex-shrink: 0;
    max-width: 150px;
    justify-content: flex-end;
}

/* --- General & Homepage Sections --- */
.hidden { display: none !important; }

#main-dynamic-content > div:not(:first-child) {
    margin-top: 2.5rem; /* 40px */
}

.content-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.25rem; /* 20px */
}

.homepage-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem; /* 15px */
}

.homepage-section-header h2 {
    font-size: 1.5rem;
    margin: 0;
    color: #fff;
}

/* Horizontal Scroll Strips */
.horizontal-scroll-strip {
    display: flex;
    overflow-x: auto;
    padding-bottom: 1rem; /* 15px */
    padding-top: 1rem; /* 15px */
    gap: 1rem; /* 15px */
    min-width: 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.horizontal-scroll-strip::-webkit-scrollbar {
    display: none;
}

/* Scroll Items (Genres, Artists, etc) */
.scroll-item {
    flex-shrink: 0;
    width: 150px;
    background-color: #000000;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.scroll-item:hover {
    transform: translateY(-5px);
    background-color: #000000;
}

.scroll-item.active {
    border: 2px solid #cc4e01;
    transform: translateY(-5px);
    background-color: #000000;
    box-shadow: 0 0 10px rgba(204, 78, 1, 0.5);
}

.scroll-item img {
    width: 100%;
    height: 150px;
    object-fit: contain;
    background-color: #000;
}

.scroll-item h3 {
    font-size: 1.1rem;
    font-weight: bold;
    color: #fff;
    margin: 0.625rem; /* 10px */
}

.genre-scroll-item {
    width: 225px;
}

.genre-scroll-item img {
    height: 150px;
}

/* --- Featured Artist Section (Homepage) --- */
.featured-artist-section {
    display: flex;
    position: relative;
    margin-top: 1.25rem; /* 20px */
    border-radius: 8px;
    overflow: hidden;
    min-height: 18.75rem; /* 300px */
}

.featured-artist-panel-left {
    width: 50%;
    background-color: #000;
    margin-right: -1px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.featured-artist-panel-right {
    width: 50%;
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}

.featured-artist-hero {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    display: flex;
    padding: 2.5rem 1.875rem; /* 40px 30px */
    box-sizing: border-box;
    color: #fff;
}

.featured-artist-content-container {
    align-self: flex-end;
    width: 100%;
    overflow: hidden;
}

.artist-header-image {
    width: 9.375rem; /* 150px */
    height: 9.375rem; /* 150px */
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 5px 20px rgba(0,0,0,0.5);
    flex-shrink: 0;
    cursor: default;
    margin-bottom: 1rem; /* 15px */
}

.artist-label {
    font-size: 0.9rem;
    font-weight: bold;
    text-transform: uppercase;
    color: #bbb;
    margin: 0 0 0.3rem 0; /* 5px */
}

.artist-actions-line {
    display: flex;
    align-items: center;
    gap: 1.25rem; /* 20px */
    width: 100%;
}

/* FLUID TYPOGRAPHY for h1 */
.artist-actions-line h1 {
    font-size: clamp(2rem, 5vw, 3rem); /* Min, Preferred, Max */
    margin: 0;
    line-height: 1.1;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.artist-actions-line .actions-spacer {
    flex-grow: 1;
}

.artist-actions-line .btn-shuffle, .artist-actions-line .btn-secondary {
    flex-shrink: 0;
}

.featured-artist-tracks-container {
    display: block;
}

.featured-artist-tracks .compact-track-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem; /* 20px */
}

/* Highlight for Searched Track */
.compact-track-item.highlighted-track .compact-track-info {
    box-shadow: 0 0 15px rgba(204, 78, 1, 0.8);
    border: 1px solid #cc4e01;
}

/* --- MOBILE-First STYLES for Homepage Song Items --- */
.compact-track-item {
    display: flex;
    flex-direction: column; 
    text-align: center;
    gap: 0.5rem; /* 8px */
}

.compact-track-item .track-artwork-container {
    position: relative;
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
}

.compact-track-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.compact-track-item .compact-track-title {
    padding: 0 0.3rem;
}

.compact-track-item .compact-track-title h3 {
    margin: 0;
    font-size: 0.8rem;
    font-weight: bold;
}

.compact-track-item .compact-track-title .compact-track-artist {
    margin: 0.125rem 0 0 0; /* 2px */
    font-size: 0.7rem;
    color: #aaa;
    font-weight: normal;
}

.compact-track-item .track-actions {
    padding-bottom: 0.625rem; /* 10px */
    font-size: 0.8rem;
    color: #aaa;
}

.compact-track-item .track-actions .fa-heart:hover,
.compact-track-item .track-actions .fa-plus:hover {
    color: #fff;
}

.compact-track-item .track-actions .fa-heart.fas {
    color: #cc4e01;
}

.compact-track-item .track-actions .fa-plus {
    color: #cc4e01;
}

.compact-track-item .track-actions .fa-heart {
    pointer-events: auto;
}

.choice-box.active ~ .compact-track-item:not(.in-pack) .track-actions .fa-heart {
    pointer-events: none;
    cursor: default;
}

.compact-track-item.in-pack .track-actions .fa-heart {
    pointer-events: auto;
    cursor: pointer;
}

.compact-track-item .compact-track-info {
    border-radius: 4px;
    background-color: #000; 
    cursor: pointer;
    transition: background-color .2s ease;
}

.compact-track-item .compact-track-info:hover {
    background-color: #1a1a1a;
}

.compact-track-item.playing .compact-track-info {
    background-color: rgba(204, 78, 1, 0.2);
}

/* Update hero-slider-track to accommodate 4 slides */
.hero-slider-track {
    display: flex;
    width: 400%; /* Changed from 300% to 400% */
    height: 100%;
    transition: transform 0.4s ease-in-out;
}
.hero-slider-block {
    width: 25%; /* Changed from 33.3333% to 25% */
    height: 100%;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    text-align: center;
    padding: 1.25rem; /* 20px */
}

/* --- ADVERTISEMENT SPACERS --- */
.compact-track-ad-spacer, .desktop-ad-spacer {
    display: none;
    border-radius: 8px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* --- Playlist & Artist Pages --- */
.playlists-hub-card {
    background-color: #2a2a2a;
    border-radius: 10px;
    max-width: 900px;
    margin: 2.5rem auto; /* 40px */
    padding: 1.875rem; /* 30px */
    box-sizing: border-box;
    position: relative;
}

.playlists-hub-card .section-header {
    margin-bottom: 1.25rem; /* 20px */
}

.playlist-cover-art {
    width: 175px;
    height: 175px;
    border-radius: 8px;
}

.song-list-section {
    border-bottom: 1px solid #333;
    padding-bottom: 1rem; /* 15px */
    margin-bottom: 1rem; /* 15px */
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.song-list-section .section-header {
    border-bottom: 1px solid #333;
    padding-bottom: 1rem; /* 15px */
    margin-bottom: 1rem; /* 15px */
    flex-shrink: 0;
}

.song-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    scrollbar-gutter: stable;
    padding-right: 0.625rem; /* 10px */
}

.song-list-item {
    display: grid;
    grid-template-columns: 30px 40px 1fr 1fr 1fr 60px 60px;
    gap: 1.25rem; /* 20px */
    align-items: center;
    padding: 0.625rem; /* 10px */
    border-bottom: 1px solid #3d3d3d;
    border-radius: 5px;
    transition: background-color 0.2s ease;
    cursor: pointer;
}

.song-list-item:hover { background-color: #3d3d3d; }
.song-list-item.playing { background-color: #3a3a3a; color: #cc4e01; }
.song-index { text-align: center; color: #aaa; }
.song-list-item.playing .song-index { color: #cc4e01; }
.song-thumbnail img { width: 40px; height: 40px; object-fit: cover; border-radius: 4px; }
.song-details-list p, .song-album-list, .song-duration, .artist-name-list { margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.song-title-list { font-weight: bold; color: #fff; }
.album-title-list, .song-album-list, .song-duration, .artist-name-list { font-size: 0.85rem; color: #aaa; }
.song-duration { text-align: right; }
.song-actions { text-align: right; }
.remove-playlist-btn { font-size: 1.1rem; color: #888; transition: color .2s ease; }
.remove-playlist-btn:hover { color: #ff4d4d; }

.artist-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, 200px);
    gap: 1.25rem; /* 20px */
    justify-content: center;
}

.artist-card {
    background-color: #000000;
    border-radius: 8px;
    padding: 1rem; /* 15px */
    text-align: center;
    text-decoration: none;
    color: #fff;
    transition: background-color 0.2s ease;
}

.artist-card:hover {
    background-color: #3d3d3d;
}

.artist-card img {
    width: 100%;
    aspect-ratio: 1 / 1;
    height: auto;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1rem; /* 15px */
}

/* Pack Selection, Buttons, etc. */
.pack-header {
    display: flex;
    align-items: center;
    gap: 1rem; /* 15px */
    flex-wrap: wrap;
    position: relative;
}

.pack-sponsor-logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
    position: relative;
    z-index: 2;
}

.pack-toggle-btn {
    position: absolute;
    top: -33px;
    left: 165px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 0.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease, border-color 0.2s ease;
    z-index: 3;
}

.pack-toggle-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    border-color: #cc4e01;
}

.pack-progress {
    font-size: 1.1rem;
    font-weight: bold;
    color: #fff;
    background: rgba(0, 0, 0, 0.8);
    padding: 0.3rem 0.625rem; /* 5px 10px */
    border-radius: 4px;
    border: none;
    position: absolute;
    top: -35px;
    left: 0;
    z-index: 2;
}

.pack-selection-prompt {
    text-align: center;
    color: #aaa;
    font-style: italic;
    font-size: 0.9rem;
    margin: -0.3rem 0 0.625rem 0; /* -5px 0 10px 0 */
}

.pack-promo-image-item {
    width: 300px;
    height: 150px;
    background-color: transparent !important;
    flex-shrink: 0;
}

.pack-promo-image-item:hover {
    transform: none !important;
    background-color: transparent !important;
}

.pack-promo-image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.choice-box {
    justify-content: center !important;
    align-items: center;
    height: 150px;
    border: 2px dashed #444;
    position: relative;
}

.choice-box:hover {
    border-color: #cc4e01;
    background-color: #000000;
}

.choice-box i {
    font-size: 3rem;
    color: #555;
    transition: color 0.2s ease;
}

.choice-box:hover i {
    color: #cc4e01;
}

.choice-box.filled {
    border: none;
    background-color: #000;
    text-align: center;
}

.choice-box.filled img {
    width: 100%;
    height: 100px;
    object-fit: cover;
}

.choice-box.filled h3 {
    font-size: 0.8rem;
    margin: 0.3rem 0 0.125rem; /* 5px 0 2px */
}

.choice-box.filled .compact-track-artist {
    font-size: 0.7rem;
    color: #aaa;
    margin: 0;
}

.choice-box.filled .remove-pack-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 1rem;
    color: #888;
    cursor: pointer;
}

.choice-box.filled .remove-pack-btn:hover {
    color: #ff4d4d;
}

.choice-box.active {
    border: 2px solid #cc4e01;
    box-shadow: 0 0 10px rgba(204, 78, 1, 0.5);
}

.choice-box:focus {
    outline: 2px solid #cc4e01;
    outline-offset: 2px;
}

.choice-box.dragging {
    opacity: 0.5;
    border: 2px dashed #cc4e01;
}

.header-buttons-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem; /* 15px */
}

.btn-shuffle, .btn-secondary {
    background-color: #000000;
    color: #f0f0f0;
    border: 1px solid #444;
    padding: 0.5rem 1rem; /* 8px 15px */
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: bold;
    transition: background-color 0.2s ease, color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem; /* 8px */
}

.btn-shuffle:hover, .btn-secondary:hover {
    background-color: #cc4e01;
    color: #fff;
}

.btn-secondary {
    background-color: #3a3a3a;
}

.btn-secondary:hover {
    background-color: #555;
}

.btn-delete {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 0.5rem 1rem; /* 8px 15px */
    border-radius: 5px;
}

.btn-top-right {
    position: absolute;
    top: 1.875rem; /* 30px */
    right: 1.875rem; /* 30px */
}

.strip-nav-arrows {
    display: flex;
    gap: 0.5rem; /* 8px */
}

.arrow-btn {
    background: none;
    border: none;
    color: #f0f0f0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    padding: 0.3rem; /* 5px */
    transition: color 0.2s ease;
}

.arrow-btn:hover {
    color: #cc4e01;
}

.arrow-btn:focus {
    outline: none;
    box-shadow: 0 0 0 2px #cc4e01;
}

/* --- Mobile Navigation --- */
.hamburger-menu {
    display: none; /* Hidden by default, shown in media query */
    background: none;
    border: none;
    color: #f0f0f0;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1003;
}

.mobile-nav {
    display: none; /* Controlled by JS to toggle */
    flex-direction: column;
    position: absolute;
    top: 3.75rem; /* Height of the top utility nav */
    right: 0;
    width: 50vw; /* Half of the viewport width */
    max-width: 250px; /* Don't let it get too big */
    background-color: #0d0d0d;
    z-index: 1002;
    box-shadow: -5px 5px 15px rgba(0,0,0,0.5);
    border-radius: 0 0 0 8px;
}

.mobile-nav.open {
    display: flex; /* Show the nav */
}

.mobile-nav span {
    color: #f0f0f0;
    padding: 1rem 1.5rem;
    cursor: pointer;
    border-bottom: 1px solid #2a2a2a;
    font-size: 1rem;
    text-align: right;
}

.mobile-nav span:last-child {
    border-bottom: none;
}

.mobile-nav span:hover {
    background-color: #cc4e01;
}


/* --- Sidebar Overlay & Forms --- */
#sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 4.375rem; /* 70px */
    background-color: rgba(13, 13, 13, 0.95);
    z-index: 2000;
    padding: 1.25rem; /* 20px */
    box-sizing: border-box;
    overflow-y: auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.close-overlay-btn {
    position: absolute;
    top: 1rem; /* 15px */
    right: 1.25rem; /* 20px */
    font-size: 1.5rem;
    color: #888;
    cursor: pointer;
    background: none;
    border: none;
}

.close-overlay-btn:hover { color: #fff; }

.auth-card, .playlist-overlay-card {
    background-color: #2a2a2a;
    padding: 1.875rem; /* 30px */
    border-radius: 10px;
    width: 100%;
    position: relative;
    box-sizing: border-box;
    margin: 2.5rem 0; /* 40px */
}

.auth-card {
    max-width: 400px;
}

.playlist-overlay-card {
    max-width: 900px;
    display: flex;
    flex-direction: column;
    max-height: 85vh;
}

.auth-card h2 {
    text-align: center;
    margin-top: 0;
    color: #cc4e01;
    margin-bottom: 1.5rem; /* 25px */
}

.form-group { margin-bottom: 1.25rem; /* 20px */ }

.form-group label {
    display: block;
    margin-bottom: 0.5rem; /* 8px */
    font-weight: bold;
    color: #f0f0f0;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="email"] {
    width: 100%;
    padding: 0.75rem; /* 12px */
    background-color: #333;
    border: 1px solid #535353;
    border-radius: 5px;
    color: #fff;
    box-sizing: border-box;
    font-size: 1rem;
}

.form-group input:focus {
    outline: none;
    border-color: #cc4e01;
    box-shadow: 0 0 0 2px rgba(204, 78, 1, 0.3);
}

.btn-primary {
    width: 100%;
    padding: 0.75rem; /* 12px */
    margin-top: 0.625rem; /* 10px */
    background-color: #cc4e01;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: bold;
    transition: background-color 0.2s ease;
}

.btn-primary:hover {
    background-color: #a03f00;
}

.playlist-selection-list {
    list-style: none;
    padding: 0;
    margin-top: 1.25rem; /* 20px */
    width: 100%;
    max-width: 400px;
}

.playlist-choice {
    padding: 0.75rem 1rem; /* 12px 15px */
    background-color: #2a2a2a;
    border-radius: 5px;
    margin-bottom: 0.625rem; /* 10px */
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.playlist-choice:hover {
    background-color: #cc4e01;
    color: #fff;
}

/* --- Custom Dialog Box Styles --- */
.dialog-card {
    text-align: center;
}
.dialog-message {
    font-size: 1.1rem;
    color: #f0f0f0;
    margin-bottom: 1.5rem; /* 25px */
    line-height: 1.6;
}
.dialog-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem; /* 15px */
}
.dialog-buttons .btn-primary,
.dialog-buttons .btn-secondary {
    width: auto;
    padding: 0.625rem 1.5rem; /* 10px 25px */
}
.dialog-card .dialog-input {
    width: 100%;
    padding: 0.75rem; /* 12px */
    background-color: #333;
    border: 1px solid #535353;
    border-radius: 5px;
    color: #fff;
    box-sizing: border-box;
    font-size: 1rem;
    margin-bottom: 1.25rem; /* 20px */
}
.dialog-card .dialog-input:focus {
    outline: none;
    border-color: #cc4e01;
    box-shadow: 0 0 0 2px rgba(204, 78, 1, 0.3);
}


/* --- Custom Features & Tweaks --- */
.nike-playlist-actions {
    display: flex;
    gap: 1rem; /* 15px */
}

.logo .logo-mobile, .logo .logo-desktop {
    max-height: 45px;
    width: auto;
    display: block;
}

.logo .logo-desktop {
    display: none; /* Hidden by default for mobile-first */
}

.logo .logo-mobile {
    display: block; /* Shown by default */
}

/* Show desktop logo and hide mobile logo on screens wider than 600px */
@media (min-width: 601px) {
    .logo .logo-desktop {
        display: block;
    }
    .logo .logo-mobile {
        display: none;
    }
}

.artist-name-line {
    display: flex;
    align-items: center;
    gap: 1.25rem; /* 20px */
    flex-wrap: wrap;
}

.song-thumbnail {
    position: relative;
}

.explicit-tag {
    position: absolute;
    bottom: 2px;
    right: 2px;
    font-size: 10px;
    font-weight: bold;
    color: #fff;
    background-color: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    padding: 2px 5px;
    line-height: 1;
    text-transform: uppercase;
}

.header-action-button {
    position: absolute;
    top: 1.25rem; /* 20px */
    right: 1.25rem; /* 20px */
    z-index: 3;
    background: rgba(0, 0, 0, 0.4);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.header-action-button:hover {
    background: rgba(0, 0, 0, 0.7);
}

.top-right-nav span[data-action="register"]::before {
    content: "";
    margin: 0 0.5rem; /* 8px */
    color: inherit;
}

/* --- Mobile Responsive Adjustments --- */
@media (max-width: 900px) {
    p {
        line-height: 1.5;
    }
    .homepage-section-header h2 {
        font-size: 1.3rem;
    }

    .content-area {
        padding: 1rem 1rem 4.5rem 1rem; /* 15px 15px 70px 15px */
    }
    .genre-scroll-item {
        width: 225px;
    }
    .genre-scroll-item img {
        height: 150px;
    }
    .choice-box, .scroll-item img {
        height: 120px;
    }

    .featured-artist-panel-left {
        display: none;
    }
    .featured-artist-panel-right {
        width: 100%;
    }
    .featured-artist-hero {
        padding: 1.25rem; /* 20px */
        justify-content: flex-start;
        align-items: flex-end;
    }
    .featured-artist-content-container {
        margin-top: 1.5rem; /* 25px */
        min-height: 225px;
    }
    
    .hero-slider-nav {
        display: flex;
        position: absolute;
        bottom: 1rem; /* 15px */
        right: 1rem; /* 15px */
        z-index: 10;
        gap: 0.5rem; /* 8px */
    }
    
    .artist-header-image {
        width: 100px;
        height: 100px;
        margin-bottom: 0.625rem; /* 10px */
    }
    
    .artist-actions-line {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.625rem; /* 10px */
    }
    .artist-actions-line .actions-spacer {
        display: none;
    }
    
    .pack-promo-image-item {
        width: 240px;
        height: 120px;
    }
    .pack-sponsor-logo {
        width: 40px;
        height: 40px;
    }
    .pack-progress {
        font-size: 0.9rem;
        top: -30px;
        padding: 0.25rem 0.5rem; /* 4px 8px */
        border: none;
    }
    .pack-toggle-btn {
        top: -28px;
        left: 140px;
        width: 20px;
        height: 20px;
        font-size: 0.7rem;
    }
    .choice-box.filled img {
        height: 80px;
    }
    .choice-box.filled h3 {
        font-size: 0.7rem;
    }
    .choice-box.filled .compact-track-artist {
        font-size: 0.6rem;
    }

    .song-list-item {
        grid-template-columns: 30px 40px 1fr 60px;
        gap: 0.625rem; /* 10px */
    }
    .song-album-list {
        display: none;
    }

    .featured-artist-tracks .homepage-section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem; /* 15px */
    }

    .hero-slider-block h1 {
        font-size: 1.6rem;
        margin-bottom: 0.3rem; /* 5px */
    }
    .hero-slider-block h2 {
        font-size: 1.2rem;
    }
    .hero-slider-block h3 {
        font-size: 0.9rem;
    }

    .hero-redeem-block {
        padding-top: 0.625rem; /* 10px */
        padding-bottom: 0.625rem; /* 10px */
        gap: 0.625rem; /* 10px */
    }

    .hero-redeem-block h1,
    .hero-redeem-block h2,
    .hero-redeem-block h3 {
        /* UPDATED: Use fluid font size to prevent overflow on small screens */
        font-size: clamp(0.8rem, 4vw, 1rem);
        margin: 0;
    }

    /* VOTE PAGE MOBILE STYLES */
    .vote-header-studio-logo {
        display: none;
    }
    #running-man-logo {
        display: none;
    }
    #snoop-remix-logo {
        display: none;
    }
    .vote-content-grid {
        grid-template-columns: 1fr;
    }
    .vote-sidebar-column {
        display: none;
    }
    .vote-list-item {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem; /* 15px */
        padding: 1rem; /* 15px */
    }
    .vote-item-main {
        flex-direction: column;
        align-items: stretch;
    }
    .vote-item-actions {
        width: 100%;
        justify-content: space-between;
    }
    .vote-now-playing {
        display: none;
    }
    .vote-item-social {
        width: 100%;
        display: flex;
        justify-content: center !important; /* Force centering */
        gap: 2rem;
        padding-top: 1rem;
        border-top: 1px solid #2a2a2a;
        margin-top: 1rem;
        padding-right: 0;
    }
}

/* NEW: Media query for short/wide screens like landscape phones */
@media (max-width: 900px) and (orientation: landscape) {
    .featured-artist-section {
        min-height: 240px; /* Reduce height in landscape */
    }

    .featured-artist-hero {
        padding: 1rem;
        justify-content: center;
        align-items: center;
        text-align: center;
    }

    .featured-artist-content-container {
        align-self: center;
        margin-top: 0;
    }

    .artist-actions-line {
        flex-direction: row; /* Go back to row layout */
        justify-content: center;
        align-items: center;
    }
    
    .artist-header-image {
        width: 80px;
        height: 80px;
    }
}


@media (max-width: 480px) {
    .top-utility-nav {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 0.625rem; /* 10px */
        padding: 0.625rem 1rem; /* 10px 15px */
    }

    .main-top-nav {
        padding: 0 1rem; /* Reduce padding on smallest screens */
    }

    .search-input {
        padding: 0.375rem 0.5rem;
        font-size: 0.8rem;
        max-width: 110px; /* Constrain width to make room */
    }
}

@media (max-width: 600px) {
    /* Hide the original desktop nav and show the hamburger menu */
    .top-right-nav {
        display: none;
    }
    .hamburger-menu {
        display: flex;
    }

    .main-top-nav .main-nav-links {
        gap: 0.5rem; /* Reduce gap between search and redeem btn */
        justify-content: space-between;
    }
    .main-top-nav .main-nav-links li:last-child {
        margin-left: 0; /* Remove the auto margin */
    }

    .redeem-code {
        font-size: 0.8rem;
        padding: 0.4rem 0.6rem; /* Adjust padding */
    }
    .featured-artist-tracks .compact-track-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .compact-track-ad-spacer {
        display: flex;
        grid-column: 1 / -1;
        aspect-ratio: 2 / 1;
        background-image: url('./images/site/advert2.png');
    }
}

@media (min-width: 1600px) {
    .site-header,
    .main-content-wrapper,
    .fixed-bottom-player {
        max-width: 1600px;
        margin-left: auto;
        margin-right: auto;
        left: 50%;
        transform: translateX(-50%);
    }
}

@media (min-width: 901px) {
    .featured-artist-tracks-container {
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        gap: 1.25rem; /* 20px */
        align-items: start;
    }

    .featured-artist-tracks .compact-track-grid {
        grid-column: 1 / 5;
    }

    .compact-track-item {
        flex-direction: row;
        align-items: center;
        gap: 0;
    }
    
    .compact-track-info {
        display: flex;
        align-items: center;
        gap: 0.625rem; /* 10px */
        flex-grow: 1;
        background-color: #000;
        padding: 0.5rem; /* 8px */
        border-radius: 4px;
        width: 100%;
    }
    
    .compact-track-item .track-artwork-container {
        width: 50px;
        height: 50px;
        flex-shrink: 0;
    }

    .compact-track-item .track-actions {
        font-size: 1.2rem;
        padding: 0 0.3rem; /* 5px */
        color: #aaa;
    }
    
    .compact-track-item .compact-track-title {
        flex-grow: 1;
        min-width: 0;
        padding: 0;
        display: flex;
        flex-direction: column;
        justify-content: center;
        text-align: left;
    }

    .compact-track-item .compact-track-title h3 {
        font-size: 0.75rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .compact-track-item .compact-track-title .compact-track-artist {
        font-size: 0.7rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .hero-slider-nav {
        display: flex;
        position: absolute;
        bottom: 1.25rem; /* 20px */
        left: 50%;
        transform: translateX(-50%);
        z-index: 10;
        gap: 1rem; /* 15px */
    }

    .hero-slider-block h1 {
        /* FLUID TYPOGRAPHY */
        font-size: clamp(1.6rem, 3vw, 2.0rem);
        color: #fff;
        margin: 0 0 0.3rem 0; /* 5px */
        text-shadow: 0 2px 8px rgba(0,0,0,0.7);
        line-height: 1.2;
    }

    .hero-slider-block h2 {
        font-size: 1.4rem;
        color: #fff;
        margin: 0 0 1rem 0; /* 15px */
        font-weight: normal;
    }

    .hero-slider-block h3 {
        font-size: 1rem;
        color: #fff;
        margin: 0;
        font-weight: normal;
        text-transform: uppercase;
        letter-spacing: 1px;
    }

    .hero-redeem-block {
        padding-bottom: 3.125rem; /* 50px */
    }

    .hero-redeem-block h1 {
        font-size: 1.9rem;
        margin-bottom: 0.3rem; /* 5px */
    }

    .hero-redeem-block h2 {
        font-size: 1.1rem;
        margin-bottom: 1.5rem; /* 25px */
        white-space: nowrap;
    }

    .artist-actions-line .actions-spacer {
        display: block;
    }

    .desktop-ad-spacer {
        display: flex;
        height: 349px;
        background-image: url('./images/site/advert1.png');
    }
}

/* --- Styles for Vote Section --- */
.song-actions .vote-btn {
    padding: 0.3rem 1rem; /* 5px 15px */
    font-size: 0.8rem;
    font-weight: bold;
    min-width: 60px;
}

.song-actions .vote-btn:disabled {
    background-color: #555;
    color: #999;
    cursor: not-allowed;
    border-color: #555;
}

.playlists-hub-card .song-list-item {
    cursor: default;
}

.playlists-hub-card .song-list-item:hover {
    background-color: transparent;
}

/* --- Scrolling Video Player Styles --- */
#scrolling-video-player-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5; 
    background-color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
}

#scrolling-video-player-container .video-wrapper {
    width: 100%;
    height: 100%;
    max-width: 533px;
    max-height: 300px;
    position: relative;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.5);
    padding: 4px;
    box-sizing: border-box;
}

#scrolling-video-player-container video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 6px;
}

#scrolling-video-player-container .close-video-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 30px;
    text-align: center;
    transition: background-color 0.2s ease, color 0.2s ease;
    z-index: 6;
}

#scrolling-video-player-container .close-video-btn:hover {
    background-color: #cc4e01;
    color: #000;
}

/* --- Trailer Vote Page Styles --- */
.vote-page-wrapper {
    width: 100%;
    overflow-x: hidden;
}
.vote-header {
    margin-bottom: 1.25rem; /* 20px */
}
#running-man-logo {
    position: absolute;
    top: 50%;
    left: 145px;
    width: 150px;
    height: auto;
    z-index: 6;
    transform: translateY(-50%);
    background: none;
}

#snoop-remix-logo {
    position: absolute;
    top: 50%;
    left: 145px;
    width: 150px;
    height: auto;
    z-index: 6;
    transform: translateY(-50%);
    background: none;
}

.vote-header-studio-logo {
    position: absolute;
    top: 50%;
    right: 145px;
    width: 150px;
    height: auto;
    z-index: 6;
    transform: translateY(-50%);
    background: none;
}

.vote-content-grid {
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: 1.875rem; /* 30px */
    align-items: flex-start;
}

.vote-chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #333;
    padding-bottom: 0.625rem;
    margin-bottom: 0.625rem;
}

.vote-chart-header h2 {
    margin: 0;
    padding: 0;
    border: none;
    font-size: 1.5rem;
    color: #fff;
}

.vote-now-playing {
    position: absolute;
    bottom: 346px; /* <-- THIS CONTROLS THE VERTICAL (Y) POSITION */
    left: 50%; 
    transform: translateX(-50%);
    z-index: 6;
    color: #fff;
    font-size: 1.2rem;
    font-style: normal;
    text-align: center;
    width: 50%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 2px 4px rgba(0,0,0,0.7);
}

.vote-chart-column h2, .vote-sidebar-column h3 {
    margin-top: 0;
    color: #fff;
    
    padding-bottom: 0.625rem; /* 10px */
}

.vote-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.vote-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0.625rem; /* 12px 10px */
    border-radius: 5px;
    margin-bottom: 0.3rem; /* 5px */
    background-color: #121212;
    transition: background-color 0.2s ease;
    cursor: default;
    gap: 2rem; /* Increased gap for more space */
}

.vote-list-item:hover {
    background-color: #2a2a2a;
}

.vote-list-item.playing .vote-item-track-info {
    background-color: rgba(204, 78, 1, 0.1);
    border-radius: 4px;
}

.vote-item-main {
    display: flex;
    align-items: center;
    gap: 1.5rem; /* Increased gap */
    flex-grow: 1;
    min-width: 0;
}

.vote-item-track-info {
    display: grid;
    /* Adjusted grid to give title more space but not be overly greedy */
    grid-template-columns: 40px 30px 60px 40px minmax(150px, 1fr);
    gap: 1rem; /* 15px */
    align-items: center;
    flex-grow: 1;
    min-width: 0;
}

/* The clickable action is now on the children, not the container */
.vote-item-track-info .vote-item-thumbnail,
.vote-item-track-info .vote-item-info {
    cursor: pointer;
}


.vote-item-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem; /* 24px */
}

.vote-item-position {
    font-weight: bold;
    font-size: 1.1rem;
    color: #aaa;
    text-align: center;
}

.vote-item-trend {
    text-align: center;
    font-size: 1.2rem;
}

.vote-item-trend .trend-up { color: #28a745; }
.vote-item-trend .trend-down { color: #dc3545; }
.vote-item-trend .trend-neutral { color: #888; }

.vote-item-thumbnail img {
    width: 50px;
    height: 50px;
    border-radius: 4px;
    object-fit: cover;
}

.vote-item-info p {
    margin: 0;
}
.vote-item-info .title {
    font-weight: bold;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.vote-item-info .artist {
    font-size: 0.85rem;
    color: #aaa;
}

.vote-item-like {
    text-align: center;
    font-size: 1.2rem;
    color: #888;
}

.vote-item-counts {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem; /* 15px */
    font-size: 0.8rem;
    color: #bbb;
}

.vote-count-line {
    display: flex;
    align-items: center;
    gap: 0.5rem; /* 8px */
}

.vote-item-like .fa-heart,
.vote-item-counts .fas {
    cursor: pointer;
    transition: color 0.2s ease, transform 0.1s ease;
}

.vote-item-like .fa-heart:hover,
.vote-item-counts .fas:hover {
    transform: scale(1.1);
    color: #fff;
}

.vote-item-like .fas.fa-heart,
.vote-item-counts .vote-active {
    color: #cc4e01;
}

.vote-item-social {
    display: flex;
    gap: 1.25rem; /* 20px */
    font-size: 1.2rem;
    justify-content: flex-end;
    padding-right: 0.625rem; /* 10px */
}

.vote-item-social [data-service="pinterest"] {
    display: none;
}

.vote-item-social span { /* Changed from a to span */
    color: #888;
    transition: color 0.2s ease, transform 0.2s ease;
    cursor: pointer;
}

.vote-item-social span:hover { /* Changed from a to span */
    color: #fff;
    transform: scale(1.1);
}

.vote-sidebar-column {
    display: flex;
    flex-direction: column;
    gap: 1.25rem; /* 20px */
}

.sidebar-ad-box {
    background-color: #121212;
    padding: 1.25rem; /* 20px */
    border-radius: 8px;
    text-align: center;
}

.sidebar-ad-box img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
}

/* --- NEW: Styles for Upload Page --- */
.upload-page-card {
    background-color: #1a1a1a;
    border-radius: 10px;
    max-width: 900px;
    margin: 2.5rem auto;
    padding: 1.875rem; /* 30px */
    box-sizing: border-box;
    position: relative;
}

.upload-page-card .section-header {
    margin-bottom: 1.25rem; /* 20px */
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.upload-step-section {
    background-color: #2a2a2a;
    padding: 1.25rem; /* 20px */
    border-radius: 8px;
    margin-bottom: 1.5rem; /* 25px */
    border-left: 3px solid #cc4e01;
}

.upload-step-section h2 {
    margin-top: 0;
    color: #f0f0f0;
}

.compliance-acknowledgment {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem; /* 12px */
    background-color: #333;
    padding: 1rem;
    border-radius: 5px;
}

.compliance-acknowledgment input[type="checkbox"] {
    margin-top: 5px;
    width: 18px;
    height: 18px;
}

.compliance-acknowledgment p {
    margin: 0;
    font-size: 0.9rem;
    color: #ccc;
}

#upload-progress-area {
    margin: 1rem 0;
    font-weight: bold;
    color: #cc4e01;
}

.origin-declaration-form fieldset {
    border: 1px solid #444;
    border-radius: 5px;
    padding: 1rem;
}

.origin-declaration-form legend {
    font-weight: bold;
    padding: 0 0.5rem;
    color: #f0f0f0;
}

.origin-choice {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.origin-choice label {
    color: #ddd;
}

.compliance-banner {
    background-color: rgba(220, 53, 69, 0.1);
    border: 1px solid #dc3545;
    border-radius: 5px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.compliance-banner h3 {
    margin-top: 0;
    color: #ffc107;
}

.compliance-banner ul {
    padding-left: 20px;
    margin-bottom: 0;
    color: #ddd;
}

.upload-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

.upload-actions .btn-primary,
.upload-actions .btn-secondary {
    width: auto;
}