/* Основний контейнер для інформації про команду */


.row {
    display: flex;
    flex-wrap: wrap;
    margin: -10px;
}

.col-sm-6 {
    flex: 0 0 50%;
    max-width: 50%;
    padding: 10px;
    box-sizing: border-box;
}

.team-info,
.team-statistic {

    border-radius: 4px;
    padding: 15px;
    margin-bottom: 20px;
}

.team-logo {
    width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.team-name {
    font-size: 1.5em;
    margin-bottom: 10px;
    color: #555;
}

.team-members {
    font-size: 1em;
    color: #777;
}

/* Statistic section */
.statistics p {
    margin: 5px 0;
    font-size: 0.95em;
    color: #444;
}

.statistics p strong {
    font-weight: bold;
    color: #222;
}


/* Tab content */
.tab-content {
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
    padding: 15px;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

/* Opponent and tournament rows */
.opponent-rows,
.tournament-rows {
    margin-top: 20px;
}

/* Responsive styles */
@media (max-width: 768px) {
    .col-sm-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .team-logo {
        max-width: 150px;
        margin: 0 auto 10px;
    }

}

.team-info-container {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 30px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #f9f9f9;
    padding: 20px;
}

/* Логотип команди */
.team-info .team-logo {
    flex: 0 0 100px;
    margin-right: 20px;
    text-align: center;
}

.team-info .team-logo img {
    max-width: 100px;
    max-height: 100px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* Інформація про команду */
.team-info .team-details {
    flex: 1;
}

.team-info .team-details h1 {
    font-size: 24px;
    margin: 0 0 10px;
    color: #333;
}

.team-info .team-details .team-members {
    font-size: 14px;
    color: #555;
    margin-top: 10px;
    line-height: 1.5;
}

.team-info .team-details .team-members span {
    display: inline-block;
    margin-right: 10px;
    padding: 3px 8px;
    background-color: #e7e7e7;
    border-radius: 4px;
}

/* Статистика команди */
.team-statistics {
    flex: 1;
    margin-top: 10px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
}

.team-statistics h2 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #444;
}

.team-statistics p {
    margin: 5px 0;
    font-size: 14px;
    color: #666;
}

.team-statistics .progress-bar {
    display: flex;
    height: 16px;
    border-radius: 8px;
    background-color: #e7e7e7;
    margin: 10px 0;
    overflow: hidden;
}

.team-statistics .progress-bar .progress {
    height: 100%;
    text-align: center;
    line-height: 16px;
    color: #fff;
    font-size: 12px;
}

/* Зелена для виграшу */
.team-statistics .progress-bar .progress-win {
    background-color: #4caf50;
}

/* Червона для поразок */
.team-statistics .progress-bar .progress-loss {
    background-color: #f44336;
}



/* Матчі, супротивники, турніри */
.match-row
{
    border: 1px solid #ddd;
    padding: 10px;
    border-radius: 10px;
    margin-bottom: 10px;
    background-color: #f8f9fa;
}

.tournament-row {


    border: 1px solid #ddd;
    padding: 10px;
    border-radius: 10px;
    margin-bottom: 10px;
}
.match-info-tournament,
.match-tournament
{
    display: flex;
}

.match-row img,
.opponent-row img,
.tournament-row img {
    max-height: 100px;
    margin-right: 10px;
    border-radius: 4px;
    max-width: 100%;
}
.opponent-logo
{
    width: 100px;
    padding: 10px;
}
.match-info
{
    padding: 0 10px;
}
.match-teams-maps,
.match-tournament
{
    padding: 10px;
}
.match-teams {
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 10px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.match-teams .team {
    display: flex;
    align-items: center;
    flex-basis: 40%;
    justify-content: flex-start;
    text-align: left;
}

.match-teams .team-logo {
    width: 50px;
    height: 50px;
    margin-right: 10px;
    border-radius: 4px;
    object-fit: cover;
    background-color: #e9ecef;
    border: 1px solid #ddd;
}

.match-teams .team-name {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.match-teams .match-score {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-basis: 20%;
    text-align: center;
    padding: 10px;
}

.match-teams .match-score .score {
    font-size: 24px;
    font-weight: bold;
    color: #28a745;
    margin-bottom: 5px;
}

.match-teams .match-score .format {
    font-size: 14px;
    color: #6c757d;
}


.map-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #e0e0e0;
}

.map-info {
    display: flex;
    justify-content: space-between;
    width: 100%;
}

.map-name {
    font-weight: bold;
    color: #333;
    padding: 5px;
    display: inline-block;
}

.map-score {
    font-size: 14px;
    color: #666;
    padding: 5px;
    display: inline-block;
}

/* Адаптивність */
@media (max-width: 768px) {
    .team-info-container {
        flex-direction: column;
    }

    .team-info .team-logo {
        margin: 0 auto 20px;
    }


}

@media (max-width: 768px) {
    .match-teams {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .match-teams .team {
        flex-basis: auto;
        justify-content: center;
        margin-bottom: 10px;
    }

    .match-teams .match-score {
        margin: 10px 0;
    }
}

@media (max-width: 576px) {
    .match-row,

    .tournament-row {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Container to wrap opponent rows */
.opponents-list {
    display: flex;
    flex-wrap: wrap;
    gap: 16px; /* Space between rows and columns */
    justify-content: space-between;
}

/* Single opponent row */
.opponent-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    width: calc(50% - 42px); /* Take 50% of the container width, minus half the gap */
    padding: 16px;
    border: 1px solid #ccc;
    border-radius: 8px;
    background-color: #f9f9f9;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease-in-out;
}

.opponent-row:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Opponent logo */
.opponent-logo img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 50%;
    margin-right: 16px;
}

/* Opponent info */
.opponent-info {
    flex: 1;
}

.opponent-info h4 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: bold;
    color: #333;
}

.opponent-info p {
    margin: 4px 0;
    font-size: 0.9rem;
    color: #666;
}

/* Responsive styles */
@media (max-width: 768px) {
    .opponent-row {
        width: 100%; /* Full width on mobile */
    }

    .opponents-container {
        gap: 12px; /* Reduce gap on smaller screens */
    }
}

.team-tournaments {
    margin: 20px 0;
}

.tournament-row {
    display: flex;
    align-items: center;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin-bottom: 15px;
    background-color: #f9f9f9;
}

.tournament-logo {
    flex: 0 0 80px;
    margin-right: 15px;
}

.tournament-logo img {
    width: auto;
    height: auto;
    border-radius: 5px;
}

.tournament-info {
    flex: 1;
}

.tournament-name {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 5px;
}

.tournament-name a {
    text-decoration: none;
    color: #333;
}

.tournament-dates,
.tournament-status {
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
}

.tournament-stats {
    flex: 0 0 200px;
    text-align: right;
    font-size: 14px;
}

.tournament-stats p {
    margin: 0;
    margin-bottom: 5px;
}

@media (max-width: 768px) {
    .tournament-stats
    {
        text-align: left;
    }
}

.team-h2h-section {
    padding: 0 0 95px;
}

.team-h2h-heading {
    margin-bottom: 28px;
}

.team-h2h-heading span,
.team-h2h-main span,
.team-h2h-stat span {
    display: block;
    color: #b950ff;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.2;
    text-transform: uppercase;
}

.team-h2h-heading h2 {
    margin: 6px 0 0;
    color: #fff;
    font-size: clamp(26px, 4vw, 44px);
    font-weight: 900;
    letter-spacing: 0;
}

.team-h2h-switch {
    display: inline-flex;
    gap: 6px;
    margin: 0 0 24px;
    padding: 6px;
    border: 1px solid rgba(143, 87, 255, 0.34);
    border-radius: 12px;
    background:
        radial-gradient(circle at 20% 0%, rgba(185, 80, 255, 0.16), transparent 48%),
        rgba(8, 0, 36, 0.72);
    box-shadow: inset 0 0 22px rgba(142, 75, 255, 0.08);
}

.team-h2h-switch-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 18px;
    border: 1px solid transparent;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.78);
    background: transparent;
    font-family: "Exo", sans-serif;
    font-size: 13px;
    font-weight: 900;
    line-height: 1;
    text-transform: uppercase;
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.team-h2h-switch-button:hover,
.team-h2h-switch-button.is-active {
    color: #fff;
    border-color: rgba(255, 230, 138, 0.36);
    background: linear-gradient(135deg, rgba(111, 38, 255, 0.92), rgba(185, 80, 255, 0.86));
    box-shadow: 0 8px 24px rgba(111, 38, 255, 0.28), inset 0 0 14px rgba(255, 255, 255, 0.08);
}

.team-h2h-panel[hidden] {
    display: none;
}

.team-h2h-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.team-h2h-card {
    position: relative;
    display: grid;
    grid-template-columns: 92px minmax(150px, 1fr);
    gap: 18px;
    align-items: center;
    min-height: 170px;
    padding: 22px;
    overflow: hidden;
    border: 1px solid rgba(143, 87, 255, 0.34);
    border-radius: 16px;
    background:
        radial-gradient(circle at 15% 15%, rgba(114, 54, 255, 0.22), transparent 34%),
        linear-gradient(135deg, rgba(24, 8, 63, 0.96), rgba(7, 0, 34, 0.96));
    box-shadow: inset 0 0 28px rgba(142, 75, 255, 0.08);
}

.team-h2h-card:before {
    content: "SPACE";
    position: absolute;
    right: 18px;
    bottom: -24px;
    color: rgba(255, 255, 255, 0.035);
    font-size: 72px;
    font-weight: 900;
    line-height: 1;
    pointer-events: none;
}

.team-h2h-card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    justify-self: center;
    width: calc(50% - 9px);
}

.team-h2h-logo {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 92px;
    height: 92px;
    border: 1px solid rgba(185, 80, 255, 0.45);
    border-radius: 14px;
    background: rgba(8, 0, 36, 0.7);
}

.team-h2h-logo img {
    max-width: 78px;
    max-height: 78px;
    object-fit: contain;
}

.team-h2h-main {
    position: relative;
    z-index: 1;
    min-width: 0;
}

.team-h2h-main h3 {
    margin: 6px 0 0;
    font-size: clamp(18px, 2vw, 26px);
    font-weight: 900;
    line-height: 1.1;
}

.team-h2h-main h3 a {
    color: #fff;
    text-decoration: none;
}

.team-h2h-main h3 a:hover {
    color: #b950ff;
}

.team-h2h-stats {
    position: relative;
    z-index: 1;
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.team-h2h-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 74px;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.045);
    text-align: center;
}

.team-h2h-stat strong {
    display: block;
    margin-top: 8px;
    color: #fff;
    font-size: clamp(22px, 3vw, 34px);
    font-weight: 900;
    line-height: 1;
}

.team-h2h-stat.is-win strong {
    color: #67ff9d;
}

.team-h2h-stat.is-loss strong {
    color: #ff657f;
}

.team-h2h-stat.is-rate strong {
    color: #ffe68a;
}

.team-h2h-copy-row {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
}

.team-h2h-copy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 1px solid rgba(255, 230, 138, 0.42);
    border-radius: 8px;
    color: #ffe68a;
    background: rgba(255, 230, 138, 0.08);
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.team-h2h-copy:hover,
.team-h2h-copy.is-copied {
    color: #080024;
    border-color: #ffe68a;
    background: #ffe68a;
    transform: translateY(-1px);
}

.team-h2h-copy svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.team-h2h-empty {
    grid-column: 1 / -1;
    padding: 28px;
    border: 1px solid rgba(143, 87, 255, 0.34);
    border-radius: 16px;
    color: #fff;
    background: rgba(24, 8, 63, 0.78);
    text-align: center;
}

@media (max-width: 991px) {
    .team-h2h-grid {
        grid-template-columns: 1fr;
    }

    .team-h2h-card:last-child:nth-child(odd) {
        grid-column: auto;
        width: 100%;
    }
}

@media (max-width: 575px) {
    .team-h2h-switch {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
    }

    .team-h2h-switch-button {
        min-width: 0;
        padding: 0 10px;
        font-size: 11px;
    }

    .team-h2h-card {
        grid-template-columns: 74px minmax(0, 1fr);
        gap: 14px;
        padding: 16px;
    }

    .team-h2h-logo {
        width: 74px;
        height: 74px;
    }

    .team-h2h-logo img {
        max-width: 62px;
        max-height: 62px;
    }

    .team-h2h-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
