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

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: #1a1a1a;
    font-family: 'Arial', sans-serif;
    padding: 20px;
}

.lotto-machine {
    background: rgba(255, 255, 255, 0.08);
    padding: 40px 36px;
    border-radius: 24px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    text-align: center;
    width: 100%;
    max-width: 520px;
}

h1 {
    color: #fff;
    font-size: 2rem;
    margin-bottom: 6px;
}

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

.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); }

#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; }
