body {
    background-color: var(--bg);
    color: var(--text-main);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.5;
}

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

/* === HEADER === */
header.event-header {
    text-align: center;
    padding: 40px 20px;
    background: white;
    border-bottom: 1px solid var(--border);
    margin-bottom: 40px;
}
.event-logo { width: 80px; height: 80px; object-fit: contain; margin-bottom: 15px; }
h1 { margin: 0; font-size: 2rem; font-weight: 800; color: var(--text-main); }

/* === BUTTONS === */
.action-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: transform 0.1s, opacity 0.2s;
    text-decoration: none;
}
.action-button:active { transform: scale(0.98); }
.action-button.primary { background: var(--primary); color: white; box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2); }
.action-button.secondary { background: var(--primary-soft); color: var(--primary); }
.action-button.icon-only { width: 32px; height: 32px; padding: 0; border-radius: 50%; background: transparent; color: var(--text-muted); border: 1px solid var(--border); }
.action-button.full-width { width: 100%; margin-top: 10px; }
.action-button.compact { padding: 6px 12px; font-size: 0.8rem; }

/* === SEARCH === */
.search-container { max-width: 600px; margin: -65px auto 30px; position: relative; padding: 0 20px; }
#searchInput {
    width: 100%; height: 50px; padding: 0 20px; border-radius: 10px;
    border: 1px solid var(--border); box-shadow: 0 8px 20px rgba(0,0,0,0.06);
    font-size: 1rem; box-sizing: border-box;
}

/* === RACE CONTAINER === */
.race-container {
    background: white;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    margin-bottom: 30px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}
.race-header {
    padding: 20px;
    background: #fdfdfd;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.race-title { font-size: 1.2rem; font-weight: 700; }

/* === DESKTOP TABLE === */
.results-table { width: 100%; border-collapse: collapse; }
.results-table th { 
    text-align: left; padding: 12px 20px; 
    background: #f8fafc; color: var(--text-muted); 
    font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em;
}
.participant-row td { padding: 16px 20px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.participant-row:hover { background-color: #f8fafc; }

/* Spalten Styling */
.col-rank { font-weight: 800; color: var(--primary); width: 40px; }
.col-name { font-weight: 700; color: var(--text-main); }
.col-time { font-family: monospace; font-weight: 700; color: var(--primary); font-size: 1.1rem; }
.col-action, .col-toggle { text-align: right; }

/* === SPLIT DROPDOWN (DESKTOP) === */
.split-details-row td { background: #f8fafc; padding: 20px; box-shadow: inset 0 4px 6px -4px rgba(0,0,0,0.05); }
.split-wrapper { background: white; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; max-width: 800px; margin: 0 auto; }
.split-table { width: 100%; font-size: 0.9rem; }
.split-table th { background: #f1f5f9; padding: 10px 15px; }
.split-table td { padding: 10px 15px; border-bottom: 1px solid #f1f5f9; }
.no-splits { text-align: center; color: var(--text-muted); font-style: italic; padding: 20px; }

/* === MOBILE CARDS === */
.mobile-cards { display: none; padding: 10px; }
.participant-card {
    background: white; border: 1px solid var(--border);
    border-radius: 12px; margin-bottom: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.03);
}
.card-header { padding: 15px; display: flex; align-items: center; gap: 15px; border-bottom: 1px solid #f1f5f9; }
.card-rank { 
    width: 36px; height: 36px; background: var(--primary); color: white; 
    border-radius: 8px; display: flex; align-items: center; justify-content: center; font-weight: 800; 
}
.card-info { flex: 1; }
.card-name { margin: 0; font-size: 1rem; font-weight: 700; }
.card-club { font-size: 0.85rem; color: var(--text-muted); }

.card-body { padding: 15px; }
.card-stat { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.time-value { font-family: monospace; font-size: 1.2rem; font-weight: 800; color: var(--primary); }

.mobile-split-details { margin-top: 15px; background: #f8fafc; border-radius: 8px; padding: 10px; }
.split-label { font-size: 0.7rem; text-transform: uppercase; font-weight: 700; color: var(--text-muted); margin: 0 0 10px 0; }
.split-row { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px dashed var(--border); font-size: 0.9rem; }
.split-row:last-child { border-bottom: none; }

/* === RESPONSIVE SWITCH === */
.mobile-only { display: none; }
.desktop-only { display: table-row; }

@media (max-width: 768px) {
    .desktop-only { display: none !important; }
    .results-table thead { display: none; } /* Header verstecken */
    .mobile-cards { display: block; }
    .mobile-only { display: block; }
    
    .race-container { border: none; background: transparent; box-shadow: none; }
    .race-header { border-radius: 12px; margin-bottom: 10px; }
    
    /* Container Padding anpassen */
    .container { padding: 10px; }
}

/* Toast Notification Styling */
.toast {
    position: fixed; bottom: 20px; right: 20px;
    background: #10b981; color: white;
    padding: 12px 20px; border-radius: 8px;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
    display: flex; align-items: center; gap: 10px;
    transform: translateY(100px); transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 1000;
}
.toast.error { background: #ef4444; }
.toast.show { transform: translateY(0); }
.toast-close { background: none; border: none; color: white; font-size: 1.2rem; cursor: pointer; margin-left: 10px; }