body {
    font-family: Arial, sans-serif;
    background-color: #000;
    color: #eee;
    margin: 0;
    padding: 20px;
}

h1 {
    text-align: center;
    margin-bottom: 20px;
    color: #fff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.info {
    font-size: 13px;
    color: #aaa;
    margin-bottom: 15px;
}

.groups {
    background-color: #111;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #333;
    margin-bottom: 20px;

    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.group {
    border: 1px solid #333;
    background-color: #151515;
    padding: 8px;
    border-radius: 4px;

    float: none;
    width: auto;
    box-sizing: border-box;
}


@media (max-width: 1200px) {
    .groups {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .groups {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .groups {
        grid-template-columns: repeat(1, minmax(0, 1fr));
    }
}


.group h3 {
    margin: 0 0 5px 0;
    color: #fff;
}

.group table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.group table th:nth-child(2),
.group table th:nth-child(3),
.group table td:nth-child(2),
.group table td:nth-child(3) {
    width: 50px;
    text-align: center;
}

.group table td:nth-child(2) input[type="radio"],
.group table td:nth-child(3) input[type="radio"] {
    display: block;
    margin: 0 auto;
}

.group table th,
.group table td {
    border-bottom: 1px solid #333;
    padding: 4px;
}

.group table th {
    background-color: #181818;
    color: #ddd;
}

.group table td.team-cell {
    text-align: left;
}

.group.error {
    border-color: #e74c3c;
    box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.5);
}

.group .group-error-msg {
    margin-top: 6px;
    font-size: 12px;
    color: #ff9b9b;
}

.logo {
    width: 20px;
    height: 20px;
    vertical-align: middle;
    margin-right: 4px;
}

.third-picker {
    margin-top: 6px;
    font-size: 12px;
    color: #ccc;
}

.third-picker select {
    width: 100%;
    background-color: #111;
    color: #eee;
    border: 1px solid #444;
    padding: 2px 4px;
}

.buttons-row {
    margin-top: 10px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;

    grid-column: 1 / -1;
}


.btn {
    padding: 8px 14px;
    cursor: pointer;
    border-radius: 4px;
    border: 1px solid #555;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.btn-primary {
    background-color: #444;
    color: #fff;
}

.btn-primary:hover {
    background-color: #666;
}

.btn-secondary {
    background-color: #222;
    color: #eee;
}

.btn-secondary:hover {
    background-color: #333;
}

.bracket {
    margin-top: 20px;
    padding: 15px;
    background-color: #111;
    border-radius: 6px;
    border: 1px solid #333;
    overflow-x: auto;
}

.round {
    float: left;
    margin-right: 20px;
    min-width: 170px;
}

.round-title {
    font-weight: bold;
    text-align: center;
    margin-bottom: 4px;
    color: #fff;
}

.round .info {
    text-align: center;
    margin-bottom: 6px;
    color: #999;
    font-size: 11px;
}

.match {
    border: 1px solid #333;
    margin-bottom: 10px;
    padding: 4px;
    background-color: #151515;
    border-radius: 4px;
}

.team {
    cursor: pointer;
    padding: 2px 4px;
    min-width: 140px;
    display: flex;
    align-items: center;
    font-size: 13px;
    color: #eee;
}

.team span {
    margin-left: 4px;
}

.team.empty {
    cursor: default;
    color: #555;
}

.team.winner {
    background-color: #333;
    font-weight: bold;
}

.team img {
    width: 20px;
    height: 20px;
}

.champion,
.third-place-result {
    margin-top: 10px;
    font-weight: bold;
    color: #fff;
    clear: both;
}

.round-final {
    float: none;
    clear: both;
    width: 100%;
    max-width: 420px;
    margin-top: 25px;
}

.round-final .round-title {
    background-color: #f0f0f0;
    color: #111;
    padding: 6px 10px;
    border-radius: 6px 6px 0 0;
}

.round-final .match {
    background-color: #f0f0f0;
    color: #111;
    border: 1px solid #ccc;
    border-radius: 0 0 6px 6px;
    padding: 8px 10px;
    margin-top: 0;
}

.round-final .team {
    font-size: 14px;
    font-weight: 600;
}

.round-third {
    float: none;
    clear: both;
    width: 100%;
    max-width: 360px;
    margin-top: 10px;
}

.round-third .round-title {
    background-color: #e5e5e5;
    color: #111;
    padding: 5px 9px;
    border-radius: 6px 6px 0 0;
    font-size: 14px;
}

.round-third .match {
    background-color: #e5e5e5;
    color: #111;
    border: 1px solid #bbb;
    border-radius: 0 0 6px 6px;
    padding: 7px 9px;
    margin-top: 0;
}

.round-third .team {
    font-size: 13px;
    font-weight: 500;
}