/* ============================================
   Lottomachine - Stylesheet

   Copyright (c) 2026 Apptimate. Alle rechten voorbehouden.
   Ongeautoriseerd kopieren, verspreiden of hergebruiken van deze
   code of het ontwerp is niet toegestaan. Zie LICENSE.
   ============================================ */

:root {
    --lm-rev: 7f3a9c;
    --bg-primary: #0A0E17;
    --bg-card: #111827;
    --bg-card-hover: #1a2332;
    --accent-gold: #D4A843;
    --accent-blue: #3B82F6;
    --accent-green: #10B981;
    --text-primary: #F1F5F9;
    --text-secondary: #94A3B8;
    --border-color: #1E293B;
    --ball-shadow: 0 4px 15px rgba(0,0,0,0.4);
}

* { box-sizing: border-box; }

body {
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'DM Sans', sans-serif;
    min-height: 100vh;
}

/* Background mesh effect */
.bg-mesh {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background:
        radial-gradient(ellipse at 20% 20%, rgba(59,130,246,0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(212,168,67,0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(16,185,129,0.04) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

.content-wrapper { position: relative; z-index: 1; }

/* ---- Header ---- */
.site-header {
    padding: 2rem 0 1rem;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 2rem;
}
.site-header h1 {
    font-family: 'Space Mono', monospace;
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -1px;
    background: linear-gradient(135deg, var(--accent-gold), #F59E0B, var(--accent-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.25rem;
}
.site-header p {
    color: var(--text-secondary);
    font-size: 1rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* ---- Language switcher ---- */
.lang-switcher {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    gap: 0.25rem;
}
.lang-switcher a {
    padding: 0.3rem 0.7rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    text-decoration: none;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    transition: all 0.2s;
}
.lang-switcher a.active,
.lang-switcher a:hover {
    background: var(--accent-gold);
    color: var(--bg-primary);
    border-color: var(--accent-gold);
}

/* ---- Panel cards ---- */
.panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}
.panel-title {
    font-family: 'Space Mono', monospace;
    font-size: 0.85rem;
    color: var(--accent-gold);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

/* ---- Game selector grid ---- */
.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
}
.game-card {
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.25s ease;
    text-align: center;
}
.game-card:hover {
    border-color: var(--accent-blue);
    background: var(--bg-card-hover);
    transform: translateY(-2px);
}
.game-card.selected {
    border-color: var(--accent-gold);
    background: rgba(212,168,67,0.1);
    box-shadow: 0 0 20px rgba(212,168,67,0.15);
}
.game-card .game-icon {
    font-size: 1.8rem;
    margin-bottom: 0.3rem;
}
.game-card .game-name {
    font-weight: 700;
    font-size: 0.85rem;
    margin-bottom: 0.2rem;
}
.game-card .game-desc {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

/* ---- Form elements ---- */
.form-control, .form-select {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 10px;
    padding: 0.6rem 1rem;
}
.form-control:focus, .form-select:focus {
    background: var(--bg-primary);
    border-color: var(--accent-gold);
    color: var(--text-primary);
    box-shadow: 0 0 0 3px rgba(212,168,67,0.15);
}
.form-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ---- Buttons ---- */
.btn-generate {
    background: linear-gradient(135deg, var(--accent-gold), #F59E0B);
    color: var(--bg-primary);
    font-family: 'Space Mono', monospace;
    font-weight: 700;
    font-size: 1rem;
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 12px;
    letter-spacing: 1px;
    transition: all 0.3s;
    text-transform: uppercase;
}
.btn-generate:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(212,168,67,0.35);
    color: var(--bg-primary);
}
.btn-outline-action {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0.5rem 1.2rem;
    font-size: 0.85rem;
    transition: all 0.2s;
}
.btn-outline-action:hover {
    border-color: var(--accent-blue);
    color: var(--accent-blue);
}

/* ---- Lotto balls ---- */
.lotto-ball {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-family: 'Space Mono', monospace;
    font-weight: 700;
    font-size: 0.9rem;
    margin: 3px;
    background: linear-gradient(145deg, #2d3748, #1a202c);
    color: var(--text-primary);
    border: 2px solid #4a5568;
    box-shadow: var(--ball-shadow);
    animation: popIn 0.3s ease-out both;
}
.lotto-ball.bonus-ball {
    background: linear-gradient(145deg, var(--accent-gold), #B8860B);
    color: var(--bg-primary);
    border-color: #F59E0B;
    box-shadow: 0 4px 15px rgba(212,168,67,0.4);
}
.lotto-ball.star-ball {
    background: linear-gradient(145deg, #3B82F6, #1D4ED8);
    color: #fff;
    border-color: #60A5FA;
    box-shadow: 0 4px 15px rgba(59,130,246,0.4);
}
.lotto-ball.dream-ball {
    background: linear-gradient(145deg, #9333EA, #6A1B9A);
    color: #fff;
    border-color: #C084FC;
    box-shadow: 0 4px 15px rgba(147,51,234,0.4);
}

@keyframes popIn {
    0% { transform: scale(0); opacity: 0; }
    70% { transform: scale(1.15); }
    100% { transform: scale(1); opacity: 1; }
}

/* ---- Results table ---- */
.results-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}
.results-table thead th {
    background: var(--bg-primary);
    color: var(--accent-gold);
    font-family: 'Space Mono', monospace;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0.8rem 1rem;
    border-bottom: 2px solid var(--accent-gold);
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}
.results-table thead th:hover {
    color: #F59E0B;
}
.results-table thead th .sort-arrow {
    margin-left: 4px;
    opacity: 0.4;
}
.results-table thead th.sorted .sort-arrow {
    opacity: 1;
}
.results-table tbody tr {
    transition: background 0.2s;
}
.results-table tbody tr:hover {
    background: rgba(59,130,246,0.05);
}
.results-table tbody td {
    padding: 0.6rem 1rem;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}
.draw-number {
    font-family: 'Space Mono', monospace;
    color: var(--text-secondary);
    font-size: 0.85rem;
    min-width: 40px;
}

/* ---- Custom game panel ---- */
.custom-panel {
    display: none;
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(59,130,246,0.05);
    border: 1px solid rgba(59,130,246,0.2);
    border-radius: 12px;
}
.custom-panel.show { display: block; }

/* ---- Bingo panel ---- */
.bingo-panel {
    display: none;
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(16,185,129,0.05);
    border: 1px solid rgba(16,185,129,0.2);
    border-radius: 12px;
}
.bingo-panel.show { display: block; }

/* ---- Empty state ---- */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-secondary);
}
.empty-state .empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

/* ---- PDF progress overlay ---- */
.pdf-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(10, 14, 23, 0.85);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 1rem;
}
.pdf-overlay.show { display: flex; }
.pdf-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--border-color);
    border-top-color: var(--accent-gold);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
.pdf-overlay p {
    color: var(--accent-gold);
    font-family: 'Space Mono', monospace;
    font-size: 0.9rem;
}

/* ---- Print styles ---- */
@media print {
    body { background: #fff !important; color: #000 !important; }
    .bg-mesh, .site-header, .panel:not(.results-panel), .btn-generate,
    .lang-switcher, .no-print, footer,
    .lm-nav, .lm-alert, .lm-upsell, .lm-tabs, .lm-stats { display: none !important; }
    .panel { background: #fff !important; border: 1px solid #ddd !important; }
    .results-table thead th { background: #f5f5f5 !important; color: #333 !important; border-bottom-color: #333 !important; }
    .results-table tbody td { border-bottom-color: #ddd !important; color: #000 !important; }
    .lotto-ball { background: #eee !important; color: #000 !important; border-color: #999 !important; box-shadow: none !important; animation: none !important; }
    .lotto-ball.bonus-ball { background: #FFD700 !important; color: #000 !important; }
    .lotto-ball.star-ball { background: #4A90D9 !important; color: #fff !important; }
    .lotto-ball.dream-ball { background: #8B5CD6 !important; color: #fff !important; }
    .panel-title { color: #333 !important; }
    .print-header { display: block !important; text-align: center; margin-bottom: 1rem; }
    .print-header h2 { font-size: 1.5rem; color: #000; }
    .print-header p { font-size: 0.9rem; color: #666; }
}
.print-header { display: none; }

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .site-header h1 { font-size: 1.8rem; }
    .game-grid { grid-template-columns: repeat(2, 1fr); }
    .lotto-ball { width: 36px; height: 36px; font-size: 0.75rem; }
}

/* ============================================
   Account, kassa en beheer
   Hoort bij de bovenbalk van index.php en bij account.php, checkout.php
   en admin.php. Kleuren komen uit dezelfde :root-variabelen als de
   generator; de PDF-export raakt hier niets van.
   ============================================ */

/* ---- Bovenbalk ---- */
.lm-nav {
    position: relative;
    z-index: 5;
    border-bottom: 1px solid var(--border-color);
    background: rgba(17, 24, 39, 0.75);
    backdrop-filter: blur(6px);
}
.lm-nav-inner {
    max-width: 960px;
    margin: 0 auto;
    padding: 0.55rem 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    justify-content: space-between;
    font-size: 0.85rem;
}
.lm-nav-links, .lm-nav-right {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    flex-wrap: wrap;
}
.lm-nav a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}
.lm-nav a:hover { color: var(--text-primary); }
.lm-nav a.active { color: var(--accent-gold); }
.lm-nav-user { color: var(--text-primary); font-weight: 500; }
.lm-nav-upgrade {
    color: var(--accent-gold) !important;
    border: 1px solid var(--accent-gold);
    border-radius: 999px;
    padding: 0.15rem 0.7rem;
}
.lm-nav-lang {
    display: inline-flex;
    gap: 0.4rem;
    border-left: 1px solid var(--border-color);
    padding-left: 0.9rem;
    font-family: 'Space Mono', monospace;
    font-size: 0.75rem;
}

/* ---- Meldingen ---- */
.lm-alert {
    border: 1px solid var(--border-color);
    border-left-width: 3px;
    border-radius: 8px;
    padding: 0.7rem 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    background: var(--bg-card);
}
.lm-alert-error   { border-left-color: #EF4444; color: #FCA5A5; }
.lm-alert-success { border-left-color: var(--accent-green); color: #6EE7B7; }
.lm-alert-info    { border-left-color: var(--accent-blue); color: #93C5FD; }
.lm-alert a { color: inherit; }

.lm-muted { color: var(--text-secondary); font-size: 0.85rem; }

/* ---- Badges en statussen ---- */
.lm-badge {
    display: inline-block;
    border-radius: 999px;
    padding: 0.1rem 0.6rem;
    font-size: 0.7rem;
    font-family: 'Space Mono', monospace;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.lm-badge-premium { background: rgba(212, 168, 67, 0.15); color: var(--accent-gold); border: 1px solid var(--accent-gold); }
.lm-badge-free    { background: rgba(148, 163, 184, 0.12); color: var(--text-secondary); border: 1px solid var(--border-color); }

.lm-status {
    display: inline-block;
    border-radius: 999px;
    padding: 0.1rem 0.6rem;
    font-size: 0.72rem;
}
.lm-status-paid      { background: rgba(16, 185, 129, 0.15);  color: #6EE7B7; }
.lm-status-pending   { background: rgba(212, 168, 67, 0.15);  color: var(--accent-gold); }
.lm-status-failed    { background: rgba(239, 68, 68, 0.15);   color: #FCA5A5; }
.lm-status-cancelled { background: rgba(148, 163, 184, 0.15); color: var(--text-secondary); }

/* ---- Formulieren ---- */
.lm-form-panel { max-width: 460px; margin: 0 auto; }
.lm-form-links {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-top: 1rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}
.lm-form-links a { color: var(--accent-gold); text-decoration: none; }
.lm-form-links a:hover { text-decoration: underline; }
.lm-check { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.9rem; }

/* Bootstrap-velden in het donkere thema */
.form-control, .form-select {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}
.form-control:focus, .form-select:focus {
    background: var(--bg-primary);
    color: var(--text-primary);
    border-color: var(--accent-gold);
    box-shadow: 0 0 0 0.15rem rgba(212, 168, 67, 0.2);
}
.form-control:disabled { color: var(--text-secondary); }
.form-text { color: var(--text-secondary); font-size: 0.78rem; }

/* ---- Tabellen ---- */
.lm-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}
.lm-table th {
    text-align: left;
    padding: 0.5rem 0.6rem;
    border-bottom: 2px solid var(--border-color);
    color: var(--text-secondary);
    font-family: 'Space Mono', monospace;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.lm-table td {
    padding: 0.55rem 0.6rem;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}
.lm-table tbody tr:hover { background: var(--bg-card-hover); }
.lm-actions { white-space: nowrap; display: flex; gap: 0.6rem; align-items: center; }
.lm-actions a { color: var(--accent-gold); text-decoration: none; font-size: 0.85rem; }
.lm-linkbutton {
    background: none;
    border: none;
    padding: 0;
    color: var(--accent-gold);
    font-size: 0.85rem;
    cursor: pointer;
}
.lm-linkbutton:hover { text-decoration: underline; }
.lm-danger { color: #F87171; }
.lm-access-table td:first-child { width: 60%; }

/* ---- Beheer: kerncijfers en tabbladen ---- */
.lm-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    margin-bottom: 1rem;
}
.lm-stat {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0.8rem;
    text-align: center;
}
.lm-stat-value {
    display: block;
    font-family: 'Space Mono', monospace;
    font-size: 1.3rem;
    color: var(--accent-gold);
}
.lm-stat-label {
    display: block;
    font-size: 0.72rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.lm-tabs {
    display: flex;
    gap: 0.4rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}
.lm-tabs a {
    padding: 0.5rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    font-size: 0.9rem;
}
.lm-tabs a.active { color: var(--accent-gold); border-bottom-color: var(--accent-gold); }

/* ---- Paywall in de generator ---- */
.game-card.locked { opacity: 0.55; position: relative; }
.game-card.locked:hover { opacity: 0.8; }
.lm-lock {
    position: absolute;
    top: 0.35rem;
    right: 0.35rem;
    font-size: 0.62rem;
    color: var(--accent-gold);
    background: rgba(10, 14, 23, 0.8);
    border-radius: 999px;
    padding: 0.05rem 0.4rem;
}
.lm-locked-btn { opacity: 0.7; text-decoration: none; }
.lm-upsell {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, rgba(212, 168, 67, 0.12), rgba(59, 130, 246, 0.08));
    border: 1px solid var(--accent-gold);
    border-radius: 12px;
    padding: 0.7rem 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

/* ---- Kassa ---- */
.lm-plan-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    justify-content: space-between;
}
.lm-panel-premium { border-color: var(--accent-gold); }
.lm-checkout-amount {
    text-align: center;
    font-family: 'Space Mono', monospace;
    font-size: 2rem;
    color: var(--accent-gold);
    margin: 0.5rem 0;
}
.lm-feature-list { list-style: none; padding: 0; margin: 1rem 0; font-size: 0.9rem; }
.lm-feature-list li { padding: 0.3rem 0 0.3rem 1.6rem; position: relative; }
.lm-feature-list li::before { position: absolute; left: 0; }
.lm-feature-list li.yes::before { content: "\2713"; color: var(--accent-green); }
.lm-feature-list li.no::before  { content: "\2715"; color: #F87171; }
.lm-feature-list li.no { color: var(--text-secondary); }
.lm-psp-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.6rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
}
.lm-psp-logo { font-family: 'Space Mono', monospace; color: var(--accent-green); }
.lm-checkout-pay { max-width: 520px; margin: 0 auto; }
.lm-pay-buttons { display: flex; flex-direction: column; gap: 0.5rem; }

@media (max-width: 768px) {
    .lm-stats { grid-template-columns: repeat(2, 1fr); }
    .lm-nav-inner { font-size: 0.8rem; }
}
