body {
    background: #f7fafd;
    margin: 0;
    font-family: 'Segoe UI', Arial, sans-serif;
}

.ranking-wrapper {
    width: 540px;
    margin: 40px auto;
    background: #fff;
    border-radius: 20px;
    padding: 32px 24px;
    box-shadow: 0 2px 12px #ddeaf9;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 150px;
}

.img-topo-quiz {
    width: 100%;
    max-width: 340px;
    min-width: 100px;
    height: auto;
    display: block;
    margin: 0 auto 18px auto;
    border-radius: 12px;
    object-fit: contain;
    /* Espaçamento lateral igual ao da tabela */
    box-sizing: border-box;
    padding-left: 0; 
    padding-right: 0; 
}

.table-ranking {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    border-radius: 12px;
    border-collapse: collapse;
    background: transparent;
    /* Garante espaçamento igual */
    box-sizing: border-box;
}

.table-ranking th {
    background: #e3eaf2 !important;
    color: #222;
    font-weight: 600;
    border-bottom: 2px solid #ddeaf9 !important;
    text-align: center;
    padding: 13px 4px;
    vertical-align: middle;
}
.table-ranking td {
    background: #e6fbe6;
    color: #222;
    text-align: center;
    padding: 14px 4px;
    border-bottom: 1px solid #ecf5ff;
    vertical-align: middle;
    word-break: break-word;
}
.table-ranking tr:last-child td { border-bottom: none; }

@media (max-width:700px) {
    .ranking-wrapper {width:97vw; padding: 8px 1vw;}
    .img-topo-quiz {max-width: 99vw;}
    .table-ranking { font-size: .96em; width:99vw;}
}

/* Formatação extra para index.php */
.header {
    background: #276cc2;
    color: #fff;
    font-size: 2.2em;
    font-weight: bold;
    padding: 28px 0 18px 0;
    text-align: center;
    border-radius: 0 0 20px 20px;
    margin-bottom: 12px;
    box-shadow: 0 2px 10px #ddeaf9;
}
.menu-horizontal {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 18px;
    gap: 16px;
    flex-wrap: wrap;
}
.menu-link {
    text-decoration: none;
    color: #276cc2;
    font-weight: 500;
    font-size: 1.15em;
    padding: 10px 18px;
    border-radius: 9px;
    background: #f9f9f9;
    transition: 0.1s;
}
.menu-link:hover {
    background: #e3eaf2;
    color: #18589c;
}
.menu-item-horizontal {
    position: relative;
    display: inline-block;
    margin-right: 10px;
}
.menu-item-horizontal > a {
    color: #276cc2;
    font-weight: 500;
    font-size: 1.15em;
    padding: 10px 18px;
    border-radius: 9px;
    background: #f9f9f9;
    text-decoration: none;
    cursor: pointer;
    transition: 0.13s;
}
.menu-item-horizontal > a:hover {
    background: #e3eaf2;
}
.menu-item-horizontal.active > a {
    background: #e3eaf2;
}
.submenu-horizontal {
    display: none;
    position: absolute;
    left: 0; top: 110%;
    min-width: 135px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(39, 108, 194, 0.12);
    z-index: 10;
    padding: 10px 0 9px 0;
}
.menu-item-horizontal.active .submenu-horizontal {
    display: block;
}
.submenu-horizontal a {
    display: block;
    color: #276cc2;
    padding: 7px 22px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 400;
}
.submenu-horizontal a:hover {
    background: #e3eaf2;
    color: #18589c;
}
.conteudos {
    max-width: 650px;
    margin: 32px auto 20px auto;
    background: #fff;
    padding: 36px 32px 22px 32px;
    box-shadow: 0 2px 15px #ddeaf9;
    border-radius: 22px;
}
.conteudos h2 {
    font-size: 1.55em;
    margin-top: 0;
    margin-bottom: 12px;
    color: #276cc2;
}
.conteudos p {
    font-size: 1.13em;
    color: #222;
    margin-bottom:22px;
    line-height:1.55;
}
@media (max-width:700px) {
    .conteudos {max-width: 99vw; padding: 16px 2vw;}
    .header {font-size: 1.35em; padding: 19px 0 11px 0;}
    .menu-horizontal, .menu-link, .menu-item-horizontal > a { padding: 9px 8px; font-size:1em; }
}
