body {
    margin: 0;
    padding: 20px;
    font-family: Arial, sans-serif;
    background-color: #f0f0f0;
}

.container {
    display: grid;
    grid-template-columns: minmax(0, 300px) 1fr minmax(0, 300px);
    grid-template-areas: 
        "header header header"
        "buttons buttons buttons"
        "storage storage storage"
        "team-stats field player-info";
    gap: 20px;
    max-width: 1800px;
    margin: 0 auto;
    padding: 20px;
}

.buttons-container {
    grid-area: buttons;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.team-info {
    grid-area: team-stats;
}

.field-container {
    grid-area: field;
}

.player-info {
    grid-area: player-info;
}

@media (max-width: 1400px) {
    .container {
        grid-template-columns: 1fr;
        grid-template-areas: 
            "header"
            "buttons"
            "storage"
            "field"
            "team-stats"
            "player-info";
    }
}

.field-container {
    background: white;
    padding: 10px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    user-select: none;
}

.field-container svg {
    overflow: visible;
}

.player-info {
    background: white;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.player-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.player-item {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 5px;
    border-left: 4px solid #007bff;
}

.player-item.team-blue {
    border-left-color: #007bff;
}

.player-item.team-red {
    border-left-color: #dc3545;
}

h1, h2 {
    color: #333;
    text-align: center;
}

.toggle-button {
    background: #007bff;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    margin-bottom: 20px;
    transition: background-color 0.3s;
}

.toggle-button:hover {
    background: #0056b3;
}

.toggle-button.active {
    background: #28a745;
}

.toggle-button.voronoi-button {
    background: #6f42c1;
    margin-left: 10px;
}

.toggle-button.voronoi-button:hover {
    background: #5a359a;
}

.toggle-button.voronoi-button.active {
    background: #e83e8c;
}

.toggle-button.team-stats-button {
    background: #20c997;
}

.toggle-button.team-stats-button:hover {
    background: #1ba085;
}

.toggle-button.team-stats-button.active {
    background: #fd7e14;
}

.toggle-button.player-info-button {
    background: #6c757d;
}

.toggle-button.player-info-button:hover {
    background: #545b62;
}

.toggle-button.player-info-button.active {
    background: #17a2b8;
}

.toggle-button.shadow-button {
    background: #8b0000;
}

.toggle-button.shadow-button.active {
    background: #dc3545;
}

.toggle-button.offside-button {
    background: #ff6b35;
}

.toggle-button.offside-button:hover {
    background: #e55a2b;
}

.toggle-button.offside-button.active {
    background: #ff4500;
}

.toggle-button.pass-button {
    background: #28a745;
}

.toggle-button.pass-button:hover {
    background: #218838;
}

.toggle-button.pass-button.active {
    background: #1e7e34;
}

.toggle-button.storage-toggle-button {
    background: #6f42c1;
    display: flex;
    align-items: center;
    gap: 5px;
}

.toggle-button.storage-toggle-button:hover {
    background: #5a359a;
}

.toggle-button.storage-toggle-button.active {
    background: #e83e8c;
}

.hamburger-icon {
    font-size: 18px;
    font-weight: bold;
}

.team-info {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    height: fit-content;
}

.team-info h2 {
    margin-top: 0;
    color: #333;
    border-bottom: 2px solid #007bff;
    padding-bottom: 10px;
    text-align: center;
}

.team-stat {
    margin-bottom: 20px;
    padding: 15px;
    border-radius: 8px;
    border: 2px solid;
}

.team-stat.team-blue {
    background: rgba(0, 100, 255, 0.1);
    border-color: #0064ff;
}

.team-stat.team-red {
    background: rgba(255, 0, 0, 0.1);
    border-color: #ff0000;
}

.team-stat h3 {
    margin: 0 0 10px 0;
    font-size: 18px;
    text-align: center;
}

.stat-item {
    margin: 8px 0;
    font-size: 14px;
    display: flex;
    justify-content: space-between;
}

.stat-value {
    font-weight: bold;
    font-size: 16px;
}

.buttons-container {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

/* Cursor-Stile für Drag & Drop */
.draggable-element {
    cursor: grab;
}

.draggable-element:active {
    cursor: grabbing;
}

.selectable-element {
    cursor: pointer;
}

.non-selectable {
    cursor: not-allowed;
}

.dragging {
    cursor: grabbing !important;
}

/* Storage Controls */
.storage-container {
    grid-area: storage;
    background: white;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.storage-container h3 {
    margin: 0 0 15px 0;
    color: #333;
    text-align: center;
    font-size: 18px;
    border-bottom: 2px solid #007bff;
    padding-bottom: 8px;
}

.storage-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.storage-slots {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.storage-button {
    padding: 8px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    min-width: 80px;
}

.save-button {
    background: #28a745;
    color: white;
}

.save-button:hover {
    background: #218838;
    transform: translateY(-1px);
}

.load-button {
    background: #007bff;
    color: white;
}

.load-button:hover:not(:disabled) {
    background: #0056b3;
    transform: translateY(-1px);
}

.load-button:disabled {
    background: #6c757d;
    cursor: not-allowed;
    opacity: 0.6;
}

.clear-button {
    background: #dc3545;
    color: white;
    margin-top: 10px;
    padding: 10px 20px;
}

.clear-button:hover {
    background: #c82333;
    transform: translateY(-1px);
}

.storage-info {
    margin-top: 15px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 5px;
    border-left: 4px solid #17a2b8;
}

.storage-info small {
    color: #666;
    font-weight: bold;
}

.storage-info ul {
    margin: 5px 0 0 0;
    padding-left: 20px;
}

.storage-info li {
    font-size: 12px;
    color: #555;
    margin: 2px 0;
}
