/* ============================================================================
   VJSHADER · contenedores FSC (fuente ÚNICA de la receta en este sitio)
   ----------------------------------------------------------------------------
   Se carga ÚLTIMO en el <head> de index.html (y de profile.html): pisa las
   tarjetas opacas de landing.css / feed.css sin tocar sus layouts.

   Ley FSC: vidrio al 50% + blur + borde hairline + UN acento (el violeta de la
   app) y esquinas rectas. El "brillo" es un glow suave del acento, no neón.
   ========================================================================== */
:root {
    --vj-glass: rgba(9, 10, 15, 0.50);
    --vj-glass-soft: rgba(9, 10, 15, 0.34);
    --vj-blur: blur(20px) saturate(125%);
    --vj-blur-soft: blur(12px) saturate(115%);
    --vj-line: rgba(255, 255, 255, 0.09);
    --vj-line-hover: rgba(255, 255, 255, 0.16);
    --vj-accent: #8a2be2;
    --vj-glow: 0 0 0 1px rgba(255, 255, 255, 0.05),
               0 24px 60px -30px rgba(138, 43, 226, 0.55),
               inset 0 1px 0 rgba(255, 255, 255, 0.06);
    --vj-glow-hover: 0 0 0 1px rgba(255, 255, 255, 0.09),
                     0 30px 70px -28px rgba(138, 43, 226, 0.75),
                     inset 0 1px 0 rgba(255, 255, 255, 0.10);
}

/* --- Fondo: la página NO tapa lo que hay atrás ---------------------------- */
html {
    background: #06060a !important;
}

body {
    background-color: transparent !important;
    background-image: none !important;
}

/* Capa decorativa detrás de todo: es lo que el blur difumina. Da el "brillo"
   de fondo sin depender del shader del include (que en la landing se elige). */
body::before {
    content: '';
    position: fixed;
    inset: -25%;
    z-index: -2;
    pointer-events: none;
    background:
        linear-gradient(180deg, rgba(5, 5, 9, 0.72) 0%, rgba(5, 5, 9, 0.30) 45%, rgba(5, 5, 9, 0.72) 100%),
        radial-gradient(closest-side at 16% 20%, rgba(138, 43, 226, 0.26), transparent 60%),
        radial-gradient(closest-side at 84% 8%, rgba(40, 120, 255, 0.13), transparent 55%),
        radial-gradient(closest-side at 62% 92%, rgba(255, 60, 160, 0.14), transparent 60%);
    filter: blur(46px);
    animation: vjDrift 28s ease-in-out infinite alternate;
}

@keyframes vjDrift {
    0% { transform: translate3d(-2%, 0, 0) scale(1); }
    100% { transform: translate3d(3%, -3%, 0) scale(1.08); }
}

/* --- Secciones: transparentes (el color viene de atrás) ------------------- */
.hero-featured,
.features,
.gallery {
    background: none !important;
}

.hero-featured::before,
.features::before,
.gallery::before {
    display: none !important;
}

/* --- El header global también es vidrio ---------------------------------- */
.global-header {
    background: rgba(6, 6, 12, 0.55) !important;
    -webkit-backdrop-filter: var(--vj-blur);
    backdrop-filter: var(--vj-blur);
    border-bottom: 1px solid var(--vj-line) !important;
    box-shadow: 0 12px 40px -32px rgba(138, 43, 226, 0.9);
}

/* --- La receta, aplicada a TODOS los contenedores de la página ----------- */
.hero-featured-info,
.featured-details,
.feature-card,
.shader-card,
.gallery-tools,
.profile-header-card,
.shared-card {
    background: var(--vj-glass) !important;
    -webkit-backdrop-filter: var(--vj-blur);
    backdrop-filter: var(--vj-blur);
    border: 1px solid var(--vj-line) !important;
    border-radius: 0 !important;
    box-shadow: var(--vj-glow);
}

/* Contenedores finos: chips, barras y campos */
.gallery-tools .gt-search,
.gt-field select,
.pagination-controls .page-btn,
.featured-btn,
.btn,
.lang-btn,
.language-selector,
.footer {
    background: var(--vj-glass-soft) !important;
    -webkit-backdrop-filter: var(--vj-blur-soft);
    backdrop-filter: var(--vj-blur-soft);
    border: 1px solid var(--vj-line) !important;
    border-radius: 0 !important;
    box-shadow: 0 14px 40px -34px rgba(138, 43, 226, 0.8);
}

/* --- Hover: el brillo sube un punto, nada más ---------------------------- */
.feature-card:hover,
.shader-card:hover {
    background: rgba(14, 15, 22, 0.55) !important;
    border-color: var(--vj-line-hover) !important;
    box-shadow: var(--vj-glow-hover);
    transform: translateY(-4px);
}

.shader-card::before {
    background: linear-gradient(90deg, transparent, var(--vj-accent), transparent) !important;
    height: 1px !important;
}

.gallery-tools .gt-search:focus-within,
.gt-field select:focus {
    border-color: rgba(138, 43, 226, 0.65) !important;
    box-shadow: 0 0 0 1px rgba(138, 43, 226, 0.35), 0 0 32px -12px rgba(138, 43, 226, 0.9) !important;
}

.featured-btn:hover,
.btn-primary:hover,
.page-btn:not([disabled]):hover {
    border-color: rgba(138, 43, 226, 0.55) !important;
    box-shadow: 0 0 0 1px rgba(138, 43, 226, 0.25), 0 18px 44px -28px rgba(138, 43, 226, 1) !important;
    transform: translateY(-2px);
}

/* --- El canvas destacado: marco de vidrio, adentro manda el shader ------- */
.featured-canvas-container {
    background: rgba(0, 0, 0, 0.35) !important;
    border: 1px solid var(--vj-line) !important;
    border-radius: 0 !important;
    box-shadow: var(--vj-glow);
}

/* ============================================================================
   NOMBRES DE USUARIO — rediseño (antes salían con el azul por defecto del <a>)
   Chip en mono, mayúsculas, con punto de acento; el "Por:" queda como etiqueta.
   ========================================================================== */
.shader-author,
.featured-details p,
.shared-by {
    color: rgba(255, 255, 255, 0.42) !important;
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.shader-author a,
.featured-details p a,
.profile-bio a,
.shared-by a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: rgba(255, 255, 255, 0.82) !important;
    text-decoration: none !important;
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    padding: 3px 9px 3px 18px;
    position: relative;
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: color .18s ease, background .18s ease, border-color .18s ease;
}

.shader-author a::before,
.featured-details p a::before,
.shared-by a::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 50%;
    width: 4px;
    height: 4px;
    margin-top: -2px;
    background: var(--vj-accent);
    box-shadow: 0 0 8px rgba(138, 43, 226, 0.95);
}

.shader-author a:hover,
.featured-details p a:hover,
.shared-by a:hover {
    color: #fff !important;
    background: rgba(138, 43, 226, 0.18);
    border-color: rgba(138, 43, 226, 0.5);
}

/* ============================================================================
   HERO: título y frases que van pasando
   ========================================================================== */
.hero-title {
    letter-spacing: -0.03em !important;
    text-shadow: 0 0 60px rgba(138, 43, 226, 0.28);
}

/* Alto reservado: la frase no puede empujar el layout en cada cambio */
.hero-subtitle {
    min-height: 3.6em;
    display: flex;
    align-items: flex-start;
    margin-left: 0 !important;
    margin-right: 0 !important;
    margin-bottom: 28px !important;
    max-width: 560px !important;
    color: rgba(255, 255, 255, 0.78) !important;
}

.hp-text {
    display: inline-block;
    transition: opacity .55s ease, transform .55s ease, filter .55s ease;
    will-change: opacity, transform;
}

.hp-text.is-out {
    opacity: 0;
    transform: translateY(-10px);
    filter: blur(3px);
}

.hp-text.is-in {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
}

.hero-featured-info {
    padding: 34px 32px;
    align-self: center;
}

.hero-buttons {
    justify-content: flex-start;
}

/* ============================================================================
   SHARED LIST (perfil)
   ========================================================================== */
.shared-card {
    padding: 20px 22px;
    margin-bottom: 34px;
}

.shared-head {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 6px;
}

.shared-head h2 {
    margin: 0;
    font-size: 1rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 700;
}

.shared-count {
    font-family: ui-monospace, Menlo, Consolas, monospace;
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.45);
}

.shared-hint {
    margin: 0 0 14px 0;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.5);
}

.shared-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 4px;
}

.shared-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 6px 5px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.09);
    color: rgba(255, 255, 255, 0.85);
    font-family: ui-monospace, Menlo, Consolas, monospace;
    font-size: 0.74rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    position: relative;
}

.shared-chip::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 50%;
    width: 4px;
    height: 4px;
    margin-top: -2px;
    background: var(--vj-accent);
    box-shadow: 0 0 8px rgba(138, 43, 226, 0.95);
}

.shared-chip button {
    background: transparent;
    border: 0;
    color: rgba(255, 255, 255, 0.45);
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    padding: 2px 4px;
}

.shared-chip button:hover {
    color: #fff;
}

.shared-empty {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.4);
}

.shared-editor {
    display: flex;
    gap: 8px;
    margin-top: 14px;
    flex-wrap: wrap;
}

.shared-editor input {
    flex: 1 1 220px;
    min-width: 160px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 9px 11px;
    font-family: inherit;
    font-size: 0.86rem;
    outline: none;
}

.shared-editor input:focus {
    border-color: rgba(138, 43, 226, 0.6);
    box-shadow: 0 0 0 1px rgba(138, 43, 226, 0.3);
}

.shared-btn {
    background: rgba(138, 43, 226, 0.22);
    border: 1px solid rgba(138, 43, 226, 0.45);
    color: #fff;
    padding: 9px 16px;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    cursor: pointer;
}

.shared-btn:hover {
    background: rgba(138, 43, 226, 0.4);
}

.shared-status {
    min-height: 1.2em;
    margin-top: 10px;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.55);
}

.shared-status.ok { color: #7ee787; }
.shared-status.err { color: #ff8b8b; }

.shared-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 3;
    padding: 3px 7px;
    background: rgba(9, 10, 15, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.82);
    font-family: ui-monospace, Menlo, Consolas, monospace;
    font-size: 0.6rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

/* --- Perfil: la página tampoco tapa el fondo ----------------------------- */
.profile-page,
.profile-hero {
    background: none !important;
}

/* --- Celular: mismo vidrio, blur más barato ------------------------------ */
@media (max-width: 768px) {
    .hero-featured-info,
    .featured-details,
    .feature-card,
    .shader-card,
    .gallery-tools,
    .profile-header-card,
    .shared-card {
        -webkit-backdrop-filter: blur(12px) saturate(120%);
        backdrop-filter: blur(12px) saturate(120%);
    }

    .hero-featured-info {
        padding: 22px 18px;
    }

    .hero-subtitle {
        min-height: 4.4em;
    }
}
