:root {
    --modern-bg: #030806;
    --modern-panel: rgba(7, 21, 14, 0.82);
    --modern-panel-strong: rgba(5, 16, 10, 0.94);
    --modern-line: rgba(116, 255, 164, 0.16);
    --modern-line-strong: rgba(90, 255, 145, 0.38);
    --modern-green: #38f27c;
    --modern-green-soft: #78ffa4;
    --modern-cyan: #68e4d0;
    --modern-white: #f2fff7;
    --modern-muted: #9db2a5;
    --modern-shadow: 0 28px 85px rgba(0, 0, 0, 0.44);
}

body.modern-subpage,
body.modern-store-page,
body.modern-auth-page,
body.modern-dashboard-page {
    min-height: 100vh;
    color: var(--modern-white);
    background:
        linear-gradient(110deg, rgba(2, 9, 5, 0.97), rgba(2, 9, 5, 0.76)),
        url("assets/img/image-15.png") center top / cover fixed;
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

body.modern-subpage::before,
body.modern-store-page::before,
body.modern-auth-page::before {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    content: "";
    opacity: 0.22;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
    background-size: 58px 58px;
    mask-image: linear-gradient(to bottom, black, transparent 88%);
}

/* Paginas de download e guias */
.modern-subpage .page-shell {
    width: min(1120px, calc(100% - 34px));
    margin: 0 auto;
    padding: 28px 0 72px;
}

.modern-subpage .mini-nav {
    position: sticky;
    top: 12px;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 62px;
    margin-bottom: 24px;
    padding: 8px 12px;
    border: 1px solid var(--modern-line);
    border-radius: 17px;
    background: rgba(3, 12, 7, 0.84);
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(22px);
}

.modern-subpage .mini-nav::before {
    margin-right: auto;
    padding-left: 9px;
    content: "EMERALD RP";
    color: var(--modern-white);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.16em;
}

.modern-subpage .mini-nav a {
    padding: 11px 14px;
    border: 0;
    border-radius: 11px;
    color: #a6b8ac;
    background: transparent;
    font-size: 12px;
    font-weight: 750;
    transition: 0.22s ease;
}

.modern-subpage .mini-nav a:hover {
    color: white;
    background: rgba(255, 255, 255, 0.06);
    transform: translateY(-1px);
}

.modern-subpage .simple-page {
    position: relative;
    padding: clamp(28px, 5vw, 64px);
    overflow: hidden;
    border: 1px solid var(--modern-line);
    border-radius: 30px;
    background:
        radial-gradient(circle at 91% 5%, rgba(56, 242, 124, 0.1), transparent 27%),
        linear-gradient(145deg, rgba(8, 26, 16, 0.91), rgba(3, 12, 7, 0.94));
    box-shadow: var(--modern-shadow);
    backdrop-filter: blur(20px);
}

.modern-subpage .simple-page::after {
    position: absolute;
    right: -110px;
    bottom: -130px;
    width: 330px;
    height: 330px;
    border: 1px solid rgba(101, 255, 153, 0.07);
    border-radius: 50%;
    content: "";
    box-shadow:
        0 0 0 48px rgba(101, 255, 153, 0.018),
        0 0 0 96px rgba(101, 255, 153, 0.012);
    pointer-events: none;
}

.modern-subpage .eyebrow {
    display: inline-flex;
    padding: 8px 11px;
    border: 1px solid rgba(88, 255, 143, 0.2);
    border-radius: 999px;
    color: var(--modern-green-soft);
    background: rgba(56, 242, 124, 0.065);
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 0.17em;
    text-transform: uppercase;
}

.modern-subpage .simple-page > h1 {
    max-width: 800px;
    margin: 18px 0 13px;
    color: transparent;
    background: linear-gradient(100deg, #fff, #8effb2 63%, var(--modern-cyan));
    background-clip: text;
    -webkit-background-clip: text;
    font-size: clamp(38px, 6vw, 70px);
    line-height: 1.02;
    letter-spacing: -0.06em;
}

.modern-subpage .simple-page > p {
    max-width: 760px;
    color: var(--modern-muted);
    font-size: 16px;
    line-height: 1.7;
}

.modern-subpage .download-panel,
.modern-subpage .download-confirm-panel,
.modern-subpage .install-flow {
    position: relative;
    z-index: 2;
    border: 1px solid var(--modern-line) !important;
    border-radius: 22px !important;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.045), rgba(0, 0, 0, 0.18)) !important;
    box-shadow: none !important;
}

.modern-subpage .download-meta-card,
.modern-subpage .download-confirm-card,
.modern-subpage .install-step,
.modern-subpage .checksum-box,
.modern-subpage .download-safe-note,
.modern-subpage .download-honest-note {
    border-color: rgba(255, 255, 255, 0.085) !important;
    border-radius: 15px !important;
    color: #d6e5db !important;
    background: rgba(255, 255, 255, 0.035) !important;
}

.modern-subpage .download-meta-card span,
.modern-subpage .download-confirm-card span,
.modern-subpage .install-step strong {
    color: var(--modern-green-soft) !important;
}

.modern-subpage .big-button,
.modern-subpage .light-button {
    min-height: 54px;
    border-radius: 14px;
    font-size: 13px;
    font-weight: 900;
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.modern-subpage .big-button {
    border: 0;
    color: #031108;
    background: linear-gradient(115deg, var(--modern-green), #8cffad);
    box-shadow: 0 14px 40px rgba(56, 242, 124, 0.16);
}

.modern-subpage .light-button {
    border: 1px solid rgba(255, 255, 255, 0.13);
    color: white;
    background: rgba(255, 255, 255, 0.045);
}

.modern-subpage .big-button:hover,
.modern-subpage .light-button:hover {
    border-color: var(--modern-line-strong);
    transform: translateY(-3px);
}

.modern-subpage .note-line {
    position: relative;
    z-index: 2;
    margin-top: 18px;
    color: #82968a;
}

.modern-subpage .mini-grid article,
.modern-subpage .step-list article {
    position: relative;
    z-index: 2;
    border: 1px solid rgba(255, 255, 255, 0.085);
    border-radius: 18px;
    background:
        radial-gradient(circle at 92% 5%, rgba(56, 242, 124, 0.09), transparent 30%),
        rgba(255, 255, 255, 0.034);
    transition: transform 0.22s ease, border-color 0.22s ease;
}

.modern-subpage .mini-grid article:hover,
.modern-subpage .step-list article:hover {
    border-color: var(--modern-line-strong);
    transform: translateY(-4px);
}

.modern-subpage .mini-grid article strong,
.modern-subpage .step-list article > span {
    color: var(--modern-green-soft);
}

/* Loja */
.modern-store-page .portal-topbar {
    top: 14px;
    width: min(1180px, calc(100% - 34px));
    min-height: 66px;
    border: 1px solid var(--modern-line);
    border-radius: 18px;
    background: rgba(3, 12, 7, 0.88);
    box-shadow: 0 18px 55px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(22px);
}

.modern-store-page .portal-brand {
    color: var(--modern-white);
    letter-spacing: 0.11em;
}

.modern-store-page .portal-brand::before {
    content: "◆";
    margin-right: 9px;
    color: var(--modern-green);
    text-shadow: 0 0 14px var(--modern-green);
}

.modern-store-page .portal-nav a {
    border-radius: 10px;
}

.modern-store-page .portal-shell {
    width: min(1180px, calc(100% - 34px));
    padding-top: 105px;
}

.modern-store-page .store-hero {
    min-height: 500px;
    overflow: hidden;
    border: 1px solid var(--modern-line);
    border-radius: 30px;
    background:
        linear-gradient(90deg, rgba(3, 11, 7, 0.96), rgba(3, 11, 7, 0.48)),
        url("assets/img/image-13.png") center / cover;
    box-shadow: var(--modern-shadow);
}

.modern-store-page .hero-title {
    max-width: 720px;
    font-size: clamp(45px, 6vw, 76px);
    line-height: 0.98;
    letter-spacing: -0.06em;
}

.modern-store-page .hero-kicker,
.modern-store-page .section-kicker {
    color: var(--modern-green-soft);
    letter-spacing: 0.16em;
}

.modern-store-page .hero-button {
    color: #031108;
    background: linear-gradient(115deg, var(--modern-green), #8cffad);
    box-shadow: 0 14px 40px rgba(56, 242, 124, 0.17);
}

.modern-store-page .hero-button-secondary {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(3, 12, 7, 0.58);
    backdrop-filter: blur(13px);
}

.modern-store-page .focus-section {
    border: 1px solid var(--modern-line);
    border-radius: 26px;
    background: linear-gradient(145deg, rgba(8, 25, 16, 0.86), rgba(4, 13, 8, 0.92));
    box-shadow: var(--modern-shadow);
}

.modern-store-page .store-product {
    border-color: rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    background:
        radial-gradient(circle at 88% 8%, rgba(56, 242, 124, 0.1), transparent 28%),
        rgba(255, 255, 255, 0.035);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.modern-store-page .store-product:hover {
    border-color: var(--modern-line-strong);
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.32);
    transform: translateY(-7px);
}

/* Login */
.modern-auth-page .auth-shell {
    width: min(1180px, calc(100% - 30px));
    min-height: min(780px, calc(100vh - 42px));
    margin: 21px auto;
    overflow: hidden;
    border: 1px solid var(--modern-line);
    border-radius: 31px;
    background: rgba(3, 12, 7, 0.78);
    box-shadow: var(--modern-shadow);
    backdrop-filter: blur(20px);
}

.modern-auth-page .hero-side {
    background:
        linear-gradient(0deg, rgba(3, 12, 7, 0.94), rgba(3, 12, 7, 0.26)),
        url("assets/img/image-13.png") center / cover;
}

.modern-auth-page .hero-content .brand {
    display: inline-flex;
    width: auto;
    min-width: 0;
    padding: 9px 12px;
    border: 1px solid rgba(90, 255, 145, 0.2);
    border-radius: 999px;
    color: var(--modern-green-soft);
    background: rgba(3, 15, 8, 0.58);
    font-size: 10px;
    letter-spacing: 0.15em;
}

.modern-auth-page .hero-content h1 {
    font-size: clamp(42px, 5vw, 70px);
    line-height: 0.98;
    letter-spacing: -0.06em;
}

.modern-auth-page .hero-card {
    border-color: rgba(255, 255, 255, 0.09);
    border-radius: 17px;
    background: rgba(3, 13, 8, 0.6);
    backdrop-filter: blur(14px);
}

.modern-auth-page .form-side {
    background:
        radial-gradient(circle at 80% 10%, rgba(56, 242, 124, 0.1), transparent 30%),
        rgba(4, 14, 9, 0.93);
}

.modern-auth-page .kicker {
    color: var(--modern-green-soft);
    letter-spacing: 0.16em;
}

.modern-auth-page .title {
    color: var(--modern-white);
    letter-spacing: -0.045em;
}

.modern-auth-page input {
    border-color: rgba(255, 255, 255, 0.11);
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.04);
}

.modern-auth-page input:focus {
    border-color: var(--modern-line-strong);
    box-shadow: 0 0 0 4px rgba(56, 242, 124, 0.08);
}

.modern-auth-page .submit {
    min-height: 54px;
    border-radius: 14px;
    color: #031108;
    background: linear-gradient(115deg, var(--modern-green), #8cffad);
    box-shadow: 0 14px 40px rgba(56, 242, 124, 0.16);
}

/* Painel autenticado */
.modern-dashboard-page .topbar {
    top: 12px;
    border-color: var(--modern-line);
    border-radius: 18px;
    background: rgba(3, 12, 7, 0.91);
    backdrop-filter: blur(22px);
}

.modern-dashboard-page .topbar .brand::before {
    margin-right: 8px;
    content: "◆";
    color: var(--modern-green);
}

.modern-dashboard-page .hero,
.modern-dashboard-page .card,
.modern-dashboard-page .metric,
.modern-dashboard-page .note {
    border-color: var(--modern-line);
    border-radius: 22px;
    background:
        radial-gradient(circle at 95% 3%, rgba(56, 242, 124, 0.07), transparent 25%),
        var(--modern-panel);
}

.modern-dashboard-page .card,
.modern-dashboard-page .metric {
    transition: transform 0.22s ease, border-color 0.22s ease;
}

.modern-dashboard-page .card:hover,
.modern-dashboard-page .metric:hover {
    border-color: var(--modern-line-strong);
    transform: translateY(-3px);
}

.modern-dashboard-page .btn.primary,
.modern-dashboard-page .fill {
    background: linear-gradient(115deg, var(--modern-green), #8cffad);
}

@media (max-width: 760px) {
    .modern-subpage .page-shell,
    .modern-store-page .portal-shell {
        width: calc(100% - 20px);
    }

    .modern-subpage .mini-nav {
        position: relative;
        top: 0;
        flex-wrap: wrap;
        justify-content: flex-start;
    }

    .modern-subpage .mini-nav::before {
        width: 100%;
        margin: 0;
        padding: 8px 10px 4px;
    }

    .modern-subpage .mini-nav a {
        flex: 1 1 120px;
        text-align: center;
    }

    .modern-subpage .simple-page {
        padding: 26px 18px;
        border-radius: 22px;
    }

    .modern-store-page .portal-topbar {
        width: calc(100% - 20px);
    }

    .modern-store-page .store-hero,
    .modern-store-page .focus-section {
        border-radius: 22px;
    }

    .modern-auth-page .auth-shell {
        width: calc(100% - 20px);
        margin: 10px auto;
        border-radius: 22px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .modern-subpage *,
    .modern-store-page *,
    .modern-auth-page *,
    .modern-dashboard-page * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
