*,
*::before,
*::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #050509;
    color: #f5f5f5;
}

body.no-select {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Ocultar scrollbars */
::-webkit-scrollbar {
    width: 0;
    height: 0;
}
body {
    scrollbar-width: none;
}

/* Header y footer fijos */
.site-header,
.site-footer {
    position: fixed;
    left: 0;
    right: 0;
    z-index: 50;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    color: #fff;
}

.site-header {
    top: 0;
    height: 60px;
    display: flex;
    align-items: center;
    padding: 0 16px;
    justify-content: space-between;
}

.site-footer {
    bottom: 0;
    height: 40px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.with-fixed-hf {
    padding-top: 70px;
    padding-bottom: 50px;
    min-height: calc(100vh - 120px);
}

/* Logo */
.logo {
    font-weight: 800;
    font-size: 20px;
    letter-spacing: 0.05em;
}
.logo a {
    color: #fff;
    text-decoration: none;
}
.logo span {
    color: #ff8800;
}

/* Menú */
.main-menu {
    display: flex;
    gap: 8px;
}

.main-menu a {
    text-decoration: none;
    color: #eee;
    font-size: 14px;
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(135deg, rgba(255,255,255,0.05), rgba(0,0,0,0.7));
    transition: all .2s;
}

.main-menu a:hover,
.main-menu a.active {
    background: linear-gradient(135deg, #ff8800, #ffcc33);
    color: #000;
}

/* Layout general */
.page-content {
    padding: 16px;
}

/* Cards / tablas */
.card {
    background: rgba(15, 15, 25, 0.95);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 0 25px rgba(0, 0, 0, 0.6);
}

.card h2 {
    margin-top: 0;
    margin-bottom: 8px;
}

label {
    display: block;
    font-size: 14px;
    margin-bottom: 8px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="file"] {
    width: 100%;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    font-size: 14px;
}

button,
.btn-primary,
.btn-small {
    border: none;
    cursor: pointer;
    border-radius: 999px;
    padding: 8px 18px;
    font-size: 14px;
    font-weight: 600;
    background: linear-gradient(135deg, #ff8800, #ffcc33);
    color: #000;
    box-shadow: 0 0 12px rgba(255, 153, 0, 0.5);
    transition: transform .15s, box-shadow .15s;
}

button:hover,
.btn-primary:hover,
.btn-small:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 20px rgba(255, 200, 0, 0.8);
}

.btn-small {
    padding: 6px 14px;
    font-size: 12px;
}

/* Alertas */
.alert {
    border-radius: 10px;
    padding: 8px 12px;
    margin-bottom: 12px;
    font-size: 13px;
}

.alert.error {
    background: rgba(255, 0, 0, 0.12);
    border: 1px solid rgba(255, 0, 0, 0.4);
}

.alert.success {
    background: rgba(0, 180, 0, 0.12);
    border: 1px solid rgba(0, 200, 0, 0.4);
}

/* Tabla simple */
.table-simple {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.table-simple th,
.table-simple td {
    border-bottom: 1px solid rgba(255,255,255,0.08);
    padding: 6px 8px;
}

.table-simple th {
    text-align: left;
    color: #ffcc66;
}

/* Grid de productos */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.product-card {
    background: radial-gradient(circle at top, rgba(255,255,255,0.04), rgba(0,0,0,0.9));
    border-radius: 18px;
    padding: 12px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 18px rgba(0,0,0,0.7);
}

.product-cover img {
    width: 100%;
    display: block;
    border-radius: 14px;
}

.product-title {
    font-size: 16px;
    margin: 8px 0 4px;
}

.product-price {
    font-size: 14px;
    color: #ffcc66;
    margin: 0 0 8px;
}

.sales-counter {
    font-size: 12px;
    opacity: 0.8;
    margin-top: 4px;
}

/* PayPal contenedor */
.paypal-button {
    margin: 12px auto 6px;   /* centrado y con márgenes */
    max-width: 260px;        /* ancho máximo del botón */
    display: flex;
    justify-content: center;
}

/* Playlist */
.playlist-body {
    overflow: hidden;
}

#bgCanvas {
    position: fixed;
    inset: 0;
    z-index: -1;
}

/* Cabecera playlist */
.playlist-main {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.playlist-header {
    text-align: center;
}

.playlist-cover-wrap {
    width: 120px;
    height: 120px;
    margin: 0 auto 8px;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 0 25px rgba(0,0,0,0.9);
}

.playlist-cover-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.playlist-title {
    margin: 0 0 4px;
    font-size: 18px;
}

.playlist-price {
    margin: 0 0 8px;
    font-size: 14px;
    color: #ffcc66;
}

/* Lista de tracks */
.playlist-tracks-wrap {
    flex: 1;
    min-height: 0;
}

.playlist-tracks {
    max-height: calc(100vh - 210px);
    overflow-y: auto;
    padding: 8px 4px 40px;
}

.track-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.track-item {
    position: relative;
    background: rgba(0, 0, 0, 0.65);
    border-radius: 16px;
    padding: 10px 12px;
    overflow: hidden;
    cursor: pointer;
}

.track-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(255,255,255,0.04), rgba(0,0,0,0.8));
    mix-blend-mode: screen;
    pointer-events: none;
}

.track-item.active {
    box-shadow: 0 0 18px rgba(255, 200, 0, 0.5);
}

.track-eq {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    pointer-events: none;
    opacity: 0.9;
}

.track-title {
    position: relative;
    z-index: 2;
    font-size: 14px;
    font-weight: 500;
}

/* Responsivo */
@media (max-width: 768px) {
    .site-header {
        padding: 0 10px;
    }
    .with-fixed-hf {
        padding-left: 8px;
        padding-right: 8px;
    }
}
