/* Reset minimal */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
}

body {
    background-color: #f9f9f9;
    padding: 20px;
    line-height: 1.4;
}

header {
    text-align: center;
    margin-bottom: 30px;
}

header h1 {
    font-weight: 700;
    font-size: 2.5rem;
    color: #2d3436;
    margin-bottom: 8px;
}

header p {
    color: #636e72;
    font-size: 1.1rem;
}

/* Container */
.container {
    max-width: 900px;
    margin: 0 auto;
    background-color: #ffffff;
    padding: 25px 30px;
    border-radius: 8px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
}

/* Sections */
section {
    margin-bottom: 30px;
}

section h2 {
    font-weight: 600;
    font-size: 1.7rem;
    color: #0984e3;
    border-bottom: 2px solid #74b9ff;
    padding-bottom: 6px;
    margin-bottom: 20px;
}

#results-section {
    display: none;
}

/* Players form */
#players-form {
    display: flex;
    flex-wrap: wrap;
    gap: 15px 20px;
}

.input-group {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
}

.input-group label {
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 1rem;
    color: #0984e3;
}

.player-input {
    padding: 8px 12px;
    font-size: 1rem;
    border: 1.8px solid #b2bec3;
    border-radius: 6px;
    transition: border-color 0.25s ease;
}

.player-input:focus {
    border-color: #0984e3;
    outline: none;
}

/* Buttons */
.btn-group {
    margin-top: 15px;
    display: flex;
    gap: 15px;
}

button {
    background-color: #0984e3;
    border: none;
    padding: 10px 18px;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    border-radius: 7px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    user-select: none;
}

button:hover,
button:focus {
    background-color: #74b9ff;
    outline: none;
}

#process-results-btn {
    width: 100%;
    padding: 14px 0;
    font-size: 1.25rem;
    margin-bottom: 30px;
    border-radius: 9px;
}

#remove-player-btn,
#add-player-btn {
    flex: 1;
}

/* Results section */
#results-section>div {
    margin-bottom: 25px;
}

#players-who-dont-play h3 {
    color: #d63031;
    font-weight: 700;
    font-size: 1.3rem;
    margin-bottom: 15px;
}

/* Players characters & items & tracks containers */
#players-characters,
#items,
#tracks {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.player-character,
.item,
.track-result {
    flex: 1 1 220px;
    background-color: #dfe6e9;
    border-radius: 8px;
    padding: 12px;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    text-align: center;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: background-color 0.25s ease;
}

.player-character:hover,
.item:hover,
.track-result:hover {
    background-color: #b2bec3;
}

#items>h3,
#players-characters>h3,
#tracks>h3,
#players-who-dont-play>h3 {
    width: 100%;
    display: block;
    margin-bottom: 0;
    margin-top: 15px;
}

/* Titles inside cards */
.player-character h4,
.item h4,
.track-result h4 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: #2d3436;
    font-weight: 700;
}

/* Images */
.player-character img,
.item img,
.track-result img {
    width: 80px;
    height: auto;
    border-radius: 6px;
    object-fit: contain;
    user-select: none;
}

/* Responsive */
@media (max-width: 600px) {

    #players-form,
    .btn-group {
        flex-direction: column;
    }

    .player-character,
    .item,
    .track-result {
        flex: 1 1 100%;
    }
}

.loader {
    width: 16px;
    height: 16px;
    border: 3px solid rgba(255, 255, 255, 0.4);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    display: inline-block;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}