/* 
   BESTFLOWBEATS Premium Theme
   Theme: Glassmorphism / Neon Dark
*/

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    /* Core Colors */
    --bg-dark: #0a0a12;
    --bg-panel: #141420;
    --primary: #8b5cf6;       /* Violet */
    --primary-hover: #7c3aed;
    --accent: #06b6d4;        /* Cyan */
    --danger: #f43f5e;
    
    /* Text */
    --text-main: #ffffff;
    --text-muted: #94a3b8;
    
    /* Glassmorphism */
    --glass-bg: rgba(20, 20, 32, 0.7);
    --glass-border: 1px solid rgba(255, 255, 255, 0.08);
    --glass-highlight: rgba(255, 255, 255, 0.03);
    --backdrop-blur: blur(16px);
    
    /* Effects */
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
    --glow-primary: 0 0 20px rgba(139, 92, 246, 0.3);
    --transition: all 0.3s ease;
    
    /* Layout */
    --header-height: 80px;
    --player-height: 90px;
    --container-width: 1280px;
    --radius-md: 12px;
    --radius-lg: 20px;
}

/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Outfit', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    padding-bottom: var(--player-height); /* Space for persistent player */
}

a { text-decoration: none; color: inherit; transition: var(--transition); }
ul { list-style: none; }
button { font-family: inherit; border: none; outline: none; background: none; cursor: pointer; }
input, select, textarea { font-family: inherit; outline: none; }

/* Utilities */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.hidden { display: none !important; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    color: white;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.5);
}

.btn-outline {
    border: 1px solid rgba(255,255,255,0.2);
    color: var(--text-main);
    background: rgba(255,255,255,0.02);
}
.btn-outline:hover {
    border-color: var(--primary);
    background: rgba(139, 92, 246, 0.1);
}

.btn-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: var(--transition);
}
.btn-icon:hover {
    color: var(--text-main);
    background: rgba(255,255,255,0.1);
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background: rgba(10, 10, 18, 0.85); /* Slightly opaque */
    backdrop-filter: var(--backdrop-blur);
    border-bottom: var(--glass-border);
    z-index: 1000;
}

.navbar .container {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}
.logo img { height: 32px; border-radius: 6px; }

.nav-menu {
    display: flex;
    gap: 32px;
}
.nav-link {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.95rem;
}
.nav-link:hover, .nav-link.active {
    color: var(--text-main);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.cart-btn-wrapper {
    position: relative;
    cursor: pointer;
}
.cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--accent);
    color: #000;
    font-size: 0.7rem;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hamburger { display: none; font-size: 1.5rem; color: var(--text-main); }

/* Side Cart */
.side-cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 1001;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
}
.side-cart-overlay.active { opacity: 1; pointer-events: all; }

.side-cart {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100%;
    background: var(--bg-panel);
    border-left: var(--glass-border);
    z-index: 1002;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}
.side-cart.active { right: 0; }

.cart-header {
    padding: 24px;
    border-bottom: var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.cart-header h3 { font-size: 1.25rem; }

.cart-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}
.cart-item {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    background: rgba(255,255,255,0.03);
    padding: 12px;
    border-radius: 12px;
}
.cart-item img {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
}
.cart-item-info { flex: 1; }
.cart-item-info h4 { font-size: 0.95rem; margin-bottom: 4px; }
.cart-item-info p { font-size: 0.8rem; color: var(--text-muted); }
.cart-item-price { font-weight: 600; color: var(--accent); margin-top: 4px; display: block; }
.cart-remove { color: var(--danger); opacity: 0.7; }

.cart-footer {
    padding: 24px;
    border-top: var(--glass-border);
    background: rgba(0,0,0,0.2);
}
.cart-total-row { display: flex; justify-content: space-between; margin-bottom: 16px; font-weight: 700; font-size: 1.2rem; }

/* Upload Modal (Global) */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
    z-index: 1100;
    display: none;
    align-items: center;
    justify-content: center;
}
.modal-overlay.active { display: flex; }

.modal-content {
    background: var(--bg-panel);
    border: var(--glass-border);
    width: 100%;
    max-width: 600px;
    border-radius: var(--radius-lg);
    padding: 32px;
    position: relative;
    box-shadow: var(--shadow-lg);
    animation: modalSlideIn 0.3s ease;
}
@keyframes modalSlideIn {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
.close-modal { position: absolute; top: 20px; right: 20px; font-size: 1.2rem; color: var(--text-muted); }

.drop-zone {
    border: 2px dashed rgba(255,255,255,0.1);
    border-radius: 16px;
    padding: 40px;
    text-align: center;
    margin: 20px 0;
    cursor: pointer;
    transition: var(--transition);
}
.drop-zone:hover { border-color: var(--primary); background: rgba(139, 92, 246, 0.05); }

/* Hero Section */
.hero {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    text-align: center;
    padding-top: var(--header-height);
}
.hero-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: -1;
    overflow: hidden;
}
.purple-blob {
    position: absolute;
    top: 20%; left: 20%;
    width: 400px; height: 400px;
    background: var(--primary);
    filter: blur(150px);
    opacity: 0.2;
    border-radius: 50%;
}
.cyan-blob {
    position: absolute;
    bottom: 20%; right: 20%;
    width: 300px; height: 300px;
    background: var(--accent);
    filter: blur(120px);
    opacity: 0.15;
    border-radius: 50%;
}

.hero h1 { font-size: 4rem; line-height: 1.1; font-weight: 700; margin-bottom: 20px; }
.hero p { font-size: 1.2rem; color: var(--text-muted); margin-bottom: 32px; max-width: 600px; margin-left: auto; margin-right: auto; }

/* Filter Section */
.search-container {
    transform: translateY(-50%);
    position: relative;
    z-index: 10;
}
.search-bar {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: var(--glass-border);
    padding: 12px 24px;
    border-radius: 100px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow-lg);
}
.search-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 1.1rem;
}

.filters-bar {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 20px 0;
    /* Hide scrollbar */
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.filters-bar::-webkit-scrollbar { display: none; }

.filter-chip {
    padding: 8px 20px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 50px;
    white-space: nowrap;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
}
.filter-chip:hover, .filter-chip.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* Beat Grid */
.beat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 24px;
    padding: 40px 0;
}

.beat-card {
    background: var(--bg-panel);
    border: var(--glass-border);
    border-radius: 16px;
    overflow: hidden;
    transition: var(--transition);
    position: relative;
}
.beat-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(255,255,255,0.2);
}

.card-img-container {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
}
.card-img { width: 100%; height: 100%; object-fit: cover; transition: 0.5s; }
.beat-card:hover .card-img { transform: scale(1.1); }

.play-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}
.beat-card:hover .play-overlay { opacity: 1; }

.play-btn-lg {
    width: 60px; height: 60px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    box-shadow: 0 0 20px var(--glow-primary);
}

.card-content { padding: 16px; }
.beat-title { font-weight: 600; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.producer-name { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 12px; display: block; }
.card-meta { display: flex; justify-content: space-between; align-items: center; }
.price-tag { font-weight: 600; color: var(--accent); }

/* Persistent Player */
.player-container {
    position: fixed;
    bottom: 0; left: 0; width: 100%;
    height: var(--player-height);
    background: rgba(10, 10, 18, 0.95);
    border-top: var(--glass-border);
    backdrop-filter: blur(10px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
}

.player-track-info { display: flex; align-items: center; gap: 16px; width: 300px; }
.player-thumb { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; }
.player-title h4 { font-size: 0.95rem; margin-bottom: 2px; }
.player-title p { font-size: 0.8rem; color: var(--text-muted); }

.player-controls { flex: 1; max-width: 600px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.control-btns { display: flex; align-items: center; gap: 24px; font-size: 1.2rem; }
.play-toggle {
    width: 40px; height: 40px;
    background: white; color: black;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
}

.progress-container {
    width: 100%;
    display: flex; align-items: center; gap: 10px;
    font-size: 0.75rem; color: var(--text-muted);
}
.progress-bar {
    flex: 1; height: 4px;
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
    position: relative;
    cursor: pointer;
}
.progress-fill {
    width: 0%; height: 100%;
    background: var(--primary);
    border-radius: 4px;
}

.player-volume { width: 200px; display: flex; justify-content: flex-end; align-items: center; gap: 10px; }

/* Dashboard Tables */
.dashboard-table-wrapper {
    overflow-x: auto;
    background: var(--bg-panel);
    border-radius: 16px;
    border: var(--glass-border);
}
.dashboard-table {
    width: 100%;
    border-collapse: collapse;
}
.dashboard-table th, .dashboard-table td {
    padding: 16px 24px;
    text-align: left;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.dashboard-table th {
    background: rgba(255,255,255,0.02);
    color: var(--text-muted);
    font-weight: 500;
}
.status-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}
.status-badge.complete { background: rgba(34, 197, 94, 0.15); color: #22c55e; }

/* Auth Forms */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--bg-panel);
    border: var(--glass-border);
    padding: 40px;
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
}
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; font-size: 0.9rem; color: var(--text-muted); }
.input-wrapper { position: relative; }
.form-input {
    width: 100%;
    padding: 12px 16px;
    padding-right: 40px; /* Space for icon */
    background: rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    color: var(--text-main);
    transition: var(--transition);
}
.form-input:focus { border-color: var(--primary); }
.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    cursor: pointer;
}

/* License Selector (Detail Page) */
.license-selector {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin: 32px 0;
}
.license-option {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}
.license-option:hover { background: rgba(255,255,255,0.05); }
.license-option.selected {
    border-color: var(--primary);
    background: rgba(139, 92, 246, 0.1);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.15);
}
.license-option input { display: none; }
.license-title { font-weight: 700; display: block; margin-bottom: 5px; font-size: 1.1rem; }
.license-price { font-size: 1.5rem; color: var(--accent); font-weight: 700; margin-bottom: 10px; display: block; }
.license-feats li { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 4px; display: flex; gap: 6px; }
.license-feats li i { color: var(--primary); }

/* Responsive Media Queries */
@media (max-width: 900px) {
    .nav-menu { display: none; }
    .hamburger { display: block; }
    .hero h1 { font-size: 3rem; }
    .container { padding: 0 16px; }
    
    .player-track-info { width: auto; }
    .player-thumb, .player-volume { display: none; }
    .player-container { padding: 0 16px; }
}