* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg-main: #07111f;
    --bg-panel: #0d1b2a;
    --bg-panel-2: #10243a;
    --line: rgba(120, 180, 255, 0.18);
    --text: #eaf4ff;
    --text-soft: #aac4e6;
    --accent: #4db8ff;
    --accent-2: #7ed7ff;
    --gold: #d8f3ff;
    --shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

body {
    font-family: Arial, sans-serif;
    background:
        radial-gradient(circle at top, rgba(50, 130, 255, 0.16), transparent 35%),
        linear-gradient(180deg, #030914 0%, #07111f 45%, #0a1627 100%);
    color: var(--text);
    line-height: 1.5;
    min-height: 100vh;
}

a {
    color: inherit;
    text-decoration: none;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(10px);
    background: rgba(4, 10, 20, 0.82);
    border-bottom: 1px solid var(--line);
}

.topbar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 78px;
    gap: 20px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    font-weight: bold;
    font-size: 20px;
    letter-spacing: 0.5px;
}

.brand img {
    height: 82px;
    width: auto;
    display: block;
}

.nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.nav a {
    padding: 10px 14px;
    border-radius: 10px;
    color: var(--text-soft);
    transition: 0.2s ease;

    font-family: "Trebuchet MS", Arial, sans-serif;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

.nav a:hover {
    background: rgba(90, 170, 255, 0.12);
    color: #ffffff;
    text-shadow: 0 0 8px rgba(126, 215, 255, 0.65);
}
.menu-toggle {
    display: none;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(120, 180, 255, 0.16);
    color: #eaf4ff;
    font-size: 22px;
    line-height: 1;
    padding: 8px 12px;
    border-radius: 10px;
    cursor: pointer;
}


.hero {
    padding: 72px 0 50px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 32px;
    align-items: center;
}

.panel {
    background: linear-gradient(180deg, rgba(17, 35, 57, 0.92), rgba(10, 24, 41, 0.96));
    border: 1px solid var(--line);
    border-radius: 22px;
    box-shadow: var(--shadow);
}

.hero-panel {
    padding: 38px;
}

.hero-kicker {
    display: inline-block;
    margin-bottom: 18px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(80, 160, 255, 0.08);
    border: 1px solid rgba(100, 180, 255, 0.16);
    color: var(--accent-2);
    font-size: 13px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.hero h1 {
    font-size: 54px;
    line-height: 1.03;
    margin-bottom: 18px;
    letter-spacing: -1px;
}

.hero h1 span {
    color: var(--accent-2);
}

.hero p {
    color: var(--text-soft);
    font-size: 19px;
    max-width: 760px;
    margin-bottom: 24px;
}

.btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 18px;
}

.btn {
    display: inline-block;
    padding: 13px 20px;
    border-radius: 12px;
    font-weight: bold;
    transition: 0.2s ease;
    border: 1px solid transparent;
}

.btn-primary {
    background: linear-gradient(135deg, #42a5ff, #1575ff);
    color: white;
    box-shadow: 0 8px 22px rgba(30, 120, 255, 0.28);
}

.btn-primary:hover {
    transform: translateY(-2px);
    filter: brightness(1.08);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.03);
    border-color: var(--line);
    color: var(--text);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.06);
}

.hero-logo-box {
    padding: 28px;
    text-align: center;
}

.hero-logo-box img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto 24px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.stat-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(120, 180, 255, 0.10);
    border-radius: 16px;
    padding: 18px;
    text-align: center;
}

.stat-card strong {
    display: block;
    font-size: 28px;
    color: var(--accent-2);
    margin-bottom: 6px;
}
.stat-card span {
    color: var(--text-soft);
}

.stat-button span {
    color: var(--accent-2);
}
.section {
    padding: 34px 0 70px;
}

.section-title {
    text-align: center;
    margin-bottom: 34px;
}

.section-title h2 {
    font-size: 36px;
    margin-bottom: 10px;
}

.section-title p {
    color: var(--text-soft);
    font-size: 18px;
    max-width: 820px;
    margin: 0 auto;
}

.cards-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.card {
    padding: 28px;
}

.card h3 {
    color: var(--accent-2);
    font-size: 22px;
    margin-bottom: 12px;
}

.card p,
.card li {
    color: var(--text-soft);
    font-size: 15px;
}

.card ul {
    margin-top: 12px;
    padding-left: 18px;
}

.cards-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 22px;
}

.cta-box {
    padding: 40px 28px;
    text-align: center;
}

.cta-box h2 {
    font-size: 36px;
    margin-bottom: 12px;
}

.cta-box p {
    color: var(--text-soft);
    font-size: 18px;
    max-width: 760px;
    margin: 0 auto 22px;
}

.page-shell {
    padding: 34px 0 60px;
}

.page-panel {
    padding: 26px;
}

.page-title {
    text-align: center;
    margin-bottom: 10px;
    font-size: 38px;
}

.page-subtitle {
    text-align: center;
    color: var(--text-soft);
    margin-bottom: 28px;
}

.form-box,
.form-filtro {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-bottom: 24px;
}

.form-box input,
.form-filtro input,
.form-filtro select,
.form-box select {
    min-width: 80px;
    padding: 11px 12px;
    border-radius: 10px;
    border: 1px solid rgba(120, 180, 255, 0.16);
    background: #081321;
    color: white;
    font-size: 15px;
    text-align: center;
}

.form-filtro label {
    display: flex;
    align-items: center;
    font-weight: bold;
    color: var(--text);
}

.form-box button,
.form-filtro button {
    padding: 11px 18px;
    border-radius: 10px;
    border: none;
    background: linear-gradient(135deg, #42a5ff, #1575ff);
    color: white;
    font-weight: bold;
    cursor: pointer;
}

.form-box button:hover,
.form-filtro button:hover {
    filter: brightness(1.08);
}

.info,
.messaggio {
    background: rgba(77, 184, 255, 0.08);
    border: 1px solid rgba(77, 184, 255, 0.18);
    color: #dff4ff;
    padding: 14px;
    border-radius: 12px;
    margin-bottom: 18px;
    text-align: center;
    font-weight: bold;
}

.errore {
    background: rgba(255, 80, 80, 0.12);
    border: 1px solid rgba(255, 100, 100, 0.20);
    color: #ffd9d9;
    padding: 14px;
    border-radius: 12px;
    margin-bottom: 18px;
    text-align: center;
    font-weight: bold;
}

.grid-risultati {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 24px 0;
}

.box {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(120, 180, 255, 0.10);
    border-radius: 18px;
    padding: 18px;
}

.box h3 {
    text-align: center;
    margin-bottom: 12px;
    color: var(--accent-2);
}

.listbox-web {
    min-height: 180px;
    max-height: 280px;
    overflow-y: auto;
    background: #081321;
    border: 1px solid rgba(120, 180, 255, 0.16);
    border-radius: 12px;
    padding: 10px;
    font-family: Consolas, monospace;
}

.listbox-web div {
    padding: 8px 6px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    color: var(--text);
}

.listbox-web div:last-child {
    border-bottom: none;
}

table,
.mini-table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    border: 1px solid rgba(120, 180, 255, 0.12);
    padding: 10px;
    text-align: center;
    font-size: 14px;
}

th {
    background: #10243a;
    color: #eaf4ff;
}

tr:nth-child(even) {
    background: rgba(255,255,255,0.02);
}

tr:hover {
    background: rgba(77, 184, 255, 0.06);
}

footer {
    text-align: center;
    padding: 30px 20px 42px;
    color: var(--text-soft);
    font-size: 14px;
}

@media (max-width: 1080px) {
    .hero-grid,
    .cards-3,
    .cards-2,
    .grid-risultati {
        grid-template-columns: 1fr;
    }

    .hero h1 {
        font-size: 42px;
    }
}

@media (max-width: 700px) {
    .topbar {
        padding: 0;
    }

    .topbar-inner {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        min-height: 56px;
        padding: 8px 0;
        gap: 10px;
    }

    .brand {
        gap: 8px;
        font-size: 15px;
    }

    .brand img {
        height: 46px;
        width: auto;
    }

    .menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .nav {
        display: none;
        position: absolute;
        top: 100%;
        right: 12px;
        left: 12px;
        flex-direction: column;
        gap: 6px;
        padding: 12px;
        background: rgba(4, 10, 20, 0.97);
        border: 1px solid rgba(120, 180, 255, 0.18);
        border-radius: 14px;
        box-shadow: 0 12px 30px rgba(0,0,0,0.35);
        z-index: 40;
    }

    body.menu-open .nav {
        display: flex;
    }

    .nav a {
        display: block;
        width: 100%;
        text-align: left;
        padding: 10px 12px;
        font-size: 14px;
        border-radius: 10px;
    }

    .hero h1 {
        font-size: 34px;
    }

    .page-title,
    .section-title h2,
    .cta-box h2 {
        font-size: 28px;
    }

    .btn {
        width: 100%;
        text-align: center;
    }

    .stat-button {
        cursor: pointer;
        width: 100%;
        border: 1px solid rgba(120, 180, 255, 0.10);
        font-family: inherit;
        color: inherit;
    }

    .stat-button:hover {
        background: rgba(77, 184, 255, 0.08);
        transform: translateY(-2px);
        transition: 0.2s ease;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }
}
.hero-special-logo {
    display: inline-block;
    text-decoration: none;
    transition: transform 0.25s ease, filter 0.25s ease;
}

.hero-special-logo:hover {
    transform: scale(1.02);
    filter: brightness(1.08);
}

.hero-special-logo img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto 18px auto;
}
@media (max-width: 1024px) {
    .previsioni-home-box {
        padding: 18px;
        border-radius: 20px;
    }

    .previsioni-home-head h2 {
        font-size: 28px;
    }

    .previsioni-home-table {
        min-width: 860px;
    }

    .previsioni-home-table th,
    .previsioni-home-table td {
        padding: 14px 12px;
    }

    .forecast-numbers {
        font-size: 14px;
    }

    .estratto-pill {
        min-width: 38px;
        padding: 7px 9px;
        font-size: 13px;
    }
}

@media (max-width: 768px) {
    .section-home-previsioni {
        padding: 32px 0;
    }

    .previsioni-home-box {
        padding: 14px;
        border-radius: 18px;
    }

    .previsioni-home-head h2 {
        font-size: 24px;
        line-height: 1.15;
    }

    .previsioni-home-head p {
        font-size: 14px;
        line-height: 1.6;
        margin-bottom: 14px;
    }

    .previsioni-home-table-wrap {
        border-radius: 14px;
    }

    .previsioni-home-table {
        min-width: 760px;
    }

    .previsioni-home-table th,
    .previsioni-home-table td {
        padding: 12px 10px;
    }

    .ruota-cell strong {
        font-size: 15px;
    }

    .ruota-cell span,
    .estrazione-data {
        font-size: 12px;
    }

    .forecast-group {
        gap: 8px;
    }

    .forecast-label {
        font-size: 11px;
        padding: 4px 8px;
    }

    .forecast-numbers {
        font-size: 13px;
        line-height: 1.6;
    }

    .estrazione-numeri {
        gap: 6px;
    }

    .estratto-pill {
        min-width: 34px;
        padding: 6px 8px;
        border-radius: 10px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .previsioni-home-box {
        padding: 12px;
    }

    .previsioni-home-head h2 {
        font-size: 22px;
    }

    .previsioni-home-head p {
        font-size: 13px;
    }

    .previsioni-home-table {
        min-width: 700px;
    }

    .previsioni-home-table th {
        font-size: 11px;
    }

    .previsioni-home-table th,
    .previsioni-home-table td {
        padding: 10px 8px;
    }

    .forecast-numbers {
        font-size: 12px;
    }

    .estratto-pill {
        min-width: 30px;
        padding: 5px 7px;
        font-size: 11px;
    }
}
.btn-previsione-oggi {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 24px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 800;
    font-size: 15px;
    letter-spacing: 0.3px;
    color: #ffffff;
    background: linear-gradient(135deg, #00c6ff 0%, #0072ff 100%);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow:
        0 0 0 1px rgba(126, 215, 255, 0.18) inset,
        0 0 18px rgba(0, 183, 255, 0.35),
        0 0 34px rgba(0, 114, 255, 0.22);
    transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
    position: relative;
    overflow: hidden;
}

.btn-previsione-oggi::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 20%, rgba(255,255,255,0.18) 50%, transparent 80%);
    transform: translateX(-120%);
    transition: transform 0.6s ease;
}

/* HEADER RESPONSIVE FINALE */
@media (max-width: 480px) {
    .topbar-inner {
        min-height: 50px;
        padding: 6px 0;
    }

    .brand img {
        height: 40px;
    }

    .menu-toggle {
        font-size: 20px;
        padding: 7px 10px;
    }

    .nav a {
        font-size: 13px;
        padding: 9px 10px;
    }
}

@media (min-width: 701px) {
    .menu-toggle {
        display: none;
    }

    .nav {
        display: flex;
        position: static;
        flex-direction: row;
        padding: 0;
        background: transparent;
        border: none;
        box-shadow: none;
    }
}
