* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #f4f6f8;
    color: #1d2a35;
}

header {
    background: linear-gradient(135deg, #0f4c81, #1e3a5f);
    color: #fff;
    padding: 18px 24px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.topo {
    max-width: 1180px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.logo {
    font-size: 24px;
    font-weight: bold;
}

.logo span {
    color: #f29c2b;
}

nav {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

nav a {
    color: #fff;
    text-decoration: none;
    font-size: 15px;
}

nav a:hover {
    text-decoration: underline;
}

.hero {
    max-width: 1180px;
    margin: 28px auto 0;
    padding: 0 20px;
}

.hero-box {
    background: linear-gradient(135deg, #ffffff, #f8fbff);
    border-radius: 20px;
    padding: 36px 28px;
    box-shadow: 0 10px 30px rgba(19, 47, 76, 0.08);
    border: 1px solid #e7edf4;
}

.badge {
    display: inline-block;
    background: #f3e8ff;
    color: #7b1fa2;
    font-weight: bold;
    font-size: 13px;
    padding: 8px 12px;
    border-radius: 999px;
    margin-bottom: 14px;
}

.hero h1 {
    margin: 0 0 10px;
    font-size: 36px;
    color: #1e3a5f;
}

.hero p {
    margin: 0;
    font-size: 18px;
    color: #495867;
    line-height: 1.6;
    max-width: 760px;
}

/* BASE */
.container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    max-width: 1180px;
    margin: 26px auto 50px;
    padding: 0 20px;
}

.container-modalidades {
    display: grid;
    max-width: 1180px;
    margin: 26px auto 50px;
    padding: 0 20px;
}

/* APENAS PARA PÁGINAS DE GERADOR */
.layout-gerador {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 24px;
}

.card {
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(19, 47, 76, 0.08);
    border: 1px solid #e7edf4;
    padding: 24px;
}

.card h2 {
    margin-top: 0;
    font-size: 24px;
    color: #1e3a5f;
}

.sub {
    color: #6a7784;
    font-size: 15px;
    line-height: 1.5;
    margin-bottom: 24px;
}

.campo {
    margin-bottom: 18px;
}

.campo label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #23384d;
}

.campo input,
.campo select,
textarea {
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    border: 1px solid #ccd6e0;
    font-size: 16px;
    background: #fff;
    outline: none;
}

.campo input:focus,
.campo select:focus,
textarea:focus {
    border-color: #7b1fa2;
    box-shadow: 0 0 0 3px rgba(123, 31, 162, 0.08);
}

.btn-gerar,
.btn-sec,
.btn-light {
    border-radius: 12px;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
}

.btn-gerar {
    width: 100%;
    border: 0;
    background: linear-gradient(135deg, #f29c2b, #eb7f1d);
    color: #fff;
    font-size: 17px;
    padding: 15px;
}

.btn-sec {
    display: inline-block;
    padding: 12px 18px;
    background: #1e3a5f;
    color: #fff;
    border: 0;
}

.btn-light {
    display: inline-block;
    padding: 12px 18px;
    background: #eef3f8;
    color: #1e3a5f;
    border: 1px solid #d5e0ea;
}
.grid-modalidades{
    display:grid;
    grid-template-columns:repeat(auto-fit, minmax(240px,1fr));
    gap:18px;
    margin-top:22px;
}
.info-box {
    margin-top: 18px;
    padding: 14px;
    border-radius: 12px;
    background: #f7f9fc;
    border: 1px solid #e5edf5;
    color: #556371;
    font-size: 14px;
    line-height: 1.5;
}

.erro {
    background: #fff2f2;
    color: #a11d1d;
    border: 1px solid #f3c4c4;
    padding: 14px 16px;
    border-radius: 12px;
    margin-bottom: 18px;
    font-weight: bold;
}

.resultado-topo {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.resultado-topo h3 {
    margin: 0;
    font-size: 24px;
    color: #1e3a5f;
}

.resultado-topo small,
.lista-topo small {
    color: #697887;
    font-size: 14px;
}

.lista-wrapper {
    background: #f9fbfd;
    border: 1px solid #e4ebf3;
    border-radius: 16px;
    padding: 18px;
}

.lista-topo {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.lista-topo h4 {
    margin: 0;
    font-size: 18px;
    color: #1e3a5f;
}

#textoJogos {
    min-height: 170px;
    resize: vertical;
    font-size: 14px;
    line-height: 1.25;
    color: #24384b;
    font-family: Consolas, Monaco, monospace;
}

.acoes {
    margin-top: 18px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.jogos-scroll {
    margin-top: 22px;
    max-height: 430px;
    overflow-y: auto;
    padding-right: 6px;
}

.jogos-scroll::-webkit-scrollbar {
    width: 10px;
}

.jogos-scroll::-webkit-scrollbar-track {
    background: #edf2f7;
    border-radius: 999px;
}

.jogos-scroll::-webkit-scrollbar-thumb {
    background: #c1cfdd;
    border-radius: 999px;
}

.jogos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 14px;
}

.jogo-card {
    background: linear-gradient(180deg, #ffffff, #fafcff);
    border: 1px solid #e7edf4;
    border-radius: 16px;
    padding: 14px;
    width: 100%;
}

.jogo-titulo {
    font-weight: bold;
    color: #7b1fa2;
    margin-bottom: 8px;
    font-size: 14px;
}

.dezenas {
    display: grid;
    grid-template-columns: repeat(5, 34px);
    gap: 6px;
    justify-content: start;
}

.dezena {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: #7b1fa2;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 13px;
    box-shadow: 0 4px 10px rgba(123,31,162,0.16);
}

.vazio {
    text-align: center;
    color: #6f7e8d;
    padding: 50px 20px;
    border: 2px dashed #d6e0ea;
    border-radius: 18px;
    background: #fbfdff;
}

/* HOME / LISTAGENS */
.cards-home {
    max-width: 1180px;
    margin: 26px auto 50px;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
}

.home-card {
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(19, 47, 76, 0.08);
    border: 1px solid #e7edf4;
    padding: 22px;
}

.home-card h3 {
    margin-top: 0;
    color: #1e3a5f;
}

.home-card p {
    color: #627180;
    line-height: 1.6;
    min-height: 50px;
}

.home-card a {
    display: inline-block;
    margin-top: 10px;
    padding: 11px 16px;
    border-radius: 12px;
    background: #1e3a5f;
    color: #fff;
    text-decoration: none;
    font-weight: bold;
}

footer {
    text-align: center;
    color: #6f7e8d;
    padding: 25px 15px 40px;
    font-size: 14px;
}

.modal-robo {
    position: fixed;
    inset: 0;
    background: rgba(10, 22, 37, 0.72);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 9999;
}

.modal-robo.ativo {
    display: flex;
}

.modal-box {
    width: 100%;
    max-width: 420px;
    background: #ffffff;
    border-radius: 22px;
    padding: 28px 24px;
    text-align: center;
    box-shadow: 0 25px 60px rgba(0,0,0,0.22);
}

.robo {
    width: 92px;
    height: 92px;
    margin: 0 auto 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1e3a5f, #0f4c81);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 42px;
    animation: pulse 1s infinite ease-in-out;
}

.modal-box h4 {
    margin: 0 0 10px;
    font-size: 24px;
    color: #1e3a5f;
}

.modal-box p {
    margin: 0;
    font-size: 17px;
    color: #506172;
    line-height: 1.5;
}

.dots {
    margin-top: 16px;
    display: flex;
    justify-content: center;
    gap: 8px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #f29c2b;
    animation: bounce 1.2s infinite ease-in-out;
}

.dot:nth-child(2) {
    animation-delay: .15s;
}

.dot:nth-child(3) {
    animation-delay: .3s;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.08); }
    100% { transform: scale(1); }
}

@keyframes bounce {
    0%, 80%, 100% { transform: translateY(0); opacity: .55; }
    40% { transform: translateY(-8px); opacity: 1; }
}

@media (max-width: 900px) {
    .container{
        display: flow-root !important;
    }
    .layout-gerador {
        grid-template-columns: 1fr;
    }

    .hero h1 {
        font-size: 30px;
    }

    .jogos-scroll {
        max-height: 360px;
    }
}

@media (max-width: 640px) {
    .hero-box {
        padding: 26px 20px;
    }

    .card {
        padding: 18px;
    }

    .dezenas {
        grid-template-columns: repeat(5, 32px);
    }

    .dezena {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }

    .acoes {
        flex-direction: column;
    }

    .btn-sec,
    .btn-light {
        width: 100%;
        text-align: center;
    }
}