* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #f4f5f7;
    color: #222;
}

.container {
    width: min(1100px, calc(100% - 30px));
    margin: 30px auto;
}

h1 {
    margin-bottom: 10px;
}

.description {
    color: #666;
    line-height: 1.5;
}

.panel {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    margin-top: 20px;
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
}

textarea {
    width: 100%;
    min-height: 180px;
    padding: 12px;
    resize: vertical;
    border: 1px solid #ccc;
    border-radius: 8px;
    font: inherit;
}

.settings {
    display: flex;
    align-items: end;
    gap: 15px;
    margin-top: 15px;
}

select,
button {
    min-height: 44px;
    padding: 0 16px;
    border: 1px solid #ccc;
    border-radius: 8px;
    background: #fff;
    font: inherit;
}

#generateBtn {
    background: #222;
    color: #fff;
    border-color: #222;
}

.message {
    min-height: 25px;
    margin: 15px 0;
    text-align: center;
}

.teams {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 15px;
}

.team {
    background: #fff;
    border-radius: 12px;
    padding: 15px;
    min-height: 180px;
    border: 2px solid transparent;
}

.team.drag-over {
    border-color: #555;
    background: #fafafa;
}

.team-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 12px;
}

.team-members {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 100px;
}

.player {
    padding: 12px;
    background: #f0f1f3;
    border-radius: 8px;
    cursor: grab;
    user-select: none;
    touch-action: none;
}

.player.dragging {
    opacity: 0.45;
}

.actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

@media (max-width: 600px) {

    .container {
        width: calc(100% - 20px);
        margin: 20px auto;
    }

    h1 {
        font-size: 25px;
    }

    .panel {
        padding: 15px;
    }

    .settings {
        flex-direction: column;
        align-items: stretch;
    }

    .settings button {
        width: 100%;
    }

    .teams {
        grid-template-columns: 1fr;
    }

    .team {
        min-height: 140px;
    }

    .actions {
        flex-direction: column;
    }

    .actions button {
        width: 100%;
    }

    .player {
        padding: 14px;
    }
}

#button:hover {
    cursor: pointer;
    background: #000 !important;
}