:root {
    --bg-color: #0b0f19;
    --text-main: #e2e8f0;
    --text-muted: #94a3b8;
    --accent-color: #38bdf8;
    --accent-glow: rgba(56, 189, 248, 0.5);
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    
    --ball-bg: linear-gradient(135deg, #1e293b, #0f172a);
    --ball-euro-bg: linear-gradient(135deg, #0369a1, #0c4a6e);
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Background Effect */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(14, 165, 233, 0.05) 0%, transparent 50%);
    z-index: -1;
    animation: pulse 15s infinite alternate;
}

@keyframes pulse {
    0% { transform: scale(1); }
    100% { transform: scale(1.1); }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1, h2, h3 {
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 1rem;
}

.glow-text {
    background: linear-gradient(to right, #fff, var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 20px var(--accent-glow);
}

.glow-accent {
    color: var(--accent-color);
    text-shadow: 0 0 10px var(--accent-glow);
    font-weight: 800;
}

/* Header */
.glass-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(11, 15, 25, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    padding: 15px 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 800;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
}

nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

nav a:hover, nav a.active {
    color: var(--accent-color);
}

/* Glass Panels */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* Hero Section */
.hero-section {
    padding: 60px 0;
    text-align: center;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 50px 20px;
}

.subtitle {
    color: var(--text-muted);
    font-size: 1.2rem;
    margin-bottom: 40px;
}

.balls-container {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.ball {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--ball-bg);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: inset 0 2px 5px rgba(255, 255, 255, 0.1), 0 5px 15px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ball:hover {
    transform: translateY(-5px);
    box-shadow: inset 0 2px 5px rgba(255, 255, 255, 0.2), 0 10px 20px rgba(0, 0, 0, 0.6);
}

.ball.euro {
    background: var(--ball-euro-bg);
    border-color: var(--accent-color);
    color: #fff;
    box-shadow: inset 0 2px 5px rgba(255, 255, 255, 0.2), 0 0 15px var(--accent-glow);
}

.jackpot-info {
    font-size: 1.5rem;
    background: rgba(0, 0, 0, 0.3);
    padding: 15px 30px;
    border-radius: 50px;
    border: 1px solid var(--glass-border);
}

/* Stats */
.stats-section {
    padding: 40px 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.stats-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.stat-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0, 0, 0, 0.2);
    padding: 10px 20px;
    border-radius: 10px;
}

.stat-item .ball {
    width: 40px;
    height: 40px;
    font-size: 1.1rem;
    animation: none;
}

.stat-count {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* History Table */
.history-section {
    padding: 40px 0 80px 0;
}

.table-container {
    overflow-x: auto;
    margin-top: 30px;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

th, td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

th {
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
}

tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.mini-ball {
    display: inline-flex;
    width: 28px;
    height: 28px;
    align-items: center;
    justify-content: center;
    background: var(--ball-bg);
    border-radius: 50%;
    margin-right: 5px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.mini-ball.euro {
    background: var(--ball-euro-bg);
    border-color: var(--accent-color);
}

/* Charts */
.charts-section {
    padding: 40px 0;
}

.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

@media (max-width: 768px) {
    .charts-grid {
        grid-template-columns: 1fr;
    }
}

.chart-card {
    display: flex;
    flex-direction: column;
}

.chart-card h3 {
    margin-bottom: 20px;
}

.doughnut-container {
    position: relative;
    height: 300px;
    width: 100%;
    display: flex;
    justify-content: center;
}

/* History Accordion */
tr.history-row {
    cursor: pointer;
    transition: background 0.2s;
}

tr.history-row:hover {
    background: rgba(255, 255, 255, 0.05);
}

tr.details-row {
    display: none;
    background: rgba(0, 0, 0, 0.2);
}

tr.details-row.open {
    display: table-row;
}

.details-content {
    padding: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

.details-investment {
    flex: 1;
    min-width: 250px;
    background: rgba(255, 255, 255, 0.03);
    padding: 15px;
    border-radius: 10px;
    border: 1px solid var(--glass-border);
}

.details-quotes {
    flex: 2;
    min-width: 300px;
}

.quotes-table {
    width: 100%;
    font-size: 0.85rem;
}

.quotes-table th, .quotes-table td {
    padding: 8px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.quotes-table th {
    color: var(--accent-color);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 30px;
}

.btn {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    transition: all 0.3s;
}

.btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 10px var(--accent-glow);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

footer {
    text-align: center;
    padding: 30px 0;
    color: var(--text-muted);
    border-top: 1px solid var(--glass-border);
    background: rgba(0, 0, 0, 0.5);
}

/* Even-Odd Full Width Card */
.even-odd-full-card {
    margin-top: 30px;
    margin-bottom: 30px;
}

.even-odd-content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 40px;
}

.even-odd-chart-box {
    flex: 1;
    min-width: 280px;
    max-width: 350px;
}

.even-odd-info {
    flex: 2;
    min-width: 300px;
}

.even-odd-info h4 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--text-main);
}

.even-odd-info p {
    color: var(--text-muted);
    line-height: 1.6;
    font-size: 1rem;
}

.even-odd-badges {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.even-odd-badge {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    padding: 12px 20px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.even-odd-badge span:first-child {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.even-odd-badge span:last-child {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--accent-color);
}

/* Section Descriptions */
.section-description {
    margin-top: 20px;
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--text-main);
}

.section-subtitle {
    color: var(--text-muted);
    margin-top: 10px;
    font-size: 1.1rem;
}

/* Lucky Number Checker */
.checker-section {
    padding: 40px 0;
}

.checker-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin-top: 30px;
}

.number-picker {
    display: grid;
    gap: 10px;
    margin-top: 15px;
}

.grid-50 {
    grid-template-columns: repeat(auto-fill, minmax(45px, 1fr));
}

.grid-12 {
    grid-template-columns: repeat(auto-fill, minmax(55px, 1fr));
}

.pick-btn {
    height: 45px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pick-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.pick-btn.active {
    background: var(--ball-bg);
    border-color: #fff;
    color: #fff;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.4);
    transform: scale(1.05);
}

.pick-btn.active.euro {
    background: var(--ball-euro-bg);
    border-color: var(--accent-color);
    box-shadow: 0 0 15px var(--accent-glow);
}

.checker-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-color), #ff0055);
    color: #fff;
    border: none;
    padding: 14px 28px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 4px 20px var(--accent-glow);
    transition: all 0.3s ease;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px var(--accent-glow);
}

.btn-primary:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    box-shadow: none;
    filter: grayscale(1);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border: 1px solid var(--glass-border);
    padding: 14px 28px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

.mt-4 {
    margin-top: 25px;
}

.hidden {
    display: none !important;
}

.result-matrix {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.matrix-card {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.matrix-label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.matrix-val {
    display: block;
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--accent-color);
    margin-bottom: 10px;
}

.matrix-desc {
    font-size: 0.95rem;
    color: var(--text-main);
    line-height: 1.5;
}

.matrix-summary {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    padding: 20px;
    border-radius: 12px;
    border-left: 4px solid var(--accent-color);
}

.matrix-summary h4 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--text-main);
}

.matrix-summary p {
    color: var(--text-muted);
    line-height: 1.6;
    font-size: 1.05rem;
}

/* Disclaimer Banner */
.disclaimer-banner {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin: 20px 0 30px 0;
    padding: 20px;
    background: rgba(56, 189, 248, 0.05);
    border: 1px solid rgba(56, 189, 248, 0.2);
    border-radius: 12px;
}
.disclaimer-icon {
    font-size: 1.5rem;
    line-height: 1;
}
.disclaimer-banner p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-main);
}

/* Footer layout */
.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}
.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s ease;
}
.footer-links a:hover {
    color: var(--accent-color);
}
@media (max-width: 600px) {
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
}

/* Phase 1 redesign: hierarchy, responsiveness and accessible states */
:root {
    --bg-color: #07101d;
    --surface: #111d2d;
    --surface-raised: #172538;
    --surface-soft: #0d1827;
    --text-main: #f4f7fb;
    --text-muted: #a7b4c6;
    --accent-color: #3bd6c6;
    --accent-strong: #15b8a7;
    --accent-soft: rgba(59, 214, 198, 0.12);
    --accent-glow: rgba(59, 214, 198, 0.24);
    --glass-bg: rgba(17, 29, 45, 0.94);
    --glass-border: rgba(167, 180, 198, 0.14);
    --focus-ring: #f5c451;
    --danger: #fb7185;
    --ball-bg: linear-gradient(145deg, #f8fbff, #cdd8e6);
    --ball-euro-bg: linear-gradient(145deg, #58e7d9, #13aa9c);
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}

body {
    background:
        radial-gradient(circle at 12% 2%, rgba(38, 100, 116, 0.22), transparent 30rem),
        radial-gradient(circle at 90% 24%, rgba(33, 67, 107, 0.18), transparent 32rem),
        var(--bg-color);
    font-size: 16px;
}

body::before {
    display: none;
}

section {
    scroll-margin-top: 100px;
}

.skip-link {
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 1000;
    transform: translateY(-160%);
    padding: 10px 14px;
    border-radius: 8px;
    background: #fff;
    color: #07101d;
    font-weight: 700;
    transition: transform 0.2s ease;
}

.skip-link:focus {
    transform: translateY(0);
}

a:focus-visible,
button:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
    outline: 3px solid var(--focus-ring);
    outline-offset: 3px;
}

.container {
    max-width: 1180px;
    padding-inline: 24px;
}

h1, h2, h3 {
    letter-spacing: -0.035em;
}

h1 {
    font-size: clamp(2.1rem, 5vw, 4rem);
    line-height: 1.06;
}

h2 {
    font-size: clamp(1.75rem, 3vw, 2.65rem);
    line-height: 1.12;
}

h3 {
    font-size: clamp(1.05rem, 2vw, 1.25rem);
}

.glass-header {
    min-height: 76px;
    padding: 0;
    background: rgba(7, 16, 29, 0.92);
    border-bottom-color: rgba(167, 180, 198, 0.12);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18);
}

.nav-container {
    min-height: 76px;
    gap: 28px;
}

.logo {
    flex: 0 0 auto;
    color: var(--text-main);
    text-decoration: none;
    font-size: 1rem;
}

.logo-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--ball-euro-bg);
    color: #06211e;
    border: 3px solid rgba(255, 255, 255, 0.38);
    box-shadow: 0 8px 24px rgba(21, 184, 167, 0.22);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.logo-copy {
    display: flex;
    flex-direction: column;
    gap: 1px;
    line-height: 1.05;
    font-size: 0.76rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.logo-copy strong {
    color: var(--text-main);
    font-size: 1.02rem;
    letter-spacing: -0.02em;
    text-transform: none;
}

nav ul {
    gap: 8px;
}

nav a {
    display: block;
    padding: 9px 11px;
    border-radius: 9px;
    font-size: 0.92rem;
    white-space: nowrap;
}

nav a:hover,
nav a.active {
    color: var(--text-main);
    background: var(--accent-soft);
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    margin-left: auto;
    padding: 10px;
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    background: var(--surface-raised);
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    margin: 5px 0;
    border-radius: 4px;
    background: var(--text-main);
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.menu-open .menu-toggle span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.menu-open .menu-toggle span:nth-child(2) {
    opacity: 0;
}

.menu-open .menu-toggle span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-color: var(--glass-border);
    border-radius: 18px;
    box-shadow: 0 16px 45px rgba(0, 0, 0, 0.22);
}

.panel--hero {
    position: relative;
    overflow: hidden;
    border-color: rgba(59, 214, 198, 0.24);
    background:
        radial-gradient(circle at 50% 20%, rgba(59, 214, 198, 0.11), transparent 45%),
        linear-gradient(155deg, rgba(20, 36, 53, 0.98), rgba(11, 23, 37, 0.98));
}

.panel--hero::before {
    content: '';
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: var(--accent-color);
}

.panel--feature {
    background: linear-gradient(135deg, rgba(17, 36, 52, 0.96), rgba(14, 29, 44, 0.96));
}

.panel--stat {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}

.panel--interactive {
    border-color: rgba(59, 214, 198, 0.2);
}

.panel--result {
    border-color: rgba(59, 214, 198, 0.28);
}

.panel--chart {
    min-height: 360px;
}

.hero-section {
    padding: clamp(36px, 7vw, 76px) 0 clamp(44px, 6vw, 70px);
}

.hero-content {
    min-height: 430px;
    justify-content: center;
    padding: clamp(38px, 6vw, 70px) 24px;
}

.eyebrow {
    margin-bottom: 12px;
    color: var(--accent-color);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.glow-text {
    background: none;
    color: var(--text-main);
    -webkit-text-fill-color: currentColor;
    text-shadow: none;
}

.subtitle {
    margin: 4px 0 34px;
}

.balls-container {
    min-height: 64px;
    margin-bottom: 34px;
}

.ball {
    color: #0a1725;
    border: 3px solid rgba(255, 255, 255, 0.44);
    box-shadow: inset 0 -6px 12px rgba(47, 67, 91, 0.16), 0 9px 22px rgba(0, 0, 0, 0.3);
}

.ball.euro {
    color: #06211e;
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: inset 0 -6px 12px rgba(4, 89, 80, 0.2), 0 8px 24px var(--accent-glow);
}

.jackpot-info {
    display: flex;
    align-items: baseline;
    gap: 10px;
    border-color: rgba(59, 214, 198, 0.18);
    background: rgba(4, 12, 22, 0.62);
}

.glow-accent {
    color: var(--accent-color);
    text-shadow: none;
}

.section-heading {
    max-width: 720px;
    margin-bottom: 28px;
}

.section-heading h2 {
    margin-bottom: 10px;
}

.section-heading > p:last-child {
    color: var(--text-muted);
    font-size: 1.03rem;
}

.stats-section,
.checker-section,
.charts-section {
    padding: clamp(44px, 7vw, 76px) 0;
}

.stats-grid,
.checker-grid,
.charts-grid {
    gap: 22px;
}

.stat-item {
    border: 1px solid rgba(167, 180, 198, 0.08);
    background: var(--surface-soft);
}

.stat-item .ball {
    border-width: 2px;
}

.section-description {
    margin-top: 0;
    padding: 22px 24px;
    border-left: 3px solid var(--accent-color);
    color: var(--text-muted);
    background: rgba(17, 29, 45, 0.72);
}

.disclaimer-banner {
    margin: 0 0 28px;
    padding: 0;
    overflow: hidden;
    border-color: rgba(59, 214, 198, 0.2);
    background: rgba(59, 214, 198, 0.07);
}

.disclaimer-banner summary {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    color: var(--text-main);
    font-weight: 700;
    cursor: pointer;
    list-style: none;
}

.disclaimer-banner summary::-webkit-details-marker {
    display: none;
}

.disclaimer-banner summary::after {
    content: '+';
    margin-left: auto;
    color: var(--accent-color);
    font-size: 1.3rem;
}

.disclaimer-banner[open] summary::after {
    content: '–';
}

.disclaimer-banner p {
    padding: 0 18px 18px 54px;
    color: var(--text-muted);
}

.disclaimer-icon {
    width: 24px;
    height: 24px;
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 50%;
    background: var(--accent-color);
    color: #06211e;
    font-size: 0.85rem;
    font-weight: 800;
}

.picker-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.picker-heading h3 {
    margin-bottom: 0;
}

.selection-count {
    flex: 0 0 auto;
    padding: 5px 10px;
    border-radius: 999px;
    color: var(--accent-color);
    background: var(--accent-soft);
    font-size: 0.82rem;
    font-weight: 800;
}

.pick-btn {
    border-color: rgba(167, 180, 198, 0.16);
    background: var(--surface-raised);
}

.pick-btn:hover {
    border-color: rgba(59, 214, 198, 0.55);
    background: #20324a;
}

.pick-btn.active,
.pick-btn.active.euro {
    color: #06211e;
    border-color: rgba(255, 255, 255, 0.5);
    background: var(--ball-euro-bg);
    box-shadow: 0 0 0 3px var(--accent-soft), 0 8px 18px rgba(0, 0, 0, 0.2);
}

.number-picker.at-limit .pick-btn:not(.active) {
    opacity: 0.48;
}

.btn-primary {
    color: #06211e;
    background: var(--accent-color);
    box-shadow: 0 8px 24px var(--accent-glow);
}

.btn-primary:hover:not(:disabled) {
    background: #6ce6da;
}

.data-state {
    width: 100%;
    padding: 18px;
    border-radius: 10px;
    color: var(--text-muted);
    background: rgba(7, 16, 29, 0.48);
    text-align: center;
}

.data-state--error {
    color: #fecdd3;
    border: 1px solid rgba(251, 113, 133, 0.18);
    background: rgba(251, 113, 133, 0.07);
}

.data-state--loading {
    animation: state-pulse 1.6s ease-in-out infinite;
}

.has-error .jackpot-info {
    border-color: rgba(251, 113, 133, 0.2);
}

.has-error .subtitle {
    color: #fecdd3;
}

.chart-card.has-data-state canvas,
.even-odd-chart-box.has-data-state canvas {
    display: none !important;
}

.chart-card.has-data-state .chart-insight {
    display: none;
}

.chart-data-state {
    margin: auto 0;
}

.state-row td {
    padding: 24px;
    text-align: center;
}

tr.history-row:focus-visible {
    outline: 3px solid var(--focus-ring);
    outline-offset: -3px;
}

@keyframes state-pulse {
    50% { opacity: 0.58; }
}

@media (max-width: 1050px) {
    html {
        scroll-padding-top: 82px;
    }

    section {
        scroll-margin-top: 82px;
    }

    .glass-header,
    .nav-container {
        min-height: 68px;
    }

    .menu-toggle {
        display: block;
    }

    .nav-container {
        position: relative;
    }

    #main-navigation {
        position: absolute;
        top: calc(100% + 10px);
        left: 18px;
        right: 18px;
        visibility: hidden;
        opacity: 0;
        transform: translateY(-8px);
        padding: 10px;
        border: 1px solid var(--glass-border);
        border-radius: 14px;
        background: rgba(13, 24, 39, 0.99);
        box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
        transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    }

    .menu-open #main-navigation {
        visibility: visible;
        opacity: 1;
        transform: translateY(0);
    }

    nav ul {
        display: grid;
        gap: 4px;
    }

    nav a {
        padding: 12px 14px;
    }

    .legal-header nav {
        position: static;
        visibility: visible;
        opacity: 1;
        transform: none;
        margin-left: auto;
        padding: 0;
        border: 0;
        background: transparent;
        box-shadow: none;
    }

    .legal-header nav ul {
        display: flex;
    }

    .even-odd-chart-box,
    .even-odd-info,
    .details-quotes {
        min-width: 0;
    }
}

@media (max-width: 600px) {
    .container {
        padding-inline: 16px;
    }

    .logo-icon {
        width: 38px;
        height: 38px;
    }

    .logo-copy strong {
        font-size: 0.94rem;
    }

    .glass-panel {
        padding: 22px;
        border-radius: 16px;
    }

    .hero-content {
        min-height: 390px;
        padding: 38px 18px;
    }

    .hero-content h1 {
        font-size: 2.15rem;
    }

    .subtitle {
        margin-bottom: 26px;
    }

    .balls-container {
        gap: 9px;
    }

    .ball {
        width: 48px;
        height: 48px;
        font-size: 1.12rem;
    }

    .jackpot-info {
        width: 100%;
        flex-direction: column;
        align-items: center;
        gap: 1px;
        padding: 13px 18px;
        font-size: 1.16rem;
    }

    .even-odd-content {
        gap: 28px;
    }

    .even-odd-chart-box,
    .even-odd-info {
        flex-basis: 100%;
    }

    .grid-50 {
        grid-template-columns: repeat(5, 1fr);
        gap: 8px;
    }

    .grid-12 {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }

    .pick-btn {
        height: 44px;
        font-size: 1rem;
    }

    .checker-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
    }

    .disclaimer-banner p {
        padding-left: 18px;
    }

    .charts-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .panel--chart {
        min-height: 300px;
    }

    .table-container {
        padding: 0;
        overflow: visible;
        border: 0;
        background: transparent;
        box-shadow: none;
    }

    #history-table,
    #history-table tbody {
        display: block;
        min-width: 0;
    }

    #history-table thead {
        display: none;
    }

    #history-table tbody {
        display: grid;
        gap: 12px;
    }

    #history-table tr.history-row {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 14px 20px;
        padding: 18px;
        border: 1px solid var(--glass-border);
        border-radius: 14px;
        background: var(--glass-bg);
        box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
    }

    #history-table tr.history-row td {
        display: block;
        padding: 0;
        border: 0;
    }

    #history-table tr.history-row td::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 5px;
        color: var(--text-muted);
        font-size: 0.69rem;
        font-weight: 700;
        letter-spacing: 0.08em;
        text-transform: uppercase;
    }

    #history-table tr.history-row td:nth-child(2),
    #history-table tr.history-row td:nth-child(3) {
        grid-column: 1 / -1;
    }

    #history-table tr.details-row.open {
        display: block;
        margin-top: -12px;
        padding: 8px 12px 16px;
        border: 1px solid var(--glass-border);
        border-top: 0;
        border-radius: 0 0 14px 14px;
        background: rgba(13, 24, 39, 0.95);
    }

    #history-table tr.details-row > td {
        display: block;
        padding: 0;
        border: 0;
    }

    .details-content {
        display: grid;
        gap: 18px;
        padding: 12px;
    }

    .details-investment,
    .details-quotes {
        min-width: 0;
    }

    .quotes-table {
        min-width: 460px;
    }

    .details-quotes {
        overflow-x: auto;
    }

    .pagination {
        gap: 10px;
    }

    .pagination .btn {
        padding-inline: 15px;
    }
}

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

/* Phase 2: editorial palette and task-focused information architecture */
:root {
    --bg-color: #f3efe5;
    --surface: #fffdf7;
    --surface-raised: #f8f3e8;
    --surface-soft: #eee7d9;
    --text-main: #243129;
    --text-muted: #687169;
    --accent-color: #c8553d;
    --accent-strong: #a94230;
    --accent-soft: rgba(200, 85, 61, 0.11);
    --accent-glow: rgba(200, 85, 61, 0.18);
    --secondary-color: #28594d;
    --secondary-soft: rgba(40, 89, 77, 0.10);
    --gold: #d6a63c;
    --glass-bg: rgba(255, 253, 247, 0.96);
    --glass-border: rgba(36, 49, 41, 0.13);
    --focus-ring: #28594d;
    --danger: #b4384c;
    --ball-bg: linear-gradient(145deg, #fffef9, #e8dfcf);
    --ball-euro-bg: linear-gradient(145deg, #efbd4e, #cf9630);
}

body {
    background:
        radial-gradient(circle at 8% 5%, rgba(214, 166, 60, 0.13), transparent 30rem),
        radial-gradient(circle at 92% 22%, rgba(40, 89, 77, 0.09), transparent 34rem),
        var(--bg-color);
}

.glass-header {
    background: rgba(248, 244, 234, 0.94);
    border-bottom-color: rgba(36, 49, 41, 0.12);
    box-shadow: 0 8px 26px rgba(61, 52, 38, 0.08);
}

.logo {
    color: var(--text-main);
}

.logo-icon {
    color: #fffaf0;
    border-color: rgba(255, 255, 255, 0.55);
    background: linear-gradient(145deg, #d86a50, #b74432);
    box-shadow: 0 8px 20px rgba(169, 66, 48, 0.22);
}

.logo-copy,
.logo-copy strong {
    color: var(--text-main);
}

.logo-copy {
    opacity: 0.7;
}

.logo-copy strong {
    opacity: 1;
}

nav a {
    color: var(--text-muted);
}

nav a:hover,
nav a.active {
    color: var(--secondary-color);
    background: var(--secondary-soft);
}

.menu-toggle {
    border-color: var(--glass-border);
    background: var(--surface);
}

.menu-toggle span {
    background: var(--text-main);
}

.glass-panel {
    color: var(--text-main);
    background: var(--glass-bg);
    border-color: var(--glass-border);
    box-shadow: 0 14px 40px rgba(61, 52, 38, 0.09);
}

.hero-section {
    padding: clamp(28px, 4vw, 48px) 0 clamp(42px, 5vw, 64px);
}

.hero-content {
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(250px, 0.75fr);
    align-items: stretch;
    gap: clamp(28px, 5vw, 64px);
    padding: clamp(34px, 5vw, 58px);
    text-align: left;
}

.panel--hero {
    border-color: rgba(255, 255, 255, 0.12);
    color: #fffaf0;
    background:
        radial-gradient(circle at 18% 0%, rgba(214, 166, 60, 0.17), transparent 25rem),
        linear-gradient(145deg, #263c34, #17271f);
    box-shadow: 0 22px 55px rgba(35, 49, 41, 0.18);
}

.panel--hero::before {
    background: var(--gold);
}

.hero-main {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.panel--hero .eyebrow {
    color: #efc96e;
}

.panel--hero .glow-text {
    color: #fffaf0;
    font-size: clamp(2.35rem, 5vw, 4.4rem);
}

.panel--hero .subtitle {
    color: rgba(255, 250, 240, 0.72);
}

.balls-container {
    min-height: 58px;
    justify-content: flex-start;
    margin: 0;
}

.ball {
    color: var(--text-main);
    border-color: rgba(255, 255, 255, 0.68);
    box-shadow: inset 0 -6px 12px rgba(82, 69, 45, 0.13), 0 9px 20px rgba(6, 15, 11, 0.24);
}

.ball.euro {
    color: #432f09;
    border-color: rgba(255, 248, 222, 0.7);
    box-shadow: inset 0 -6px 12px rgba(92, 60, 8, 0.15), 0 9px 20px rgba(8, 20, 14, 0.26);
}

.jackpot-info {
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 8px;
    padding: clamp(24px, 4vw, 34px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #fffaf0;
    background: rgba(8, 20, 14, 0.23);
}

.jackpot-info .label {
    color: rgba(255, 250, 240, 0.66);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.jackpot-info .value {
    max-width: 100%;
    color: #efc96e;
    font-size: clamp(1.5rem, 2.4vw, 2.3rem);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.035em;
    line-height: 1.12;
    white-space: nowrap;
}

.jackpot-caption {
    color: rgba(255, 250, 240, 0.52);
    font-size: 0.78rem;
}

.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-top: 18px;
    color: #fffaf0;
    font-size: 0.94rem;
    font-weight: 700;
    text-decoration: none;
}

.hero-cta:hover {
    color: #efc96e;
}

.eyebrow {
    color: var(--accent-color);
}

.section-heading {
    margin-bottom: 24px;
}

.section-heading > p:last-child,
.section-subtitle {
    color: var(--text-muted);
}

.stats-section,
.checker-section,
.charts-section {
    padding: clamp(42px, 6vw, 68px) 0;
}

.stats-section,
.charts-section {
    border-top: 1px solid rgba(36, 49, 41, 0.07);
}

.panel--feature {
    background: linear-gradient(135deg, #fffdf7, #f8f2e5);
}

.stat-item,
.even-odd-badge,
.matrix-card {
    border-color: rgba(36, 49, 41, 0.1);
    background: var(--surface-raised);
}

.stat-count,
.even-odd-info p,
.matrix-desc,
.matrix-summary p {
    color: var(--text-muted);
}

.even-odd-badge span:last-child,
.matrix-val {
    color: var(--accent-color);
}

.section-description {
    color: var(--text-muted);
    border-left-color: var(--accent-color);
    background: rgba(255, 253, 247, 0.68);
}

.disclaimer-banner {
    display: block;
    border-color: rgba(40, 89, 77, 0.18);
    background: var(--secondary-soft);
}

.disclaimer-banner[open] summary {
    border-bottom: 1px solid rgba(40, 89, 77, 0.14);
}

.disclaimer-banner p {
    color: var(--text-muted);
}

.disclaimer-icon {
    color: #fffaf0;
    background: var(--secondary-color);
}

.disclaimer-banner summary::after,
.selection-count {
    color: var(--secondary-color);
}

.selection-count {
    background: var(--secondary-soft);
}

.selection-dock {
    position: sticky;
    top: 90px;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: -10px -10px 30px;
    padding: 14px 16px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    color: #fffaf0;
    background: rgba(36, 49, 41, 0.97);
    box-shadow: 0 12px 28px rgba(36, 49, 41, 0.2);
}

.selection-dock-content {
    min-width: 0;
}

.selection-dock-label {
    display: block;
    margin-bottom: 7px;
    color: rgba(255, 250, 240, 0.62);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.selection-preview,
.selected-number-list,
.selection-dock-actions {
    display: flex;
    align-items: center;
    gap: 7px;
}

.selection-preview {
    flex-wrap: wrap;
}

.selection-divider {
    width: 1px;
    height: 28px;
    margin-inline: 3px;
    background: rgba(255, 255, 255, 0.16);
}

.selected-number {
    width: 29px;
    height: 29px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: var(--text-main);
    background: #fffaf0;
    font-size: 0.78rem;
    font-weight: 800;
}

.selected-number--euro {
    color: #432f09;
    background: #efbd4e;
}

.selection-placeholder {
    color: rgba(255, 250, 240, 0.56);
    font-size: 0.84rem;
}

.selection-dock .btn-primary,
.selection-dock .btn-secondary {
    padding: 10px 15px;
    white-space: nowrap;
}

.selection-dock .btn-primary {
    color: #fffaf0;
    background: var(--accent-color);
    box-shadow: none;
}

.selection-dock .btn-primary:hover:not(:disabled) {
    background: #dc684e;
}

.selection-dock .btn-secondary {
    color: #fffaf0;
    border-color: rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.07);
}

.pick-btn {
    color: var(--text-main);
    border-color: rgba(36, 49, 41, 0.13);
    background: var(--surface-raised);
}

.pick-btn:hover {
    border-color: rgba(200, 85, 61, 0.45);
    background: #f3e7d8;
}

.pick-btn.active {
    color: #fffaf0;
    border-color: rgba(169, 66, 48, 0.5);
    background: linear-gradient(145deg, #d86a50, #b74432);
    box-shadow: 0 0 0 3px var(--accent-soft), 0 8px 18px rgba(92, 45, 35, 0.15);
}

.pick-btn.active.euro {
    color: #432f09;
    border-color: rgba(172, 119, 25, 0.44);
    background: var(--ball-euro-bg);
    box-shadow: 0 0 0 3px rgba(214, 166, 60, 0.13), 0 8px 18px rgba(92, 60, 8, 0.14);
}

.btn,
.btn-secondary {
    color: var(--text-main);
    border-color: var(--glass-border);
    background: var(--surface-raised);
}

.btn-primary {
    color: #fffaf0;
    background: var(--accent-color);
}

.trend-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 18px;
    padding: 14px 18px;
    box-shadow: none;
}

.trend-toolbar-label,
.trend-toolbar-hint {
    display: block;
}

.trend-toolbar-label {
    font-weight: 800;
}

.trend-toolbar-hint {
    color: var(--text-muted);
    font-size: 0.82rem;
}

.range-control {
    display: flex;
    padding: 4px;
    border-radius: 10px;
    background: var(--surface-soft);
}

.range-btn {
    padding: 8px 13px;
    border: 0;
    border-radius: 8px;
    color: var(--text-muted);
    background: transparent;
    font: inherit;
    font-size: 0.86rem;
    font-weight: 700;
    cursor: pointer;
}

.range-btn.active {
    color: #fffaf0;
    background: var(--secondary-color);
    box-shadow: 0 4px 12px rgba(40, 89, 77, 0.18);
}

.range-btn:disabled {
    cursor: wait;
    opacity: 0.58;
}

.charts-grid {
    margin-top: 22px;
}

.panel--chart {
    min-height: 410px;
}

.chart-card-header {
    margin-bottom: 18px;
}

.chart-card-header h3 {
    margin: 3px 0 0;
}

.chart-kicker {
    color: var(--accent-color);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.chart-insight {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid rgba(36, 49, 41, 0.1);
    color: var(--text-muted);
    font-size: 0.9rem;
}

.data-state {
    color: var(--text-muted);
    background: var(--surface-soft);
}

.data-state--error {
    color: #8f2f41;
    border-color: rgba(180, 56, 76, 0.17);
    background: rgba(180, 56, 76, 0.07);
}

.has-error .subtitle {
    color: #f2a9a0;
}

.matrix-summary {
    background: var(--surface-raised);
    border-color: var(--glass-border);
    border-left-color: var(--accent-color);
}

th {
    color: var(--text-muted);
}

th, td {
    border-bottom-color: rgba(36, 49, 41, 0.08);
}

tr:hover td {
    background: rgba(40, 89, 77, 0.04);
}

footer {
    color: rgba(255, 250, 240, 0.66);
    border-top: 0;
    background: #243129;
}

.footer-links a {
    color: rgba(255, 250, 240, 0.72);
}

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

@media (max-width: 1050px) {
    #main-navigation {
        border-color: var(--glass-border);
        background: rgba(255, 253, 247, 0.99);
        box-shadow: 0 18px 50px rgba(61, 52, 38, 0.18);
    }
}

@media (max-width: 760px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 26px;
    }

    .jackpot-info {
        align-items: center;
        text-align: center;
    }

    .balls-container {
        justify-content: center;
    }

    .hero-main {
        text-align: center;
    }

    .trend-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .range-control {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 600px) {
    .hero-content {
        padding: 30px 20px;
    }

    .panel--hero .glow-text {
        font-size: 2.35rem;
    }

    .jackpot-info {
        width: auto;
        padding: 22px;
    }

    .selection-dock {
        top: 76px;
        align-items: stretch;
        flex-direction: column;
        margin: -6px -6px 26px;
        padding: 13px;
    }

    .selection-dock-actions {
        display: grid;
        grid-template-columns: 1fr auto;
    }

    .selection-dock .btn-primary,
    .selection-dock .btn-secondary {
        width: auto;
    }

    .panel--chart {
        min-height: 360px;
    }

    #history-table tr.history-row {
        background: var(--glass-bg);
    }

    #history-table tr.details-row.open {
        background: var(--surface-raised);
    }
}

/* Phase 3: motion, chart polish and accessible interaction details */
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.balls-container {
    align-items: flex-end;
    gap: 26px;
}

.ball-group {
    display: grid;
    grid-template-columns: repeat(5, 60px);
    gap: 10px;
}

.ball-group--euro {
    grid-template-columns: repeat(2, 60px);
}

.ball-group-label {
    grid-column: 1 / -1;
    color: rgba(255, 250, 240, 0.64);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.range-control[aria-busy="true"] {
    opacity: 0.68;
}

.range-control[aria-busy="true"] .range-btn.active {
    box-shadow: 0 0 0 3px rgba(40, 89, 77, 0.12);
}

.checker-results:focus {
    outline: none;
}

.checker-results:focus-visible {
    box-shadow: 0 0 0 4px rgba(200, 85, 61, 0.16), var(--shadow-soft);
}

.history-row td:first-child::after {
    content: '+';
    float: right;
    margin-left: 10px;
    color: var(--accent-color);
    font-weight: 800;
}

.history-row[aria-expanded="true"] td:first-child::after {
    content: '−';
}

.reveal-item {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 480ms ease, transform 480ms ease;
}

.reveal-item.is-revealed {
    opacity: 1;
    transform: none;
}

.is-ready .ball-group .ball {
    animation: ball-in 460ms cubic-bezier(0.2, 0.75, 0.25, 1.15) backwards;
}

.is-ready .ball-group .ball:nth-child(2) { animation-delay: 40ms; }
.is-ready .ball-group .ball:nth-child(3) { animation-delay: 80ms; }
.is-ready .ball-group .ball:nth-child(4) { animation-delay: 120ms; }
.is-ready .ball-group .ball:nth-child(5) { animation-delay: 160ms; }
.is-ready .ball-group .ball:nth-child(6) { animation-delay: 200ms; }

@keyframes ball-in {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.84);
    }
}

@media (hover: hover) {
    .panel--stat,
    .panel--chart {
        transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
    }

    .panel--stat:hover,
    .panel--chart:hover {
        transform: translateY(-2px);
        border-color: rgba(200, 85, 61, 0.2);
        box-shadow: 0 18px 44px rgba(61, 52, 38, 0.1);
    }
}

@media (max-width: 760px) {
    .balls-container {
        gap: 18px;
    }

    .ball-group {
        grid-template-columns: repeat(5, 48px);
        justify-content: center;
    }

    .ball-group--euro {
        grid-template-columns: repeat(2, 48px);
    }

    .ball-group-label {
        text-align: center;
    }
}

@media (max-width: 360px) {
    .ball-group {
        grid-template-columns: repeat(5, 43px);
        gap: 7px;
    }

    .ball-group--euro {
        grid-template-columns: repeat(2, 43px);
    }

    .ball-group .ball {
        width: 43px;
        height: 43px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .reveal-item,
    .is-ready .ball-group .ball,
    .panel--stat,
    .panel--chart {
        animation: none !important;
        opacity: 1;
        transform: none;
        transition: none !important;
    }

    html {
        scroll-behavior: auto;
    }
}
