@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Devanagari:wght@400;600;700&family=Outfit:wght@300;400;500;600;700&display=swap');

/* Color Variables & Styling Tokens */
:root {
    --bg-main: #0b0f19;
    --bg-card: rgba(17, 24, 39, 0.7);
    --bg-input: #1f2937;
    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(99, 102, 241, 0.4);
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --accent-blue: #3b82f6;
    --accent-indigo: #6366f1;
    --accent-purple: #8b5cf6;
    --accent-gradient: linear-gradient(135deg, var(--accent-blue), var(--accent-indigo), var(--accent-purple));
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --font-sans: 'Outfit', 'Noto Sans Devanagari', sans-serif;
}

body.light-mode {
    --bg-main: #f8fafc;
    --bg-card: rgba(255, 255, 255, 0.85);
    --bg-input: #f1f5f9;
    --border-color: rgba(0, 0, 0, 0.08);
    --border-hover: rgba(99, 102, 241, 0.6);
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 8px 16px rgba(0,0,0,0.08);
}

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

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
}

/* Neon Gradient Strip on Top of Page */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent-gradient);
    z-index: 1000;
}

a {
    color: inherit;
    text-decoration: none;
    transition: all 0.2s ease;
}

/* Layout Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header & Navbar */
header {
    background: rgba(11, 15, 25, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: background 0.3s ease;
}
body.light-mode header {
    background: rgba(248, 250, 252, 0.85);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

.nav_links {
    display: flex;
    gap: 20px;
}

@media(max-width: 768px) {
    .nav_links {
        display: none; /* Hide on mobile for simplicity, or we can wrap it */
    }
}

.nav_links a {
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 500;
}

.nav_links a:hover {
    color: var(--text-primary);
}

/* Theme Switcher & Admin Button */
.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.btn-theme-toggle {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 20px;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}
.btn-theme-toggle:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}
body.light-mode .btn-theme-toggle:hover {
    background: rgba(0, 0, 0, 0.05);
}

.btn-admin {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    border-radius: 99px;
    font-size: 14px;
    font-weight: 600;
}
.btn-admin:hover {
    background: var(--accent-gradient);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.4);
}

/* Search Bar */
.search-container {
    padding: 20px 0;
    display: flex;
    justify-content: center;
}

.search-form {
    display: flex;
    width: 100%;
    max-width: 600px;
    gap: 10px;
}

.search-input {
    flex-grow: 1;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    padding: 12px 20px;
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 16px;
    outline: none;
    transition: border-color 0.2s;
}
.search-input:focus {
    border-color: var(--accent-indigo);
}

.search-button {
    background: var(--accent-gradient);
    color: #ffffff;
    border: none;
    padding: 0 25px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s;
}
.search-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

/* Main Grid Layout */
.main-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    padding-bottom: 50px;
}

@media (max-width: 992px) {
    .main-layout {
        grid-template-columns: 1fr;
    }
}

/* Content Blocks */
.content-block {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-md);
}

.upa {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 4px solid var(--accent-indigo);
    padding-left: 12px;
}

.viewall {
    font-size: 13px;
    color: var(--accent-indigo);
    font-weight: 600;
}

/* Song / Album Lists (PenduJatt Styling) */
.listnew {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
}

.listnew li {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s ease, box-shadow 0.3s ease;
}

body.light-mode .listnew li {
    background: rgba(0, 0, 0, 0.02);
}

.listnew li:hover {
    transform: translateY(-5px);
    border-color: var(--border-hover);
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.15);
}

.listnew a {
    display: block;
    height: 100%;
}

.listnew img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-bottom: 1px solid var(--border-color);
    transition: transform 0.3s ease;
}

.listnew li:hover img {
    transform: scale(1.03);
}

.info-container {
    padding: 12px;
}

.b.bk {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.bk.s {
    font-size: 13px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 8px;
}

.tracks {
    font-size: 11px;
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent-indigo);
    padding: 3px 8px;
    border-radius: 99px;
    display: inline-block;
    font-weight: 600;
}

/* Sidebar Widgets */
.sidebar-widget {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: var(--shadow-md);
}

.widget-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 8px;
}

/* Sidebar Category list */
.widget-categories {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.widget-categories a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 14px;
    color: var(--text-secondary);
}
body.light-mode .widget-categories a {
    background: rgba(0, 0, 0, 0.02);
}

.widget-categories a:hover {
    background: rgba(99, 102, 241, 0.05);
    border-color: var(--border-hover);
    color: var(--text-primary);
    transform: translateX(3px);
}

.category-badge {
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

/* Sidebar Recent List */
.recent-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.recent-item {
    display: flex;
    gap: 10px;
    align-items: center;
}

.recent-item img {
    width: 45px;
    height: 45px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid var(--border-color);
}

.recent-info {
    flex-grow: 1;
    min-width: 0;
}

.recent-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.recent-artist {
    font-size: 11px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Song Detail Page & Streaming Player */
.song-detail {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 20px;
}

.song-artwork {
    width: 250px;
    height: 250px;
    border-radius: 24px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
    object-fit: cover;
    border: 2px solid var(--border-color);
}

.song-meta {
    width: 100%;
    margin-top: 15px;
}

.song-meta-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 5px;
}

.song-meta-artist {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

/* Table properties listing */
.meta-table {
    width: 100%;
    max-width: 500px;
    margin: 0 auto 25px auto;
    border-collapse: collapse;
}

.meta-table td {
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
}

.meta-table td:first-child {
    color: var(--text-secondary);
    text-align: left;
    font-weight: 500;
}

.meta-table td:last-child {
    font-weight: 600;
    text-align: right;
}

/* Custom Audio Player */
.audio-player-container {
    width: 100%;
    max-width: 500px;
    margin: 20px 0;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 15px;
}
body.light-mode .audio-player-container {
    background: rgba(0,0,0,0.03);
}

audio {
    width: 100%;
    outline: none;
}

/* Download Buttons */
.download-buttons {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 500px;
    gap: 15px;
    margin-top: 10px;
}

.btn-download {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-download-high {
    background: var(--accent-gradient);
    color: #fff;
    border: none;
}
.btn-download-high:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
}

.btn-download-normal {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}
.btn-download-normal:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border-hover);
    transform: translateY(-2px);
}
body.light-mode .btn-download-normal:hover {
    background: rgba(0, 0, 0, 0.05);
}

/* Footer Section */
footer {
    background: rgba(11, 15, 25, 0.95);
    border-top: 1px solid var(--border-color);
    padding: 40px 0;
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
}
body.light-mode footer {
    background: #f1f5f9;
}

.footer-logo {
    font-size: 20px;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
    display: inline-block;
}

.footerlinks {
    margin-top: 15px;
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.footerlinks a {
    color: var(--text-secondary);
}
.footerlinks a:hover {
    color: var(--text-primary);
}

/* Admin Dashboard styling */
.admin-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
    box-shadow: var(--shadow-md);
}

.admin-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
}

.admin-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: left;
}

.admin-form-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}

.admin-input, .admin-textarea, .admin-select {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    padding: 10px 14px;
    border-radius: 8px;
    color: var(--text-primary);
    outline: none;
    font-family: inherit;
    font-size: 14px;
}
.admin-input:focus, .admin-textarea:focus, .admin-select:focus {
    border-color: var(--accent-indigo);
}

.admin-button {
    background: var(--accent-gradient);
    color: #fff;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
}
.admin-button:hover {
    transform: translateY(-1px);
}

/* Table management UI */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.admin-table th, .admin-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.admin-table th {
    font-weight: 600;
    color: var(--text-secondary);
}

.btn-action {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    margin-right: 5px;
    display: inline-block;
}

.btn-edit {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.4);
}
.btn-edit:hover {
    background: #3b82f6;
    color: #fff;
}

.btn-delete {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.4);
}
.btn-delete:hover {
    background: #ef4444;
    color: #fff;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-box {
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}
body.light-mode .stat-box {
    background: rgba(0,0,0,0.02);
}

.stat-num {
    font-size: 32px;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-label {
    font-size: 13px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 5px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 30px;
}

.page-link {
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: rgba(255,255,255,0.02);
    font-size: 14px;
}
.page-link:hover, .page-link.active {
    background: var(--accent-gradient);
    color: #fff;
    border-color: transparent;
}
