/* CSS SOFT BRUTALISM - Team Generator (No :root) */
.tool-container {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #ffffff;
    width: 100%;
    max-width: 1000px;
    margin: 20px auto;
    border: 3px solid #111111;
    border-radius: 12px;
    box-shadow: 6px 6px 0px #111111;
    padding: 30px;
    color: #111111;
    box-sizing: border-box;
}

.tool-container h1 {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 25px;
    text-transform: uppercase;
    font-weight: 900;
    margin-top: 0;
}

.main-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

/* Các thành phần Input */
.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    font-weight: 700;
    margin-bottom: 8px;
    font-size: 1.05rem;
}

.input-group textarea,
.input-group input[type="number"] {
    width: 100%;
    padding: 12px;
    font-size: 1.05rem;
    font-family: inherit;
    border: 3px solid #111111;
    border-radius: 8px;
    outline: none;
    box-sizing: border-box;
    transition: box-shadow 0.2s;
    background-color: #f9f9f9;
}

.input-group textarea:focus,
.input-group input[type="number"]:focus {
    box-shadow: 4px 4px 0px #111111;
    background-color: #ffffff;
}

/* Quick Gen */
.quick-generate {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}
.quick-generate input {
    width: 100px;
    padding: 8px;
    border: 2px solid #111111;
    border-radius: 6px;
    font-weight: bold;
    outline: none;
}
.quick-generate button {
    flex-grow: 1;
    cursor: pointer;
    font-weight: bold;
    background-color: #e2f0cb; /* Pastel Yellow-Green */
    border: 2px solid #111111;
    border-radius: 6px;
    box-shadow: 2px 2px 0px #111111;
    transition: transform 0.1s, box-shadow 0.1s;
}
.quick-generate button:active {
    transform: translate(2px, 2px);
    box-shadow: 0px 0px 0px #111111;
}

.divider {
    border: none;
    border-top: 3px dashed #111111;
    margin: 25px 0;
}

/* Radio Custom */
.radio-container {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    user-select: none;
}
.radio-container input {
    margin-right: 10px;
    width: 18px;
    height: 18px;
    accent-color: #111111;
    cursor: pointer;
}

/* Nút Action */
.action-buttons {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 15px;
    margin-top: 25px;
}
.action-buttons button {
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 800;
    padding: 15px;
    border: 3px solid #111111;
    border-radius: 8px;
    box-shadow: 4px 4px 0px #111111;
    transition: transform 0.1s, box-shadow 0.1s;
    text-transform: uppercase;
    color: #111111;
}
.action-buttons button:active {
    transform: translate(4px, 4px);
    box-shadow: 0px 0px 0px #111111;
}
.btn-generate { background-color: #ffb7b2; } /* Pastel Red */
.btn-clear { background-color: #eceae4; } /* Light Gray */

/* Khu vực Kết quả */
.result-section {
    background-color: #f4f4f4;
    border: 3px solid #111111;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    flex-direction: column;
}
.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    border-bottom: 3px solid #111111;
    padding-bottom: 10px;
}
.result-header h3 {
    margin: 0;
    font-size: 1.5rem;
    text-transform: uppercase;
}
.btn-copy {
    background-color: #b5ead7;
    border: 2px solid #111111;
    border-radius: 6px;
    padding: 6px 12px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 3px 3px 0px #111111;
}
.btn-copy:active {
    transform: translate(2px, 2px);
    box-shadow: 0px 0px 0px #111111;
}

.team-output {
    flex-grow: 1;
    overflow-y: auto;
    max-height: 500px;
    padding-right: 5px;
}

/* Giao diện Thẻ Đội (Card) */
.team-card {
    border: 3px solid #111111;
    border-radius: 8px;
    margin-bottom: 15px;
    background-color: #ffffff;
    box-shadow: 3px 3px 0px #111111;
    overflow: hidden;
    animation: fadeIn 0.4s ease-out;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.team-title {
    padding: 10px 15px;
    font-weight: 900;
    font-size: 1.2rem;
    border-bottom: 3px solid #111111;
    display: flex;
    align-items: center;
    gap: 8px;
}

.team-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.team-list li {
    padding: 10px 15px;
    border-bottom: 1px solid #ddd;
    font-weight: 600;
    font-size: 1.05rem;
}
.team-list li:last-child {
    border-bottom: none;
}

/* Các màu ngẫu nhiên cho Card */
.bg-color-1 { background-color: #ffb7b2; } /* Pastel Red */
.bg-color-2 { background-color: #b5ead7; } /* Pastel Green */
.bg-color-3 { background-color: #ffdac1; } /* Pastel Orange */
.bg-color-4 { background-color: #cbaacb; } /* Pastel Purple */
.bg-color-5 { background-color: #e2f0cb; } /* Pastel Yellow-Green */
.bg-bench { background-color: #d3d3d3; color: #333; } /* Ghế dự bị (Xám) */

.empty-state {
    text-align: center;
    color: #666;
    margin-top: 50px;
    font-style: italic;
}

#toastTeam {
    visibility: hidden;
    min-width: 200px;
    background-color: #111111;
    color: #ffffff;
    text-align: center;
    border-radius: 8px;
    padding: 12px;
    position: fixed;
    z-index: 9999;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    font-weight: bold;
    opacity: 0;
    transition: opacity 0.3s, bottom 0.3s;
}
#toastTeam.show {
    visibility: visible;
    opacity: 1;
    bottom: 50px;
}

@media (max-width: 768px) {
    .main-grid { grid-template-columns: 1fr; }
}