:root {
    --bg-page: #f0f4f8;
    --kro-blue: #00468c;
    --kro-blue-light: #0066cc;
    --kro-text: #2c3e50;
    --white: #ffffff;
    --border-color: #d1d5db;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--bg-page);
    color: var(--kro-text);
}

a {
    text-decoration: none;
    color: var(--kro-blue);
}

.container {
    max-width: 1360px; /* Aumentado de 1100px para preencher melhor telas largas */
    width: 100%;
    margin: 0 auto;
    padding: 0 25px; /* Um respiro lateral confortável */
}

/* BACKGROUND GERAL DO SITE */
.site-background {
    background: url('../img/bg-body.jpg') no-repeat center top fixed;
    background-size: cover;
}

/* TOP BAR */
.top-bar {
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid var(--border-color);
    font-size: 12px;
    padding: 8px 0;
}

.top-bar-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-links a {
    margin-right: 15px;
    color: #555;
    font-weight: 600;
}

.status-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 5px;
}

.status-indicator.online {
    background: #10b981;
}

/* HEADER BACKGROUND & LOGO */
.header-background {
    background: url('../img/bg-header.jpg') no-repeat center center;
    background-size: cover;
    padding: 35px 0;
    border-bottom: 3px solid #002244;
}

.site-logo {
    max-height: 110px;
    display: block;
}

/* NAVEGAÇÃO & DROPDOWNS */
.main-nav {
    background: var(--kro-blue);
    box-shadow: 0 4px 6px rgba(0,0,0,0.15);
}

.main-nav ul {
    list-style: none;
    display: flex;
}

.main-nav > .container > ul > li {
    position: relative; /* Necessário para alinhar o submenu perfeitamente embaixo */
}

.main-nav a {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: var(--white);
    font-weight: bold;
    font-size: 13px;
    transition: background 0.2s;
}

.main-nav a:hover,
.main-nav a.active {
    background: var(--kro-blue-light);
}

.nav-icon {
    width: 16px;
    height: 16px;
    margin-right: 8px;
}

/* FIX DEFINITIVO DO DROPDOWN */
.dropdown-menu {
    display: none !important; /* Esconde o submenu de forma forçada por padrão */
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--kro-blue);
    min-width: 220px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.3);
    z-index: 1000;
    border-top: 2px solid var(--kro-blue-light);
    flex-direction: column;
}

.has-dropdown:hover .dropdown-menu {
    display: flex !important; /* Mostra o submenu SOMENTE ao passar o mouse */
}

.dropdown-menu li {
    width: 100%;
}

.dropdown-menu a {
    padding: 10px 20px;
    font-size: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
}

.dropdown-menu a:hover {
    background: var(--kro-blue-light);
    padding-left: 24px;
}

/* LAYOUT KRO */
.kro-layout {
    display: flex;
    gap: 25px;
    margin-top: 25px;
    margin-bottom: 50px;
}

.kro-main-content {
    flex: 1;
    min-width: 0; /* Impede que tabelas ou grids estourem o flexbox */
}

.kro-sidebar {
    width: 320px; /* Sidebar levemente mais robusta para harmonizar com a largura maior */
    flex-shrink: 0;
}

/* HERO BANNER */
.hero-banner {
    background: #000 url('../img/hero-bg.jpg') center/cover no-repeat;
    height: 260px;
    border-radius: 4px;
    display: flex;
    align-items: flex-end;
    padding: 25px;
    color: #fff;
    border: 1px solid var(--border-color);
}

.hero-text h2 {
    font-size: 24px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
}

.hero-text p {
    font-size: 14px;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
}

/* NEWS BOARD */
.news-board {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    margin-top: 20px;
}

.board-header {
    display: flex;
    justify-content: space-between;
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    background: #fafafa;
}

.board-header h3 {
    font-size: 16px;
    color: var(--kro-blue);
}

.btn-more {
    font-size: 12px;
    color: #666;
}

.news-list {
    list-style: none;
}

.news-list li {
    padding: 12px 20px;
    border-bottom: 1px dashed #eee;
    display: flex;
    align-items: center;
    font-size: 13px;
}

.news-list li:last-child {
    border-bottom: none;
}

.tag {
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 3px;
    color: #fff;
    margin-right: 12px;
    font-weight: bold;
    text-transform: uppercase;
}

.tag.update { background: var(--kro-blue); }
.tag.event { background: #f59e0b; }
.tag.notice { background: #ef4444; }

.date {
    margin-left: auto;
    color: #888;
    font-size: 12px;
}

/* BOX DE LOGIN */
.login-box {
    background: var(--white);
    border: 1px solid var(--border-color);
    padding: 25px;
    border-top: 4px solid var(--kro-blue);
    border-radius: 4px;
}

.login-box input {
    width: 100%;
    padding: 10px 12px;
    margin-bottom: 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 13px;
}

.btn-block {
    display: block;
    width: 100%;
    padding: 12px;
    text-align: center;
    font-weight: bold;
    cursor: pointer;
    border: none;
    border-radius: 4px;
    font-size: 14px;
}

.btn-blue {
    background: var(--kro-blue);
    color: var(--white);
}

.btn-blue:hover {
    background: var(--kro-blue-light);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: #444;
    margin-top: 10px;
}

.login-links {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    margin-top: 12px;
}

.error-msg {
    color: #dc2626;
    font-size: 12px;
    margin-bottom: 12px;
    font-weight: bold;
    text-align: center;
}

/* BOTOES DE ATALHO */
.quick-buttons {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn-large {
    display: block;
    padding: 18px;
    text-align: center;
    border: 1px solid var(--border-color);
    background: var(--white);
    border-radius: 4px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-large strong {
    display: block;
    font-size: 16px;
    color: var(--kro-blue);
}

.btn-large span {
    font-size: 12px;
    color: #666;
}

.btn-large:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* TELA DE LOGIN INDEPENDENTE */
.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.login-container {
    width: 100%;
    max-width: 380px;
}

.input-group {
    margin-bottom: 15px;
}

.input-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 13px;
    font-weight: 600;
}

.alert-error {
    background: #fee2e2;
    color: #b91c1c;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 15px;
    font-size: 13px;
    text-align: center;
}

.back-link {
    display: block;
    text-align: center;
    margin-top: 15px;
    font-size: 13px;
}

.text-center { text-align: center; }

/* =========================================
   ESTILOS PARA TABELAS DE RANKING 
   ========================================= */
.ranking-table-container {
    padding: 0 20px 20px 20px;
    overflow-x: auto;
}

.ranking-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 13px;
    margin-top: 15px;
}

.ranking-table th {
    background: var(--kro-blue);
    color: var(--white);
    padding: 12px;
    font-weight: bold;
}

.ranking-table td {
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
}

.ranking-table tr:hover {
    background-color: #f8fafc;
}

/* Colunas Específicas do PvP */
.ranking-table .col-pos { width: 60px; font-weight: bold; color: #666; }
.ranking-table .col-name { font-weight: bold; color: var(--kro-blue); }
.ranking-table .col-kills { color: #10b981; font-weight: bold; text-align: center; }
.ranking-table .col-deaths { color: #ef4444; font-weight: bold; text-align: center; }
.ranking-table .col-ratio { font-weight: bold; text-align: center; font-size: 14px; background-color: rgba(0, 70, 140, 0.05); }
.text-center { text-align: center !important; }

/* Abas de Seleção (Normal vs GvG) */
.pvp-tabs {
    display: flex;
    gap: 10px;
    padding: 15px 20px 0 20px;
}

.pvp-tabs .btn-block {
    width: auto;
    padding: 8px 20px;
    margin: 0;
    font-size: 13px;
}

/* =========================================
   RANKING PVP - DESIGN MODERNO
   ========================================= */
.pvp-board { padding-bottom: 20px; }
.ranking-container { padding: 20px; }
.empty-ranking { text-align: center; padding: 40px; color: #888; font-size: 16px; }
.empty-ranking i { font-size: 40px; color: #ccc; margin-bottom: 10px; display: block; }

/* ABAS */
.pvp-tabs { display: flex; gap: 10px; padding: 15px 20px 0; border-bottom: 1px solid var(--border-color); padding-bottom: 15px; }
.pvp-tabs .btn-block { width: 150px; padding: 10px; margin: 0; font-size: 13px; text-transform: uppercase; letter-spacing: 0.5px; border-radius: 4px 4px 0 0; }
.pvp-tabs .btn-blue { background: var(--kro-blue); box-shadow: inset 0 -3px 0 rgba(0,0,0,0.2); }

/* PÓDIO TOP 3 */
.pvp-podium {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 15px;
    margin: 30px 0 40px 0;
    min-height: 250px;
}

.podium-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    width: 220px;
    position: relative;
    padding: 60px 15px 15px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    transition: transform 0.3s;
}

.podium-card:hover { transform: translateY(-5px); }

/* Cores e Alturas do Pódio */
.rank-1 { border-top: 5px solid #fbbf24; box-shadow: 0 0 20px rgba(251, 191, 36, 0.2); z-index: 3; margin-bottom: 20px; }
.rank-2 { border-top: 5px solid #9ca3af; z-index: 2; }
.rank-3 { border-top: 5px solid #b45309; z-index: 1; }

.rank-badge {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 34px;
    height: 34px;
    border-radius: 50%;
    color: #fff;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.rank-1 .rank-badge { background: linear-gradient(135deg, #fde68a, #d97706); }
.rank-2 .rank-badge { background: linear-gradient(135deg, #e5e7eb, #6b7280); }
.rank-3 .rank-badge { background: linear-gradient(135deg, #fcd34d, #92400e); }

.avatar-container {
    position: absolute;
    top: -65px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.char-sprite { max-height: 110px; max-width: 110px; filter: drop-shadow(0 4px 3px rgba(0,0,0,0.3)); }

.player-info { margin-bottom: 15px; }
.player-name { font-size: 16px; color: var(--kro-blue); margin-bottom: 3px; }
.player-class { display: block; font-size: 12px; color: #555; font-weight: 600; }
.player-guild { display: inline-block; background: #f1f5f9; padding: 2px 8px; border-radius: 12px; font-size: 11px; color: #475569; margin-top: 5px; }

.player-stats { display: flex; justify-content: space-between; border-top: 1px dashed #eee; padding-top: 10px; }
.player-stats .stat { display: flex; flex-direction: column; flex: 1; }
.player-stats .label { font-size: 10px; text-transform: uppercase; color: #888; }
.player-stats .val { font-size: 14px; font-weight: bold; }
.val.kills { color: #10b981; }
.val.deaths { color: #ef4444; }
.ratio-stat { background: #f8fafc; border-radius: 4px; padding: 2px; }
.val.ratio { color: var(--kro-blue-light); }

/* LISTA RESTANTE (4º ao 50º) */
.pvp-list { border: 1px solid var(--border-color); border-radius: 6px; background: #fff; overflow: hidden; }
.list-header { display: flex; background: var(--kro-blue); color: #fff; padding: 12px 15px; font-size: 12px; font-weight: bold; text-transform: uppercase; }
.list-item { display: flex; align-items: center; padding: 10px 15px; border-bottom: 1px solid #f1f5f9; transition: background 0.2s; }
.list-item:last-child { border-bottom: none; }
.list-item:hover { background: #f8fafc; }

.col-rank { width: 60px; font-weight: bold; color: #64748b; font-size: 16px; }
.col-char { flex: 1; display: flex; align-items: center; gap: 15px; }
.col-stats { width: 80px; text-align: center; font-weight: bold; font-size: 14px; }
.col-ratio { width: 100px; text-align: center; }

.list-avatar { width: 45px; height: 45px; background: #f1f5f9; border-radius: 50%; border: 2px solid #e2e8f0; display: flex; justify-content: center; overflow: hidden; align-items: flex-end; }
.list-avatar img { max-height: 50px; }
.char-details strong { display: block; font-size: 14px; color: var(--kro-text); }
.char-details small { display: block; font-size: 11px; color: #64748b; }
.guild-text { color: var(--kro-blue-light) !important; font-weight: 600; }

.kills-text { color: #10b981; }
.deaths-text { color: #ef4444; }
.ratio-box { background: rgba(0, 70, 140, 0.08); color: var(--kro-blue); font-weight: bold; padding: 5px 0; border-radius: 4px; font-size: 14px; }

/* =========================================
   NOVO ESTILO - PÁGINA DE REGISTRO
   ========================================= */
.ro-register-wrapper {
    max-width: 680px;
    margin: 30px auto;
    padding: 0 15px;
}

.register-card-v2 {
    background: #ffffff;
    border: 1px solid var(--border-color, #d1d5db);
    border-top: 4px solid var(--kro-blue, #00468c);
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    padding: 35px 30px;
}

.register-header-v2 {
    text-align: center;
    margin-bottom: 25px;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 20px;
}

.register-header-v2 .badge-icon {
    font-size: 32px;
    display: inline-block;
    margin-bottom: 5px;
}

.register-header-v2 h2 {
    font-size: 22px;
    color: var(--kro-blue, #00468c);
    font-weight: 700;
    margin-bottom: 5px;
}

.register-header-v2 p {
    font-size: 13px;
    color: #64748b;
}

.register-form-v2 {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.form-field-group {
    display: flex;
    flex-direction: column;
}

.field-label {
    font-size: 12px;
    font-weight: 700;
    color: #334155;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 5px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.field-icon {
    font-size: 14px;
}

.field-input, 
.field-select {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background-color: #f8fafc;
    color: #1e293b;
    font-size: 13px;
    transition: all 0.2s ease-in-out;
}

.field-input:focus, 
.field-select:focus {
    outline: none;
    border-color: var(--kro-blue-light, #0066cc);
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.12);
}

.field-hint {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 4px;
}

/* Botão Principal de Submissão */
.form-submit-block {
    margin-top: 10px;
    text-align: center;
}

.btn-register-submit {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--kro-blue, #00468c), var(--kro-blue-light, #0066cc));
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(0, 70, 140, 0.25);
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

.btn-register-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 70, 140, 0.35);
    background: linear-gradient(135deg, #003366, #0055b3);
}

.btn-arrow {
    font-size: 16px;
    transition: transform 0.2s;
}

.btn-register-submit:hover .btn-arrow {
    transform: translateX(4px);
}

.login-redirect-text {
    margin-top: 15px;
    font-size: 13px;
    color: #64748b;
}

.login-redirect-text a {
    color: var(--kro-blue, #00468c);
    font-weight: 700;
    text-decoration: underline;
}

/* Alertas de Erro e Sucesso */
.register-alert {
    padding: 14px 18px;
    border-radius: 6px;
    font-size: 13px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-danger-v2 {
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    font-weight: 600;
}

.alert-success-v2 {
    background-color: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
    flex-direction: column;
    text-align: center;
    padding: 25px;
}

.alert-success-v2 .alert-icon {
    font-size: 36px;
    margin-bottom: 10px;
}

.alert-success-v2 h4 {
    font-size: 18px;
    color: #15803d;
    margin-bottom: 5px;
}

.btn-register-action {
    display: inline-block;
    margin-top: 15px;
    padding: 10px 24px;
    border-radius: 6px;
    font-weight: bold;
    font-size: 13px;
    text-decoration: none;
    transition: background 0.2s;
}

.btn-login-now {
    background-color: #16a34a;
    color: #ffffff !important;
}

.btn-login-now:hover {
    background-color: #15803d;
}

/* Responsividade Mobile */
@media (max-width: 600px) {
    .register-card-v2 {
        padding: 20px 15px;
    }

    .form-row-2 {
        grid-template-columns: 1fr;
    }
}

/* ==========================================
   RODAPÉ PADRONIZADO (STYLE KRO / ETHERNALRO)
   ========================================== */
.site-footer {
    background-color: #ffffff;
    border-top: 3px solid var(--kro-blue, #00468c);
    color: #475569;
    font-size: 0.9rem;
    margin-top: 40px;
    padding: 35px 0 20px 0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.footer-container {
    max-width: 1360px;
    margin: 0 auto;
    padding: 0 25px;
}

/* Responsividade para Tablets e Dispositivos Móveis */
@media (max-width: 992px) {
    .kro-layout {
        flex-direction: column; /* Empilha a sidebar abaixo do conteúdo principal em telas menores */
    }

    .kro-sidebar {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .footer-container {
        padding: 0 15px;
    }
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 30px;
    padding-bottom: 25px;
    border-bottom: 1px solid #e2e8f0;
}

.footer-title {
    color: var(--kro-blue, #00468c);
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-left: 3px solid var(--kro-blue, #00468c);
    padding-left: 8px;
}

.footer-text {
    line-height: 1.6;
    color: #64748b;
    font-size: 0.88rem;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 6px;
}

.footer-links a {
    color: #475569;
    text-decoration: none;
    font-size: 0.88rem;
    transition: color 0.2s ease, padding-left 0.2s ease;
    display: inline-block;
}

.footer-links a:hover {
    color: var(--kro-blue, #00468c);
    padding-left: 4px;
    font-weight: 600;
}

.footer-bottom {
    padding-top: 20px;
    text-align: center;
}

.footer-copyright {
    color: #64748b;
    font-size: 0.85rem;
}

.footer-copyright strong {
    color: var(--kro-blue, #00468c);
}

.disclaimer-text {
    color: #94a3b8;
    font-size: 0.78rem !important;
    margin-top: 6px;
    line-height: 1.4;
}

/* Responsividade para telas menores */
@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}