/* ========================================
   RPool Music Store - Premium Dark Theme
   ======================================== */

:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: #1a1a28;
    --bg-card-hover: #222236;
    --accent: #6c5ce7;
    --accent-light: #a29bfe;
    --accent-glow: rgba(108,92,231,0.3);
    --success: #00b894;
    --danger: #ff6b6b;
    --warning: #feca57;
    --text-primary: #ffffff;
    --text-secondary: #a0a0b8;
    --text-muted: #6c6c80;
    --border: rgba(255,255,255,0.06);
    --border-hover: rgba(108,92,231,0.4);
    --gradient-1: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 100%);
    --gradient-2: linear-gradient(135deg, #fd79a8 0%, #e17055 100%);
    --gradient-hero: linear-gradient(135deg, #0a0a0f 0%, #1a1030 50%, #0a0a0f 100%);
    --radius: 16px;
    --radius-sm: 10px;
    --shadow: 0 8px 32px rgba(0,0,0,0.4);
    --shadow-lg: 0 16px 48px rgba(0,0,0,0.6);
    --transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
}

* { box-sizing: border-box; }

body {
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 3px; }

/* ===== NAVBAR ===== */
.store-navbar {
    background: rgba(10,10,15,0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 1050;
}
.store-navbar .navbar-brand {
    font-weight: 800;
    font-size: 1.5rem;
    background: var(--gradient-1);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}
.store-navbar .nav-link {
    color: var(--text-secondary) !important;
    font-weight: 500;
    transition: var(--transition);
    padding: 8px 16px !important;
    border-radius: var(--radius-sm);
}
.store-navbar .nav-link:hover,
.store-navbar .nav-link.active {
    color: var(--text-primary) !important;
    background: rgba(108,92,231,0.1);
}
.cart-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: var(--danger);
    color: #fff;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

/* ===== HERO SECTION ===== */
.hero-section {
    background: var(--gradient-hero);
    padding: 100px 0 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 50%, rgba(108,92,231,0.08) 0%, transparent 50%),
                radial-gradient(circle at 70% 50%, rgba(253,121,168,0.05) 0%, transparent 50%);
    animation: heroGlow 15s ease-in-out infinite;
}
@keyframes heroGlow {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-2%, 2%); }
}
.hero-section h1 {
    font-size: 3.5rem;
    font-weight: 900;
    letter-spacing: -1px;
    position: relative;
    z-index: 1;
}
.hero-section h1 span {
    background: var(--gradient-1);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero-section p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 20px auto 30px;
    position: relative;
    z-index: 1;
}
.hero-search {
    max-width: 560px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}
.hero-search input {
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--border);
    color: #fff;
    border-radius: 50px;
    padding: 16px 60px 16px 24px;
    font-size: 1rem;
    width: 100%;
    transition: var(--transition);
}
.hero-search input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-glow);
    background: rgba(255,255,255,0.08);
}
.hero-search button {
    position: absolute;
    right: 6px;
    top: 6px;
    bottom: 6px;
    background: var(--gradient-1);
    border: none;
    border-radius: 50px;
    padding: 0 24px;
    color: #fff;
    font-weight: 600;
}

/* ===== SECTION TITLES ===== */
.section-title {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}
.section-subtitle {
    color: var(--text-secondary);
    margin-bottom: 30px;
}
.section-divider {
    padding: 50px 0 20px;
}

/* ===== PRODUCT CARDS ===== */
.product-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}
.product-card:hover {
    transform: translateY(-6px);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-lg), 0 0 30px var(--accent-glow);
}
.product-card .cover-wrap {
    position: relative;
    padding-top: 100%;
    background: var(--bg-secondary);
    overflow: hidden;
}
.product-card .cover-wrap img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.product-card:hover .cover-wrap img {
    transform: scale(1.08);
}
.product-card .cover-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}
.product-card:hover .cover-overlay {
    opacity: 1;
}
.cover-overlay .btn-play-preview {
    width: 56px; height: 56px;
    border-radius: 50%;
    background: var(--gradient-1);
    border: none;
    color: #fff;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
}
.cover-overlay .btn-play-preview:hover {
    transform: scale(1.1);
}
.product-card .card-body {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.product-card .product-type {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    width: fit-content;
}
.type-track { background: rgba(0,184,148,0.15); color: var(--success); }
.type-album { background: rgba(108,92,231,0.15); color: var(--accent-light); }
.type-pack { background: rgba(253,121,168,0.15); color: #fd79a8; }

.product-card .product-title {
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-primary);
    text-decoration: none;
}
.product-card .product-title:hover {
    color: var(--accent-light);
}
.product-card .creator-name {
    color: var(--text-muted);
    font-size: 0.82rem;
    margin-bottom: 10px;
}
.product-card .creator-name a {
    color: var(--text-secondary);
    text-decoration: none;
}
.product-card .creator-name a:hover {
    color: var(--accent-light);
}
.product-card .card-footer-area {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.product-card .price-tag {
    font-weight: 800;
    font-size: 1rem;
    color: var(--accent-light);
}
.product-card .price-tag .original-price {
    text-decoration: line-through;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 500;
    margin-right: 6px;
}
.product-card .btn-add-cart {
    width: 38px; height: 38px;
    border-radius: 50%;
    background: var(--gradient-1);
    border: none;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    font-size: 0.9rem;
}
.product-card .btn-add-cart:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 16px var(--accent-glow);
}

/* ===== TYPE FILTER PILLS ===== */
.filter-pills {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}
.filter-pills .pill {
    padding: 8px 20px;
    border-radius: 50px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}
.filter-pills .pill:hover,
.filter-pills .pill.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

/* ===== DETAIL PAGE ===== */
.detail-cover {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}
.detail-cover img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
}
.detail-info .badge-type {
    display: inline-block;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}
.detail-price {
    font-size: 2rem;
    font-weight: 900;
    color: var(--accent-light);
}
.detail-price .old-price {
    text-decoration: line-through;
    color: var(--text-muted);
    font-size: 1.2rem;
    font-weight: 500;
}
.track-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.track-list li {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    transition: var(--transition);
}
.track-list li:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
}
.track-num {
    width: 30px;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.85rem;
}
.track-title-col {
    flex: 1;
    font-weight: 600;
}
.track-duration {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
}

/* ===== BUTTONS ===== */
.btn-accent {
    background: var(--gradient-1);
    border: none;
    color: #fff;
    font-weight: 700;
    border-radius: var(--radius-sm);
    padding: 12px 28px;
    transition: var(--transition);
}
.btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--accent-glow);
    color: #fff;
}
.btn-outline-accent {
    background: transparent;
    border: 2px solid var(--accent);
    color: var(--accent-light);
    font-weight: 700;
    border-radius: var(--radius-sm);
    padding: 10px 26px;
    transition: var(--transition);
}
.btn-outline-accent:hover {
    background: var(--accent);
    color: #fff;
}

/* ===== CART ===== */
.cart-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 12px;
}
.cart-item img {
    width: 70px; height: 70px;
    border-radius: var(--radius-sm);
    object-fit: cover;
}
.cart-summary {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    position: sticky;
    top: 90px;
}

/* ===== CREATOR/ADMIN DASHBOARD ===== */
.dash-sidebar {
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    min-height: calc(100vh - 60px);
    padding: 24px 0;
}
.dash-sidebar .nav-link {
    color: var(--text-secondary);
    padding: 10px 24px;
    font-weight: 500;
    border-left: 3px solid transparent;
    transition: var(--transition);
}
.dash-sidebar .nav-link:hover,
.dash-sidebar .nav-link.active {
    color: var(--accent-light);
    background: rgba(108,92,231,0.08);
    border-left-color: var(--accent);
}
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    transition: var(--transition);
}
.stat-card:hover {
    border-color: var(--border-hover);
}
.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 900;
}
.stat-card .stat-label {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ===== UPLOAD ===== */
.upload-zone {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 60px 40px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: rgba(108,92,231,0.02);
}
.upload-zone:hover,
.upload-zone.dragover {
    border-color: var(--accent);
    background: rgba(108,92,231,0.06);
}
.upload-zone i {
    font-size: 3rem;
    color: var(--accent);
    margin-bottom: 16px;
}
.upload-progress {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    margin-top: 8px;
}
.upload-progress .progress {
    height: 6px;
    background: rgba(255,255,255,0.06);
    border-radius: 3px;
}
.upload-progress .progress-bar {
    background: var(--gradient-1);
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* ===== FORM ===== */
.form-control, .form-select {
    background: var(--bg-card) !important;
    border: 1px solid var(--border) !important;
    color: var(--text-primary) !important;
    border-radius: var(--radius-sm);
    padding: 10px 16px;
    transition: var(--transition);
}
.form-control:focus, .form-select:focus {
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 3px var(--accent-glow) !important;
}
.form-label {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 6px;
}

/* ===== TABLES ===== */
.table-dark-custom {
    background: transparent;
    color: var(--text-primary);
}
.table-dark-custom thead th {
    background: var(--bg-card);
    border-bottom: 2px solid var(--border);
    color: var(--text-secondary);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
    padding: 12px 16px;
}
.table-dark-custom td {
    border-bottom: 1px solid var(--border);
    padding: 12px 16px;
    vertical-align: middle;
}
.table-dark-custom tbody tr:hover {
    background: rgba(108,92,231,0.04);
}

/* ===== FOOTER ===== */
.store-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 40px 0 20px;
    margin-top: 60px;
    color: var(--text-muted);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .hero-section { padding: 60px 0 40px; }
    .hero-section h1 { font-size: 2.2rem; }
    .section-title { font-size: 1.4rem; }
    .detail-price { font-size: 1.5rem; }
}

/* ===== ANIMATIONS ===== */
.fade-up {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.6s ease forwards;
}
@keyframes fadeUp {
    to { opacity: 1; transform: translateY(0); }
}
.fade-up:nth-child(2) { animation-delay: 0.1s; }
.fade-up:nth-child(3) { animation-delay: 0.2s; }
.fade-up:nth-child(4) { animation-delay: 0.3s; }

/* ===== NO COVER PLACEHOLDER ===== */
.no-cover {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #1a1a28, #2a2a40);
    color: var(--text-muted);
    font-size: 2.5rem;
}

/* Creator page */
.creator-header {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 30px;
}
.creator-banner {
    height: 220px;
    background: var(--gradient-1);
    background-size: cover;
    background-position: center;
}
.creator-profile {
    display: flex;
    align-items: flex-end;
    gap: 20px;
    padding: 0 24px;
    margin-top: -50px;
    position: relative;
    z-index: 2;
}
.creator-avatar-lg {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 4px solid var(--bg-primary);
    object-fit: cover;
    background: var(--bg-card);
}

/* Verified badge */
.verified-badge {
    color: var(--accent-light);
    font-size: 0.9rem;
}

/* ===== PAGINATION ===== */
.pagination .page-link {
    background: var(--bg-card);
    border-color: var(--border);
    color: var(--text-secondary);
    font-weight: 500;
    padding: 8px 14px;
    transition: var(--transition);
}
.pagination .page-link:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent);
    color: #fff;
}
.pagination .page-item.active .page-link {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    box-shadow: 0 4px 12px var(--accent-glow);
}
.pagination .page-item.disabled .page-link {
    background: var(--bg-secondary);
    border-color: var(--border);
    color: var(--text-muted);
    opacity: .5;
}
