body, html { margin: 0; padding: 0; }

/* === CÓDIGO DO BODY CORRIGIDO ABAIXO === */
body {
    background-image: url('../imgs/bg-top.jpg');
    background-repeat: no-repeat;
    background-position: center -150px;
    background-attachment: fixed; /* Esta linha fixa a imagem */
    background-color: #020b13; /* Cor de fundo caso a imagem não carregue */
    font-family: Arial, sans-serif;
    font-size: 13px;
    color: #333;
}
/* === FIM DA CORREÇÃO === */

a { text-decoration: none; cursor: pointer; }

.background-char-left, .background-char-right {
    position: fixed;
    width: 50%;
    height: 100%;
    top: 0;
    z-index: -1;
    background-repeat: no-repeat;
}
.background-char-left { left: 0; background-image: url('../imgs/char-left.png'); background-position: left bottom; }
.background-char-right { right: 0; background-image: url('../imgs/char-right.png'); background-position: right bottom; }

.all-wrapper {
    width: 960px;
    margin: 0 auto;
    padding-top: 50px;
}

/* Logo Principal */
.main-logo-container {
    text-align: center;
    margin-bottom: 25px;
}
.main-logo-container img {
    max-width: 450px;
    height: auto;
}

/* Barra de Navegação */
.header { text-align: center; margin-bottom: 0px; }
nav.main-nav {
    display: block;
    padding: 10px 0;
    margin: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.4);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0));
    border-radius: 0;
}
nav.main-nav a {
    display: inline-block;
    padding: 10px 15px;
    color: #ffffff;
    font-weight: bold;
    text-transform: uppercase;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
    background-color: transparent;
    border: none;
    margin: 0 5px;
}
nav.main-nav a:hover { 
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

/* Painel Branco Principal */
.content-wrapper {
    display: flex;
    justify-content: space-between;
    background-color: #fff;
    padding: 20px;
    border-radius: 6px;
}
.sidebar-left, .sidebar-right { width: 220px; flex-shrink: 0; }
.main-content { width: 450px; flex-shrink: 0; }
.gallery-content, .olympiad-content, .vote-content { padding: 15px; }


/* Títulos dos Módulos */
.sidebar-title, .page-header {
    color: #333;
    font-size: 14px;
    font-weight: bold;
    text-transform: uppercase;
    border-bottom: 2px solid #31708f;
    padding: 0 15px 8px 15px;
    margin: 15px 0;
}
.sidebar-title:first-child {
    margin-top: 0;
}

/* Divisor Azul */
.sidebar-separator {
    height: 2px;
    background-color: #31708f;
    margin: 25px 0;
}

/* Botões */
a.sidebar-button {
    display: block;
    background-color: #3c3c3c;
    color: #fff !important;
    padding: 10px;
    margin-bottom: 6px;
    text-align: center;
    border-radius: 4px;
    font-size: 13px;
    font-weight: bold;
    text-decoration: none;
    border-top: 1px solid #666;
    border-left: 1px solid #2b2b2b;
    border-right: 1px solid #2b2b2b;
    border-bottom: 1px solid #2b2b2b;
    transition: background-color 0.2s;
}
a.sidebar-button:hover {
    background-color: #4d4d4d;
}

/* Status do Servidor */
.server-status {
    background-color: #f5f5f5;
    border: 1px solid #e3e3e3;
    border-radius: 4px;
    padding: 10px 15px;
}
.server-status .status-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px dotted #ccc;
}
.server-status .status-row:last-child {
    border-bottom: none;
}
.server-status .status-row span {
    font-family: 'Trebuchet MS', sans-serif;
    font-size: 13px;
    font-weight: bold;
    text-transform: uppercase;
    color: #555;
}
.server-status .status-online { color: #3c763d; }
.server-status .status-offline { color: #a94442; }

/* Rodapé */
.footer {
    text-align: center;
    color: #fff;
    padding: 25px 0;
    font-weight: bold;
    text-shadow: 1px 1px 2px #000;
}

/* ===== ESTILO PARA A GALERIA DE IMAGENS ===== */
.gallery-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-bottom: 10px;
}
.gallery-grid a {
    display: block;
    line-height: 0;
}
.gallery-grid img {
    width: 100%;
    height: auto;
    border: 1px solid #ddd;
    border-radius: 3px;
    transition: transform 0.2s;
}
.gallery-grid img:hover {
    transform: scale(1.05);
}

/* ===== ESTILO PARA O PAINEL DE LOGIN ===== */
.user-panel-content {
    background-color: #f0f0f0;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 15px;
}
.login-form {
    padding: 0;
    margin: 0;
}
.login-input-group {
    position: relative;
    margin-bottom: 6px;
}
.login-input-group input {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #ccc;
    padding: 9px 10px 9px 32px; /* Espaço para o ícone à esquerda */
    border-radius: 3px;
    background-color: #fff;
}
.login-input-group .login-button {
    position: absolute;
    right: 3px;
    top: 3px;
    bottom: 3px;
    border: none;
    background: #555;
    color: white;
    font-weight: bold;
    border-radius: 3px;
    cursor: pointer;
    padding: 0 15px;
}
.login-input-group .login-button:hover {
    background: #3c763d;
}
.login-links {
    text-align: center;
    padding-top: 8px;
}
.login-links a {
    display: block;
    font-size: 11px;
    color: #666;
    margin-bottom: 5px;
}
.user-panel-logged p {
    text-align: center;
    font-weight: bold;
    margin-bottom: 10px;
    padding: 10px;
}
.login-icon {
    position: absolute;
    top: 50%;
    left: 10px;
    width: 16px;
    height: 16px;
    transform: translateY(-50%);
    background-image: url('../imgs/login-icons.png');
    background-repeat: no-repeat;
}
.login-icon.user-icon { background-position: 0 0; }
.login-icon.pass-icon { background-position: 0 -16px; }

/* ===== NOVO ESTILO PARA FORMULÁRIO DE CADASTRO ===== */
.main-content .form-horizontal-custom {
    padding: 10px;
}
.form-horizontal-custom .form-group {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}
.form-horizontal-custom label {
    flex: 0 0 140px;
    text-align: right;
    padding-right: 15px;
    font-weight: bold;
    color: #444;
    font-size: 13px;
}
.form-horizontal-custom .form-control {
    flex: 1;
    height: auto;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s, box-shadow 0.3s;
}
.form-horizontal-custom .form-control:focus {
    border-color: #31708f;
    box-shadow: 0 0 5px rgba(49, 112, 143, 0.5);
    outline: none;
}
.form-horizontal-custom .form-group-checkbox {
    padding-left: 155px;
    margin: 20px 0;
}
.form-horizontal-custom .form-group-submit {
    padding-top: 15px;
    margin-top: 15px;
    text-align: right;
    border-top: 1px solid #eee;
}
.text-danger-custom {
    padding-left: 155px;
    margin-top: -10px;
    margin-bottom: 10px;
    font-size: 11px;
    height: 15px;
    color: #a94442;
}
.form-horizontal-custom .btn-primario {
    font-weight: bold;
    font-size: 14px;
    color: #fff;
    background: linear-gradient(to bottom, #4a4a4a, #2a2a2a);
    border: 1px solid #222;
    padding: 10px 30px;
    border-radius: 4px;
    cursor: pointer;
}
.form-horizontal-custom .btn-primario:hover {
    background: linear-gradient(to bottom, #5cb85c, #3c763d);
}
.form-horizontal-custom .btn-primario:disabled {
    background: #ccc;
    cursor: not-allowed;
    border-color: #bbb;
}
.download-section-title {
  border-bottom: 1px solid #eee;
  padding-bottom: 10px;
  margin-bottom: 15px;
  margin-top: 25px;
  font-size: 18px;
}
.download-section-title:first-of-type {
    margin-top: 0;
}
.download-item p {
  margin-bottom: 15px;
  color: #666;
}
.download-separator {
    margin: 30px 0;
    border: 0;
    border-top: 1px solid #eee;
}
.info-section-title {
    font-size: 18px;
    color: #333;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-top: 30px;
    margin-bottom: 15px;
}

.table-info {
    width: 100%;
    margin-bottom: 20px;
}

.table-info td {
    padding: 8px 0;
    border-bottom: 1px dotted #ccc;
}

.table-info td:last-child {
    text-align: right;
    font-weight: bold;
    color: #31708f;
}

.features-list {
    list-style-type: square;
    color: #555;
    padding-left: 20px;
}

.features-list li {
    margin-bottom: 8px;
}

.play-now-container {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

/* Ajuste para o botão não ocupar a largura toda */
.play-now-container .sidebar-button {
    display: inline-block;
    padding-left: 30px;
    padding-right: 30px;
}
/* Estilo para a Página de Regras */
.rules-content h3 {
    font-size: 18px;
    color: #333;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-top: 30px;
    margin-bottom: 15px;
}

.rules-content p, .rules-content ul {
    color: #666;
    line-height: 1.6;
}

.rules-content ul {
    list-style-type: square;
    padding-left: 20px;
}
.server-status .status-online { color: #3c763d !important; }
.server-status .status-offline { color: #a94442 !important; }
.server-status .status-count { color: #5bc0de !important; }