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

body {
    min-height: 100vh;
    background: #07071f;
    font-family: 'Arial', sans-serif;
}

/* ── Layout ── */
.site-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ── Header / Nav ── */
.site-header {
    position: relative;
    z-index: 10;
    background: rgba(0,0,0,0.45);
    border-bottom: 1px solid rgba(255,215,0,0.15);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.site-nav {
    max-width: 900px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.nav-logo {
    color: #ffd700;
    font-size: 1.1rem;
    font-weight: bold;
    text-decoration: none;
}

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

.nav-links a {
    color: rgba(255,255,255,0.65);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.nav-links a:hover { color: #ffd700; }

/* ── Main content area ── */
main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 20px 60px;
    gap: 48px;
    position: relative;
    z-index: 1;
}

/* ── Content sections ── */
.content-section {
    width: 100%;
    max-width: 860px;
    color: rgba(255,255,255,0.85);
}

.content-section h2 {
    font-size: 1.4rem;
    color: #ffd700;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255,215,0,0.2);
}

.content-section p {
    line-height: 1.75;
    color: rgba(255,255,255,0.75);
    margin-bottom: 16px;
}

.content-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
    margin-top: 8px;
}

.content-card {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,215,0,0.12);
    border-radius: 14px;
    padding: 22px 20px;
}

.content-card .card-icon {
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.content-card h3 {
    font-size: 1rem;
    color: #fff;
    margin-bottom: 8px;
}

.content-card p {
    font-size: 0.88rem;
    color: rgba(255,255,255,0.6);
    margin: 0;
    line-height: 1.6;
}

/* ── Prize table ── */
.prize-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 8px;
    font-size: 0.9rem;
}

.prize-table th {
    background: rgba(255,215,0,0.12);
    color: #ffd700;
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid rgba(255,215,0,0.2);
}

.prize-table td {
    padding: 11px 16px;
    color: rgba(255,255,255,0.75);
    border-bottom: 1px solid rgba(255,255,255,0.07);
}

.prize-table tr:last-child td { border-bottom: none; }
.prize-table tr:hover td { background: rgba(255,255,255,0.04); }

/* ── FAQ ── */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.faq-item {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 18px 20px;
}

.faq-item h3 {
    font-size: 0.97rem;
    color: #fff;
    margin-bottom: 8px;
}

.faq-item p {
    font-size: 0.88rem;
    color: rgba(255,255,255,0.6);
    line-height: 1.65;
    margin: 0;
}

/* ── Tips ── */
.tips-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0;
}

.tips-list li {
    padding: 12px 16px 12px 42px;
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
    color: rgba(255,255,255,0.72);
    font-size: 0.9rem;
    line-height: 1.5;
    position: relative;
}

.tips-list li::before {
    content: "✔";
    position: absolute;
    left: 16px;
    color: #4CAF50;
    font-size: 0.9rem;
}

/* ── Footer ── */
.site-footer {
    position: relative;
    z-index: 10;
    background: rgba(0,0,0,0.5);
    border-top: 1px solid rgba(255,215,0,0.12);
    text-align: center;
    padding: 24px 20px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 12px;
}

.footer-links a {
    color: rgba(255,255,255,0.5);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s;
}

.footer-links a:hover { color: #ffd700; }

.footer-copy {
    color: rgba(255,255,255,0.3);
    font-size: 0.78rem;
    line-height: 1.7;
}

/* ── Privacy page ── */
.privacy-main {
    padding: 48px 20px 80px;
}

.privacy-container {
    max-width: 800px;
    margin: 0 auto;
    color: rgba(255,255,255,0.8);
}

.privacy-container h1 {
    font-size: 1.8rem;
    color: #ffd700;
    margin-bottom: 8px;
}

.privacy-date {
    color: rgba(255,255,255,0.4);
    font-size: 0.85rem;
    margin-bottom: 36px;
}

.privacy-container section {
    margin-bottom: 32px;
}

.privacy-container h2 {
    font-size: 1.1rem;
    color: #fff;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.privacy-container p {
    font-size: 0.92rem;
    line-height: 1.8;
    color: rgba(255,255,255,0.68);
    margin-bottom: 10px;
}

.privacy-container ul {
    padding-left: 20px;
    margin-top: 8px;
}

.privacy-container ul li {
    font-size: 0.92rem;
    line-height: 1.8;
    color: rgba(255,255,255,0.65);
    margin-bottom: 6px;
}

.privacy-container a {
    color: #ffd700;
    text-decoration: underline;
}

/* ── Canvas layers ── */
#bg-canvas {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 0;
    pointer-events: none;
}

#confetti-canvas {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 999;
    pointer-events: none;
}

/* ── Screen flash ── */
#screen-flash {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(255, 215, 0, 0.28);
    z-index: 998;
    pointer-events: none;
    opacity: 0;
}

#screen-flash.flash {
    animation: screenFlash 0.9s ease-out forwards;
}

@keyframes screenFlash {
    0%   { opacity: 0; }
    18%  { opacity: 1; }
    100% { opacity: 0; }
}


/* ── Number win glow ── */
@keyframes winGlow {
    0%, 100% { transform: scale(1); }
    50% {
        transform: scale(1.2);
        box-shadow: 0 0 28px rgba(255,215,0,0.95), 0 0 56px rgba(255,215,0,0.55);
    }
}

.number.win-glow {
    animation: winGlow 0.52s ease-in-out 4;
}

/* ── Card ── */
.lotto-machine {
    position: relative;
    z-index: 1;
    background: rgba(255, 255, 255, 0.07);
    padding: 40px 36px;
    border-radius: 24px;
    box-shadow:
        0 8px 40px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(255,215,0,0.12),
        0 0 60px rgba(255,215,0,0.04);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255,215,0,0.22);
    text-align: center;
    width: 100%;
    max-width: 520px;
    flex-shrink: 0;
}

h1 {
    color: #fff;
    font-size: 2rem;
    margin-bottom: 6px;
    text-shadow: 0 0 24px rgba(255,215,0,0.28);
}

.subtitle {
    color: rgba(255,255,255,0.5);
    font-size: 0.82rem;
    margin-bottom: 32px;
}

.data-badge {
    display: inline-block;
    background: rgba(255, 215, 0, 0.12);
    color: #ffd700;
    border: 1px solid rgba(255, 215, 0, 0.35);
    border-radius: 20px;
    padding: 2px 10px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.lotto-numbers {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.number {
    width: 62px;
    height: 62px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: rgba(255,255,255,0.4);
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
    transition: transform 0.3s ease, background 0.3s ease;
}

.stats {
    min-height: 24px;
    color: rgba(255,255,255,0.55);
    font-size: 0.78rem;
    margin-bottom: 24px;
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

.stats span b {
    color: #fff;
}

.bonus-stat { color: #c084fc; }
.bonus-stat b { color: #e879f9; }

#generate-btn {
    display: block;
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #4CAF50, #2e7d32);
    color: white;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.15s;
    box-shadow: 0 4px 16px rgba(76,175,80,0.4);
    margin-bottom: 28px;
}

#generate-btn:hover { opacity: 0.88; }
#generate-btn:active { transform: scale(0.97); }
#generate-btn:disabled { opacity: 0.55; cursor: not-allowed; }

#stats-btn {
    display: block;
    width: 100%;
    padding: 12px;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 12px;
    background: transparent;
    color: rgba(255,255,255,0.7);
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    margin-bottom: 20px;
}

#stats-btn:hover {
    background: rgba(255,255,255,0.08);
    color: #fff;
}

.stats-table {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 480px;
    overflow-y: auto;
    padding-right: 4px;
}

.stats-table.hidden { display: none; }

.stat-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
}

.stat-rank {
    width: 22px;
    text-align: right;
    color: rgba(255,255,255,0.35);
    flex-shrink: 0;
}

.stat-ball {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.78rem;
    color: #fff;
    flex-shrink: 0;
}

.stat-bar-wrap {
    flex: 1;
    height: 8px;
    background: rgba(255,255,255,0.08);
    border-radius: 4px;
    overflow: hidden;
}

.stat-bar {
    height: 100%;
    border-radius: 4px;
    opacity: 0.75;
    transition: width 0.4s ease;
}

.stat-count {
    width: 40px;
    text-align: right;
    color: rgba(255,255,255,0.6);
    flex-shrink: 0;
}

.stat-prob {
    width: 46px;
    text-align: right;
    color: rgba(255,255,255,0.85);
    font-weight: bold;
    flex-shrink: 0;
}

.separator {
    color: rgba(255,255,255,0.4);
    font-size: 1.4rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    padding: 0 2px;
    flex-shrink: 0;
}

.bonus-ball {
    box-shadow: 0 0 0 3px #e879f9, 0 4px 16px rgba(232,121,249,0.4);
}

.tab-row {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.tab-btn {
    flex: 1;
    padding: 8px;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    background: transparent;
    color: rgba(255,255,255,0.5);
    font-size: 0.82rem;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.tab-btn.active {
    background: rgba(255,255,255,0.12);
    color: #fff;
    border-color: rgba(255,255,255,0.4);
}

.info-box {
    background: rgba(0,0,0,0.25);
    border-radius: 12px;
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.82rem;
}

.info-label {
    color: rgba(255,255,255,0.45);
}

.info-value {
    color: rgba(255,255,255,0.75);
    font-weight: bold;
}

.info-value.hot { color: #ff8a65; }
.info-value.cold { color: #64b5f6; }
