:root {
    --bg-dark: #0a0f0d;
    --glass-bg: rgba(18, 28, 24, 0.78);
    --glass-border: rgba(16, 185, 129, 0.25);
    --emerald: #10b981;
    --emerald-glow: rgba(16, 185, 129, 0.35);
    --red-accent: #ef4444;
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Segoe UI', system-ui, sans-serif; }

body {
    background: radial-gradient(circle at top right, #112920, var(--bg-dark) 60%);
    color: var(--text-main);
    min-height: 100vh;
}

.adv-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 2rem;
    background: rgba(10, 15, 13, 0.85);
    border-bottom: 1px solid var(--glass-border);
    backdrop-filter: blur(12px);
}

.header-left { display: flex; align-items: center; gap: 1rem; }
.logo-icon { font-size: 2.2rem; }
.header-left h1 { font-size: 1.4rem; color: var(--emerald); }
.header-left p { font-size: 0.85rem; color: var(--text-muted); }

.container { max-width: 1280px; margin: 2rem auto; padding: 0 1.5rem; display: grid; gap: 2rem; }

.glass-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.75rem;
    backdrop-filter: blur(14px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

/* Login */
.login-body { display: flex; align-items: center; justify-content: center; padding: 1rem; }
.login-card { width: 100%; max-width: 400px; text-align: center; }
.brand-badge { display: inline-block; padding: 0.3rem 0.8rem; background: rgba(239, 68, 68, 0.15); color: #fca5a5; border: 1px solid rgba(239, 68, 68, 0.3); border-radius: 999px; font-size: 0.8rem; margin-bottom: 0.8rem; }
.login-form { display: grid; gap: 1rem; margin-top: 1.5rem; text-align: left; }
.login-form label { display: grid; gap: 0.4rem; font-size: 0.9rem; color: var(--text-muted); }

input, select {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: var(--text-main);
    padding: 0.65rem 0.9rem;
    border-radius: 8px;
    font-size: 0.95rem;
}
input:focus, select:focus { outline: none; border-color: var(--emerald); box-shadow: 0 0 0 2px var(--emerald-glow); }

.btn-primary {
    background: linear-gradient(135deg, var(--emerald), #059669);
    color: #fff;
    border: none;
    padding: 0.7rem 1.25rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 16px var(--emerald-glow); }

.btn-outline {
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    text-decoration: none;
    padding: 0.55rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
}

/* Wheel Section */
.wheel-section { display: grid; grid-template-columns: 360px 1fr; gap: 2rem; align-items: center; }
@media (max-width: 860px) { .wheel-section { grid-template-columns: 1fr; } }

.wheel-wrapper { position: relative; display: flex; justify-content: center; align-items: center; }
.wheel-pointer { position: absolute; top: -12px; font-size: 1.8rem; color: var(--red-accent); z-index: 5; text-shadow: 0 2px 8px rgba(0,0,0,0.8); }
canvas#prizeWheel { border-radius: 50%; border: 4px solid var(--emerald); box-shadow: 0 0 25px var(--emerald-glow); }

.spin-config { display: grid; gap: 0.8rem; margin: 1rem 0; }
.spin-config label { display: grid; gap: 0.35rem; font-size: 0.85rem; color: var(--text-muted); }

.spin-result {
    padding: 1rem;
    border-radius: 10px;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid var(--emerald);
    margin-bottom: 1rem;
    font-weight: 600;
}
.hidden { display: none !important; }

.history-list { list-style: none; display: grid; gap: 0.5rem; margin-top: 0.6rem; max-height: 150px; overflow-y: auto; }
.history-list li { display: flex; justify-content: space-between; align-items: center; padding: 0.45rem 0.75rem; background: rgba(0,0,0,0.25); border-radius: 8px; font-size: 0.88rem; }

/* Table */
.table-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1.25rem; }
.toolbar-right { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.add-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0.75rem; margin-bottom: 1.25rem; padding: 1rem; background: rgba(0,0,0,0.25); border-radius: 10px; }

.table-responsive { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th, td { padding: 0.85rem 1rem; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
th { color: var(--emerald); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.04em; }
tr:hover { background: rgba(16, 185, 129, 0.05); }

.badge { padding: 0.25rem 0.6rem; border-radius: 999px; font-size: 0.78rem; font-weight: 600; }
.badge-won { background: rgba(16, 185, 129, 0.2); color: #6ee7b7; }
.status-select.badge-offen { border-color: #f59e0b; color: #fcd34d; }
.status-select.badge-gewonnen { border-color: #10b981; color: #6ee7b7; }
.status-select.badge-abgelaufen { border-color: #ef4444; color: #fca5a5; }
.alert-error { background: rgba(239, 68, 68, 0.2); border: 1px solid #ef4444; color: #fca5a5; padding: 0.75rem; border-radius: 8px; margin-top: 1rem; font-size: 0.9rem; }
