/* Adicionado para impedir que o conteúdo vase das caixas */
*, *::before, *::after {
    box-sizing: border-box;
}

/* Corpo e fontes */
body {
    font-family: 'Poppins', sans-serif;
    color: #333;
    background-color: #f4f4f4;
    background-image: url('img/bg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    min-height: 100vh;
    cursor: url('img/cursor.png') 16 16, auto;
    margin: 0;
}

/* Cabeçalho */
header {
    background-color: rgba(31, 31, 31, 0.7);
    color: #fff;
    padding: 20px 0;
}

header .container {
    width: 90%;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 a {
    text-decoration: none;
    color: #fff;
    font-size: 2rem;
    font-family: 'Poppins', sans-serif;
}

header nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;
    padding: 0;
}

header nav ul li {
    position: relative;
    margin-right: 20px;
}

header nav ul li a {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    color: #fff;
    font-size: 1rem;
    padding: 10px 15px;
    transition: all 0.3s ease;
}

header nav ul li a:hover {
    background-color: #f90;
    color: #333;
    border-radius: 5px;
    transform: translateY(-3px);
}

/* Banner */
.banner {
    text-align: center;
    padding: 100px 0;
    color: #fff;
}

.banner h2 {
    font-size: 3rem;
    margin-bottom: 20px;
}

.banner p {
    font-size: 1.5rem;
    margin-bottom: 30px;
}

.banner .btn {
    background-color: #f90;
    color: #fff;
    padding: 15px 30px;
    text-decoration: none;
    font-size: 1.2rem;
    border-radius: 5px;
}

/* Seções e Caixas Flexíveis (AGORA TOTALMENTE ADAPTÁVEL) */
.features,
.voting {
    padding: 50px 0;
    background-color: #fff;
}

.custom-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap; 
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-box {
    flex: 1 1 300px; /* Permite crescer e encolher sem quebrar */
    max-width: 100%;
    padding: 20px;
    border: 2px solid #ccc;
    border-radius: 10px;
    background-color: #f9f9f9;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
}

@media (min-width: 768px) {
    .feature-box {
        max-width: calc(50% - 10px); /* Garante que nunca ultrapasse a metade da tela no PC */
    }
}

.features h2,
.voting h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 40px;
}

.feature-item {
    margin-bottom: 20px;
}

.feature-item h3 {
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.feature-item p {
    font-size: 1.2rem;
}

/* Vídeos do Index (Presos firmemente dentro da caixa) */
.video-grid {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden; /* Corta qualquer excesso que tente vazar */
}

.video-grid video {
    width: 100%;
    max-width: 100%; 
    height: auto;
    border-radius: 8px;
    display: block;
}

/* Botões e Ícones */
.btn-blue {
    background-color: #007bff;
    color: #fff;
    padding: 8px 15px;
    text-decoration: none;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.btn-blue:hover {
    background-color: #0056b3;
    transform: scale(1.05);
}

/* Rodapé */
footer {
    background-color: rgba(31, 31, 31, 0.7);
    padding: 20px 0;
    text-align: center;
    color: #fff !important;
}

footer ul li a {
    color: #fff !important;
    text-decoration: none;
    font-size: 1rem;
}

/* Logo Banner */
.logo-banner {
    width: 30%;
    height: auto;
    vertical-align: middle;
    margin-right: 10px;
}

/* Menu Hambúrguer e Submenus */
.hamburger {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}

.hamburger .bar {
    width: 25px;
    height: 3px;
    background-color: #fff;
    transition: all 0.3s ease-in-out;
}

.has-submenu {
    position: relative;
}

.submenu {
    display: none;
    position: absolute;
    background-color: rgba(31, 31, 31, 0.9);
    list-style: none;
    padding: 0;
    margin: 0;
    top: 100%;
    left: 0;
    z-index: 10;
}

.submenu li {
    margin: 0;
}

.submenu li a {
    display: block;
    padding: 10px 15px;
    text-decoration: none;
    color: white;
}

.submenu li a:hover {
    background-color: #f90;
}

.has-submenu:hover .submenu {
    display: block;
}

ul.submenu li a .custom-icon-text {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

ul.submenu li a .custom-icon-text .custom-icon {
    width: 25px;
    height: 25px;
    flex-shrink: 0;
}

/* =========================================
   MEDIA QUERY - CELULAR (Até 768px)
   ========================================= */
@media (max-width: 768px) {
    header .container {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: center;
    }

    .hamburger {
        display: flex;
    }

    #nav-menu {
        display: none;
        width: 100%;
        background-color: #1a1a1a;
        margin-top: 15px;
        padding: 15px 0;
        border-radius: 8px;
    }

    #nav-menu.active {
        display: block;
    }

    header nav ul {
        flex-direction: column;
    }

    header nav ul li {
        margin-bottom: 15px;
        margin-right: 0;
        text-align: center;
    }

    .hamburger.active .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .hamburger.active .bar:nth-child(2) { opacity: 0; }
    .hamburger.active .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

    .logo-banner {
        width: 80%;
        margin-right: 0;
    }

    .banner h2 { font-size: 2rem; }
    .banner p { font-size: 1rem; }
    .banner .btn { padding: 10px 20px; }
    
    .submenu {
        position: static;
        background-color: transparent;
    }
}

/* ---------------- Outros Estilos (Formulários, DBs, Votos) ---------------- */
form label { display: block; margin-top: 10px; }
form input, form select, form button { width: 100%; padding: 10px; margin-top: 5px; margin-bottom: 5px; border: 1px solid #ccc; border-radius: 5px; }
form button { background-color: #4CAF50; color: white; border: none; cursor: pointer; }
form button:hover { background-color: #45a049; }

#R_SENHA { padding: 20px; background-color: #f9f9f9; border-radius: 8px; max-width: 500px; margin: 0 auto; box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1); color: #fff; }
#R_SENHA h1 { text-align: center; color: #FFD700; margin-bottom: 20px; }
#R_SENHA .container { background-color: #f9f9f9; padding: 20px; border-radius: 8px; border: 1px solid #ddd; }
#R_SENHA form input[type="text"], #R_SENHA form input[type="email"] { width: 80%; padding: 8px; margin-bottom: 15px; border: 1px solid #ccc; border-radius: 4px; font-size: 14px; box-sizing: border-box; }
#R_SENHA form label { display: block; margin-bottom: 5px; font-size: 14px; color: #333; }

.vote-buttons { display: flex; gap: 20px; justify-content: center; }
.vote-option { display: flex; flex-direction: column; align-items: center; }
.vote-image-button { background: none; border: none; padding: 0; cursor: pointer; }
.vote-image-button img { width: 500px; height: auto; transition: transform 0.2s; max-width: 100%; }
.vote-image-button img:disabled { opacity: 0.5; cursor: not-allowed; }
.vote-image-button img:hover:not([disabled]) { transform: scale(1.05); }
.vote-text { margin-top: 8px; font-size: 14px; text-align: center; }
.time-remaining { font-size: 24px; color: white !important; font-weight: bold; text-align: center; margin-top: 5px; }

.custom-button-row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.custom-button-row button { padding: 10px 20px; border: none; border-radius: 5px; color: white; font-size: 16px; cursor: pointer; transition: opacity 0.3s ease; }
.custom-btn-vote { background-color: #4CAF50; }
.custom-btn-register { background-color: #007BFF; }
.custom-btn-new-password { background-color: #FF5733; }
.custom-btn-recover-password { background-color: #FFC107; color: black; }
.custom-button-row button:hover { opacity: 0.8; }

.message { text-align: center; font-size: 18px; margin-top: 50px; color: black; }

/* DB Pages Estilos Gerais */
.page-item table, .mobdb .monster-table, .rank-table { width: 100%; border-collapse: collapse; background-color: #fff; box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); border-radius: 8px; overflow: hidden; margin-top: 20px;}
.page-item table th, .page-item table td, .mobdb .monster-table th, .mobdb .monster-table td, .rank-table th, .rank-table td { padding: 12px 15px; border-bottom: 1px solid #ddd; text-align: left; }
.page-item table th, .mobdb .monster-table th, .rank-table th { background-color: #0056b3; color: white; font-weight: bold; text-align: center; }
.page-item table tr:hover, .rank-table tr:hover { background-color: #f1f1f1; }

.page-item .search-bar { margin: 20px 0; text-align: center; }
.page-item .search-bar input[type="text"] { padding: 10px; width: 70%; font-size: 16px; border: 1px solid #ddd; border-radius: 5px; }
.page-item .search-bar button { padding: 8px 16px; font-size: 14px; background-color: #1e3d58; color: white; border: 1px solid #ddd; border-radius: 5px; cursor: pointer; transition: background-color 0.3s; margin-left: 10px; }
.page-item .search-bar button:hover { background-color: #555; }

.info-button { background-color: #007bff; color: white; padding: 5px 10px; font-size: 12px; border: none; border-radius: 5px; text-decoration: none; font-weight: bold; transition: background-color 0.3s ease; display: inline-block; margin-top: 10px; }
.info-button:hover { background-color: #0056b3; }

.containercard, .containerMOB, .containerITEM { max-width: 1200px; margin: 0 auto; padding: 20px; background: white; border-radius: 10px; box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); text-align: center;}

/* Ajuste de imagens nas tabelas */
.drop-image, .monster-image, .item-image, .search-item-image { object-fit: contain; }
.map-info td img { max-width: 80px; max-height: 80px; }

/* =========================================
   Página de Downloads (responsive-links) - CORRIGIDO
   ========================================= */
.responsive-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap; 
    margin-top: 15px;
    width: 100%; /* Impede que o container force a tela para o lado */
}

.responsive-links a.image-link {
    display: block;
    max-width: 100%; /* Impede que o botão seja maior que a tela do celular */
}

.responsive-links img {
    width: 100%; /* Faz a imagem encolher automaticamente em telas pequenas */
    max-width: 100px; /* Define um tamanho máximo bacana para o PC */
    height: auto;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.responsive-links img:hover {
    transform: scale(1.05);
}