body {
    background-color: #121212;
    color: #e0e0e0;
    font-family: sans-serif;
    margin: 0;
    padding: 0;
}

header {
    background-color: #1f1f1f;
    padding: 1em 0;
    border-bottom: 1px solid #333;
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: center;
}

nav ul li {
    display: inline;
    margin: 0 15px;
}

nav ul li a {
    color: #17FFAC;
    text-decoration: none;
    font-weight: bold;
}

nav ul li a:hover {
    color: #ffffff;
}

main {
    margin-bottom: 60px;
}

h1, h2, h3, h4, h5, h6 {
    color: #17FFAC;
}

footer {
    background-color: #1f1f1f;
    color: #aaaaaa;
    text-align: center;
    clear: both;
    padding: 10px 0;
    width: 100%;
    border-top: 1px solid #333;
}

table {
    position: relative;
    left: 10%;
    width: 80%;
    border-collapse: collapse;
    margin-bottom: 20px;
    margin-top: 20px;
}

table th, table td {
    text-align: center;
    border: 1px solid #17FFAC;
}

table th {
    background-color: #17FFAC;
    color: #121212;
}

table td {
    background-color: #121212;
    color: #17FFAC;
}
div {
    background-color: #121212;
    color: #17FFAC;
    float: left;
    width: 40%;
    margin-right: 5%;
    margin-left: 5%;
}

.center {
    text-align: center;
    width: 80%;
    margin-left: 10%;
    margin-right: 10%;
    float: center;
}

.secondHeader {
    background-image: url('../assets/images/header2bg.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: #e0e0e0;
    width: 100%;
    height: 400px;
    position: relative;
}
.secondHeader > div {
    background-color: rgba(18, 18, 18, 0);
    display: flex;
    flex-direction: column;
    align-items: center;
}
.secondHeader h1 {
    color: #17FFAC;
    font-size: 30px;
    width: 430px;
    background-color: rgba(18, 18, 18, 0.7);
    border: 1px solid rgba(18, 18, 18, 1);
    border-radius: 7px;
    padding: 10px;
    box-sizing: border-box;
    text-align: center;
    margin-bottom: 0px;
}
.secondHeader h2 {
    color: #17FFAC;
    font-size: 20px;
    width: 430px;
    background-color: rgba(18, 18, 18, 0.7);
    border: 1px solid rgba(18, 18, 18, 1);
    border-radius: 7px;
    padding: 5px;
    box-sizing: border-box;
    text-align: center;
    margin-bottom: 0px;
}
.secondHeader table {
    width: 100%;
    float: left;
    border: none;
    background-color: rgba(18, 18, 18, 0);
}
.secondHeader table tr {
    width: 100%;
    border: none;
    background-color: rgba(18, 18, 18, 0);
}
.secondHeader table td {
    width: 50%;
    float: right;
    border: none;
    background-color: rgba(18, 18, 18, 0);
}

.secondHeaderContent {
    width: 50%;
    float: right;
    background-color: rgba(18, 18, 18, 1);
    box-sizing: border-box;
}

.headerForm {
    width: 30%;
    margin-top:50px;
    margin-bottom: 20px;
    box-sizing: border-box;
    display: block;
    flex-direction: column;
    align-items: center;
    float: left;
}

.headerForm input {
    background-color: rgba(18, 18, 18, 0.7);
    color: #17FFAC;
    border: 1px solid rgba(18, 18, 18, 1);
    border-radius: 7px;
    padding: 10px;
    margin-bottom: 10px;
    width: 100%;
    box-sizing: border-box;
    font-size: 14px;
}

.headerForm input[type="submit"],
.headerForm input[type="button"],
.headerForm button {
    background-color: rgba(18, 18, 18, 0.7); 
    color: #17FFAC; 
    border: 1px solid rgba(18, 18, 18, 1); 
    border-radius: 7px;
    padding: 10px;
    margin-bottom: 10px;
    width: 100%;
    box-sizing: border-box;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    text-align: center;
}

.headerForm input[type="submit"]:hover,
.headerForm input[type="button"]:hover,
.headerForm button:hover {
    background-color: #2a2a2a; 
    color: #ffffff; 
    border-color: #17FFAC; 
}

.headerForm input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    width: auto;
}

.headerForm input[type="radio"] + label {
    position: relative;
    padding-left: 25px;
    cursor: pointer;
    display: inline-block;
    margin-right: 20px;
    margin-bottom: 5px;
    color: #17FFAC;
    font-size: 14px;
    font-weight: bold;
    line-height: 20px;
    vertical-align: middle;
}

.headerForm input[type="radio"] + label:before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border: 2px solid #17FFAC;
    border-radius: 50%;
    background-color: rgba(18, 18, 18, 0.7);
    transition: all 0.3s ease;
}

.headerForm input[type="radio"]:checked + label:before {
    background-color: #17FFAC;
    border-color: #17FFAC;
    box-shadow: inset 0 0 0 3px rgba(18, 18, 18, 0.7);
}

.headerForm input[type="radio"] + label:hover:before {
    border-color: #ffffff;
    box-shadow: 0 0 5px rgba(23, 255, 172, 0.3);
}



.headerForm div {
    background-color: rgba(18, 18, 18, 0.7);
    width: 100%;
    margin-bottom: 10px;
    padding: 10px 10px;
    border-radius: 7px;
    border: 1px solid rgba(18, 18, 18, 1);
    box-sizing: border-box;
    text-align: center;
    margin-left: 0;
    margin-right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
}
 
.headerForm > *:last-child {
    margin-bottom: 0;
}

.matchHeaderMenu {
    background-color: rgba(18, 18, 18, 0.7);
    width: 100%;
    height: 40px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    position: absolute;
    bottom: 0;
    left: 0;
    box-sizing: border-box;
}

.matchHeaderMenu ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
}

.matchHeaderMenu li {
    margin: 0;
}

.matchHeaderMenu button {
    color: #17FFAC;
    font-weight: bold;
    text-decoration: none;
    background: none;
    border: none;
    padding: 10px;
    margin: 0 15px 0 0;
    cursor: pointer;
    font-size: inherit;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
}

.matchHeaderMenu button:last-child {
    margin-right: 0;
}

.matchHeaderMenu button:hover {
    color: #ffffff;
}

.gameMenu {
    background-color: rgba(18, 18, 18, 0.8);
    width: 100%;
    height: 40px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.gameMenu ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
}

.gameMenu li {
    margin: 0;
}

.gameButton {
    width: 100px;
    background-color: rgba(18, 18, 18, 0.6);
    color: #17FFAC;
    font-weight: bold;
    border: 1px solid rgba(18, 18, 18, 1);
    border-radius: 7px;
    padding: 10px;
    margin: 0 15px 0 0;
    cursor: pointer;
    font-size: 14px;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gameButton:hover {
    background-color: #2a2a2a; 
    color: #ffffff; 
    border-color: #17FFAC; 
}


.Stats {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    margin-top: 20px;
    border: none;
}
#gameStats {
    width: 90%;
    border-collapse: collapse;
    margin-bottom: 20px;
    margin-top: 20px;
    left: 5%;
    border: none;
}

#gameStats td, #gameStats tr {
    text-align: center;
    border: none;
    height: 40px;
    background-color: rgba(68, 68, 68, 0.6);
    color: #17FFAC;
    border-top: 1px solid rgba(18, 18, 18, 1);
    border-bottom: 1px solid rgba(18, 18, 18, 1);
}

#gameStats th {
    text-align: center;
    font-weight: bold;
    border: none;
    height: 40px;
    background-color: rgba(68, 68, 68, 0.6);
    color: #17FFAC;
    border-top: 1px solid rgba(18, 18, 18, 1);
}

.shortTd {
    width: 100px;
}

.leftTd {
    text-align: left;
}

.rightTd {
    text-align: right;
}

.leftShortLongTd {
    text-align: left;
    width: 150px;
}

.rightShortLongTd {
    text-align: right;
    width: 150px;
}
.rightLongTd {
    text-align: right;
    width: 300px;
}
.leftLongTd {
    text-align: left;
    width: 300px;
}
.middleTd {
    text-align: center;
}
.link-button {
    color: #17FFAC;
    text-decoration: underline;
    cursor: pointer;
    font-weight: bold;
}

/* Tournament styles */
.tournament-row {
    cursor: pointer;
}

.tournament-row:hover {
    background-color: rgba(23, 255, 172, 0.1);
}

.series-container {
    padding: 10px;
    background-color: rgba(0, 0, 0, 0.05);
    border-left: 3px solid #17FFAC;
    margin: 5px 0;
}

.loading {
    text-align: center;
    padding: 20px;
    color: #17FFAC;
}

/* Teams grid */
.team-grid {
    width: 90%;
    margin: 30px auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.team-card {
    background: #121212;
    border: 1px solid #222;
    border-radius: 10px;
    overflow: hidden;
}

.team-card-inner {
    position: relative;
    height: 260px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    background: linear-gradient(to bottom, rgba(18,18,18,0.9) 0%, rgba(18,18,18,0.9) 60%, var(--team-color, #000000) 100%);
}

.team-id {
    color: #17FFAC;
    font-weight: bold;
    font-size: 12px;
    align-self: flex-start;
}

.team-logo {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.team-logo img {
    max-width: 100%;
    max-height: 120px;
    object-fit: contain;
}

.logo-placeholder {
    color: #666;
    font-size: 12px;
}

.team-name {
    color: #fff;
    font-weight: bold;
    text-align: center;
    width: 100%;
    font-size: 14px;
}

/* After Match End Styles */
.after-match-section {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.after-match-section h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #17FFAC;
}

.after-match-section h3 {
    color: #17FFAC;
    margin: 20px 0 15px 0;
    border-bottom: 2px solid #17FFAC;
    padding-bottom: 5px;
}

.matrix-controls, .kast-controls {
    margin: 15px 0;
    text-align: center;
}

.matrix-controls label, .kast-controls label {
    margin-right: 10px;
    color: #e0e0e0;
}

.matrix-controls select, .kast-controls select {
    background-color: #1f1f1f;
    color: #17FFAC;
    border: 1px solid #17FFAC;
    padding: 5px 10px;
    border-radius: 5px;
}

.matrix-container, .kast-container {
    margin: 20px 0;
}

.kill-matrix-table, .trade-kills-table, .kast-table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
}

.kill-matrix-table th, .kill-matrix-table td,
.trade-kills-table th, .trade-kills-table td,
.kast-table th, .kast-table td {
    text-align: center;
    border: 1px solid #17FFAC;
    padding: 8px;
}

.kill-matrix-table th, .trade-kills-table th, .kast-table th {
    background-color: #17FFAC;
    color: #121212;
    font-weight: bold;
}

.kill-matrix-table td, .trade-kills-table td, .kast-table td {
    background-color: #121212;
    color: #e0e0e0;
}

.game-matrix {
    margin: 20px 0;
    padding: 15px;
    border: 1px solid #333;
    border-radius: 8px;
    background-color: rgba(23, 255, 172, 0.05);
}

.game-matrix h4, .game-kast h4 {
    color: #17FFAC;
    margin: 0 0 15px 0;
    text-align: center;
}

.round-matrix {
    margin: 15px 0;
    padding: 10px;
    border: 1px solid #444;
    border-radius: 5px;
}

.round-matrix h5 {
    color: #17FFAC;
    margin: 0 0 10px 0;
    text-align: center;
}

.game-kast {
    margin: 20px 0;
    padding: 15px;
    border: 1px solid #333;
    border-radius: 8px;
    background-color: rgba(23, 255, 172, 0.05);
}

.trade-kills-section, .kast-section {
    margin: 30px 0;
}

