:root {
    --blue: #0000B9;
    --blue-dark: #00006f;
    --blue-soft: #eeeeff;
    --red: #FE0402;
    --red-dark: #be0000;
    --red-soft: #fff0f0;
    --ink: #121325;
    --muted: #696b7c;
    --line: #e8e9f1;
    --surface: #ffffff;
    --background: #f5f6fb;
    --shadow: 0 20px 65px rgba(16, 18, 57, 0.12);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-width: 320px;
    background:
        radial-gradient(circle at 12% 22%, rgba(0, 0, 185, 0.07), transparent 26rem),
        radial-gradient(circle at 92% 62%, rgba(254, 4, 2, 0.06), transparent 25rem),
        var(--background);
    color: var(--ink);
    font-family: Roboto, Arial, Helvetica, sans-serif;
    -webkit-font-smoothing: antialiased;
}

button,
input {
    font: inherit;
}

button {
    -webkit-tap-highlight-color: transparent;
}

.page-shell {
    min-height: 100vh;
}

.hero {
    position: relative;
    overflow: hidden;
    min-height: 280px;
    background:
        linear-gradient(125deg, rgba(0, 0, 111, 0.98), rgba(0, 0, 185, 0.98) 58%, rgba(38, 39, 196, 0.98));
    color: #fff;
    isolation: isolate;
}

.hero::before {
    content: "";
    position: absolute;
    inset: auto -7% -150px -7%;
    height: 210px;
    border-radius: 50% 50% 0 0;
    background: var(--background);
    z-index: -1;
}

.hero::after {
    content: "";
    position: absolute;
    width: 390px;
    height: 390px;
    right: 8%;
    top: -245px;
    border: 42px solid rgba(255, 255, 255, 0.06);
    border-radius: 50%;
    z-index: -1;
}

.hero__inner {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
    padding: 35px 0 95px;
    display: flex;
    align-items: center;
    gap: 32px;
}

.club-logo {
    width: 145px;
    height: 145px;
    object-fit: contain;
    filter: drop-shadow(0 15px 25px rgba(0, 0, 0, 0.25));
}

.hero__copy {
    padding-bottom: 6px;
}

.eyebrow,
.section-label {
    margin: 0 0 8px;
    color: var(--blue);
    font-size: 0.77rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero .eyebrow {
    color: rgba(255, 255, 255, 0.74);
}

.hero h1 {
    margin: 0;
    font-size: clamp(2.3rem, 6vw, 4.4rem);
    line-height: 0.98;
    font-weight: 900;
    letter-spacing: -0.045em;
}

.hero h1 span {
    color: #fff;
    position: relative;
}

.hero h1 span::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -10px;
    height: 7px;
    border-radius: 99px;
    background: var(--red);
    transform: rotate(-1deg);
}

.hero__copy > p:last-child {
    margin: 22px 0 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 1.02rem;
}

.hero__glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(1px);
    pointer-events: none;
    z-index: -1;
}

.hero__glow--one {
    width: 260px;
    height: 260px;
    left: -100px;
    top: -85px;
    background: rgba(254, 4, 2, 0.14);
}

.hero__glow--two {
    width: 120px;
    height: 120px;
    right: 25%;
    bottom: 20px;
    background: rgba(255, 255, 255, 0.08);
}

.content {
    width: min(1180px, calc(100% - 40px));
    margin: -72px auto 0;
    position: relative;
    z-index: 2;
}

.tabs {
    display: inline-flex;
    gap: 6px;
    padding: 6px;
    border: 1px solid rgba(255, 255, 255, 0.65);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 16px 45px rgba(15, 16, 45, 0.13);
    backdrop-filter: blur(16px);
}

.tab {
    border: 0;
    border-radius: 11px;
    background: transparent;
    color: var(--muted);
    min-width: 150px;
    padding: 13px 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    font-weight: 800;
    cursor: pointer;
    transition: 180ms ease;
}

.tab svg {
    width: 19px;
    height: 19px;
    fill: currentColor;
}

.tab:hover {
    background: var(--blue-soft);
    color: var(--blue);
}

.tab.is-active {
    background: var(--blue);
    color: #fff;
    box-shadow: 0 8px 20px rgba(0, 0, 185, 0.25);
}

.panel {
    display: none;
    margin-top: 25px;
}

.panel.is-active {
    display: block;
    animation: panelIn 260ms ease both;
}

@keyframes panelIn {
    from { opacity: 0; transform: translateY(7px); }
    to { opacity: 1; transform: translateY(0); }
}

.draw-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(310px, 0.8fr);
    gap: 22px;
}

.card,
.results {
    border: 1px solid rgba(225, 226, 236, 0.94);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.draw-card,
.sponsor-card,
.archive-card {
    padding: clamp(24px, 4vw, 40px);
}

.card__header,
.results__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.card h2,
.results h2 {
    margin: 0;
    font-size: clamp(1.45rem, 2.5vw, 2rem);
    line-height: 1.17;
    letter-spacing: -0.025em;
}

.live-badge {
    flex: 0 0 auto;
    border-radius: 99px;
    padding: 8px 12px;
    background: #effaf1;
    color: #18712b;
    font-size: 0.76rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.live-badge span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #25a241;
    box-shadow: 0 0 0 4px rgba(37, 162, 65, 0.14);
}

.number-fields {
    margin-top: 34px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: end;
    gap: 16px;
}

.field {
    display: grid;
    gap: 9px;
}

.field span {
    color: #3f4154;
    font-size: 0.84rem;
    font-weight: 800;
}

.field input {
    width: 100%;
    height: 68px;
    border: 2px solid #e5e6ee;
    border-radius: 16px;
    background: #fbfbfd;
    color: var(--ink);
    padding: 0 18px;
    font-size: clamp(1.2rem, 3vw, 1.65rem);
    font-weight: 900;
    outline: none;
    transition: 180ms ease;
}

.field input::placeholder {
    color: #b0b1be;
    font-weight: 500;
}

.field input:hover {
    border-color: #cfd0dc;
}

.field input:focus {
    border-color: var(--blue);
    background: #fff;
    box-shadow: 0 0 0 5px rgba(0, 0, 185, 0.08);
}

.field input:disabled {
    opacity: 0.65;
}

.range-arrow {
    width: 38px;
    height: 68px;
    display: grid;
    place-items: center;
    color: var(--blue);
    font-size: 1.6rem;
    font-weight: 900;
}

.form-message {
    display: none;
    margin-top: 16px;
    border: 1px solid #ffc4c4;
    border-radius: 12px;
    background: var(--red-soft);
    color: #a00000;
    padding: 11px 13px;
    font-size: 0.87rem;
    font-weight: 700;
}

.form-message.is-visible {
    display: block;
}

.draw-button {
    position: relative;
    overflow: hidden;
    width: 100%;
    min-height: 70px;
    margin-top: 25px;
    border: 0;
    border-radius: 17px;
    background: linear-gradient(120deg, var(--red), #e70000);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 1.04rem;
    font-weight: 900;
    letter-spacing: 0.01em;
    cursor: pointer;
    box-shadow: 0 14px 30px rgba(254, 4, 2, 0.23);
    transition: 180ms ease;
}

.draw-button::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 25%, rgba(255, 255, 255, 0.26), transparent 70%);
    transform: translateX(-120%);
    transition: transform 500ms ease;
}

.draw-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 18px 36px rgba(254, 4, 2, 0.29);
}

.draw-button:hover::before {
    transform: translateX(120%);
}

.draw-button:active:not(:disabled) {
    transform: translateY(0);
}

.draw-button:disabled {
    cursor: wait;
    opacity: 0.86;
}

.draw-button__icon {
    width: 29px;
    height: 29px;
    display: grid;
    place-items: center;
}

.draw-button__icon svg {
    width: 26px;
    height: 26px;
    fill: currentColor;
}

.draw-button.is-loading .draw-button__icon {
    animation: spin 900ms linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.draw-note {
    margin: 14px 0 0;
    color: var(--muted);
    font-size: 0.81rem;
    line-height: 1.5;
    text-align: center;
}

.sponsor-card {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(160deg, rgba(0, 0, 185, 0.03), transparent 45%),
        #fff;
}

.sponsor-card::after {
    content: "";
    position: absolute;
    width: 140px;
    height: 140px;
    right: -75px;
    bottom: -75px;
    border: 20px solid rgba(254, 4, 2, 0.05);
    border-radius: 50%;
}

.sponsor-list {
    margin-top: 30px;
}

.sponsor-item {
    display: grid;
    grid-template-columns: 78px 1fr;
    align-items: center;
    gap: 16px;
}

.sponsor-logo {
    width: 78px;
    height: 78px;
    border-radius: 18px;
    border: 1px solid #ececf2;
    background: #fff;
    display: grid;
    place-items: center;
    padding: 9px;
    box-shadow: 0 8px 25px rgba(26, 27, 59, 0.08);
}

.sponsor-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.sponsor-logo--johnny {
    padding: 7px;
}

.sponsor-item strong,
.sponsor-item span {
    display: block;
}

.sponsor-item strong {
    font-size: 1rem;
}

.sponsor-item span {
    margin-top: 5px;
    color: var(--muted);
    font-size: 0.84rem;
}

.sponsor-divider {
    height: 1px;
    margin: 20px 0;
    background: var(--line);
}

.results {
    margin-top: 22px;
    padding: clamp(24px, 4vw, 40px);
    background:
        radial-gradient(circle at 10% 0, rgba(0, 0, 185, 0.06), transparent 22rem),
        #fff;
}

.results[hidden] {
    display: none;
}

.results:not([hidden]) {
    animation: resultIn 450ms cubic-bezier(.2,.8,.2,1) both;
}

@keyframes resultIn {
    from { opacity: 0; transform: translateY(20px) scale(0.985); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.secondary-button,
.icon-button {
    border: 1px solid #dadbe5;
    background: #fff;
    color: var(--ink);
    font-weight: 800;
    cursor: pointer;
    transition: 170ms ease;
}

.secondary-button {
    min-height: 43px;
    padding: 0 17px;
    border-radius: 12px;
}

.secondary-button:hover,
.icon-button:hover {
    border-color: var(--blue);
    color: var(--blue);
    background: var(--blue-soft);
}

.winner-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-top: 28px;
}

.winner-card {
    position: relative;
    overflow: hidden;
    min-height: 320px;
    border-radius: 22px;
    padding: 25px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    isolation: isolate;
}

.winner-card::after {
    content: "";
    position: absolute;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    right: -105px;
    top: -105px;
    border: 35px solid currentColor;
    opacity: 0.07;
    z-index: -1;
}

.winner-card--johnny {
    background: linear-gradient(145deg, #e8f1f2, #f8fbfb);
    border: 1px solid #d7e4e6;
    color: #294a50;
}

.winner-card--luca {
    background: linear-gradient(145deg, #fff6ed, #fffafa);
    border: 1px solid #f1ddc8;
    color: #713a18;
}

.winner-card__top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
}

.winner-card__top img {
    width: 118px;
    height: 64px;
    object-fit: contain;
    object-position: left center;
}

.winner-card--luca .winner-card__top img {
    width: 76px;
    height: 76px;
}

.winner-card__top span {
    border: 1px solid currentColor;
    border-radius: 99px;
    padding: 6px 10px;
    opacity: 0.72;
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.winner-card__label {
    margin: 24px 0 0;
    color: currentColor;
    opacity: 0.72;
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.09em;
}

.winner-number {
    margin: 3px 0 0;
    font-size: clamp(4.6rem, 10vw, 8rem);
    line-height: 0.9;
    font-weight: 900;
    letter-spacing: -0.065em;
    font-variant-numeric: tabular-nums;
}

.winner-card.is-revealed .winner-number {
    animation: winningPulse 650ms cubic-bezier(.17,.89,.32,1.45);
}

@keyframes winningPulse {
    0% { transform: scale(0.75); opacity: 0.5; }
    65% { transform: scale(1.08); opacity: 1; }
    100% { transform: scale(1); }
}

.winner-card__sponsor {
    margin: 16px 0 0;
    font-size: 1rem;
    font-weight: 900;
}

.saved-message {
    margin: 20px 0 0;
    color: #3f7650;
    font-size: 0.86rem;
    font-weight: 700;
    text-align: center;
}

.archive-card {
    min-height: 360px;
}

.archive-header {
    align-items: center;
}

.icon-button {
    width: 45px;
    height: 45px;
    border-radius: 13px;
    display: grid;
    place-items: center;
}

.icon-button svg {
    width: 21px;
    height: 21px;
    fill: currentColor;
}

.icon-button.is-spinning svg {
    animation: spin 800ms linear infinite;
}

.archive-status {
    min-height: 130px;
    margin-top: 25px;
    border: 1px dashed #d7d8e3;
    border-radius: 17px;
    background: #fafafd;
    color: var(--muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;
    text-align: center;
    padding: 25px;
}

.archive-status strong {
    color: var(--ink);
}

.archive-status span {
    font-size: 0.86rem;
}

.archive-status.is-error {
    border-color: #ffc8c8;
    background: var(--red-soft);
    color: #9c0000;
}

.archive-list {
    display: grid;
    gap: 13px;
    margin-top: 26px;
}

.archive-item {
    display: grid;
    grid-template-columns: minmax(180px, 0.55fr) minmax(0, 1.45fr);
    align-items: center;
    gap: 24px;
    border: 1px solid var(--line);
    border-radius: 17px;
    padding: 18px 20px;
    animation: archiveIn 420ms ease both;
    animation-delay: var(--delay);
}

@keyframes archiveIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.archive-date span,
.archive-date small {
    display: block;
}

.archive-date span {
    font-size: 1.16rem;
    font-weight: 900;
}

.archive-date small {
    margin-top: 5px;
    color: var(--muted);
    font-size: 0.75rem;
}

.archive-winners {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.archive-winner {
    min-width: 0;
    border-radius: 13px;
    padding: 10px 12px;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
}

.archive-winner--johnny {
    background: #edf5f6;
    color: #294a50;
}

.archive-winner--luca {
    background: #fff4e8;
    color: #713a18;
}

.archive-logo {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: #fff;
    display: grid;
    place-items: center;
    padding: 5px;
}

.archive-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.archive-winner span,
.archive-winner strong {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.archive-winner span {
    opacity: 0.72;
    font-size: 0.72rem;
    font-weight: 700;
}

.archive-winner strong {
    margin-top: 2px;
    font-size: 1.02rem;
}

footer {
    width: min(1180px, calc(100% - 40px));
    min-height: 105px;
    margin: 0 auto;
    color: #8b8c99;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    font-size: 0.77rem;
}

footer img {
    width: 28px;
    height: 28px;
    object-fit: contain;
    filter: grayscale(1);
    opacity: 0.6;
}

.confetti {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 999;
}

.confetti i {
    position: absolute;
    left: var(--x);
    top: -24px;
    width: 10px;
    height: 18px;
    border-radius: 2px;
    background: var(--blue);
    animation: confettiFall var(--duration) var(--delay) cubic-bezier(.2,.72,.26,1) forwards;
}

.confetti i.is-red {
    background: var(--red);
}

@keyframes confettiFall {
    0% { transform: translate3d(0, -30px, 0) rotate(0deg); opacity: 1; }
    100% { transform: translate3d(var(--drift), 110vh, 0) rotate(var(--rotation)); opacity: 0.94; }
}

@media (max-width: 900px) {
    .draw-layout {
        grid-template-columns: 1fr;
    }

    .sponsor-list {
        display: grid;
        grid-template-columns: 1fr 1px 1fr;
        align-items: center;
        gap: 20px;
    }

    .sponsor-divider {
        width: 1px;
        height: 70px;
        margin: 0;
    }

    .archive-item {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

@media (max-width: 680px) {
    .hero {
        min-height: 255px;
    }

    .hero__inner {
        width: min(100% - 28px, 1180px);
        padding-top: 28px;
        gap: 19px;
    }

    .club-logo {
        width: 96px;
        height: 96px;
    }

    .hero__copy > p:last-child {
        font-size: 0.86rem;
        line-height: 1.45;
    }

    .content {
        width: min(100% - 24px, 1180px);
    }

    .tabs {
        width: 100%;
    }

    .tab {
        flex: 1;
        min-width: 0;
        padding-inline: 10px;
    }

    .card__header,
    .results__header {
        align-items: flex-start;
    }

    .live-badge {
        display: none;
    }

    .number-fields {
        grid-template-columns: 1fr;
        gap: 13px;
    }

    .range-arrow {
        display: none;
    }

    .field input {
        height: 61px;
    }

    .sponsor-list {
        grid-template-columns: 1fr;
    }

    .sponsor-divider {
        width: 100%;
        height: 1px;
    }

    .winner-grid {
        grid-template-columns: 1fr;
    }

    .winner-card {
        min-height: 285px;
    }

    .winner-number {
        font-size: clamp(4.8rem, 24vw, 7rem);
    }

    .archive-winners {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 460px) {
    .hero__inner {
        align-items: flex-start;
    }

    .club-logo {
        width: 76px;
        height: 76px;
    }

    .hero h1 {
        font-size: 2.18rem;
    }

    .hero__copy > p:last-child {
        display: none;
    }

    .draw-card,
    .sponsor-card,
    .archive-card,
    .results {
        padding: 22px 18px;
        border-radius: 19px;
    }

    .card h2,
    .results h2 {
        font-size: 1.45rem;
    }

    .results__header {
        display: grid;
    }

    .secondary-button {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
