@import url('https://fonts.googleapis.com/css2?family=Georama:wght@400;700&display=swap');

@font-face {
    font-family: 'Upheaval';
    src: url('fonts/upheavtt.ttf') format('truetype');
}

body {
    font-family: 'Georama', sans-serif;
    background-color: #1a1a1a;
    color: #ffffff;
    margin: 0;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 30px;
}

h1,
h2 {
    font-family: 'Upheaval', sans-serif;
    color: #ff6b6b;
    letter-spacing: 0.05em;
}

h1 {
    font-size: 2.5em;
}

h2 {
    font-size: 2em;
    text-align: center;
}

h3 {
    font-size: 1em;
    text-align: center;
}

a {
    color: #ff6b6b;
    font-weight: bold;
    text-decoration: none;
}

table {
    width: 100%;
    max-width: 400px;
    margin: 0 auto 20px auto;
    border-collapse: separate;
    border-spacing: 0 5px;
    background-color: #2a2a2a;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #444;
    overflow: hidden;
}

tbody tr {
    border-radius: 4px;
    overflow: hidden;
}

th,
td {
    border: none;
    padding: 8px;
    text-align: left;
}

th:nth-child(2),
td.column-wins {
    width: 70px;
}

th:nth-child(3),
td.column-avg {
    width: 90px;
}

td.column-wins,
td.column-avg,
td.column-deaths,
th:nth-child(2),
th:nth-child(3),
th:nth-child(4) {
    text-align: right;
}

td.column-deaths {
    text-align: right;
}

.winner-name {
    font-size: 2em;
    font-weight: bold;
    text-align: center;
    margin: 20px 0;
}

.divider {
    border: none;
    border-top: 1px solid #444;
    margin: 30px auto;
    width: 100%;
    max-width: 1000px;
}

thead {
    background-color: #2a2a2a;
}

th {
    border-bottom: 1px solid #444;
}

main {
    max-width: 1000px;
    margin: 0 auto;
}

section {
    margin-bottom: 40px;
}

#completed-list,
#remaining-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(260px, 1fr));
    gap: 15px;
    justify-items: center;
}

.match-table {
    background-color: #2a2a2a;
    padding: 10px;
    margin: 0;
    border-radius: 5px;
    border: 1px solid #444;
    max-width: 300px;
    width: 100%;
}

.top-two {
    background-color: #3a3a3a;
}

.top-two td {
    font-weight: bold;
}

.row {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
}

.row.winner {
    background-color: #3a3a3a;
}

.name {
    width: 80px;
    padding: 3px;
    font-weight: bold;
    flex-shrink: 0;
}

.score {
    flex: 1;
    margin-left: 4px;
    text-align: center;
    padding: 2px;
}

.score.winning {
    font-weight: 900;
}

.score.death {
    color: #ff6b6b;
}

#finals-display {
    display: flex;
    justify-content: center;
    width: 100%;
    border-radius: 5px;
}

/* Navbar and Tabs */
.navbar {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.tab-btn {
    background-color: #2a2a2a;
    color: #ffffff;
    font-family: 'Georama', sans-serif;
    font-size: 1.1em;
    padding: 10px 20px;
    border: 1px solid #444;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
}

.tab-btn:hover {
    background-color: #3a3a3a;
}

.tab-btn.active {
    background-color: #ff6b6b;
    color: #1a1a1a;
    border-color: #ff6b6b;
    font-weight: bold;
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Specific styling for the textual tabs */
.text-content-box {
    background-color: #2a2a2a;
    padding: 20px 30px;
    border-radius: 5px;
    border: 1px solid #444;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
}

.text-content-box h2 {
    margin-top: 0;
    text-align: center;
}

.text-content-box ul,
.text-content-box ol {
    padding-left: 20px;
}

.text-content-box li {
    margin-bottom: 10px;
}

.format-table {
    max-width: 600px;
    margin: 20px auto;
}

.format-table th,
.format-table td {
    text-align: left !important;
}

.format-table th:nth-child(2),
.format-table td:nth-child(2) {
    width: auto;
}

.format-table.points-table td:nth-child(2) {
    font-weight: bold;
}

.generate-btn {
    background-color: #ff6b6b;
    color: #1a1a1a;
    font-family: 'Upheaval', sans-serif;
    font-size: 1.5em;
    padding: 15px 30px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: transform 0.1s, background-color 0.2s;
}

.generate-btn:hover {
    background-color: #ff4f4f;
    transform: scale(1.05);
}

.generate-btn:active {
    transform: scale(0.95);
}

/* Segmented Toggle Switch */
.toggle-container {
    position: relative;
    display: inline-flex;
    background-color: #2a2a2a;
    border: 1px solid #444;
    border-radius: 30px;
    margin: 0 auto;
}

.toggle-container input[type="checkbox"] {
    display: none;
}

.toggle-label {
    position: relative;
    z-index: 2;
    width: 140px;
    padding: 10px 0;
    text-align: center;
    font-size: 1.2em;
    font-family: 'Upheaval', sans-serif;
    color: #ffffff;
    transition: color 0.3s;
}

.toggle-container .toggle-label:nth-of-type(1) {
    color: #1a1a1a;
}

.toggle-container input[type="checkbox"]:checked ~ .toggle-label:nth-of-type(1) {
    color: #ffffff;
}

.toggle-container input[type="checkbox"]:checked ~ .toggle-label:nth-of-type(2) {
    color: #1a1a1a;
}

.toggle-slider {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 140px;
    background-color: #ff6b6b;
    border-radius: 30px;
    z-index: 1;
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.toggle-container input[type="checkbox"]:checked ~ .toggle-slider {
    transform: translateX(100%);
}