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

:root {
    --bg-color-dark: #070914;
    --bg-color-mid: #10132c;
    --bg-color-light: #1c2045;
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.6);
    --accent-color: #a742ff;
    --accent-glow: rgba(167, 66, 255, 0.4);
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
}

body {
    background: var(--bg-color-dark);
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(167, 66, 255, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 85% 30%, rgba(255, 65, 108, 0.1) 0%, transparent 50%);
    background-attachment: fixed;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    overflow: hidden; /* Prevent body scroll, layout handles it */
}

.app-layout {
    display: flex;
    height: 100vh;
    width: 100vw;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: rgba(10, 13, 30, 0.4);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-right: 1px solid var(--glass-border);
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    z-index: 100;
}

.logo-placeholder {
    font-family: 'Outfit', sans-serif !important;
    font-size: 28px !important;
    font-weight: 800 !important;
    background: linear-gradient(90deg, #ff8a00, #e52e71) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    letter-spacing: -1px;
    margin-bottom: 40px;
    text-align: center;
}

.side-nav {
    list-style: none;
    padding: 0;
    margin: 0;
    flex-grow: 1;
}

.side-nav .nav-title {
    color: var(--text-secondary);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
    margin-bottom: 15px;
    margin-left: 15px;
}

.side-nav li:not(.nav-title) {
    margin-bottom: 5px;
}

.side-nav a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 15px;
    padding: 12px 15px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.side-nav a:hover, .side-nav li.active a {
    color: var(--text-primary);
    background: var(--glass-bg);
}

.nav-btn-primary {
    background: linear-gradient(90deg, #8a2be2, #4a00e0);
    color: #fff;
    border: none;
    padding: 14px 24px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 1px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 15px rgba(138, 43, 226, 0.4);
    margin-top: 20px;
}

.nav-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(138, 43, 226, 0.6);
}

/* Main Content */
.main-content {
    flex: 1;
    position: relative;
    overflow-y: auto;
    background: transparent;
}

.main-bg-glow {
    position: absolute;
    top: -20%;
    left: 10%;
    width: 80%;
    height: 80%;
    background: radial-gradient(circle, rgba(167,66,255,0.15) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    position: relative;
    z-index: 10;
}

.top-nav-links {
    display: flex;
    gap: 30px;
    background: rgba(255,255,255,0.02);
    padding: 10px 25px;
    border-radius: 30px;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.top-nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s;
}

.top-nav-links a:hover, .top-nav-links a.active {
    color: var(--text-primary);
}

.search-bar input {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--glass-border);
    padding: 12px 20px;
    border-radius: 20px;
    color: white;
    font-family: 'Inter', sans-serif;
    width: 250px;
    transition: all 0.3s;
}

.search-bar input:focus {
    outline: none;
    background: rgba(255,255,255,0.08);
    border-color: var(--accent-color);
}

/* Hero Section */
.hero-section {
    position: relative;
    z-index: 10;
    padding: 60px 40px 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-text-center {
    max-width: 800px;
    margin-bottom: 40px;
}

.hero-text-center h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 64px;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #ffffff 30%, #a8c0ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-text-center p {
    font-size: 20px;
    color: var(--text-secondary);
    margin-bottom: 30px;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.btn-discover {
    background: linear-gradient(90deg, #ff416c, #ff4b2b);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255,65,108,0.4);
    transition: transform 0.3s;
}

.btn-discover:hover { transform: translateY(-2px); }

.btn-signup {
    background: transparent;
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-signup:hover { background: rgba(255,255,255,0.1); }

.hero-graphics-center {
    position: relative;
    margin: 40px auto;
}

.album-front {
    width: 480px;
    height: 300px;
    background-size: cover;
    background-position: center;
    border-radius: 15px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.6), 0 0 50px var(--accent-glow);
    animation: float 6s ease-in-out infinite;
    border: 1px solid rgba(255,255,255,0.1);
}

@keyframes float {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(2deg) scale(1.02); }
    100% { transform: translateY(0px) rotate(0deg); }
}

/* Dashboard Grid layout */
#app-container {
    padding: 0 40px 40px;
    position: relative;
    z-index: 10;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 30px;
}

.dashboard-grid.single-column {
    grid-template-columns: 1fr;
}

.album-header-row {
    margin-bottom: 20px;
}

.album-header-row h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 22px;
    font-weight: 600;
    margin: 0;
}

/* Album Grid overrides for Dashboard left column */
.album-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.album-grid.carousel-grid {
    display: flex;
    overflow-x: auto;
    gap: 25px;
    padding-bottom: 20px;
    scroll-snap-type: x mandatory;
}

.album-grid.carousel-grid .album-item {
    flex: 0 0 240px; /* Fixed width for carousel items */
    scroll-snap-align: start;
}

.album-grid.carousel-grid::-webkit-scrollbar {
    height: 8px;
}

.album-grid.carousel-grid::-webkit-scrollbar-thumb {
    background: var(--accent-color);
    border-radius: 4px;
}

.album-item {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 10px;
    transition: transform 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
    backdrop-filter: blur(10px);
}

.album-item:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 20px rgba(0,0,0,0.4);
}

.album-cover {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    background: #000;
}

.album-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.album-item:hover .album-cover img {
    transform: scale(1.08);
}

.play-overlay {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    background: var(--accent-color);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 12px;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.album-item:hover .play-overlay {
    opacity: 1;
    transform: translateY(0);
}

.album-item h3 {
    margin: 10px 0 2px 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.album-item p {
    margin: 0;
    font-size: 12px;
    color: var(--text-secondary);
}

/* Curated Cards */
.curated-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.curated-card {
    display: flex;
    align-items: center;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 12px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    cursor: pointer;
}

.curated-card:hover {
    background: rgba(255,255,255,0.08);
    transform: translateX(5px);
}

.c-img {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    margin-right: 15px;
}

.c-info {
    flex: 1;
}

.c-info h4 {
    margin: 0 0 5px 0;
    font-size: 15px;
}

.c-info p {
    margin: 0;
    font-size: 13px;
    color: var(--text-secondary);
}

.c-play {
    width: 30px; height: 30px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%; display: flex;
    align-items: center; justify-content: center;
    font-size: 12px; transition: all 0.3s;
}

.curated-card:hover .c-play {
    background: var(--accent-color);
}

/* Trending List */
.trending-list {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 20px;
    backdrop-filter: blur(10px);
}

.trend-item {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--glass-border);
    cursor: pointer;
    transition: all 0.3s;
}

.trend-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.trend-item:first-child {
    padding-top: 0;
}

.trend-item:hover {
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
    padding-left: 10px;
    padding-right: 10px;
}

.t-num {
    font-weight: 600;
    color: var(--text-secondary);
    width: 25px;
}

.t-img {
    width: 40px; height: 40px;
    border-radius: 6px;
    margin-right: 15px;
}

.t-info {
    flex: 1;
}

.t-info h4 {
    margin: 0 0 3px 0;
    font-size: 14px;
}

.t-info p {
    margin: 0;
    font-size: 12px;
    color: var(--text-secondary);
}

.t-play {
    width: 28px; height: 28px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%; display: flex;
    align-items: center; justify-content: center;
    font-size: 10px; transition: all 0.3s;
}

.trend-item:hover .t-play {
    background: var(--accent-color);
}

/* Upload Form */
#form-view {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(15px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.upload-section {
    background: var(--bg-color-mid);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 40px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px rgba(0,0,0,0.5);
}

.upload-section::-webkit-scrollbar { width: 8px; }
.upload-section::-webkit-scrollbar-thumb { background: var(--accent-color); border-radius: 4px; }

#form-title {
    font-family: 'Outfit', sans-serif;
    margin-top: 0;
    margin-bottom: 25px;
    font-size: 28px;
    text-align: center;
}

.file-group { margin-bottom: 20px; }
.file-group label { display: block; margin-bottom: 8px; font-weight: 500; font-size: 14px; color: var(--text-secondary); }

.file-group input[type="text"],
.file-group input[type="password"] {
    width: 100%; padding: 12px 15px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--glass-border);
    border-radius: 8px; color: #fff; font-family: 'Inter', sans-serif;
    box-sizing: border-box; transition: border-color 0.3s;
}

.file-group input[type="text"]:focus,
.file-group input[type="password"]:focus {
    border-color: var(--accent-color); outline: none;
}

.file-group input[type="file"] {
    display: block; width: 100%; padding: 10px;
    background: rgba(255,255,255,0.02);
    border: 1px dashed rgba(255,255,255,0.2);
    border-radius: 8px; color: var(--text-secondary); box-sizing: border-box;
}

.upload-section h3 {
    margin-top: 30px; margin-bottom: 15px; font-size: 18px;
    border-bottom: 1px solid var(--glass-border); padding-bottom: 5px; color: var(--accent-color);
}

.form-actions { margin-top: 35px; display: flex; justify-content: flex-end; gap: 15px; flex-wrap: wrap; }

.cancel-btn {
    padding: 10px 20px; background: transparent; border: 1px solid rgba(255,255,255,0.2);
    color: #fff; border-radius: 8px; cursor: pointer; font-weight: 500; transition: background 0.3s;
}
.cancel-btn:hover { background: rgba(255,255,255,0.1); }

.save-btn {
    padding: 10px 20px; background: linear-gradient(90deg, #8a2be2, #4a00e0);
    border: none; color: #fff; border-radius: 8px; cursor: pointer; font-weight: 600; transition: opacity 0.3s;
}
.save-btn:hover { opacity: 0.9; }

/* Back Button */
.back-btn {
    position: absolute; top: 20px; left: 20px;
    background: rgba(0,0,0,0.5); color: white;
    border: 1px solid rgba(255,255,255,0.2); padding: 10px 20px;
    border-radius: 30px; cursor: pointer; font-family: 'Inter', sans-serif;
    font-weight: 500; z-index: 1001; backdrop-filter: blur(5px);
    transition: background 0.3s;
}
.back-btn:hover { background: rgba(138, 43, 226, 0.5); }

/* Lyrics Area */
#lyrics-area {
    width: 90%; max-width: 600px; margin: 40px auto;
    background: rgba(0,0,0,0.5); border: 1px solid var(--glass-border);
    border-radius: 12px; padding: 20px; backdrop-filter: blur(10px);
}
#lyrics-area h3 { text-align: center; margin-top: 0; color: var(--accent-color); font-family: 'Outfit', sans-serif; }
#lyrics-area pre {
    color: var(--text-secondary); white-space: pre-wrap;
    font-family: 'Inter', sans-serif; font-size: 15px; line-height: 1.8; text-align: center;
}

/* Mobile Responsiveness */
@media screen and (max-width: 800px) {
    .app-layout { flex-direction: column; }
    .sidebar { width: auto; padding: 15px; border-right: none; border-bottom: 1px solid var(--glass-border); flex-direction: row; justify-content: space-between; align-items: center; }
    .side-nav { display: none; }
    .logo-placeholder { margin-bottom: 0; font-size: 22px !important; }
    .nav-btn-primary { margin-top: 0; padding: 10px 16px; }
    
    .top-bar { display: none; } /* Hide secondary top nav on mobile */
    .hero-section { padding: 40px 20px; }
    .hero-text-center h1 { font-size: 36px; }
    .album-front { width: 300px; height: 187px; }
}
