* { box-sizing: border-box; }

html, body {
    margin: 0;
    min-height: 100%;
    font-family: "Segoe UI", Arial, sans-serif;
    background: #030b16;
    color: #fff;
}

[hidden] { display: none !important; }

.abertura {
    position: relative;
    isolation: isolate;
    display: grid;
    place-items: center;
    min-height: 100svh;
    padding: 70px 20px 110px;
    overflow: hidden;
    background:
        radial-gradient(ellipse at 50% 95%, #174c43 0%, transparent 55%),
        linear-gradient(180deg, #020711 0%, #07182a 55%, #03141c 100%);
}

.aurora {
    position: absolute;
    inset: -35%;
    pointer-events: none;
    opacity: .75;
    filter: blur(48px);
    mix-blend-mode: screen;
    transform-origin: 50% 80%;
    will-change: transform;
}

.aurora-1 {
    background: conic-gradient(
        from 230deg at 50% 80%,
        transparent 0deg,
        #00e5a0 35deg,
        #25d9c5 65deg,
        transparent 110deg,
        #7c59e8 155deg,
        transparent 205deg
    );
    animation: aurora-fluir 12s ease-in-out infinite alternate;
}

.aurora-2 {
    background: linear-gradient(
        115deg,
        transparent 25%,
        #008f77 40%,
        #62f6ba 48%,
        #4269d5 58%,
        transparent 75%
    );
    opacity: .42;
    animation: aurora-ondular 17s ease-in-out infinite alternate;
}

.aurora-3 {
    background: radial-gradient(
        ellipse at 55% 45%,
        #663bb5 0%,
        #007c8a 30%,
        transparent 65%
    );
    opacity: .32;
    animation: aurora-fluir 21s ease-in-out infinite alternate-reverse;
}

.estrelas {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        radial-gradient(1px 1px at 10% 20%, #fff 99%, transparent),
        radial-gradient(2px 2px at 27% 68%, #fff 99%, transparent),
        radial-gradient(1px 1px at 48% 12%, #fff 99%, transparent),
        radial-gradient(2px 2px at 73% 35%, #fff 99%, transparent),
        radial-gradient(1px 1px at 89% 76%, #fff 99%, transparent);
    background-size: 320px 240px;
    opacity: .5;
    animation: estrelas-brilhar 6s ease-in-out infinite alternate;
}

.conteudo {
    position: relative;
    z-index: 2;
    width: min(100%, 900px);
    text-align: center;
    animation: conteudo-entrar 1.6s ease-out both;
}

.simbolo-radio {
    font-size: clamp(40px, 7vw, 72px);
    color: #9bffcd;
    text-shadow: 0 0 35px #00f5a0;
}

h1 {
    margin: 10px 0;
    font-size: clamp(64px, 12vw, 132px);
    font-weight: 800;
    letter-spacing: -.06em;
    text-shadow: 0 0 45px rgba(50, 255, 180, .55);
}

.subtitulo {
    margin: 0;
    font-size: clamp(17px, 3vw, 27px);
    letter-spacing: .035em;
    color: #d6fff0;
}

#osciloscopio {
    display: block;
    width: 100%;
    height: 150px;
    margin: 24px auto;
    filter: drop-shadow(0 0 12px rgba(80,255,190,.8));
}

.descricao {
    color: #c1e5df;
    font-size: clamp(14px, 2vw, 18px);
}

.controles {
    position: absolute;
    z-index: 5;
    left: 0;
    right: 0;
    bottom: 35px;
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    padding: 0 20px;
}

button {
    min-height: 48px;
    padding: 12px 22px;
    border-radius: 12px;
    border: 1px solid rgba(190,255,225,.65);
    background: rgba(5,35,39,.75);
    color: white;
    font-size: 16px;
    cursor: pointer;
    backdrop-filter: blur(12px);
    transition: background .2s, transform .2s;
}

button:hover, button:focus-visible {
    background: rgba(20,100,85,.9);
    transform: translateY(-2px);
}

.destino {
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 18px;
    padding: 30px;
    text-align: center;
    background: linear-gradient(145deg, #09291e, #061323);
}

.destino h2 { font-size: clamp(30px, 6vw, 55px); }

.abertura.saindo {
    animation: abertura-sair .7s ease-in forwards;
}

@keyframes aurora-fluir {
    from { transform: translate(-8%, -3%) rotate(-12deg) scale(1); }
    to { transform: translate(8%, 7%) rotate(14deg) scale(1.15); }
}

@keyframes aurora-ondular {
    from { transform: translateX(-10%) skewX(-10deg) scaleY(.85); }
    to { transform: translateX(10%) skewX(12deg) scaleY(1.2); }
}

@keyframes estrelas-brilhar {
    from { opacity: .25; }
    to { opacity: .75; }
}

@keyframes conteudo-entrar {
    from { opacity: 0; transform: translateY(25px) scale(.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes abertura-sair {
    to { opacity: 0; transform: scale(1.04); }
}

@media (max-width: 600px) {
    .abertura { padding-bottom: 140px; }
    #osciloscopio { height: 100px; }
    .controles { bottom: 20px; }
    .controles button { flex: 1 1 150px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}


/* HAMCERT VU RADIO */

.vu-radio {
    position: relative;
    z-index: 3;
    width: min(100%, 540px);
    margin: 28px auto 0;
}

.vu-painel {
    padding: 15px 17px 12px;
    border: 2px solid #50635e;
    border-radius: 19px;
    background: linear-gradient(
        145deg, #263b3b, #0c191d 65%, #172d2b
    );
    box-shadow:
        0 20px 45px rgba(0,0,0,.5),
        inset 0 2px 3px rgba(255,255,255,.18),
        0 0 30px rgba(45,255,175,.13);
}

.vu-marca {
    padding: 3px 0 12px;
    color: #b4dac7;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .25em;
}

#vuMostrador {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 12px;
    background: #d4b67f;
    box-shadow:
        inset 0 0 20px rgba(80,42,0,.4),
        0 0 22px rgba(255,194,87,.14);
}



.vu-rodape {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 6px 2px;
    color: #a6e5c8;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .15em;
}

#vuNivel {
    color: #ffdb8a;
    font-variant-numeric: tabular-nums;
}

#osciloscopio {
    position: relative;
    z-index: 1;
    height: 75px;
    margin: -15px auto 12px;
    opacity: .42;
    filter: drop-shadow(0 0 7px rgba(80,255,190,.35));
}

@media (max-width: 600px) {
    .vu-radio {
        margin-top: 20px;
    }

    .vu-painel {
        padding: 10px;
        border-radius: 13px;
    }

    .vu-marca {
        font-size: 9px;
        letter-spacing: .13em;
    }

    #osciloscopio {
        height: 55px;
    }
}
/* HAMCERT - AJUSTE VISUAL VU 2 */


.abertura {
    min-height: 100svh;
    height: 100svh;
    padding: 20px 20px 105px;
}

.conteudo {
    width: min(100%, 850px);
}

.conteudo h1 {
    font-size: clamp(48px, 8vw, 92px);
    margin: 4px 0;
}

.simbolo-radio {
    font-size: clamp(28px, 4vw, 44px);
}

.subtitulo {
    font-size: clamp(15px, 2vw, 22px);
}

.vu-radio {
    width: min(100%, 440px);
    margin: 15px auto 0;
}

.vu-painel {
    padding: 10px;
}

#osciloscopio {
    width: 100%;
    height: 85px;
    margin: -30px auto 0;
    opacity: .95;
    filter: drop-shadow(0 0 12px rgba(80,255,190,.85));
}

.descricao {
    margin: 5px 0;
    font-size: 14px;
}

.controles {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 16px;
    z-index: 100;
    display: flex;
    justify-content: center;
    gap: 14px;
    padding: 0 15px;
}

.controles button {
    min-height: 48px;
    background: rgba(4,28,35,.95);
    border: 1px solid #9bffcd;
    box-shadow: 0 4px 18px rgba(0,0,0,.4);
}

@media (max-height: 750px) {
    .conteudo h1 {
        font-size: clamp(42px, 7vw, 70px);
    }

    .vu-radio {
        width: min(100%, 350px);
        margin-top: 8px;
    }

    #osciloscopio {
        height: 55px;
    }

    .simbolo-radio {
        font-size: 30px;
    }
}

@media (max-width: 600px) {
    .abertura {
        padding: 15px 12px 110px;
    }

    .vu-radio {
        width: min(100%, 360px);
    }

    .controles button {
        flex: 1 1 140px;
    }
}

/* CORRECAO DEFINITIVA EIXO VU */

/* FUNDO COMERCIAL VERSAO B */
.abertura {
    background:
        linear-gradient(
            rgba(2,8,19,.35),
            rgba(2,8,19,.55)
        ),
        url('./capa-comercial.png') center / cover no-repeat;
}

.abertura .aurora {
    opacity: .10;
}

.abertura .estrelas {
    opacity: .20;
}

/* HAMCERT ONDAS CINEMATOGRAFICAS */

/* Retira o mostrador VU sem alterar sua programacao */
.vu-radio {
    display: none !important;
}

/* Onda sonora discreta e luminosa */
#osciloscopio {
    display: block;
    position: relative;
    z-index: 4;
    width: 100%;
    height: 95px;
    margin: 25px auto 10px;
    opacity: .85;
    filter:
        drop-shadow(0 0 8px rgba(75,255,190,.75))
        drop-shadow(0 0 20px rgba(25,210,175,.35));
}

/* Textos mais discretos para valorizar a imagem */
.conteudo h1 {
    font-size: clamp(46px, 7vw, 84px);
    text-shadow: 0 4px 24px rgba(0,0,0,.85);
}

.subtitulo {
    text-shadow: 0 3px 14px rgba(0,0,0,.9);
}

.descricao {
    font-size: 13px;
    opacity: .85;
}

/* Mantem os controles acessiveis */
.controles {
    z-index: 100;
}

@media (max-width: 600px) {
    #osciloscopio {
        height: 70px;
        margin: 18px auto;
    }
}

/* HAMCERT FUNDO FINAL B */

/* Arte aprovada */
.abertura {
    background:
        linear-gradient(
            rgba(2,8,19,.08),
            rgba(2,8,19,.18)
        ),
        url('./fundo-hamcert.png') center center / cover no-repeat !important;
}

/* A aurora ja faz parte da imagem */
.abertura .aurora,
.abertura .estrelas {
    display: none !important;
}

/* Evita duplicar os textos presentes na arte */
.abertura .simbolo-radio,
.abertura .conteudo h1,
.abertura .subtitulo,
.abertura .descricao {
    display: none !important;
}

/* VU permanece oculto */
.abertura .vu-radio {
    display: none !important;
}

/* Preserva o osciloscopio real */
.abertura #osciloscopio {
    display: block !important;
    position: fixed;
    left: 0;
    top: 70%;
    width: 100%;
    height: 85px;
    margin: 0;
    opacity: .90;
    z-index: 10;
    pointer-events: none;
}

/* Controles reais */
.abertura .controles {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 18px;
    z-index: 100;
    display: flex !important;
    justify-content: center;
    gap: 14px;
}

@media (max-width: 600px) {
    .abertura #osciloscopio {
        top: 72%;
        height: 65px;
    }
}

/* ESPECTRO CANTO INFERIOR ESQUERDO */
.abertura #osciloscopio {
    position: fixed !important;
    left: 2.5% !important;
    top: auto !important;
    bottom: 20% !important;
    width: 31% !important;
    height: 100px !important;
    margin: 0 !important;
    opacity: .95 !important;
    z-index: 10 !important;
    pointer-events: none !important;
}

@media (max-width: 600px) {
    .abertura #osciloscopio {
        left: 3% !important;
        bottom: 23% !important;
        width: 43% !important;
        height: 65px !important;
    }
}

/* ESPECTRO LAGO V2 */
.abertura #osciloscopio {
    position: fixed !important;
    left: 2.5% !important;
    top: 55% !important;
    bottom: auto !important;
    width: 29% !important;
    height: 105px !important;
    margin: 0 !important;
    opacity: 1 !important;
    z-index: 10 !important;
    pointer-events: none !important;

    filter:
        drop-shadow(1px 0 1px #000)
        drop-shadow(-1px 0 1px #000)
        drop-shadow(0 2px 2px #000)
        drop-shadow(0 -2px 2px #000)
        drop-shadow(0 0 9px rgba(40,255,180,.85)) !important;
}

@media (max-width: 600px) {
    .abertura #osciloscopio {
        left: 3% !important;
        top: calc(58% + 80px) !important;
        width: 40% !important;
        height: 75px !important;
    }
}

/* POSICIONAMENTO CONSOLIDADO V4 */
@media (min-width: 601px) {
    .abertura #osciloscopio {
        position: fixed !important;
        left: calc(5% - 220px) !important;
        top: calc(58% + 80px) !important;
        bottom: auto !important;
        width: 42% !important;
        height: 100px !important;
        margin: 0 !important;
        opacity: 1 !important;
        z-index: 10 !important;
        pointer-events: none !important;
    }
}

/* HAMCERT MOBILE V1 - ENQUADRAMENTO COMPLETO */
@media (max-width: 600px) {

    html, body {
        width: 100%;
        margin: 0;
        overflow-x: hidden;
    }

    .abertura {
        position: relative;
        width: 100%;
        height: 100svh;
        min-height: 100svh;
        padding: 0 !important;
        overflow: hidden;

        background:
            linear-gradient(
                rgba(2,8,19,.05),
                rgba(2,8,19,.12)
            ),
            url('./fundo-hamcert.png')
                center 35% / contain no-repeat !important;

        background-color: #030b16 !important;
    }

    .abertura #osciloscopio {
        position: fixed !important;
        left: 12% !important;
        top: 73% !important;
        bottom: auto !important;
        width: 76% !important;
        height: 45px !important;
        margin: 0 !important;
        z-index: 10 !important;
        pointer-events: none !important;
    }

    .abertura .controles {
        position: fixed !important;
        left: 12px !important;
        right: 12px !important;
        bottom: max(18px, env(safe-area-inset-bottom)) !important;
        display: flex !important;
        gap: 10px !important;
        z-index: 100 !important;
        padding: 0 !important;
    }

    .abertura .controles button {
        flex: 1 1 0 !important;
        min-width: 0 !important;
        min-height: 46px !important;
        padding: 10px 8px !important;
        font-size: 13px !important;
        line-height: 1.25 !important;
    }
}

/* HAMCERT MOBILE V2 - FUNDO E ESPECTRO */
@media (max-width: 600px) {

    .abertura {
        background:
            linear-gradient(
                rgba(2,8,19,.05),
                rgba(2,8,19,.12)
            ),
            url('./fundo-hamcert.png')
                center center / cover no-repeat !important;

        background-color: #030b16 !important;
    }

    .abertura #osciloscopio {
        position: fixed !important;
        left: 8% !important;
        top: auto !important;
        bottom: 135px !important;
        width: 84% !important;
        height: 45px !important;
        margin: 0 !important;
        z-index: 10 !important;
    }
}

/* HAMCERT MOBILE POSICAO V3 */
@media (max-width: 600px) {
    .abertura #osciloscopio {
        left: 8% !important;
        top: auto !important;
        bottom: 105px !important;
        width: 84% !important;
        height: 36px !important;
        filter: drop-shadow(0 0 3px rgba(40,255,180,.45)) !important;
    }
}

/* HAMCERT MOBILE V4 */
@media (max-width: 600px) {

    .abertura {
        min-height: 100svh !important;
        background:
            url('./hamcert-mobile-v4-fundo.png')
            center center / 100% 100% no-repeat !important;
        background-image: image-set(
            url('./hamcert-mobile-v4-fundo.webp') type('image/webp'),
            url('./hamcert-mobile-v4-fundo.png') type('image/png')
        ) !important;
        background-color: #030b16 !important;
    }

    .abertura #osciloscopio {
        position: fixed !important;
        left: 8% !important;
        top: auto !important;
        bottom: 82px !important;
        width: 84% !important;
        height: 48px !important;
        margin: 0 !important;
        filter: drop-shadow(0 0 3px rgba(40,255,180,.5)) !important;
        z-index: 10 !important;
    }

    .abertura .controles {
        position: fixed !important;
        left: 12px !important;
        right: 12px !important;
        bottom: 16px !important;
        display: flex !important;
        gap: 10px !important;
        z-index: 100 !important;
    }

    .abertura .controles button {
        flex: 1 1 0 !important;
        min-width: 0 !important;
        min-height: 48px !important;
        padding: 10px 8px !important;
        font-size: 13px !important;
    }
}

/* HAMCERT MOBILE V5 - DESLOCAMENTO 500PX */
@media (max-width: 600px) {
    .abertura #osciloscopio {
        top: auto !important;
        bottom: -168px !important;
    }
}
/* HAMCERT DESKTOP - AJUSTE HORIZONTAL */
@media (min-width: 761px) {
    .abertura #osciloscopio {
        transform: translateX(-30px) !important;
    }
}

@keyframes osciloscopio-entrar {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* HAMCERT - Ajustes exclusivos para desktop */
@media screen and (min-width: 761px) {
    .abertura .conteudo {
        animation-name: osciloscopio-entrar;
    }

    .abertura #osciloscopio {
        left: auto !important;
        right: 4% !important;
        top: 5% !important;
        transform: none !important;
    }

    .abertura .admin-link,
    .abertura .btn-admin,
    .abertura #btnAdmin {
        position: fixed !important;
        top: auto !important;
        right: 20px !important;
        bottom: 20px !important;
        left: auto !important;
        z-index: 9999 !important;
    }
}