* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.header h1 {
    font-size: 3em;
    background: linear-gradient(45deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.header p {
    font-size: 1.2em;
    color: #666;
    font-weight: 300;
}

.tab-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 0;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
}

.tabs {
    display: flex;
    background: rgba(0, 0, 0, 0.05);
}

.tab {
    flex: 1;
    padding: 20px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: 600;
    transition: all 0.3s ease;
    color: #666;
}

.tab.active {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    transform: translateY(-2px);
}

.tab:hover:not(.active) {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

.tab-content {
    display: none;
    padding: 30px;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: flex;
    gap: 15px;
    align-items: end;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

input, select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    font-size: 1em;
    transition: all 0.3s ease;
    background: white;
}

input:focus, select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

button {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

button:active {
    transform: translateY(0);
}

.edit-btn {
    background: linear-gradient(45deg, #28a745, #20c997);
    padding: 8px 16px;
    font-size: 0.9em;
    margin-right: 10px;
}

.edit-btn:hover {
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.4);
}

.delete-btn {
    background: linear-gradient(45deg, #ff6b6b, #ee5a52);
    padding: 12px 24px;
    font-size: 1em;
    margin-left: 0px;
}

.delete-btn:hover {
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
}

.cancel-btn {
    background: linear-gradient(45deg, #6c757d, #5a6268);
    margin-left: 10px;
}

.save-btn {
    background: linear-gradient(45deg, #28a745, #20c997);
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

th, td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
}

th {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

tr:hover {
    background: rgba(102, 126, 234, 0.05);
    transform: scale(1.01);
    transition: all 0.2s ease;
}

.position {
    font-weight: bold;
    font-size: 1.2em;
    color: #667eea;
}

.points {
    font-weight: bold;
    color: #764ba2;
}

.season-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 20px;
    background: linear-gradient(45deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    border-radius: 12px;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.season-info h3 {
    color: #667eea;
    font-size: 1.5em;
}

.race-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #667eea;
    transition: all 0.3s ease;
}

.race-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.15);
}

.race-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.race-title {
    font-size: 1.3em;
    font-weight: 600;
    color: #333;
}

.race-date {
    color: #666;
    font-size: 0.9em;
}

.penalty-section {
    background: rgba(255, 107, 107, 0.05);
    border: 1px solid rgba(255, 107, 107, 0.2);
    border-radius: 8px;
    padding: 15px;
    margin-top: 15px;
}

.penalty-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 107, 107, 0.1);
}

.penalty-item:last-child {
    border-bottom: none;
}

.empty-state {
    text-align: center;
    padding: 40px;
    color: #666;
    font-style: italic;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #667eea;
}

.stat-number {
    font-size: 2em;
    font-weight: bold;
    color: #667eea;
}

.stat-label {
    color: #666;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.floating-add {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    padding: 0px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: none;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
    z-index: 1000;
}

.floating-add:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.4);
}

/* Startnummern-Styling */
.race-numbers-section {
    background: rgba(102, 126, 234, 0.05);
    border: 1px solid rgba(102, 126, 234, 0.2);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
}

.race-numbers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.number-card {
    background: white;
    border: 2px solid #667eea;
    border-radius: 12px;
    padding: 15px 10px;
    text-align: center;
    position: relative;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
}

.number-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
}

.number-display {
    font-size: 1.8em;
    font-weight: bold;
    color: #667eea;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
    margin-bottom: 5px;
}

.driver-name {
    font-size: 0.85em;
    color: #555;
    font-weight: 500;
    word-wrap: break-word;
}

.delete-btn.small {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    padding: 0;
    font-size: 14px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(45deg, #ff6b6b, #ee5a52);
    color: white;
    border: 2px solid white;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
}

.race-number-badge {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: bold;
    margin-right: 8px;
    display: inline-block;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
}

.empty-numbers {
    text-align: center;
    color: #999;
    font-style: italic;
    margin-top: 15px;
    padding: 20px;
}

input[id^="driver-info-"] {
    background: linear-gradient(45deg, rgba(102, 126, 234, 0.05), rgba(118, 75, 162, 0.05)) !important;
    border: 2px solid rgba(102, 126, 234, 0.2) !important;
    font-weight: 600 !important;
    color: #667eea !important;
}

.active-season {
    border-left: 4px solid #28a745 !important;
}

.edit-mode {
    background: rgba(40, 167, 69, 0.05) !important;
}

.edit-input {
    border: 2px solid #28a745 !important;
    background: rgba(40, 167, 69, 0.05) !important;
}

@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
    }
    
    .tabs {
        flex-direction: column;
    }
    
    .season-header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .race-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    table {
        font-size: 0.9em;
    }
    
    th, td {
        padding: 10px 8px;
    }

    .race-numbers-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 10px;
    }
    
    .number-card {
        padding: 12px 8px;
    }
    
    .number-display {
        font-size: 1.5em;
    }
    
    .driver-name {
        font-size: 0.8em;
    }
    
    .race-number-badge {
        font-size: 0.75em;
        padding: 1px 6px;
    }
    
}