/* =========================================================
   BEATNOVA · Aportes + modo Clásico web
   Usa los tokens de style.css (--bg, --neon, --violet...).
   ========================================================= */
.aportes [hidden], .dlg [hidden] { display: none !important; }

.aportes {
    min-height: 70vh;
    padding: calc(var(--nav-h) + 48px) 0 80px;
}
.aportes__cab { max-width: 720px; margin-bottom: 32px; }
.aportes__h1 {
    margin: 0 0 10px;
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 800;
    line-height: 1.1;
}
.aportes__intro { margin: 0; color: var(--text-mute); line-height: 1.6; }

.aportes__invitado {
    display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
    padding: 24px; border: 1px solid var(--border); border-radius: var(--radius);
    background: var(--surface);
}
.aportes__invitado p { flex: 1 1 100%; margin: 0 0 4px; }

/* --- barra de filtros --- */
.aportes__barra {
    display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
    margin-bottom: 18px;
}
.aportes__tabs { display: flex; gap: 6px; }
.aportes__select { width: auto; min-width: 150px; }
.aportes__buscar { flex: 1 1 200px; width: auto; }
.aportes__barra [data-proponer] { margin-left: auto; }

/* --- tarjetas --- */
.aportes__lista { display: grid; gap: 10px; }
.aportes__vacio { color: var(--text-mute); text-align: center; padding: 28px 0; list-style: none; }
.aportes__mas { display: flex; justify-content: center; margin-top: 18px; }

.aporte {
    display: flex; align-items: center; gap: 16px;
    padding: 14px 16px;
    border: 1px solid var(--border); border-radius: var(--radius);
    background: var(--surface);
    transition: border-color .2s, background .2s;
}
.aporte:hover { border-color: var(--border-strong); background: var(--surface-hover); }
.aporte__cuerpo { flex: 1; min-width: 0; cursor: pointer; outline: none; }
.aporte__cuerpo:focus-visible .aporte__titulo { color: var(--neon); }
.aporte__titulo {
    margin: 0; font-size: 1.05rem; font-weight: 700;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.aporte__artista { margin: 2px 0 6px; color: var(--text-mute); font-size: .9rem; }
.aporte__artista span { color: var(--violet); }
.aporte__meta {
    display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px;
    margin: 0; color: var(--text-mute); font-size: .8rem;
}
.aporte__meta b { color: var(--text); font-weight: 600; }
.aporte__com { display: inline-flex; align-items: center; gap: 4px; }
.aporte__com svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; }

.aporte__voto {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    flex: none; width: 58px; height: 62px;
    border: 1px solid var(--border-strong); border-radius: 10px;
    background: transparent; color: var(--text-mute);
    font: inherit; cursor: pointer;
    transition: color .2s, border-color .2s, background .2s, transform .1s;
}
.aporte__voto svg { width: 18px; height: 18px; fill: currentColor; }
.aporte__voto b { font-size: 1rem; color: var(--text); }
.aporte__voto:hover { border-color: var(--neon); color: var(--neon); }
.aporte__voto:active { transform: scale(.94); }
.aporte__voto.es-votado {
    border-color: var(--neon); color: var(--neon);
    background: color-mix(in srgb, var(--neon) 12%, transparent);
    box-shadow: var(--shadow-neon);
}
.aporte__probar { flex: none; }
.aporte__probar svg { width: 16px; height: 16px; fill: currentColor; stroke: none; }

.estado {
    padding: 2px 9px; border-radius: 999px; font-size: .72rem; font-weight: 700;
    border: 1px solid currentColor;
}
.estado--pendiente { color: #98a0b8; }
.estado--revision  { color: #fbbf24; }
.estado--aceptada  { color: #4ade80; }
.estado--rechazada { color: #f87171; }

/* --- ventanas --- */
.dlg {
    width: min(640px, calc(100vw - 32px));
    max-height: calc(100vh - 40px);
    padding: 0; border: 1px solid var(--border-strong); border-radius: 16px;
    background: var(--bg-alt); color: var(--text);
    box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
}
.dlg--ancho { width: min(760px, calc(100vw - 32px)); }
.dlg--chico { width: min(420px, calc(100vw - 32px)); text-align: center; }
.dlg::backdrop { background: rgba(3, 4, 10, .75); backdrop-filter: blur(4px); }
.dlg__caja { display: grid; gap: 14px; padding: 22px; }
.dlg__caja h2 { margin: 0; font-size: 1.3rem; }
.dlg__cab { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dlg__cab--solo { justify-content: flex-end; margin-bottom: -40px; position: relative; z-index: 1; }
.dlg__x {
    width: 34px; height: 34px; border: 1px solid var(--border); border-radius: 50%;
    background: var(--surface); color: var(--text-mute); cursor: pointer; font-size: .9rem;
}
.dlg__x:hover { color: var(--text); border-color: var(--border-strong); }
.dlg__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dlg .campo { display: grid; gap: 6px; margin: 0; }
.dlg textarea.campo__input { resize: vertical; min-height: 60px; padding-top: 10px; }
.dlg input[type=file].campo__input { padding: 9px; height: auto; }
.dlg__pie { display: flex; justify-content: flex-end; gap: 10px; }
.dlg .alerta { margin: 0; }

.ritmo {
    display: grid; gap: 10px; padding: 14px;
    border: 1px dashed color-mix(in srgb, var(--neon) 45%, transparent); border-radius: 12px;
    background: color-mix(in srgb, var(--neon) 5%, transparent);
}
.ritmo__estado { margin: 0; font-size: .88rem; color: var(--text-mute); }
.ritmo__fila { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; }
.ritmo__fila .campo { width: 150px; }

/* --- detalle --- */
[data-detalle] { display: grid; gap: 18px; }
.detalle__cab { display: flex; gap: 16px; align-items: flex-start; padding-right: 40px; }
.detalle__titulo { margin: 0; font-size: 1.45rem; font-weight: 800; line-height: 1.2; }
.detalle__texto { margin: 0; white-space: pre-line; line-height: 1.6; }
.detalle__video { position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #000; }
.detalle__video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.detalle__enlace { color: var(--neon); }
.detalle__jugar {
    display: grid; gap: 12px; padding: 16px; border-radius: 12px;
    background: linear-gradient(135deg, color-mix(in srgb, var(--neon) 14%, transparent), color-mix(in srgb, var(--violet) 16%, transparent));
    border: 1px solid var(--border-strong);
}
.detalle__jugar h3 { margin: 0 0 4px; font-size: 1.05rem; }
.detalle__jugar p { margin: 0; color: var(--text-mute); font-size: .88rem; }
.detalle__difs { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.detalle__jugar .detalle__difs { justify-content: flex-start; }
.detalle__estado:empty { display: none; }
.detalle__sub { margin: 0 0 10px; font-size: 1rem; }
.detalle__top { margin: 0; padding: 0; list-style: none; counter-reset: top; display: grid; gap: 4px; }
.detalle__top li {
    counter-increment: top; display: grid; grid-template-columns: 28px 1fr auto auto; gap: 10px;
    padding: 6px 10px; border-radius: 8px; background: var(--surface); font-size: .9rem;
}
.detalle__top li::before { content: counter(top); color: var(--neon); font-weight: 800; }
.detalle__top span { color: var(--text-mute); }
.detalle__top span:last-child { color: var(--text); font-weight: 700; font-variant-numeric: tabular-nums; }
.detalle__coms { margin: 0 0 12px; padding: 0; list-style: none; display: grid; gap: 10px; }
.detalle__coms li { padding: 10px 12px; border-radius: 10px; background: var(--surface); }
.detalle__coms p { margin: 0; line-height: 1.5; white-space: pre-line; overflow-wrap: anywhere; }
.detalle__coms p:first-child { margin-bottom: 4px; font-size: .85rem; display: flex; gap: 8px; align-items: center; }
.detalle__coms time { color: var(--text-mute); }
.detalle__borrar { margin-left: auto; border: 0; background: none; color: var(--text-mute); cursor: pointer; }
.detalle__borrar:hover { color: #f87171; }
.detalle__form { display: flex; gap: 8px; align-items: flex-end; }
.detalle__form textarea { flex: 1; resize: vertical; min-height: 44px; padding-top: 10px; }
.detalle__admin {
    display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
    padding-top: 14px; border-top: 1px solid var(--border);
}
.detalle__admin select { margin-left: 6px; padding: 8px; border-radius: 8px; background: var(--bg); color: var(--text); border: 1px solid var(--border-strong); }

/* --- modo Clásico (pantalla completa) --- */
body.clasico-abierto { overflow: hidden; }
.clasico { position: fixed; inset: 0; z-index: 1000; background: #07080f; user-select: none; touch-action: none; }
.clasico__lienzo { position: absolute; inset: 0; width: 100%; height: 100%; }
.clasico__escena { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.clasico--cargando { display: grid; place-items: center; }
.clasico--cargando p { margin: 0; color: var(--text-mute); font-weight: 700; letter-spacing: .04em; animation: clasicoLatido 1.2s ease-in-out infinite; }
@keyframes clasicoLatido { 50% { opacity: .4; } }
.clasico__barra {
    position: absolute; left: 0; right: 0; bottom: 0;
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px;
    padding: 12px 16px; background: linear-gradient(transparent, rgba(0, 0, 0, .6));
}
.clasico__ayuda { color: var(--text-mute); font-size: .8rem; display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.clasico__ayuda b { color: var(--text); min-width: 52px; text-align: center; }
.clasico__mini { padding: 2px 10px; min-height: 0; }
.clasico__tactil { display: none; }
@media (hover: none) and (pointer: coarse) {
    .clasico__tactil {
        position: absolute; left: 0; right: 0; bottom: 64px;
        display: flex; justify-content: space-between; align-items: flex-end; padding: 0 16px;
    }
    .clasico__cruz { display: grid; grid-template-columns: repeat(4, 56px); gap: 8px; }
    .clasico__tactil button {
        height: 56px; border: 1px solid var(--border-strong); border-radius: 12px;
        background: rgba(255, 255, 255, .06); color: var(--text); font-size: 1.3rem;
    }
    .clasico__tactil button:active { background: color-mix(in srgb, var(--neon) 30%, transparent); }
    .clasico__ya { width: 110px; height: 80px !important; font-weight: 800; color: var(--neon) !important; border-color: var(--neon) !important; }
    .clasico__ayuda { display: none; }
}
.clasico__resultado {
    position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
    width: min(380px, calc(100vw - 32px));
    display: grid; justify-items: center; gap: 12px; padding: 26px;
    border: 1px solid var(--border-strong); border-radius: 18px;
    background: rgba(11, 13, 24, .94); box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
}
.clasico__nota { font-size: 4.5rem; font-weight: 800; line-height: 1; }
.clasico__nota--S { color: #fde047; text-shadow: 0 0 30px rgba(253, 224, 71, .5); }
.clasico__nota--A { color: var(--neon); }
.clasico__nota--B { color: #a78bfa; }
.clasico__nota--C { color: #38bdf8; }
.clasico__nota--D { color: #f87171; }
.clasico__puntos { font-size: 1.8rem; font-variant-numeric: tabular-nums; }
.clasico__tabla { width: 100%; margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.clasico__tabla li { display: flex; justify-content: space-between; font-size: .9rem; font-weight: 700; }
.clasico__botones { display: flex; gap: 10px; margin-top: 6px; }

@media (max-width: 640px) {
    .aportes { padding-top: calc(var(--nav-h) + 28px); }
    .aportes__barra [data-proponer] { margin-left: 0; flex: 1 1 100%; }
    .aportes__select, .aportes__buscar { flex: 1 1 100%; }
    .aporte { gap: 12px; padding: 12px; }
    .aporte__probar span { display: none; }
    .dlg__grid { grid-template-columns: 1fr; }
    .detalle__form { flex-direction: column; align-items: stretch; }
}
