:root {
    --primary-color: #6a11cb;
    --secondary-color: #2575fc;
    --accent-color: #ff00de;
    --bg-dark: #0a0a0e;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-main: #ffffff;
    --text-muted: #b3b3b3;
    --font-main: 'Outfit', sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
}

body {
    background: var(--bg-dark);
    font-family: var(--font-main);
    color: var(--text-main);
    overflow-x: hidden;
    width: 100%;
    min-height: 100vh;
    background-image:
        radial-gradient(circle at 10% 20%, rgba(106, 17, 203, 0.2) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(37, 117, 252, 0.2) 0%, transparent 40%);
}

/* Glassmorphism Utilities */
.glass-header,
.glass-panel,
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
}

/* Header */
.glass-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

.logo {
    font-weight: 700;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--secondary-color);
    /* Blue */
}

.logo i {
    color: var(--secondary-color);
    -webkit-text-fill-color: initial;
}

nav {
    display: flex;
    gap: 2rem;
}

nav a {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

nav a:hover,
nav a.active {
    color: var(--text-main);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(37, 117, 252, 0.4);
}

.btn-primary.large {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
}

/* Hero Section */
.hero {
    height: 90vh;
    display: flex;
    align-items: center;
    padding: 0 10%;
    position: relative;
    overflow: hidden;
}

.hero-content {
    flex: 1;
    z-index: 2;
}

.hero h1 {
    font-size: 4.5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.gradient-text {
    background: linear-gradient(135deg, var(--accent-color), var(--primary-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    color: var(--text-muted);
    font-size: 1.2rem;
    margin-bottom: 2rem;
    max-width: 500px;
}

.hero-visual {
    flex: 1;
    display: flex;
    justify-content: center;
    position: relative;
}

.circle-glow {
    width: 400px;
    max-width: 80vw;
    height: 400px;
    max-height: 80vw;
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
    animation: pulse 6s infinite alternate;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }

    100% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

/* SEARCH BAR STYLES */
.search-container {
    position: relative;
    width: 250px;
    /* Smaller for header */
}

.search-container i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.9rem;
}

.search-container input {
    width: 100%;
    padding: 0.6rem 1rem 0.6rem 2.5rem;
    /* Smaller padding */
    border-radius: 50px;
    border: 1px solid var(--glass-border);
    background: #000000;
    /* Header subtle bg */
    color: var(--secondary-color);
    font-family: var(--font-main);
    outline: none;
    transition: var(--transition);
    font-size: 0.9rem;
}

.search-container input:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--secondary-color);
    box-shadow: 0 0 10px rgba(37, 117, 252, 0.3);
}

/* Featured Music & New Hits Sections */
.featured-music,
.new-hits-section {
    padding: 2rem 10%;
    margin-bottom: 2rem;
}

h2 {
    font-size: 6rem;
    margin-bottom: 2rem;
}

h2,
.section-title {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    font-weight: 700;
}

.songs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 2rem;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* Background Animation */
@keyframes bgPulse {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

body {
    background: var(--bg-dark);
    font-family: var(--font-main);
    color: var(--text-main);
    overflow-x: hidden;
    min-height: 100vh;
    background-image:
        radial-gradient(circle at 10% 20%, rgba(106, 17, 203, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(37, 117, 252, 0.15) 0%, transparent 40%);
    background-size: 150% 150%;
    animation: bgPulse 15s ease infinite;
}

/* ... existing styles ... */

.song-card {
    background: var(--glass-bg);
    border-radius: 16px;
    padding: 1rem;
    transition: var(--transition);
    border: 1px solid transparent;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.song-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 100%);
    opacity: 0;
    transition: var(--transition);
}

.song-card:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-8px);
    border-color: var(--secondary-color);
    box-shadow: 0 10px 30px rgba(37, 117, 252, 0.2);
}

/* View Transitions */
.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Trending List Styles */
.trending-item {
    display: flex;
    align-items: center;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 1rem 2rem;
    margin-bottom: 1rem;
    border-radius: 12px;
    transition: var(--transition);
    cursor: pointer;
}

.trending-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(10px);
    border-color: var(--secondary-color);
}

.rank-number {
    font-size: 2.5rem;
    font-weight: 800;
    margin-right: 2rem;
    color: var(--text-muted);
    font-style: italic;
    width: 60px;
}

.trending-item:hover .rank-number {
    color: var(--primary-color);
}

.trending-info {
    flex: 1;
}

.trending-actions {
    opacity: 1;
    transition: var(--transition);
}

/* Hover rule removed as it's now always visible */

.album-art {
    width: 100%;
    aspect-ratio: 1/1;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 1rem;
    position: relative;
}

.album-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.song-card:hover .album-art img {
    transform: scale(1.05);
}

/* Carousel Section */
.trending-section {
    padding: 2rem 10%;
    margin-bottom: 2rem;
    position: relative;
}

.trending-section .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.carousel-controls {
    display: flex;
    gap: 1rem;
}

.carousel-controls button {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-controls button:hover {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
}

.carousel-container-wrapper {
    overflow: hidden;
    padding: 1rem 0;
    margin: 0 -1rem;
    /* Allow shadow to show */
    padding: 1rem;
}

.carousel-track {
    display: flex;
    gap: 2rem;
    transition: transform 0.5s ease-in-out;
}

.carousel-card {
    min-width: 260px;
    background: var(--glass-bg);
    /* Use same glass bg */
    border-radius: 20px;
    padding: 1.5rem;
    border: 1px solid var(--glass-border);
    position: relative;
    transition: var(--transition);
    cursor: pointer;
}

.carousel-card:hover {
    transform: translateY(-5px) scale(1.02);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.carousel-card .album-art {
    aspect-ratio: 16/9;
    /* Widescreen look for trending */
    margin-bottom: 1rem;
}

.newest-hits-label {
    text-align: center;
    font-size: 3rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 4px;
    margin-top: 2rem;
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    opacity: 0.8;
}

/* Bootstrap Carousel Overrides */
.carousel-item img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 20px;
    aspect-ratio: 16/9;
    /* consistent aspect ratio */
}

/* Player Bar */
.player-bar {
    position: fixed;
    bottom: 0;
    width: 100%;
    height: 90px;
    display: flex;
    align-items: center;
    padding: 0 2rem;
    justify-content: space-between;
    z-index: 1000;
    border-top: 1px solid var(--glass-border);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease;
}

.player-bar.hidden-player {
    transform: translateY(100%);
    opacity: 0;
    pointer-events: none;
}

/* Player Bar Close Button */
.close-player-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.1rem;
    cursor: pointer;
    margin-left: 1.5rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
}

.close-player-btn:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(90deg);
}

.track-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 20%;
}

.track-info img {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: cover;
}

.track-details h4 {
    font-size: 0.9rem;
    margin-bottom: 0.2rem;
}

.track-details p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.player-controls {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    max-width: 600px;
}

.control-buttons {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.control-buttons button {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition);
}

.control-buttons button:hover {
    color: white;
}

.control-buttons .play-main {
    background: white;
    color: black;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.control-buttons .play-main:hover {
    transform: scale(1.1);
}

.progress-container {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.progress-bar {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.progress-fill {
    width: 0%;
    height: 100%;
    background: var(--secondary-color);
    border-radius: 2px;
}

.player-right-section {
    width: 20%;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.volume-controls {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.volume-slider {
    width: 100px;
    accent-color: var(--secondary-color);
}


.volume-controls i {
    color: var(--secondary-color);
    font-size: 1.2rem;
}

/* Song Card Info & Download Button */
.card-info {
    margin-top: 1rem;
    /* Removed flex as button is now separate */
}

.card-info h3 {
    font-size: 1.1rem;
    margin-bottom: 0.2rem;
    color: var(--text-main);
}

.card-info p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.download-btn {
    background: transparent;
    border: 1px solid var(--secondary-color);
    color: var(--secondary-color);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.download-btn i {
    transition: transform 0.3s ease;
}

.download-btn:hover {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: white;
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(255, 0, 222, 0.5);
}

.download-btn:hover i {
    transform: rotate(360deg);
}

/* Wrapper for Card + Button */
.song-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.song-actions-external {
    display: flex;
    justify-content: center;
}

/* Ensure card content spacing */
.song-card .card-info {
    margin-top: 0;
    padding-top: 0.5rem;
}

.song-info-external {
    text-align: center;
}

.song-info-external h3 {
    font-size: 1.1rem;
    margin-bottom: 0.2rem;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.song-info-external p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.card-actions {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    /* Subtle separator */
    padding-top: 0.8rem;
}

/* --- ADMIN DASHBOARD STYLES --- */

.admin-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 2rem;
}

@media (max-width: 900px) {
    .admin-grid {
        grid-template-columns: 1fr;
    }
}

.admin-panel {
    padding: 2rem;
    border-radius: 20px;
    height: fit-content;
}

.form-group {
    margin-bottom: 1.2rem;
}

.hidden {
    display: none !important;
}

.release-type-container {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

.radio-chip {
    flex: 1;
    cursor: pointer;
}

.radio-chip input {
    display: none;
}

.chip-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    padding: 0.8rem;
    border-radius: 12px;
    transition: var(--transition);
    color: var(--text-muted);
    font-weight: 600;
}

.radio-chip input:checked+.chip-label {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    box-shadow: 0 0 15px rgba(106, 17, 203, 0.3);
}

.form-help {
    display: block;
    margin-top: 0.3rem;
    font-size: 0.8rem;
    color: var(--secondary-color);
    opacity: 0.8;
}

.form-row {
    display: flex;
    gap: 1rem;
}

.form-row .form-group {
    flex: 1;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

.glass-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    color: white;
    padding: 0.8rem 1rem;
    border-radius: 10px;
    outline: none;
    transition: var(--transition);
    font-family: var(--font-main);
}

.glass-input:focus {
    border-color: var(--secondary-color);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 10px rgba(37, 117, 252, 0.2);
}

/* File Upload Wrapper */
.file-upload-wrapper {
    position: relative;
}

.file-upload-wrapper i {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

/* Table Styles */
.table-container {
    overflow-x: auto;
}

.glass-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.glass-table th {
    text-align: left;
    padding: 1rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    border-bottom: 1px solid var(--glass-border);
}

.glass-table td {
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    vertical-align: middle;
}

.glass-table tr:hover td {
    background: rgba(255, 255, 255, 0.03);
}

.glass-table img.table-thumb {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: cover;
}

.glass-table .action-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1rem;
    margin-right: 0.5rem;
    transition: var(--transition);
}

.glass-table .action-btn:hover {
    color: white;
}

.glass-table .action-btn.promote.active-promoted {
    color: #ff4757;
    background: rgba(255, 71, 87, 0.1);
    border-radius: 4px;
}

.glass-table .action-btn.promote.active-promoted:hover {
    background: rgba(255, 71, 87, 0.2);
}

.glass-table .action-btn.delete:hover {
    color: #ff4757;
}

.w-100 {
    width: 100%;
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-secondary:hover {
    border-color: white;
    color: white;
}

/* Authentication Styles */
.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: #0a0a0e;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image:
        radial-gradient(circle at 10% 20%, rgba(106, 17, 203, 0.4) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(37, 117, 252, 0.4) 0%, transparent 40%);
}

.login-card {
    width: 100%;
    max-width: 400px;
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    margin: 1rem;
}

.login-overlay.hidden {
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
}

/* Global Hidden Utility */
.hidden {
    display: none !important;
}

/* Main Content Padding */
main {
    margin-bottom: 0;
    padding-top: 80px;
    /* Clear fixed header */
}

.home-main {
    padding-top: 0;
    /* Hero section handles layout */
}

/* Site Footer */
/* Site Footer */
.site-footer {
    padding-top: 1rem;
    padding-bottom: 80px;
    /* Space for fixed player */
    background: linear-gradient(to bottom, transparent, rgba(10, 10, 14, 0.8));
    border-top: 1px solid var(--glass-border);
}

.footer-title {
    font-weight: 700;
    margin-bottom: 0.8rem;
    font-size: 1rem;
    color: var(--text-main);
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.4rem;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.95rem;
}

.footer-links a:hover {
    color: var(--secondary-color);
    padding-left: 5px;
}

.site-footer .logo {
    margin-bottom: 0.5rem !important;
}

.social-links {
    display: flex;
    gap: 1.2rem;
    margin-top: 1rem !important;
}

.social-links a {
    color: var(--text-muted);
    font-size: 1.4rem;
    transition: var(--transition);
}

.social-links a:hover {
    color: var(--accent-color);
    transform: translateY(-3px);
}

.footer-divider {
    border-color: var(--glass-border);
    opacity: 0.5;
    margin-top: 0.5rem !important;
    /* Override Bootstrap mt-5 */
}

.subscribe-form .glass-input {
    background: rgba(255, 255, 255, 0.03);
}

.footer-meta a {
    text-decoration: none;
    transition: var(--transition);
}

.footer-meta a:hover {
    color: var(--text-main) !important;
}

@media (max-width: 768px) {
    .site-footer {
        padding-top: 1.5rem;
        padding-bottom: 110px;
    }
}

/* Share Button Styles */
.share-btn {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    margin-right: 0.5rem;
}

.share-btn:hover {
    background: var(--accent-color);
    border-color: var(--accent-color);
    transform: scale(1.1);
}

.like-btn {
    min-width: 35px;
    width: auto;
    padding: 0 10px;
    height: 35px;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    margin-right: 0.5rem;
}

.like-btn:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: scale(1.1);
}

.like-btn.active {
    background: rgba(255, 0, 222, 0.2);
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.like-btn.active i {
    animation: heartPulse 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes heartPulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.3);
    }

    100% {
        transform: scale(1);
    }
}

.share-btn-trending {
    background: transparent;
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.share-btn-trending:hover {
    background: var(--accent-color);
    color: white;
    transform: scale(1.1);
}

/* --- ALBUM TRACKS MODAL --- */
.tracks-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(12px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tracks-modal.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: #0f0f13;
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    width: 100%;
    max-width: 700px;
    max-height: 85vh;
    overflow-y: auto;
    padding: 2rem;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: modalSlide 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalSlide {
    from {
        transform: translateY(30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close-modal {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    font-size: 1.2rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.close-modal:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(90deg);
}

.modal-header-album {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    align-items: flex-end;
}

.modal-header-album img {
    width: 140px;
    height: 140px;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
}

.modal-album-info h2 {
    font-size: 2.2rem;
    margin-bottom: 0.2rem;
    font-weight: 700;
}

.modal-album-info p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.track-list {
    display: flex;
    flex-direction: column;
}

.track-list-item {
    display: flex;
    align-items: center;
    padding: 0.8rem 1rem;
    border-radius: 12px;
    transition: var(--transition);
    cursor: pointer;
    gap: 1.2rem;
}

.track-list-item:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateX(8px);
}

.track-number {
    color: var(--text-muted);
    font-family: monospace;
    width: 20px;
    font-size: 0.9rem;
}

.track-name {
    flex: 1;
    font-weight: 500;
    font-size: 1rem;
}

.track-duration {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.play-track-icon {
    opacity: 0;
    color: var(--secondary-color);
    transition: var(--transition);
}

.track-list-item:hover .play-track-icon {
    opacity: 1;
}

/* Cleanup Utilities */
.hero-row {
    min-height: 80vh;
}

.hero-visual-wrapper {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: -1;
    width: 100%;
}

.whatsapp-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 1rem;
    text-decoration: none;
    padding: 0.8rem 2rem;
}

/* --- RESPONSIVE DESIGN --- */

/* Mobile Menu Toggle Button - Default Hidden */
.mobile-menu-icon {
    display: none;
    background: transparent;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    margin-left: 1rem;
}

.header-actions {
    display: flex;
    align-items: center;
}

.mobile-only-nav {
    display: none;
}

/* Tablet & Mobile Breakpoint */
@media (max-width: 1100px) {

    /* Header Re-layout */
    .glass-header {
        padding: 1rem;
        flex-wrap: wrap;
        gap: 10px;
    }

    .logo {
        flex: 1;
        order: 1;
    }

    .header-actions {
        order: 2;
    }

    .search-container {
        display: flex;
        width: 100%;
        margin: 0.5rem 0 0 0;
        order: 3;
        flex: 0 0 100%;
    }

    .search-container input {
        width: 100%;
        padding-right: 1rem;
    }

    /* Mobile Navigation Overlay */
    nav#main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        /* Hidden by default */
        width: 70%;
        height: 100vh;
        background: rgba(10, 10, 14, 0.95);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        transition: right 0.4s ease-in-out;
        z-index: 1001;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
    }

    nav#main-nav.active {
        right: 0;
    }

    nav#main-nav a {
        font-size: 1.5rem;
    }

    /* Show Mobile Toggle */
    .mobile-menu-icon {
        display: block;
    }

    /* Mobile Only Nav Links */
    .mobile-only-nav {
        display: block !important;
        width: 100%;
        padding: 0 10%;
    }

    /* Buttons */
    .btn-pro {
        display: none;
        /* Hidden in header, will show in mobile menu */
    }

    .header-actions .btn-primary:not(.btn-exit) {
        display: none;
        /* Hide Pro button in header wrapper, but keep Exit button if needed */
    }

    .header-actions .btn-primary {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }

    /* Hero Section */
    .hero,
    .hero-row,
    #album-hero .hero-content {
        height: auto !important;
        min-height: auto !important;
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }

    main {
        padding-top: 80px !important;
    }

    .hero-row {
        flex-direction: column-reverse;
        text-align: center;
        gap: 2rem;
        display: flex;
    }

    .hero-content {
        margin-top: 2rem;
        align-items: center;
        display: flex;
        flex-direction: column;
    }

    .hero h1,
    .display-3,
    .display-4 {
        font-size: 2.5rem !important;
    }

    .hero p,
    .lead {
        font-size: 1rem !important;
    }

    .col-md-6 {
        width: 100%;
    }

    /* Grids */
    .songs-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)) !important;
        gap: 1rem !important;
    }

    .admin-grid {
        grid-template-columns: 1fr !important;
    }

    /* Prevent horizontal scroll on page, allow in tables */
    .container {
        max-width: 100% !important;
        overflow-x: hidden;
    }

    .table-container {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin-bottom: 1rem;
        display: block;
        /* Ensure block formatting */
    }

    /* Ensure tables don't force width */
    .glass-table {
        min-width: 600px;
        /* Force scroll trigger */
        width: 100%;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .admin-panel {
        padding: 1.5rem !important;
    }

    .carousel-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 1.5rem;
    }

    section {
        overflow-x: hidden;
    }


    /* Trending List on Trending Page */
    .trending-list {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    .trending-item {
        padding: 1rem;
        flex-direction: column !important;
        text-align: center !important;
        gap: 1rem;
    }

    .trending-item .rank-number {
        margin: 0 !important;
        width: auto !important;
        font-size: 2rem;
    }

    .trending-item .album-art {
        margin: 0 auto !important;
    }

    .trending-actions {
        width: 100%;
        justify-content: center !important;
    }

    /* Player Bar - Compact */
    .player-bar {
        padding: 0.5rem 1rem;
        height: 140px;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
    }

    .track-info {
        width: 100% !important;
        justify-content: center;
        margin-bottom: 0px;
    }

    .track-info img {
        width: 40px;
        height: 40px;
    }

    .player-controls {
        width: 100% !important;
        max-width: 100%;
    }

    .player-right-section {
        width: 100%;
        display: contents;
        /* Let children be absolute/flex as needed */
    }

    .volume-controls {
        display: none !important;
    }

    .close-player-btn {
        display: block !important;
        position: absolute;
        top: 10px;
        right: 10px;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 50%;
        width: 32px;
        height: 32px;
        display: flex !important;
        align-items: center;
        justify-content: center;
        z-index: 10;
    }

    .site-footer {
        padding-bottom: 120px;
        /* Space for tall mobile player */
    }

    /* Glass Panels */
    .glass-panel {
        padding: 1.5rem !important;
    }
}

@media (max-width: 768px) {

    /* Mobile Screens */
    .featured-music,
    .new-hits-section {
        padding: 1rem 1rem !important;
    }

    .songs-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.8rem !important;
        /* Slightly tighter gap for mobile */
    }

    /* Fix for grid items not shrinking */
    .song-wrapper {
        min-width: 0;
        width: 100%;
    }

    .song-card {
        padding: 0.5rem !important;
        min-width: 0;
    }

    .song-info-external {
        min-width: 0;
        width: 100%;
        padding: 0 0.2rem;
    }

    .song-info-external h3 {
        font-size: 0.9rem !important;
    }

    .hero h1,
    .display-3,
    .display-4 {
        font-size: 2rem !important;
    }

    /* Carousel Adjustment */
    .carousel-item img {
        height: 180px !important;
        /* Slightly larger for better visibility */
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
        padding-top: 0.5rem !important;
        padding-bottom: 0.5rem !important;
    }
}

.footer-bottom {
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
}


/* Admin Category Selector Styling */
select#category {
    background-color: rgba(20, 20, 30, 0.9) !important;
    /* Dark background */
    color: white;
    cursor: pointer;
}

select#category option {
    background-color: #1a1a2e;
    /* Solid dark background for options */
    color: white;
}

/* Carousel Caption Mobile Optimization */
.carousel-caption {
    background: rgba(0, 0, 0, 0.5);
    /* Semi-transparent background for readability */
    border-radius: 10px;
    padding: 10px;
    bottom: 20px;
    /* Adjust position */
}

@media (max-width: 768px) {
    .carousel-caption h5 {
        font-size: 1rem;
        margin-bottom: 0px;
    }

    .carousel-caption p {
        background: transparent;
        font-size: 0.8rem;
        margin-bottom: 0;
    }
}