:root {
    --bg: #0f1117;
    --card: #1a1d27;
    --border: #2a2d37;
    --text: #e4e4e7;
    --dim: #71717a;
    --accent: #3b82f6;
    --red: #ef4444;
    --green: #22c55e;
    --yellow: #eab308;
    --purple: #a855f7;
    --orange: #f97316;
    --slo-red: #d42027;
    --em-gold: #d4a017;
    --ed-purple: #7c3aed;
    --l49-blue: #003399;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
}

/* Nav */
nav {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--card);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    backdrop-filter: blur(8px);
}
nav .logo {
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
nav .logo:hover .logo-name {
    text-shadow: 0 0 20px rgba(201, 168, 76, 0.6), 0 0 40px rgba(201, 168, 76, 0.3);
    filter: drop-shadow(0 0 12px rgba(201, 168, 76, 0.5));
}
nav .logo:hover .logo-icon {
    filter: drop-shadow(0 0 8px rgba(201, 168, 76, 0.5));
    transform: scale(1.05);
}
.logo-icon {
    width: 36px;
    height: 36px;
    object-fit: contain;
    filter: drop-shadow(0 0 4px rgba(201, 168, 76, 0.3));
    transition: filter 0.3s, transform 0.3s;
}
.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1;
}
.logo-name {
    font-family: 'Cinzel', serif;
    font-weight: 700;
    font-size: 1.3rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    background: linear-gradient(
        135deg,
        #8b6914 0%,
        #c9a84c 20%,
        #f5e6a3 35%,
        #fffbe6 50%,
        #f5e6a3 65%,
        #c9a84c 80%,
        #8b6914 100%
    );
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 8px rgba(201, 168, 76, 0.3));
    animation: logo-shimmer 6s ease-in-out infinite;
    transition: filter 0.3s;
}
@keyframes logo-shimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}
.logo-sub {
    font-size: 0.5rem;
    color: #6b6f7a;
    letter-spacing: 0.12em;
    margin-top: 2px;
}
.nav-links { display: flex; gap: 0.25rem; }
.nav-links a {
    color: var(--dim);
    text-decoration: none;
    padding: 0.4rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.85rem;
    transition: all 0.2s;
}
.nav-links a:hover { color: var(--text); background: var(--border); }
.nav-links a.active { color: var(--text); background: var(--border); font-weight: 600; }
nav a {
    color: var(--dim);
    text-decoration: none;
    transition: all 0.2s;
}
.game-tabs { display: flex; gap: 0.5rem; margin-left: auto; }
.game-tab {
    padding: 0.4rem 0.9rem;
    border-radius: 2rem;
    font-weight: 600;
    font-size: 0.8rem;
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
}
.game-tab.slo { border: 2px solid var(--slo-red); color: var(--slo-red); }
.game-tab.slo.active, .game-tab.slo:hover { background: var(--slo-red); color: #fff; }
.game-tab.em { border: 2px solid var(--em-gold); color: var(--em-gold); }
.game-tab.em.active, .game-tab.em:hover { background: var(--em-gold); color: #000; }
.game-tab.l49 { border: 2px solid var(--l49-blue); color: var(--l49-blue); }
.game-tab.l49.active, .game-tab.l49:hover { background: var(--l49-blue); color: #fff; }
.game-tab.ed { border: 2px solid var(--ed-purple); color: var(--ed-purple); }
.game-tab.ed.active, .game-tab.ed:hover { background: var(--ed-purple); color: #fff; }

/* Layout */
.container { max-width: 960px; margin: 0 auto; padding: 1.5rem; }
.grid { display: grid; gap: 1rem; }
.grid-2 { grid-template-columns: 1fr 1fr; }

/* Cards */
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1.25rem;
}
.card h2 {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--dim);
    margin-bottom: 0.75rem;
}
.card.highlight { border-color: var(--accent); }

/* Balls */
.balls { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.ball {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    box-shadow: inset 0 -3px 6px rgba(0,0,0,0.25), inset 0 3px 6px rgba(255,255,255,0.15), 0 2px 4px rgba(0,0,0,0.3);
    position: relative;
}
.ball::after {
    content: '';
    position: absolute;
    top: 4px;
    left: 6px;
    width: 40%;
    height: 30%;
    border-radius: 50%;
    background: radial-gradient(ellipse at center, rgba(255,255,255,0.45) 0%, rgba(255,255,255,0) 100%);
    pointer-events: none;
}
.ball.main { background: radial-gradient(circle at 35% 30%, rgba(255,255,255,0.2), transparent 60%), var(--slo-red); color: #fff; }
.ball.main.em-color { background: radial-gradient(circle at 35% 30%, rgba(255,255,255,0.25), transparent 60%), var(--em-gold); color: #000; text-shadow: 0 1px 2px rgba(0,0,0,0.15); }
.ball.main.ed-color { background: radial-gradient(circle at 35% 30%, rgba(255,255,255,0.2), transparent 60%), var(--ed-purple); }
.ball.main.l49-color { background: radial-gradient(circle at 35% 30%, rgba(255,255,255,0.2), transparent 60%), var(--l49-blue); }
.ball.bonus { background: radial-gradient(circle at 35% 30%, rgba(255,255,255,0.2), transparent 60%), var(--green); color: #fff; }
.ball.hit { background: radial-gradient(circle at 35% 30%, rgba(255,255,255,0.25), transparent 60%), var(--green); color: #fff; box-shadow: inset 0 -3px 6px rgba(0,0,0,0.2), inset 0 3px 6px rgba(255,255,255,0.15), 0 0 12px rgba(34,197,94,0.5); }
.ball.miss { background: radial-gradient(circle at 35% 30%, rgba(255,255,255,0.1), transparent 60%), var(--border); color: var(--dim); text-shadow: none; }
.ball.small { width: 32px; height: 32px; font-size: 0.8rem; }
.balls .sep { color: var(--dim); margin: 0 0.25rem; font-size: 1.2rem; }

/* Draw date */
.draw-date { font-size: 0.85rem; color: var(--dim); margin-bottom: 0.5rem; }
.draw-date strong { color: var(--text); }

/* Next draw card */
.next-draw-card { text-align: center; }
.next-draw-countdown { margin-bottom: 0.25rem; }
.next-draw { font-size: 1.1rem; }
.next-draw .countdown { color: var(--yellow); font-weight: 700; }
#countdown-wrap {
    margin: 0.5rem auto;
    border-collapse: collapse;
    text-align: center;
}
#countdown-labels td {
    font-size: 0.6rem;
    letter-spacing: 0.05em;
    color: var(--dim);
}
#countdown-timer {
    font-size: 1.8rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--text);
}
#countdown-timer .countdown-sep { opacity: 0.4; }
.next-draw-cutoff {
    color: var(--dim);
    font-size: 0.85rem;
}
.next-draw-divider {
    height: 1px;
    background: var(--border);
    margin: 0.75rem 0;
}
.next-draw-method { padding: 0.25rem 0; }
.next-draw-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    padding-top: 0.25rem;
}
.next-draw-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Trends */
.trend-row { display: flex; align-items: center; gap: 0.5rem; margin: 0.25rem 0; font-size: 0.9rem; }
.trend-label { width: 80px; color: var(--dim); }
.trend-nums { display: flex; gap: 0.3rem; }
.trend-num { padding: 0.15rem 0.5rem; border-radius: 0.25rem; font-weight: 600; font-size: 0.85rem; }
.trend-num.hot { background: rgba(239,68,68,0.15); color: var(--red); }
.trend-num.cold { background: rgba(59,130,246,0.15); color: var(--accent); }
.trend-num.overdue { background: rgba(168,85,247,0.15); color: var(--purple); }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    border-radius: 0.5rem;
    border: none;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #2563eb; }
.btn-primary.slo { background: var(--slo-red); }
.btn-primary.slo:hover { background: #b91c1c; }
.btn-primary.em { background: var(--em-gold); color: #000; }
.btn-primary.em:hover { background: #b8860b; }
.btn-primary.l49 { background: var(--l49-blue); }
.btn-primary.l49:hover { background: #002277; }
.btn-primary.ed { background: var(--ed-purple); }
.btn-primary.ed:hover { background: #6d28d9; }
.btn-secondary { background: var(--border); color: var(--text); }
.btn-secondary:hover { background: #3a3d47; }
.btn-sm { padding: 0.35rem 0.75rem; font-size: 0.8rem; }
.btn-danger { background: rgba(239,68,68,0.15); color: var(--red); }
.btn-danger:hover { background: rgba(239,68,68,0.3); }
.actions { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 1rem; }
.input-created-by {
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 6px;
    padding: 0.45rem 0.7rem;
    font-size: 0.85rem;
    max-width: 180px;
    outline: none;
    transition: border-color 0.2s;
}
.input-created-by:focus { border-color: var(--accent); }
.input-created-by::placeholder { color: var(--dim); }

/* Predictions table */
.pred-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}
.pred-row:last-child { border-bottom: none; }
.pred-id { color: var(--dim); font-family: monospace; font-size: 0.8rem; width: 70px; }
.pred-author { color: var(--accent); font-size: 0.8rem; font-weight: 600; max-width: 80px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pred-method { color: var(--dim); font-size: 0.8rem; flex: 1; }
.pred-status { font-weight: 600; font-size: 0.8rem; }
.pred-status.pending { color: var(--yellow); }
.pred-status.hit { color: var(--green); }
.pred-status.miss { color: var(--dim); }

/* Stats */
.stat-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.2rem 0;
    font-size: 0.85rem;
}
.stat-bar .num { width: 25px; text-align: right; font-weight: 600; }
.stat-bar .bar {
    height: 8px;
    border-radius: 4px;
    background: var(--accent);
    transition: width 0.5s;
}
.stat-bar .pct { color: var(--dim); width: 45px; }

/* Tip Footer - fixed bottom, for tip reveal */
.tip-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 40;
    background: var(--card);
    border-top: 1px solid var(--border);
    min-height: 2.5rem;
    transition: border-color 0.3s;
}
.tip-footer.tip-active {
    border-top: 2px solid var(--accent);
}
.tip-footer-inner {
    max-width: 960px;
    margin: 0 auto;
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.tip-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    justify-content: center;
}

/* Tip reveal in footer */
.tip-reveal {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    white-space: nowrap;
}
.tip-reveal-balls { display: flex; gap: 0.3rem; align-items: center; }
.tip-ball {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    box-shadow: inset 0 -3px 5px rgba(0,0,0,0.25), inset 0 3px 5px rgba(255,255,255,0.15), 0 2px 3px rgba(0,0,0,0.3);
    position: relative;
}
.tip-ball::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 5px;
    width: 40%;
    height: 30%;
    border-radius: 50%;
    background: radial-gradient(ellipse at center, rgba(255,255,255,0.4) 0%, rgba(255,255,255,0) 100%);
    pointer-events: none;
}
.tip-ball.main { background: radial-gradient(circle at 35% 30%, rgba(255,255,255,0.2), transparent 60%), var(--slo-red); color: #fff; }
.tip-ball.main.em-color { background: radial-gradient(circle at 35% 30%, rgba(255,255,255,0.25), transparent 60%), var(--em-gold); color: #000; text-shadow: 0 1px 2px rgba(0,0,0,0.15); }
.tip-ball.main.ed-color { background: radial-gradient(circle at 35% 30%, rgba(255,255,255,0.2), transparent 60%), var(--ed-purple); color: #fff; }
.tip-ball.main.l49-color { background: radial-gradient(circle at 35% 30%, rgba(255,255,255,0.2), transparent 60%), var(--l49-blue); color: #fff; }
.tip-ball.bonus { background: radial-gradient(circle at 35% 30%, rgba(255,255,255,0.2), transparent 60%), var(--green); color: #fff; }
.tip-sep { color: var(--dim); font-size: 1rem; }
.tip-reveal-method { font-size: 0.7rem; color: var(--dim); max-width: 120px; overflow: hidden; text-overflow: ellipsis; }
.tip-reveal-pid { font-size: 0.65rem; color: var(--dim); font-family: monospace; }
.tip-queue-count { font-size: 0.7rem; color: var(--yellow); font-weight: 600; }
.tip-loading-text { color: var(--yellow); font-size: 0.9rem; font-weight: 600; }
.tip-error { color: var(--red); font-size: 0.85rem; }

/* New prediction row animation */
.pred-row-new {
    background: rgba(59, 130, 246, 0.05);
    border-left: 3px solid var(--accent);
    padding-left: calc(0.6rem - 3px);
}
.pred-row-new { animation: pred-glow 2s ease-out forwards; }
@keyframes pred-glow {
    0% { background: rgba(59, 130, 246, 0.1); }
    100% { background: transparent; border-left-color: transparent; }
}

/* Confirm modal */
.modal-overlay {
    position: fixed; inset: 0; z-index: 9999;
    background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center;
}
.modal-box {
    background: var(--card); border: 1px solid var(--border);
    border-radius: 1rem; padding: 1.5rem 2rem; max-width: 360px; width: 90%;
    text-align: center; box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}
.modal-box p { font-size: 1.05rem; margin: 0 0 1.2rem 0; }
.modal-actions { display: flex; gap: 0.75rem; justify-content: center; }
.modal-actions .btn { min-width: 6rem; padding: 0.5rem 1.2rem; font-size: 0.95rem; border-radius: 0.5rem; }

/* Expert modal */
.method-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.method-btn {
    padding: 0.6rem;
    background: var(--border);
    border: 1px solid transparent;
    border-radius: 0.5rem;
    color: var(--text);
    cursor: pointer;
    text-align: left;
    font-size: 0.85rem;
    transition: all 0.2s;
}
.method-btn:hover { border-color: var(--accent); background: rgba(59,130,246,0.1); }
.method-btn.method-active {
    border-color: var(--green);
    background: rgba(34,197,94,0.1);
}
.method-check {
    position: absolute;
    top: 0.4rem;
    right: 0.5rem;
    color: var(--green);
    font-size: 0.9rem;
    font-weight: 700;
}
.method-btn { position: relative; text-decoration: none; }

/* Active method on dashboard */
.active-method {
    font-size: 0.8rem;
    color: var(--dim);
    padding: 0.4rem 0.75rem;
    background: var(--border);
    border-radius: 0.5rem;
    display: inline-block;
}
.active-method strong { color: var(--text); }
.method-change {
    color: var(--accent);
    text-decoration: none;
    margin-left: 0.5rem;
    font-size: 0.75rem;
}
.method-change:hover { text-decoration: underline; }

/* Selection info */
.selection-info { font-size: 0.8rem; margin-left: 0.5rem; }

/* Reveal animation area */
.reveal-area { margin: 2rem 0 0.5rem; min-height: 60px; }

/* Toast */
.toast {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    background: var(--card);
    border: 1px solid var(--green);
    border-radius: 0.5rem;
    padding: 0.75rem 1.25rem;
    font-size: 0.9rem;
    animation: fadeIn 0.3s, fadeOut 0.3s 2.7s;
    z-index: 100;
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } }
@keyframes fadeOut { to { opacity: 0; transform: translateY(10px); } }

/* Disclaimer banner - fixed at top */
.disclaimer-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 100;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.disclaimer-box {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem 2rem;
    max-width: 520px;
    text-align: center;
    color: var(--yellow);
    font-size: 0.85rem;
    line-height: 1.6;
}

/* Nav country switcher */
.nav-country {
    text-decoration: none;
    font-size: 1.3rem;
    line-height: 1;
    padding: 0.2rem;
    flex-shrink: 0;
    transition: transform 0.2s;
}
.nav-country:hover { transform: scale(1.15); }

/* Language switch */
.lang-switch { display: flex; gap: 2px; flex-shrink: 0; }
.lang-btn {
    font-size: 0.6rem; font-weight: 600; color: var(--dim);
    text-decoration: none; padding: 0.15rem 0.3rem;
    border-radius: 0.2rem; transition: all 0.2s;
}
.lang-btn:hover { color: var(--text); background: var(--border); }
.lang-btn.active { color: var(--text); background: var(--border); }

/* Nav info icon (Haftungsausschluss) */
.nav-info {
    color: var(--dim);
    text-decoration: none;
    font-size: 1.1rem;
    padding: 0.25rem;
    line-height: 1;
    flex-shrink: 0;
}
.nav-info:hover { color: var(--text); }

/* Disclaimer page */
.disclaimer-page h3 {
    font-size: 0.95rem;
    color: var(--text);
    margin: 1.25rem 0 0.5rem;
}
.disclaimer-page p {
    font-size: 0.85rem;
    color: var(--dim);
    line-height: 1.6;
    margin-bottom: 0.5rem;
}
.disclaimer-page ul {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0;
}
.disclaimer-page ul li {
    font-size: 0.85rem;
    color: var(--dim);
    padding: 0.3rem 0;
    padding-left: 1rem;
    border-left: 2px solid var(--accent);
    margin-bottom: 0.25rem;
}

/* Landing page */
.landing {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
}
.landing-header { margin-bottom: 2.5rem; }
.landing-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    filter: drop-shadow(0 0 12px rgba(201, 168, 76, 0.4));
    margin-bottom: 1rem;
}
.landing-title {
    font-family: 'Cinzel', serif;
    font-size: 2.5rem;
    letter-spacing: 0.3em;
    background: linear-gradient(135deg, #8b6914, #f5e6a3, #c9a84c, #8b6914);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: logo-shimmer 6s ease-in-out infinite;
    margin: 0;
}
.landing-subtitle {
    color: var(--dim);
    font-size: 0.9rem;
    margin-top: 0.5rem;
    letter-spacing: 0.1em;
}
.landing-prompt {
    color: var(--dim);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1.5rem;
}
.landing-countries {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.75rem;
    max-width: 900px;
    width: 100%;
}
.country-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    padding: 1rem 0.75rem;
    background: var(--card);
    border: 2px solid var(--border);
    border-radius: 0.75rem;
    text-decoration: none;
    color: var(--text);
    transition: all 0.3s;
}
.country-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}
.country-flag { font-size: 2rem; }
.country-name { font-weight: 700; font-size: 0.9rem; }
.country-games { font-size: 0.6rem; color: var(--dim); text-align: center; line-height: 1.3; }
.country-card.country-suggested {
    border-color: var(--accent);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.2);
}
.geo-badge {
    font-size: 0.6rem;
    background: var(--accent);
    color: #fff;
    padding: 0.1rem 0.4rem;
    border-radius: 0.25rem;
    margin-left: 0.3rem;
    vertical-align: middle;
}
.landing-footer {
    margin-top: 3rem;
    color: var(--dim);
    font-size: 0.75rem;
}

/* Forms */
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-size: 0.8rem; color: var(--dim); margin-bottom: 0.3rem; text-transform: uppercase; letter-spacing: 0.05em; }
.form-input {
    width: 100%;
    padding: 0.6rem 0.75rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    color: var(--text);
    font-size: 0.9rem;
    font-family: inherit;
}
.form-input:focus { border-color: var(--accent); outline: none; }
.form-hint { font-size: 0.7rem; color: var(--dim); margin-top: 0.2rem; display: block; }
.msg {
    padding: 0.6rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}
.msg-success { background: rgba(34,197,94,0.1); border: 1px solid rgba(34,197,94,0.3); color: var(--green); }
.msg-error { background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.3); color: var(--red); }

/* Preview table */
.preview-table { width: 100%; border-collapse: collapse; font-size: 0.8rem; }
.preview-table th { text-align: left; color: var(--dim); font-size: 0.7rem; text-transform: uppercase; padding: 0.3rem; border-bottom: 1px solid var(--border); }
.preview-table td { padding: 0.25rem 0.3rem; border-bottom: 1px solid var(--border); }
.dup-row { opacity: 0.4; }
textarea.form-input { resize: vertical; font-family: monospace; font-size: 0.8rem; }

/* Info page */
.info-notice {
    background: rgba(234, 179, 8, 0.08);
    border: 1px solid rgba(234, 179, 8, 0.25);
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    font-size: 0.8rem;
    color: var(--yellow);
    line-height: 1.6;
    margin-top: 1rem;
}
.info-table { width: 100%; font-size: 0.8rem; border-collapse: collapse; }
.info-table td { padding: 0.4rem 0.5rem; border-bottom: 1px solid var(--border); }
.info-table td:first-child { color: var(--dim); width: 40%; font-weight: 600; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.03em; }
.info-list { list-style: none; padding: 0; margin: 0; }
.info-list li { font-size: 0.8rem; color: var(--dim); padding: 0.2rem 0; padding-left: 0.75rem; border-left: 2px solid var(--border); margin-bottom: 0.2rem; }
.compliance-grid { display: flex; flex-direction: column; gap: 0.5rem; }
.compliance-item { display: flex; align-items: center; gap: 0.5rem; font-size: 0.8rem; padding: 0.4rem 0; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.compliance-item:last-child { border-bottom: none; }
.compliance-item strong { flex-shrink: 0; }
.compliance-desc { color: var(--dim); font-size: 0.7rem; width: 100%; padding-left: 4.5rem; }
.compliance-badge {
    font-size: 0.6rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
    padding: 0.15rem 0.4rem; border-radius: 0.25rem; flex-shrink: 0; width: 3.5rem; text-align: center;
}
.compliance-badge.green { background: rgba(34,197,94,0.15); color: var(--green); }
.compliance-badge.blue { background: rgba(59,130,246,0.15); color: var(--accent); }

/* Footer link */
.footer-link { color: var(--dim); text-decoration: underline; }
.footer-link:hover { color: var(--text); }

/* Method descriptions */
.method-desc {
    display: block;
    font-size: 0.75rem;
    color: var(--dim);
    font-weight: 400;
    margin-top: 0.25rem;
    line-height: 1.3;
}

/* Tooltips */
.tooltip-trigger {
    position: relative;
    cursor: help;
    border-bottom: 1px dotted var(--dim);
}
.tooltip-text {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 0;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
    color: var(--text);
    width: 220px;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    line-height: 1.4;
}
.tooltip-trigger:hover .tooltip-text { display: block; }

/* Stats grid (hit rates) */
.stats-grid {
    display: flex;
    justify-content: space-around;
    gap: 0.5rem;
    text-align: center;
}
.stat-item { display: flex; flex-direction: column; gap: 0.25rem; flex: 1; min-width: 0; }
.stat-value { font-size: 1.5rem; font-weight: 700; }
.stat-label { font-size: 0.75rem; color: var(--dim); text-transform: uppercase; letter-spacing: 0.05em; }

/* Draw rows (draws page) */
.draw-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}
.draw-row:last-of-type { border-bottom: none; }
.draw-row-date { color: var(--dim); font-size: 0.8rem; width: 100px; flex-shrink: 0; }

/* Empty trend placeholder */
.trend-empty { color: var(--dim); font-size: 0.8rem; font-style: italic; }

/* Prediction groups */
.pred-group-header {
    font-size: 0.75rem;
    color: var(--dim);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.75rem 0 0.25rem;
    border-top: 1px solid var(--border);
    margin-top: 0.25rem;
}
.pred-group-header:first-child { border-top: none; margin-top: 0; }
.pred-toggle { display: inline-block; transition: transform 0.2s; margin-right: 0.2rem; }
.pred-group-header.collapsed .pred-toggle { transform: rotate(-90deg); }
.pred-group-badge {
    font-size: 0.65rem;
    padding: 0.1rem 0.4rem;
    border-radius: 0.25rem;
    margin-left: 0.5rem;
    font-weight: 600;
}
.pred-group-badge.pending { background: rgba(234,179,8,0.15); color: var(--yellow); }
.pred-group-badge.evaluated { background: rgba(34,197,94,0.15); color: var(--green); }

/* Draw meta info */
.draw-meta {
    color: var(--dim);
    font-size: 0.7rem;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}
.page-info { color: var(--dim); font-size: 0.85rem; }

/* Mobile nav toggle */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text);
    font-size: 1.4rem;
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
}

/* Loading spinner */
.btn-loading { position: relative; color: transparent !important; pointer-events: none; }
.btn-loading::after {
    content: ''; position: absolute; top: 50%; left: 50%;
    width: 16px; height: 16px; margin: -8px 0 0 -8px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff; border-radius: 50%;
    animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Tablet breakpoint ── */
@media (max-width: 768px) {
    .grid-2 { grid-template-columns: 1fr; }
    .container { padding: 1rem; }
    .stats-grid { gap: 0.3rem; }
    .stat-value { font-size: 1.1rem; }
    .game-tabs { flex-wrap: wrap; gap: 0.3rem; }
}

/* ── Smartphone breakpoint ── */
@media (max-width: 640px) {
    /* Container & layout */
    .container { padding: 0.5rem; }
    .card { padding: 1rem; border-radius: 0.5rem; }
    .card h2 { font-size: 0.75rem; margin-bottom: 0.5rem; }

    /* Nav */
    nav {
        padding: 0.5rem 0.75rem;
        gap: 0.4rem;
        flex-wrap: wrap;
    }
    .nav-toggle { display: block; }
    .nav-links {
        display: none;
        width: 100%;
        order: 10;
        flex-direction: column;
        gap: 0.25rem;
        padding-top: 0.5rem;
        border-top: 1px solid var(--border);
    }
    .nav-links.open { display: flex; }
    .nav-links a { padding: 0.5rem 0.75rem; font-size: 0.9rem; }
    .game-tabs {
        width: 100%;
        order: 5;
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.25rem;
        margin-left: 0;
    }
    .game-tab { padding: 0.3rem 0.6rem; font-size: 0.7rem; }
    .logo-name { font-size: 1rem; letter-spacing: 0.15em; }
    .logo-icon { width: 28px; height: 28px; }
    .logo-sub { font-size: 0.4rem; }
    .lang-switch { gap: 1px; }
    .lang-btn { font-size: 0.55rem; padding: 0.2rem 0.25rem; }

    /* Balls – responsive sizing */
    .ball { width: 32px; height: 32px; font-size: 0.8rem; }
    .ball.small { width: 26px; height: 26px; font-size: 0.7rem; }
    .ball::after { top: 3px; left: 4px; }
    .balls { gap: 0.3rem; }
    .balls .sep { font-size: 1rem; margin: 0 0.1rem; }

    /* Dashboard: Next Draw card */
    #countdown-timer { font-size: 1.4rem !important; }
    .next-draw { font-size: 1rem; }
    .active-method {
        font-size: 0.7rem;
        padding: 0.3rem 0.6rem;
        display: block;
        word-break: break-word;
    }

    /* Generate actions: stack vertically on mobile */
    .next-draw-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .next-draw-buttons {
        flex-direction: column;
    }
    .input-created-by {
        max-width: 100%;
        width: 100%;
    }
    .btn { width: 100%; justify-content: center; padding: 0.7rem 1rem; font-size: 0.9rem; }
    .btn-sm { width: auto; padding: 0.35rem 0.75rem; font-size: 0.8rem; }

    /* Trends */
    .trend-row { flex-wrap: wrap; gap: 0.3rem; }
    .trend-label { width: 70px; font-size: 0.8rem; }
    .trend-nums { flex-wrap: wrap; gap: 0.25rem; }
    .trend-num { font-size: 0.75rem; padding: 0.1rem 0.4rem; }

    /* Stats grid (hit rates) */
    .stats-grid { gap: 0.2rem; }
    .stat-value { font-size: 0.9rem; }
    .stat-label { font-size: 0.55rem; }

    /* Stat bars */
    .stat-bar { gap: 0.3rem; font-size: 0.8rem; }
    .stat-bar .pct { width: 40px; font-size: 0.75rem; }

    /* Prediction rows */
    .pred-row {
        flex-wrap: wrap;
        gap: 0.3rem;
        padding: 0.5rem 0;
    }
    .pred-id { width: auto; font-size: 0.7rem; }
    .pred-author { font-size: 0.7rem; max-width: 60px; }
    .pred-method {
        width: 100%;
        order: 10;
        font-size: 0.7rem;
        margin-top: -0.15rem;
    }
    .pred-status { font-size: 0.75rem; }
    .pred-group-header { font-size: 0.7rem; padding: 0.6rem 0 0.2rem; }
    .pred-group-badge { font-size: 0.6rem; }

    /* Draw rows (draws page) */
    .draw-row { flex-wrap: wrap; gap: 0.3rem; padding: 0.4rem 0; }
    .draw-row-date { width: 100%; font-size: 0.75rem; }
    .draw-meta { width: 100%; font-size: 0.65rem; }

    /* Tip footer (bottom reveal) */
    .tip-footer-inner { padding: 0.5rem 0.75rem; }
    .tip-reveal { gap: 0.4rem; flex-wrap: wrap; justify-content: center; }
    .tip-reveal-balls { gap: 0.2rem; justify-content: center; }
    .tip-ball { width: 28px; height: 28px; font-size: 0.7rem; }
    .tip-ball::after { top: 2px; left: 4px; }
    .tip-sep { font-size: 0.8rem; }
    .tip-reveal-method { display: none; }
    .tip-reveal-pid { font-size: 0.6rem; }
    .tip-queue-count { font-size: 0.65rem; }
    .tip-loading-text { font-size: 0.8rem; }

    /* Expert: method grid single column */
    .method-grid { grid-template-columns: 1fr; }
    .method-btn { padding: 0.7rem; font-size: 0.85rem; }
    .method-desc { font-size: 0.7rem; }

    /* Forms */
    .form-input { font-size: 1rem; padding: 0.7rem 0.75rem; }
    .form-group label { font-size: 0.75rem; }

    /* Pagination: bigger touch targets */
    .pagination { gap: 0.5rem; }
    .pagination .btn { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }

    /* Tooltips: full-width on mobile */
    .tooltip-text { width: 180px; font-size: 0.7rem; }

    /* Info & compliance */
    .compliance-desc { padding-left: 0; }
    .info-table td:first-child { width: 35%; }
    .info-table td { padding: 0.3rem; font-size: 0.75rem; }

    /* Landing page */
    .landing-title { font-size: 1.6rem; letter-spacing: 0.2em; }
    .landing-logo { width: 60px; height: 60px; }
    .landing-subtitle { font-size: 0.8rem; }
    .landing-countries { grid-template-columns: 1fr 1fr; gap: 0.5rem; }
    .country-card { padding: 0.75rem 0.5rem; }
    .country-flag { font-size: 1.6rem; }
    .country-name { font-size: 0.8rem; }

    /* Disclaimer banner */
    .disclaimer-box { padding: 1rem 1.25rem; font-size: 0.8rem; }

    /* Delete all button: don't stretch full width */
    #predictions-card > div:first-child {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
}

/* ── Very small phones (< 360px) ── */
@media (max-width: 360px) {
    .container { padding: 0.35rem; }
    .card { padding: 0.75rem; }
    .ball { width: 28px; height: 28px; font-size: 0.75rem; }
    .ball.small { width: 24px; height: 24px; font-size: 0.65rem; }
    .tip-ball { width: 24px; height: 24px; font-size: 0.65rem; }
    .game-tab { padding: 0.2rem 0.45rem; font-size: 0.6rem; border-width: 1.5px; }
    .logo-name { font-size: 0.85rem; letter-spacing: 0.1em; }
    #countdown-timer { font-size: 1.2rem !important; }
    .pred-row { font-size: 0.8rem; }
    .pred-id { font-size: 0.65rem; }
    .landing-title { font-size: 1.3rem; }
    .landing-countries { grid-template-columns: 1fr; }
}
