* { box-sizing: border-box; }
body { margin: 0; font-family: 'Segoe UI', system-ui, sans-serif; background: #f5f5f5; color: #1a1a1a; }

/* Header – yellow background, logo center */
.header {
    background: #f5c542;
    padding: 1.25rem 1rem;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.logo-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: 90%;
}
.logo-img {
    max-height: 80px;
    width: auto;
    object-fit: contain;
}
.logo-fallback {
    display: none;
    flex-direction: column;
    align-items: center;
    font-weight: 700;
    color: #1a1a1a;
    font-size: 1.5rem;
    letter-spacing: 0.02em;
}
.logo-fallback .logo-text { display: block; }
.logo-fallback .logo-text:first-child { font-size: 1.25rem; }

/* Marquee – right to left */
.marquee-wrap {
    background: red;
    color: #f5c542;
    padding: 0.5rem 0;
    overflow: hidden;
}
.marquee {
    display: inline-block;
    width: max-content;
    animation: marquee 45s linear infinite;
}
@keyframes marquee {
    0% { transform: translateX(100vw); }
    100% { transform: translateX(-100%); }
}
#marquee-content {
    padding-right: 4rem;
    white-space: nowrap;
    font-size: 1.5rem;
    font-weight: 800;
    
}
img {
    max-width: 100%;
    /* Ensures the image never exceeds its container's width */
    height: auto;
    /* Maintains the image's aspect ratio */
    display: block;
    /* Removes extra space below the image */
}

/* Main */
.main { max-width: 720px; margin: 0 auto; padding: 1.5rem 1rem 3rem; }
.section-title {
    font-size: 1.15rem;
    margin: 0 0 0.75rem;
    color: #333;
    font-weight: 600;
}
.old-title { margin-top: 2rem; }
.today-section { margin-bottom: 1.5rem; }
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}
.refresh-btn {
    padding: 0.5rem 1rem;
    background: #f5c542;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    color: #1a1a1a;
    white-space: nowrap;
}
.refresh-btn:hover {
    background: #e6b530;
}
.result-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}
.result-card {
    background: #fff;
    padding: 0.75rem 1.25rem;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    display: inline-flex;
    gap: 0.5rem;
    align-items: center;
}
.result-card .num {
    font-weight: 700;
    font-size: 1.1rem;
    color: #1a1a1a;
}
.result-cards .num-grid {
    width: 100%;
}
.muted { color: #666; margin: 0; }

/* Old results */
.game-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}
.game-tab {
    padding: 1rem 2rem;
    border: 2px solid #f5c542;
    background: #fff;
    color: #1a1a1a;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 900;
    font-size: 1.1rem;
}
.game-tab:hover { background: #fef9e6; }
.game-tab.active { background: #f5c542; color: #1a1a1a; }
.old-results {
    background: #fff;
    border-radius: 10px;
    padding: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.date-group {
    margin-bottom: 1.5rem;
}
.date-header {
    padding: 0.75rem 1rem;
    background-color: #f5c542;
    margin: -1rem -1rem 0.75rem -1rem;
    text-align: center;
    font-size: 0.95rem;
    font-weight: 700;
    color: #1a1a1a;
    border-radius: 10px 10px 0 0;
}
.num-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    width: 100%;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
}
.num-pair {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.3rem 0.1rem;
    border-right: 1px solid #ddd;
    border-bottom: 1px solid #ddd;
    flex: 1;
    min-width: 25px;
    text-align: center;
}
.num-pair:nth-child(8n) {
    border-right: none;
}
.num-top, .num-bottom {
    font-weight: 700;
    font-size: 1.1rem;
    color: #1a1a1a;
    text-align: center;
}
.num-top {
    margin-bottom: 0.25rem;
}
.num-bottom {
    margin-top: 0.25rem;
    font-size: 0.95rem;
}

/* Footer */
.footer {
    background: linear-gradient(180deg, #1a1a1a 0%, #0d0d0d 100%);
    color: #ccc;
    padding: 2.5rem 1rem;
    margin-top: 2rem;
    text-align: center;
}
.footer-inner { max-width: 640px; margin: 0 auto; }
.footer-brand {
    font-size: 1.25rem;
    font-weight: 700;
    color: #f5c542;
    margin-bottom: 0.5rem;
}
.footer-tagline { margin: 0 0 1.25rem; font-size: 0.9rem; opacity: 0.9; }
.footer-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1.25rem;
}
.footer-links a { color: #f5c542; text-decoration: none; font-weight: 500; }
.footer-links a:hover { text-decoration: underline; }
.footer-copy { margin: 0; font-size: 0.8rem; opacity: 0.7; }

/* Image Section */
.image-section {
    margin: 2.5rem 0;
    display: flex;
    justify-content: center;
    align-items: center;
}
.featured-image {
   width: 500px;
    height: 350px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    display: block;
}
