* {
    box-sizing: border-box;
}

:root {
    --bg-main: #04070d;
    --bg-panel: rgba(9, 16, 28, 0.86);
    --bg-panel-2: rgba(11, 21, 35, 0.94);
    --border: rgba(110, 170, 255, 0.20);
    --border-strong: rgba(110, 170, 255, 0.45);
    --text: #f3f7ff;
    --muted: #a9b8cc;
    --accent: #6cc6ff;
    --accent-2: #2b8cff;
    --danger: #c53030;
    --warning: #ffd84d;
    --success: #39d98a;
    --shadow: 0 20px 70px rgba(0, 0, 0, 0.45);
    --blur: blur(14px);
}

html, body {
    margin: 0;
    padding: 0;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at center, rgba(18, 57, 105, 0.22) 0%, rgba(4, 7, 13, 0.96) 52%, rgba(0, 0, 0, 1) 100%),
        linear-gradient(180deg, rgba(0, 13, 27, 0.75), rgba(0, 0, 0, 0.92)),
        url("/static/img/vox-mundi-theme.png") center center / cover no-repeat fixed;
    min-height: 100%;
}

body {
    position: relative;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px),
        linear-gradient(180deg, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 80px 80px;
    opacity: 0.12;
    z-index: 0;
}

a {
    text-decoration: none;
    color: inherit;
}

.page-shell,
.map-shell,
.form-shell {
    position: relative;
    z-index: 2;
}

.topbar {
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 22px;
    border-bottom: 1px solid var(--border);
    background: rgba(4, 10, 18, 0.68);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 20;
}

.topbar-left,
.topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.brand-link {
    display: flex;
    align-items: center;
    gap: 14px;
    font-weight: bold;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #f8fbff;
}

.brand-orb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: radial-gradient(circle, #9ae0ff 0%, #3d8cff 70%, rgba(61,140,255,0.2) 100%);
    box-shadow: 0 0 18px #58b9ff;
}

.topbar-nav-link {
    color: #d8e6f7;
    font-size: 14px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 10px 14px;
    border: 1px solid transparent;
    border-radius: 12px;
    transition: 0.2s ease;
}

.topbar-nav-link:hover {
    border-color: var(--border);
    background: rgba(108, 198, 255, 0.08);
}

.page-center {
    min-height: calc(100vh - 68px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
}

.hero-panel,
.choice-card,
.form-card,
.side-panel {
    background: linear-gradient(180deg, rgba(11, 20, 32, 0.88), rgba(6, 13, 22, 0.92));
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    backdrop-filter: var(--blur);
}

.hero-panel {
    width: 100%;
    max-width: 980px;
    min-height: 560px;
    border-radius: 28px;
    padding: 42px;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 28px;
    overflow: hidden;
    position: relative;
}

.hero-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(120deg, rgba(108,198,255,0.08), rgba(43,140,255,0.02) 40%, transparent 70%);
    pointer-events: none;
}

.hero-left {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.eyebrow {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    border: 1px solid rgba(108,198,255,0.22);
    border-radius: 999px;
    color: #d9ebff;
    font-size: 12px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    background: rgba(108,198,255,0.06);
    margin-bottom: 22px;
}

.hero-title {
    margin: 0;
    font-size: 72px;
    line-height: 0.95;
    font-weight: 300;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: #fff7df;
    text-shadow: 0 0 12px rgba(175, 217, 255, 0.18);
}

.hero-subtitle {
    margin: 18px 0 0;
    font-size: 24px;
    color: #d8e6f7;
}

.hero-description {
    margin: 26px 0 0;
    max-width: 560px;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.7;
}

.hero-actions {
    margin-top: 34px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    max-width: 560px;
}

.main-button,
.choice-button,
.submit,
.icon-button {
    cursor: pointer;
    transition: 0.2s ease;
}

.main-button {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 118px;
    padding: 20px 22px;
    border-radius: 18px;
    border: 1px solid var(--border);
    background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
    color: white;
    box-shadow: 0 8px 30px rgba(0,0,0,0.18);
}

.main-button:hover,
.choice-button:hover,
.submit:hover,
.icon-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.24);
}

.main-button strong {
    font-size: 22px;
    margin-bottom: 8px;
    letter-spacing: 0.04em;
}

.main-button span {
    color: #c4d8ef;
    font-size: 14px;
    line-height: 1.5;
}

.main-button.danger {
    border-color: rgba(255, 90, 90, 0.35);
    background: linear-gradient(180deg, rgba(197, 48, 48, 0.26), rgba(64, 15, 15, 0.24));
}

.main-button.primary {
    border-color: rgba(108, 198, 255, 0.35);
    background: linear-gradient(180deg, rgba(43, 140, 255, 0.24), rgba(11, 38, 76, 0.22));
}

.hero-right {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-glass {
    width: 100%;
    height: 100%;
    min-height: 420px;
    border-radius: 24px;
    border: 1px solid rgba(108,198,255,0.18);
    background:
        linear-gradient(180deg, rgba(13, 23, 36, 0.42), rgba(4, 8, 14, 0.6)),
        url("/static/img/vox-mundi-theme.png") center center / cover no-repeat;
    box-shadow: inset 0 0 100px rgba(0,0,0,0.42);
    position: relative;
    overflow: hidden;
}

.hero-glass::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at center, rgba(108,198,255,0.18), transparent 42%),
        linear-gradient(180deg, rgba(0,0,0,0.14), rgba(0,0,0,0.45));
}

.hero-glass-label {
    position: absolute;
    left: 24px;
    bottom: 24px;
    z-index: 2;
    padding: 16px 18px;
    border-radius: 16px;
    background: rgba(7, 13, 22, 0.76);
    border: 1px solid rgba(108,198,255,0.22);
    max-width: 80%;
}

.hero-glass-label strong {
    display: block;
    font-size: 18px;
    margin-bottom: 6px;
    color: #fff7df;
    letter-spacing: 0.08em;
}

.hero-glass-label span {
    color: #c6d7ea;
    font-size: 13px;
    line-height: 1.45;
}

.choice-card,
.form-card {
    width: 100%;
    max-width: 980px;
    border-radius: 24px;
    padding: 34px;
}

.choice-header,
.form-header {
    margin-bottom: 24px;
}

.choice-header h1,
.form-header h1,
.side-panel h2 {
    margin: 0 0 8px;
    font-size: 34px;
    color: #fff7df;
    letter-spacing: 0.06em;
    font-weight: 400;
    text-transform: uppercase;
}

.choice-header p,
.form-header p,
.muted,
.side-description {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.choice-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.choice-button {
    display: block;
    min-height: 180px;
    border-radius: 18px;
    border: 1px solid var(--border);
    padding: 24px;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01)),
        radial-gradient(circle at top left, rgba(108,198,255,0.12), transparent 45%);
}

.choice-button strong {
    display: block;
    font-size: 24px;
    color: #ffffff;
    margin-bottom: 14px;
}

.choice-button span {
    display: block;
    color: #c7d7ea;
    line-height: 1.6;
    font-size: 15px;
}

.choice-badge {
    display: inline-block;
    margin-bottom: 14px;
    font-size: 11px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #cce6ff;
    padding: 7px 11px;
    border-radius: 999px;
    border: 1px solid rgba(108,198,255,0.26);
    background: rgba(108,198,255,0.06);
}

.map-layout {
    display: grid;
    grid-template-columns: 1fr 470px;
    min-height: calc(100vh - 68px);
    position: relative;
    z-index: 2;
}

#map {
    width: 100%;
    min-height: calc(100vh - 68px);
    border-right: 1px solid rgba(108,198,255,0.10);
}

.side-panel {
    padding: 22px;
    border-left: 1px solid var(--border);
    overflow-y: auto;
}

.side-panel .side-header {
    margin-bottom: 18px;
}

.field {
    margin-bottom: 15px;
}

.field label,
.captcha-box label {
    display: block;
    margin-bottom: 7px;
    font-weight: bold;
    color: #e7f0fb;
    letter-spacing: 0.02em;
}

input,
textarea,
button,
select {
    font-family: inherit;
}

input,
textarea,
select {
    width: 100%;
    border: 1px solid rgba(108,198,255,0.22);
    background: rgba(5, 10, 18, 0.88);
    color: white;
    border-radius: 14px;
    padding: 12px 13px;
    font-size: 14px;
    outline: none;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.01);
}

input:focus,
textarea:focus,
select:focus {
    border-color: rgba(108,198,255,0.58);
    box-shadow: 0 0 0 3px rgba(108,198,255,0.14);
}

textarea {
    resize: vertical;
    min-height: 200px;
    line-height: 1.55;
}

small {
    color: var(--muted);
    display: block;
    margin-top: 6px;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.search-row {
    display: grid;
    grid-template-columns: 1fr 52px;
    gap: 8px;
}

.icon-button {
    border: 1px solid rgba(108,198,255,0.24);
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(108,198,255,0.18), rgba(12, 48, 81, 0.22));
    color: white;
    font-size: 18px;
}

.captcha-box {
    padding: 14px;
    border-radius: 18px;
    border: 1px solid rgba(108,198,255,0.18);
    background: rgba(4, 9, 16, 0.82);
    margin-bottom: 14px;
}

.captcha-line {
    display: grid;
    grid-template-columns: 100px 1fr 48px;
    gap: 8px;
    align-items: center;
}

#captchaPergunta {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    border-radius: 12px;
    background: rgba(108,198,255,0.08);
    border: 1px solid rgba(108,198,255,0.22);
    font-weight: bold;
    color: #e8f6ff;
}

.submit {
    width: 100%;
    border: none;
    border-radius: 16px;
    padding: 14px 18px;
    font-size: 15px;
    font-weight: bold;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 10px;
    color: white;
}

.submit.danger {
    background: linear-gradient(180deg, #cc3c3c, #7d1717);
}

.submit.primary {
    background: linear-gradient(180deg, #2f91ff, #1b4ea6);
}

.submit.secondary {
    background: linear-gradient(180deg, #44536a, #222e42);
}

.status {
    margin-top: 14px;
    margin-bottom: 16px;
    min-height: 24px;
    color: #d8e6f7;
    line-height: 1.5;
}

.result-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.result-card {
    border: 1px solid rgba(108,198,255,0.18);
    background: rgba(6, 11, 18, 0.90);
    border-radius: 16px;
    padding: 14px;
    cursor: pointer;
    transition: 0.18s ease;
}

.result-card:hover {
    border-color: rgba(108,198,255,0.42);
    background: rgba(11, 18, 29, 0.96);
}

.result-card.active {
    border: 1px solid rgba(255, 216, 77, 0.85);
    background: linear-gradient(180deg, rgba(80, 61, 8, 0.58), rgba(44, 33, 4, 0.52));
    box-shadow: inset 0 0 0 1px rgba(255,216,77,0.18);
}

.result-card h4 {
    margin: 0 0 8px;
    font-size: 18px;
    color: #ffffff;
}

.result-card p {
    margin: 8px 0;
    font-size: 14px;
    color: #d0dfef;
    line-height: 1.5;
}

.result-meta {
    font-size: 12px;
    color: #97a8bb;
    line-height: 1.5;
}

.form-page {
    min-height: calc(100vh - 68px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px;
    position: relative;
    z-index: 2;
}

.form-page.wide {
    align-items: flex-start;
}

.wide-card {
    max-width: 1100px;
}

.highlight-line {
    margin-top: 10px;
    margin-bottom: 20px;
    height: 1px;
    background: linear-gradient(90deg, rgba(108,198,255,0.45), rgba(108,198,255,0.03));
}

.info-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
    margin-bottom: 8px;
}

.info-chip {
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border: 1px solid rgba(108,198,255,0.22);
    background: rgba(108,198,255,0.06);
    color: #dcecff;
}

.leaflet-control-zoom a {
    background: rgba(5, 10, 18, 0.95) !important;
    color: white !important;
    border-color: rgba(108,198,255,0.22) !important;
}

.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
    background: #0e1827;
    color: white;
    border: 1px solid rgba(108,198,255,0.18);
}

@media (max-width: 1150px) {
    .hero-panel {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .hero-title {
        font-size: 56px;
    }
}

@media (max-width: 980px) {
    .map-layout {
        grid-template-columns: 1fr;
    }

    #map {
        min-height: 45vh;
        border-right: none;
        border-bottom: 1px solid rgba(108,198,255,0.10);
    }

    .grid-2,
    .choice-grid,
    .hero-actions {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .topbar {
        flex-direction: column;
        height: auto;
        padding: 12px;
        gap: 10px;
    }

    .page-center,
    .form-page {
        min-height: auto;
        padding: 16px;
    }

    .hero-panel,
    .choice-card,
    .form-card,
    .side-panel {
        padding: 20px;
        border-radius: 18px;
    }

    .hero-title {
        font-size: 42px;
    }

    .hero-subtitle {
        font-size: 20px;
    }
}
