body { 
    margin: 0; background: #d1d8e0; color: #232f3e; 
    font-family: system-ui, -apple-system, sans-serif; overflow: hidden; 
}

/* ÜBERARBEITET: Split-Layout für die Leiste */
#topbar { 
    position: fixed; top: 0; width: 100%; background: #e2e8f0; 
    padding: 12px 24px; z-index: 100; display: flex; justify-content: space-between; 
    box-sizing: border-box; align-items: center;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}
#topbar-left, #topbar-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

button { 
    background: #3b82f6; color: #fff; border: none; padding: 8px 16px; 
    border-radius: 6px; cursor: pointer; font-weight: 500; transition: background 0.2s;
}
button:hover { background: #2563eb; }
button.btn-red { background: #ef4444; } button.btn-red:hover { background: #dc2626; }
button.btn-green { background: #10b981; } button.btn-green:hover { background: #059669; }

#viewport { width: 100vw; height: 100vh; cursor: grab; }
#viewport:active { cursor: grabbing; }
#diagram { position: absolute; padding: 120px; display: flex; flex-direction: column; gap: 80px; align-items: center; }

.row { 
    display: flex; 
    gap: 30px; 
    justify-content: center; 
    align-items: stretch; 
    width: max-content; 
}

.card { 
    width: clamp(520px, 32vw, 580px); 
    background: #f8fafc; 
    padding: 18px; 
    border-radius: 12px; 
    border: 1px solid #cbd5e1; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.05); 
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}
.card h3, .card strong { color: #0f172a; margin-top: 0; }

.table-row { 
    display: flex; justify-content: space-between; align-items: center; 
    border-bottom: 1px solid #e2e8f0; padding: 8px 0; font-size: 0.95em; 
}

.m-row {
    display: flex;
    flex-direction: column;
    border-bottom: 1px solid #e2e8f0; 
    padding: 10px 0;
}

.flag { width: 20px; height: 14px; vertical-align: middle; border-radius: 2px; border: 1px solid #cbd5e1; flex-shrink: 0; }

input { 
    background: #edf2f7; color: #0f172a; border: 1px solid #cbd5e1; 
    padding: 6px; border-radius: 6px; outline: none; transition: border 0.2s;
}
input:focus { border-color: #3b82f6; box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2); }

input[type=number]::-webkit-inner-spin-button, 
input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input[type=number] { -moz-appearance: textfield; text-align: center; width: 45px; font-weight: bold;}

.overlay { 
    display: none; position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; 
    background: rgba(15, 23, 42, 0.4); backdrop-filter: blur(7px); z-index: 999; 
}
.modal { 
    display: none; position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); 
    background: #f8fafc; padding: 30px; border-radius: 16px; border: 1px solid #cbd5e1; 
    z-index: 1000; max-height: 85vh; overflow-y: auto; width: 460px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.2); color: #0f172a;
}
.modal h3 { margin-top: 0; }
th { background: #edf2f7; padding: 12px 10px; border-bottom: 2px solid #cbd5e1; cursor: pointer; user-select: none; }
th:hover { background: #e2e8f0; }

.disabled-zone { opacity: 0.4; pointer-events: none; }
.btn-small { padding: 4px 8px; font-size: 0.8em; cursor: pointer; border-radius: 4px; border: none; }
.btn-danger { background: #ef4444; color: white; }
.btn-secondary { background: #64748b; color: white; }

.match-clickable { transition: background 0.2s; border-radius: 6px; padding: 6px; margin: 2px -6px; }
.match-clickable:hover { background-color: #f1f5f9; }

#tips-tooltip {
    position: fixed;
    display: none;
    background: #f8fafc;
    color: #0f172a;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 0.88em;
    z-index: 10000;
    border: 1px solid #cbd5e1;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    pointer-events: none;
    min-width: 180px;
}

#predict-content {
    max-height: 280px; 
    overflow-y: auto;
    padding-right: 5px;
}

.match-row-content {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    box-sizing: border-box;
}

.match-teams {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
    flex-grow: 1;
    cursor: default; 
    min-width: 0;
    white-space: nowrap; 
}

.match-vs-center {
    font-weight: bold;
    color: #3b82f6;
    padding: 0 2px;
}

.match-buttons {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
    white-space: nowrap;
}

/* NEU: CSS FÜR DEN TOGGLE SWITCH */
.switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
}
.switch input { 
    opacity: 0;
    width: 0;
    height: 0;
}
.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #cbd5e1;
    transition: .3s;
}
.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
}
input:checked + .slider {
    background-color: #10b981;
}
input:checked + .slider:before {
    transform: translateX(18px);
}
.slider.round {
    border-radius: 22px;
}
.slider.round:before {
    border-radius: 50%;
}