* {
    box-sizing: border-box;
}

html {
    font-family:
        Arial,
        Helvetica,
        sans-serif;
}

body {
    margin: 0;
    color: #1f2937;
    background: #f3f4f6;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input {
    font: inherit;
}

.container {
    width: min(
        1180px,
        calc(100% - 32px)
    );
    margin-inline: auto;
}

.narrow-container {
    max-width: 860px;
}

/* Header */

.public-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: #ffffff;
    background: #052e16;
    box-shadow:
        0 8px 24px
        rgba(0, 0, 0, 0.18);
}

.header-inner {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.public-brand {
    display: flex;
    align-items: center;
}

.public-logo {
    display: block;
    max-width: 220px;
    max-height: 58px;
    object-fit: contain;
}

.brand-text {
    font-size: 23px;
    font-weight: 900;
}

.public-menu {
    display: flex;
    align-items: center;
    gap: 8px;
}

.public-menu a {
    padding: 10px 13px;
    border-radius: 8px;
    color: #dcfce7;
    font-weight: 700;
}

.public-menu a:hover,
.public-menu a.active {
    color: #ffffff;
    background: #166534;
}

/* Hero */

.hero-section {
    padding: 72px 0;
    color: #ffffff;
    background:
        radial-gradient(
            circle at top right,
            #22c55e,
            transparent 36%
        ),
        linear-gradient(
            135deg,
            #052e16,
            #166534
        );
}

.hero-content {
    display: grid;
    grid-template-columns:
        minmax(0, 1.5fr)
        minmax(280px, 0.7fr);
    align-items: center;
    gap: 48px;
}

.eyebrow {
    display: inline-block;
    margin-bottom: 9px;
    color: #16a34a;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.hero-section .eyebrow {
    color: #bbf7d0;
}

.hero-copy h1 {
    max-width: 760px;
    margin: 0 0 17px;
    font-size: clamp(
        38px,
        6vw,
        68px
    );
    line-height: 1.05;
}

.hero-copy p {
    max-width: 660px;
    margin: 0;
    color: #dcfce7;
    font-size: 18px;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: 12px;
    margin-top: 30px;
}

.public-button {
    min-height: 45px;
    padding: 11px 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 9px;
    font-weight: 800;
    cursor: pointer;
}

.public-button.primary {
    color: #ffffff;
    background: #15803d;
}

.hero-section
.public-button.primary {
    color: #14532d;
    background: #ffffff;
}

.public-button.secondary {
    color: #ffffff;
    border: 1px solid
        rgba(255, 255, 255, 0.45);
    background:
        rgba(255, 255, 255, 0.12);
}

.public-button.light {
    color: #374151;
    background: #e5e7eb;
}

.countdown-card,
.next-draw-card {
    padding: 28px;
    border: 1px solid
        rgba(255, 255, 255, 0.2);
    border-radius: 18px;
    background:
        rgba(255, 255, 255, 0.11);
    backdrop-filter: blur(8px);
}

.countdown-card span,
.countdown-card strong,
.next-draw-card span,
.next-draw-card strong {
    display: block;
}

.countdown-card span {
    color: #bbf7d0;
}

.countdown-card strong {
    margin: 10px 0 5px;
    font-size: 27px;
}

.countdown-card p {
    margin: 0 0 18px;
}

.countdown {
    padding: 14px;
    border-radius: 9px;
    color: #052e16;
    background: #ffffff;
    font-size: 21px;
    font-weight: 900;
    text-align: center;
}

/* Sections */

.latest-section,
.recent-section {
    padding: 60px 0;
}

.recent-section {
    padding-top: 10px;
    padding-bottom: 70px;
}

.section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.section-heading h2 {
    margin: 0;
    font-size: 32px;
}

.section-heading a {
    color: #15803d;
    font-weight: 800;
}

/* Latest result */

.latest-result-card,
.live-result-card,
.public-content-card,
.public-filter-card,
.about-card {
    padding: 26px;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    background: #ffffff;
    box-shadow:
        0 12px 30px
        rgba(0, 0, 0, 0.06);
}

.result-meta {
    display: grid;
    grid-template-columns:
        repeat(3, minmax(0, 1fr));
    gap: 16px;
    padding-bottom: 22px;
    margin-bottom: 22px;
    border-bottom: 1px solid #e5e7eb;
}

.result-meta span,
.result-meta strong {
    display: block;
}

.result-meta span {
    margin-bottom: 5px;
    color: #6b7280;
    font-size: 13px;
}

.prize-grid {
    display: grid;
    grid-template-columns:
        repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.prize-card {
    padding: 25px 18px;
    border: 1px solid #bbf7d0;
    border-radius: 15px;
    text-align: center;
    background: #f0fdf4;
}

.prize-card span,
.prize-card strong {
    display: block;
}

.prize-card span {
    margin-bottom: 11px;
    color: #166534;
    font-weight: 700;
}

.prize-card strong {
    color: #052e16;
    font-size: clamp(
        30px,
        5vw,
        45px
    );
    letter-spacing: 5px;
}

.prize-card.prize-first {
    color: #ffffff;
    border-color: #166534;
    background:
        linear-gradient(
            135deg,
            #15803d,
            #052e16
        );
}

.prize-card.prize-first span,
.prize-card.prize-first strong {
    color: #ffffff;
}

/* Public table */

.public-table-wrapper {
    width: 100%;
    overflow-x: auto;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #ffffff;
}

.public-table {
    width: 100%;
    border-collapse: collapse;
    white-space: nowrap;
}

.public-table th,
.public-table td {
    padding: 15px 14px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
}

.public-table th {
    color: #ffffff;
    background: #166534;
}

.public-table tbody tr:hover {
    background: #f0fdf4;
}

.public-number {
    font-weight: 900;
    letter-spacing: 2px;
}

/* General public pages */

.public-page {
    min-height: 68vh;
    padding: 56px 0 72px;
}

.public-page-heading {
    margin-bottom: 28px;
}

.public-page-heading h1 {
    margin: 0 0 10px;
    font-size: 39px;
}

.public-page-heading p {
    margin: 0;
    color: #6b7280;
    line-height: 1.7;
}

.public-filter-card {
    margin-bottom: 24px;
}

.public-filter-form {
    display: flex;
    align-items: flex-end;
    gap: 16px;
}

.public-form-group {
    min-width: 240px;
}

.public-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 800;
}

.public-form-group input {
    width: 100%;
    height: 46px;
    padding: 0 12px;
    border: 1px solid #d1d5db;
    border-radius: 9px;
}

.public-filter-actions {
    display: flex;
    gap: 10px;
}

.history-summary {
    margin-bottom: 18px;
    color: #4b5563;
}

.public-empty-state {
    padding: 48px 20px;
    border: 1px dashed #d1d5db;
    border-radius: 14px;
    color: #6b7280;
    text-align: center;
    background: #ffffff;
}

.public-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin-top: 26px;
}

.public-pagination a,
.public-pagination span {
    padding: 9px 13px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #ffffff;
}

.public-pagination .disabled {
    color: #9ca3af;
}

/* Live Draw */

.live-label {
    display: inline-block;
    margin-bottom: 10px;
    padding: 7px 11px;
    border-radius: 999px;
    color: #991b1b;
    background: #fee2e2;
    font-size: 12px;
    font-weight: 900;
}

.live-result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 24px;
}

.live-result-header span {
    color: #6b7280;
}

.live-result-header h2 {
    margin: 5px 0 0;
}

.live-date {
    font-weight: 800;
}

.next-draw-card {
    margin-top: 24px;
    color: #ffffff;
    background:
        linear-gradient(
            135deg,
            #15803d,
            #052e16
        );
}

.next-draw-card span {
    color: #bbf7d0;
}

.next-draw-card strong {
    margin: 8px 0 18px;
    font-size: 22px;
}

/* About */

.about-content {
    color: #374151;
    font-size: 17px;
    line-height: 1.9;
}

/* Footer */

.public-footer {
    padding: 27px 0;
    color: #dcfce7;
    background: #052e16;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.footer-inner p {
    margin: 0;
}

.footer-menu {
    display: flex;
    gap: 18px;
}

.footer-menu a:hover {
    color: #ffffff;
}

/* Mobile */

@media (max-width: 820px) {
    .header-inner {
        padding: 15px 0;
        align-items: flex-start;
        flex-direction: column;
    }

    .public-menu {
        width: 100%;
        overflow-x: auto;
    }

    .public-menu a {
        white-space: nowrap;
    }

    .hero-content {
        grid-template-columns: 1fr;
    }

    .result-meta,
    .prize-grid {
        grid-template-columns: 1fr;
    }

    .public-filter-form {
        align-items: stretch;
        flex-direction: column;
    }

    .public-form-group {
        width: 100%;
        min-width: 0;
    }

    .public-filter-actions {
        width: 100%;
    }

    .public-filter-actions
    .public-button {
        flex: 1;
    }

    .live-result-header,
    .section-heading,
    .footer-inner {
        align-items: flex-start;
        flex-direction: column;
    }

    .public-pagination {
        flex-wrap: wrap;
    }
}

@media (max-width: 520px) {
    .hero-section {
        padding: 52px 0;
    }

    .hero-actions {
        flex-direction: column;
    }

    .hero-actions
    .public-button {
        width: 100%;
    }

    .latest-result-card,
    .live-result-card,
    .public-content-card,
    .public-filter-card,
    .about-card {
        padding: 18px;
    }

    .prize-card strong {
        letter-spacing: 3px;
    }
}