/* =====================================================
   BLOG — Estilo completo atualizado (Topazioverse Animado)
===================================================== */

/* -----------------------------------------
   RESET
----------------------------------------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* -----------------------------------------
   FUNDO & TEMA GLOBAL
----------------------------------------- */
body,
html {
    background: #020204 !important;
    font-family: "Segoe UI", sans-serif;
    color: var(--text);
    overflow-x: hidden;
    position: relative;
    padding-top: 90px;
}

/* Variáveis de cor do tema */
:root {
    --text: #cfc4ff;
    --text-strong: #ffffff;
    --subtitle: #b9a3ff;

    --card-bg: rgba(20, 10, 40, 0.45);
    --card-border: rgba(160, 90, 255, 0.35);

    --hero-shadow-1: #b07eff;
    --hero-shadow-2: #7830ff;
}

#particles-js {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: -3;
    pointer-events: none;
}

/* -----------------------------------------
   HERO
----------------------------------------- */
.hero {
    height: 50vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    text-align: center;
    z-index: 2;
}

.hero-content {
    max-width: 900px;
    padding: 25px;
    opacity: 0;
    animation: fadeInUp 1.3s ease forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(25px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero h1 {
    font-size: 3rem;
    color: var(--text-strong);
    margin-bottom: 16px;
    text-shadow: 0 0 18px var(--hero-shadow-1), 0 0 40px var(--hero-shadow-2);
}

.hero p {
    font-size: 1.25rem;
    color: var(--subtitle);
}

/* -----------------------------------------
   USER INVITE / USER BOX
----------------------------------------- */
.blog-login-invite,
.blog-user-box {
    margin: 40px auto;
    max-width: 900px;
    padding: 35px;
    border-radius: 18px;
    backdrop-filter: blur(6px);
    text-align: center;
    position: relative;
    z-index: 2;
}

/* visitante */
.blog-login-invite {
    background: rgba(30, 10, 60, 0.45);
    border: 1px solid rgba(160, 90, 255, 0.35);
    box-shadow: 0 0 25px rgba(120, 60, 255, 0.25);
}

/* logado */
.blog-user-box {
    background: rgba(40, 15, 85, 0.45);
    border: 1px solid rgba(90, 60, 255, 0.35);
    box-shadow: 0 0 18px rgba(90, 60, 255, 0.25);
}

.invite-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.btn-login,
.btn-admin,
.btn-exit {
    padding: 10px 22px;
    border-radius: 12px;
    background: rgba(140, 60, 255, 0.35);
    border: 1px solid rgba(170, 100, 255, 0.55);
    color: #f2e4ff;
    cursor: pointer;
    transition: .3s ease, transform .2s ease;
    text-decoration: none;
}

.btn-login:hover,
.btn-admin:hover,
.btn-exit:hover {
    background: rgba(160, 90, 255, 0.55);
    transform: scale(1.05);
}

/* ADM */
.btn-admin {
    background: rgba(255, 80, 80, 0.35);
    border-color: rgba(255, 120, 120, 0.55);
}

.btn-admin:hover {
    background: rgba(255, 80, 80, 0.55);
}

/* sair */
.btn-exit {
    background: rgba(255, 120, 60, 0.35);
    border-color: rgba(255, 150, 90, 0.55);
}

.btn-exit:hover {
    background: rgba(255, 120, 60, 0.55);
}

/* -----------------------------------------
   LISTA DE POSTS
----------------------------------------- */
.posts {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px 25px 80px;
    text-align: center;
}

.post-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 35px;
}

.post-card {
    width: 330px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 14px;
    text-decoration: none;
    color: var(--text);
    backdrop-filter: blur(6px);
    overflow: hidden;
    transition: .3s ease, transform .25s ease;
    position: relative;
}

.post-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 0 30px rgba(170, 90, 255, 0.6);
}

.post-img {
    width: 100%;
    height: 180px;
    background-size: cover;
    background-position: center;
}

.post-info {
    padding: 18px;
}

.post-info h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.date {
    font-size: .85rem;
    opacity: .7;
}

.excerpt {
    font-size: .95rem;
    margin-top: 8px;
    opacity: .9;
}

/* =====================================================
   MODAL LOGIN & CADASTRO (CORRIGIDO)
===================================================== */

.auth-modal {
    position: fixed;
    inset: 0;
    background: rgba(5, 0, 20, 0.75);
    display: none;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(8px);
    z-index: 9999;
}

.auth-box {
    width: 420px;
    max-width: 95%;
    padding: 35px 40px;
    border-radius: 18px;
    background: rgba(30, 10, 60, 0.55);
    border: 1px solid rgba(160, 90, 255, 0.35);
    box-shadow: 0 0 35px rgba(120, 60, 255, 0.35);
    position: relative;
    animation: modalAppear .45s ease forwards;
}

@keyframes modalAppear {
    from {
        opacity: 0;
        transform: translateY(40px) scale(.92);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* FECHAR */
.close-btn {
    position: absolute;
    top: 14px;
    right: 18px;
    font-size: 28px;
    cursor: pointer;
    color: var(--text);
    transition: .3s;
}

.close-btn:hover {
    transform: scale(1.2);
    color: #fff;
}

/* CONTÊINER DOS FORMULÁRIOS */
.auth-box-inner {
    position: relative;
    width: 100%;
}

/* FORMULÁRIOS — corrigidos */
.auth-form {
    display: none;
    flex-direction: column;
    gap: 14px;
    transition: opacity .4s ease, transform .4s ease;
}

.auth-form.show {
    display: flex !important;
    opacity: 1;
    transform: translateY(0);
}

.auth-form.hide {
    display: none !important;
    opacity: 0;
    transform: translateY(15px);
}

/* INPUTS */
.auth-box input {
    padding: 14px;
    background: rgba(20, 8, 40, 0.45);
    border: 1px solid rgba(160, 90, 255, 0.35);
    border-radius: 12px;
    color: var(--text);
    font-size: 1rem;
    transition: .25s ease;
}

.auth-box input:focus {
    border-color: rgba(200, 140, 255, 0.9);
    box-shadow: 0 0 12px rgba(160, 90, 255, 0.65);
    transform: scale(1.02);
}

/* BOTÃO SUBMIT */
.btn-primary {
    padding: 14px;
    border-radius: 12px;
    background: rgba(150, 70, 255, 0.48);
    border: 1px solid rgba(200, 120, 255, 0.55);
    color: #fff;
    cursor: pointer;
    font-size: 1.1rem;
    transition: .3s ease;
}

.btn-primary:hover {
    background: rgba(170, 100, 255, 0.65);
    transform: translateY(-3px);
}

/* TROCA LOGIN <-> CADASTRO */
.switch {
    text-align: center;
}

.switch span {
    color: #dcb6ff;
    cursor: pointer;
    font-weight: bold;
    transition: .3s;
}

.switch span:hover {
    color: #fff;
    transform: scale(1.05);
}

/* -----------------------------------------
   RESPONSIVO
----------------------------------------- */
@media (max-width: 480px) {
    .auth-box {
        width: 92%;
        padding: 25px;
    }

    .auth-box h2 {
        font-size: 1.6rem;
    }

    .post-card {
        width: 95%;
    }
}