/* ==========================================================================
   1. RESET DE ESTILOS PADRÃO & CONFIGURAÇÕES GERAIS
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #080a0f;
    --surface: rgba(15, 18, 27, 0.82);
    --surface-strong: rgba(12, 15, 23, 0.94);
    --surface-soft: rgba(255, 255, 255, 0.045);
    --line: rgba(255, 215, 0, 0.14);
    --line-soft: rgba(255, 255, 255, 0.08);
    --gold: #ffd700;
    --gold-soft: #c5a880;
    --cyan: #00e8ff;
    --green: #2ecc71;
    --red: #ff4d66;
    --text: #f6f7fb;
    --muted: #a7afbd;
    --radius: 10px;
    --shadow-card: 0 18px 45px rgba(0, 0, 0, 0.48);
    --focus: 0 0 0 3px rgba(0, 232, 255, 0.18);
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

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

button,
a {
    -webkit-tap-highlight-color: transparent;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: none;
    box-shadow: var(--focus);
}

::selection {
    background: rgba(255, 215, 0, 0.28);
    color: #fff;
}

* {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 215, 0, 0.38) rgba(255, 255, 255, 0.06);
}

*::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

*::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 99px;
}

*::-webkit-scrollbar-thumb {
    background: rgba(255, 215, 0, 0.35);
    border-radius: 99px;
}

/* ==========================================================================
   2. NAVBAR SUPERIOR FLUTUANTE
   ========================================================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(8, 10, 15, 0.88);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(255, 215, 0, 0.12);
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 40px;
}

.nav-logo {
    font-family: 'Cinzel', serif;
    font-weight: 700;
    color: var(--gold);
    text-decoration: none;
    font-size: 1.2rem;
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.28);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 40px;
}

.nav-menu a {
    color: var(--gold-soft);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    border-radius: 7px;
    padding: 6px 0;
    transition: color 0.2s ease, text-shadow 0.2s ease, background 0.2s ease;
}

.nav-menu a:hover, .nav-menu a.active {
    color: var(--gold);
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
}

/* ==========================================================================
   3. SELETOR DE IDIOMAS (MENU DROPDOWN COM BANDEIRAS)
   ========================================================================== */
.lang-dropdown {
    position: relative;
    display: inline-block;
    cursor: pointer;
}

/* Botão de exibição do idioma ativo */
.lang-dropbtn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 6px;
    padding: 8px 14px;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.lang-dropdown:hover .lang-dropbtn {
    border-color: #ffd700;
    background: rgba(255, 215, 0, 0.1);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.2);
}

.arrow-down {
    font-size: 0.65rem;
    color: #c5a880;
    transition: transform 0.3s ease;
}

.lang-dropdown:hover .arrow-down {
    transform: rotate(180deg);
    color: #ffd700;
}

/* Caixa com a lista oculta de idiomas */
.lang-dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: 110%;
    background: rgba(11, 12, 16, 0.95);
    backdrop-filter: blur(10px);
    min-width: 140px;
    border: 1px solid rgba(255, 215, 0, 0.15);
    border-radius: 6px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.6);
    z-index: 1100;
    overflow: hidden;
    animation: fadeInSlide 0.2s ease forwards;
}

/* Mostra a lista ao passar o mouse */
.lang-dropdown:hover .lang-dropdown-content {
    display: block;
}

/* Links internos das opções de idiomas */
.lang-dropdown-content a {
    color: #c5a880;
    padding: 10px 15px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: background 0.2s, color 0.2s;
}

.lang-dropdown-content a:hover {
    background: rgba(255, 215, 0, 0.1);
    color: #ffd700;
}

.lang-dropdown-content a.active {
    color: #ffd700;
    background: rgba(255, 215, 0, 0.05);
    font-weight: 600;
}

/* Estilo padrão das imagens das bandeiras */
.flag-icon {
    width: 20px;
    height: auto;
    object-fit: contain;
    border-radius: 2px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

/* Animação de surgimento suave */
@keyframes fadeInSlide {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   4. SEÇÃO HERO (BACKGROUND DO SITE)
   ========================================================================== */
.hero-section {
    position: relative;
    min-height: 100vh;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 100px 20px 60px 20px;
    background-image: var(--site-bg-image, url('../images/bg.jpg'));
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(11, 12, 16, 0.5) 0%, rgba(11, 12, 16, 0.95) 100%);
    z-index: 1;
}

.content-container {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
    width: 100%;
    max-width: 500px;
}

/* ==========================================================================
   5. CONTAINER DE INFOS DA LOGO DO CARD
   ========================================================================== */
.logo-box {
    text-align: center;
}

.main-logo {
    max-width: 280px;
    margin-bottom: 10px;
}

.text-logo {
    font-family: 'Cinzel', serif;
    font-size: 2.5rem;
    color: #fff;
    letter-spacing: 4px;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}

/* ==========================================================================
   6. CARD DE CADASTRO PRINCIPAL
   ========================================================================== */
.register-card {
    background: linear-gradient(145deg, rgba(24, 27, 37, 0.82), rgba(12, 15, 23, 0.78));
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 40px 30px;
    width: 100%;
    backdrop-filter: blur(15px);
    box-shadow: var(--shadow-card);
    text-align: center;
}

.register-card h2 {
    font-family: 'Cinzel', serif;
    font-size: 1.6rem;
    color: #ffd700;
    letter-spacing: 2px;
    margin-bottom: 5px;
}

.card-desc {
    font-size: 0.85rem;
    color: #a3a3a3;
    margin-bottom: 30px;
}

/* ==========================================================================
   7. PAINEL DE STATUS UNIFICADO (SERVIDOR E ONLINE)
   ========================================================================== */
.status-bar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: rgba(0, 0, 0, 0.32);
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 25px;
    font-size: 0.9rem;
}

.status-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.status-item:first-child {
    border-right: 1px solid rgba(255, 215, 0, 0.1);
}

.status-item label {
    color: #c5a880;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 1px;
}

.status-online {
    color: #2ecc71;
    text-shadow: 0 0 10px rgba(46, 204, 113, 0.4);
}

.status-offline {
    color: #ff4d4d;
    text-shadow: 0 0 10px rgba(255, 77, 77, 0.4);
}

/* ==========================================================================
   8. FORMULÁRIO DE ENTRADA & INPUTS
   ========================================================================== */
.register-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-group {
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.input-group label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #c5a880;
    letter-spacing: 1px;
}

.input-group input {
    background: rgba(0, 0, 0, 0.38);
    border: 1px solid rgba(255, 215, 0, 0.16);
    border-radius: 8px;
    padding: 12px 15px;
    color: #fff;
    font-size: 0.95rem;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s ease;
}

.input-group input:focus {
    outline: none;
    border-color: var(--cyan);
    box-shadow: var(--focus);
}

/* Botão de Envio (Estilo Dourado) */
.btn-submit {
    background: linear-gradient(135deg, #ae8625 0%, #f7ef8a 50%, #ae8625 100%);
    border: none;
    border-radius: 8px;
    padding: 14px;
    color: #111;
    font-family: 'Cinzel', serif;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 1px;
    cursor: pointer;
    margin-top: 10px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
    box-shadow: 0 5px 15px rgba(174, 134, 37, 0.3);
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(247, 239, 138, 0.5);
    filter: brightness(1.05);
}

.btn-submit:active {
    transform: translateY(0);
}

/* Caixa de retorno de mensagens */
.message-box {
    margin-top: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.msg-error {
    color: #ff4d4d;
    text-shadow: 0 0 10px rgba(255, 77, 77, 0.2);
}

.msg-success {
    color: #2ecc71;
    text-shadow: 0 0 10px rgba(46, 204, 113, 0.2);
}

/* ==========================================================================
   9. RODAPÉ (FOOTER)
   ========================================================================== */
.main-footer {
    background: #07080a;
    padding: 30px 20px;
    text-align: center;
    font-size: 0.75rem;
    color: #555;
    border-top: 1px solid rgba(255, 215, 0, 0.05);
}

@media (max-width: 760px) {
    body {
        min-width: 0;
    }

    .navbar {
        position: sticky;
    }

    .nav-container {
        padding: 10px 12px;
        flex-wrap: wrap;
        gap: 10px;
        justify-content: center;
    }

    .nav-logo {
        width: 100%;
        text-align: center;
        font-size: 0.98rem;
        letter-spacing: 1px;
        line-height: 1.25;
    }

    .nav-menu {
        width: 100%;
        justify-content: center;
        gap: 8px;
        flex-wrap: wrap;
    }

    .nav-menu a {
        font-size: 0.72rem;
        padding: 6px 4px;
        display: inline-block;
    }

    .nav-right-group {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 8px;
        margin-left: 0;
    }

    .lang-dropbtn {
        padding: 7px 10px;
        font-size: 0.75rem;
    }

    .hero-section {
        align-items: flex-start;
        padding: 24px 10px 36px 10px;
        min-height: calc(100vh - 1px);
        background-position: center top;
    }

    .content-container {
        max-width: 100%;
        gap: 18px;
    }

    .register-card {
        padding: 22px 14px;
        border-radius: 10px;
    }

    .text-logo {
        font-size: 1.8rem;
        letter-spacing: 2px;
        overflow-wrap: anywhere;
    }

    .status-bar {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .status-item:first-child {
        border-right: 0;
        border-bottom: 1px solid rgba(255, 215, 0, 0.1);
        padding-bottom: 10px;
    }

    .register-form {
        gap: 14px;
    }

    .main-footer {
        padding: 22px 12px;
    }
}
