/* Base styles for League Vibe match history + champion stats tracker */

* {
    margin: 0;
    padding: 0;
    list-style-type: none;
    box-sizing: border-box;
}

body {
    color: white;
    width: 100%;
    height: 100vh;
    background-color: rgb(67, 67, 67);
    font-family: sans-serif;
    font-size: 16px;
}

:root {
    --main-color: #d8d2e1;
    --secondary-color: #34435e;
    --nav-bg-color: #1c1d21;
    --link-color: #f0b729;
    --last-color: #a4d2d1;
}


a {
    color: orange;
    text-decoration: none;
}


.app-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px;
}

.app-navigation {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: 100%;
    max-width: 100%;
    margin-bottom: 20px;
}

.app-navigation-row {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    width: 100%;
}

.app-navigation button {
    padding: 8px 16px;
    background: var(--nav-bg-color);
    border: 1px solid var(--link-color);
    color: var(--main-color);
    border-radius: 4px;
    cursor: pointer;
}

.app-navigation button:hover {
    background: var(--secondary-color);
    color: var(--last-color);
}

.app-navigation button.active,
.app-navigation button[aria-current="page"] {
    background: var(--link-color);
    color: var(--nav-bg-color);
    border-color: var(--main-color);
    font-weight: 700;
    box-shadow: 0 0 0 2px rgba(240, 183, 41, 0.25);
}

.summoner-search input,
.summoner-search select,
.summoner-search button {
    padding: 8px;
    background: var(--nav-bg-color);
    border: 1px solid var(--link-color);
    color: var(--main-color);
    border-radius: 4px;
}

.summoner-search button:hover {
    background: var(--secondary-color);
    color: var(--last-color);
}

.champion-stats-controls {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin: 16px 0;
}

.champion-stats-select {
    min-width: 180px;
    padding: 8px 12px;
    background: var(--nav-bg-color);
    border: 1px solid var(--link-color);
    color: var(--main-color);
    border-radius: 4px;
}

/* Champion Stats profile-style card view */
.cs-container {
    margin-top: 24px;
    padding: 20px;
    background: linear-gradient(145deg, var(--nav-bg-color), var(--secondary-color));
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(240, 177, 41, 0.2);
}

.cs-header {
    margin-bottom: 20px;
}

.cs-title {
    text-align: center;
    margin-bottom: 6px;
    background: linear-gradient(45deg, var(--link-color), var(--main-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.8em;
}

.cs-meta {
    text-align: center;
    color: var(--last-color);
    font-size: 0.95em;
    margin: 0;
}

.cs-status {
    text-align: center;
    color: var(--last-color);
    font-style: italic;
    padding: 20px;
    display: block;
}

.cs-grid {
    display: grid;
    gap: 12px;
}

.cs-card {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 16px 20px;
    background: rgba(0, 0, 0, 0.35);
    border-radius: 12px;
    border: 1px solid rgba(240, 177, 41, 0.15);
    transition: border-color 0.2s ease, background 0.2s ease;
    flex-wrap: wrap;
}

.cs-card:hover {
    background: rgba(240, 177, 41, 0.07);
    border-color: rgba(240, 177, 41, 0.4);
}

.cs-card-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 2px solid var(--link-color);
    box-shadow: 0 0 14px rgba(240, 177, 41, 0.3);
    flex-shrink: 0;
    object-fit: cover;
}

.cs-card-body {
    flex: 1;
    min-width: 200px;
}

.cs-card-name {
    font-size: 1.2em;
    font-weight: 700;
    color: var(--main-color);
    margin: 0 0 8px;
}

.cs-card-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.cs-chip {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(240, 177, 41, 0.18);
    border-radius: 8px;
    padding: 5px 10px;
    min-width: 54px;
}

.cs-chip-label {
    font-size: 0.7em;
    color: var(--last-color);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 2px;
}

.cs-chip-value {
    font-size: 1em;
    font-weight: 600;
    color: var(--main-color);
    font-family: monospace;
}

.cs-chip--win .cs-chip-value  { color: #7bd88f; }
.cs-chip--loss .cs-chip-value { color: #ff7b72; }
.cs-chip--high .cs-chip-value { color: #7bd88f; }
.cs-chip--low .cs-chip-value  { color: #ff7b72; }

.cs-card-bar-wrap {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    overflow: hidden;
    margin-top: 2px;
}

.cs-card-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--link-color), #7bd88f);
    border-radius: 999px;
    transition: width 0.4s ease;
}

.match-history,
.champion-stats,
.champions-view,
.items-view,
.match-detail-view,
.summoner-profile-view {
    margin-top: 24px;
}

.match-list,
.champion-stats-list,
.champions-list,
.items-list,
.participants-list,
.match-history-list {
    list-style: none;
    padding: 0;
}

.match-item,
.champion-stats-item,
.champion-item,
.item-item,
.participant-item,
.match-history-item {
    padding: 10px;
    background: var(--secondary-color);
    border: 1px solid var(--link-color);
    border-radius: 8px;
    margin-bottom: 8px;
    color: var(--main-color);
}

.champion-item,
.item-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.champion-image,
.item-image,
.profile-icon,
.item-icon {
    width: 50px;
    height: 50px;
    border-radius: 4px;
}

.participant-items {
    display: flex;
    gap: 5px;
    margin-top: 5px;
}

.participant-items img {
    width: 30px;
    height: 30px;
}

/* Champion Cards Styles */
.page-title {
    font-size: 1.8em;
    margin-bottom: 30px;
    text-align: center;
    background: linear-gradient(45deg, var(--link-color), var(--main-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.champion-filter-bar {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    align-items: center;
}

.champion-filter-bar label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--main-color);
    font-weight: bold;
    font-size: 0.95em;
}

.champion-filter-search {
    padding: 8px 12px;
    background: var(--nav-bg-color);
    border: 2px solid var(--secondary-color);
    border-radius: 8px;
    color: var(--main-color);
    font-size: 0.9em;
    transition: all 0.3s ease;
    min-width: 200px;
}

.champion-filter-search::placeholder {
    color: #888;
}

.champion-filter-search:hover {
    border-color: var(--link-color);
    box-shadow: 0 0 10px rgba(240, 177, 41, 0.3);
}

.champion-filter-search:focus {
    outline: none;
    border-color: var(--link-color);
    box-shadow: 0 0 15px rgba(240, 177, 41, 0.5);
}

.champion-filter-role {
    padding: 8px 12px;
    background: var(--nav-bg-color);
    border: 2px solid var(--secondary-color);
    border-radius: 8px;
    color: var(--main-color);
    font-size: 0.9em;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 140px;
}

.champion-filter-role:hover {
    border-color: var(--link-color);
    box-shadow: 0 0 10px rgba(240, 177, 41, 0.3);
}

.champion-filter-role:focus {
    outline: none;
    border-color: var(--link-color);
    box-shadow: 0 0 15px rgba(240, 177, 41, 0.5);
}

.champion-filter-count {
    color: #aaa;
    font-size: 14px;
    white-space: nowrap;
}

#champion-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 45px;
    max-width: 1400px;
    width: 100%;
    /* padding: 0 20px; */
    margin: 0 auto;
}

.champion-card {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    background: radial-gradient(circle, var(--secondary-color) 0%, 65%, rgba(0, 0, 0, 1) 100%);
    border-radius: 20px;
    height: 420px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8);
    transition: all 0.4s ease;
    border: 1px solid rgba(240, 177, 41, 0.3);
    position: relative;
    cursor: pointer;
    color: var(--main-color);
}

.champion-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.9), 0 0 30px rgba(240, 177, 41, 0.3);
}

.splash {
    width: 100%;
    height: 240px;
    object-fit: cover;
    transition: all 0.6s ease;
    filter: brightness(0.8);
}

.champion-card:hover .splash {
    transform: scale(1.1);
    filter: brightness(1);
}

.info {
    border: #f0b729 solid 1px;
    border-radius: 25px;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 15px;
    background: linear-gradient(135deg, var(--secondary-color), var(--nav-bg-color));
    position: relative;
}

.sicon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid var(--link-color);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.champion-card:hover .sicon {
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(240, 177, 41, 0.6);
}

.details {
    flex: 1;
}

.details strong {
    font-size: 1.3em;
    color: var(--main-color);
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.details small {
    font-size: 0.95em;
    color: var(--link-color);
    font-style: italic;
}

.hover-info {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.95), rgba(26, 26, 46, 0.95));
    padding: 20px;
    box-sizing: border-box;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    backdrop-filter: blur(10px);
}

.champion-card:hover .hover-info {
    opacity: 1;
    visibility: visible;
}

.hover-info .champion-header {
    text-align: center;
    margin-bottom: 15px;
    border-bottom: 2px solid var(--link-color);
    padding-bottom: 10px;
}

.hover-info .champion-header strong {
    font-size: 1.4em;
    background: linear-gradient(45deg, var(--link-color), var(--main-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hover-info .champion-header small {
    color: var(--link-color);
    font-size: 0.9em;
    margin-top: 5px;
}

.hover-info .blurb {
    font-size: 0.85em;
    color: #ddd;
    line-height: 1.4;
    margin-bottom: 15px;
    text-align: center;
}

.hover-info .stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: auto;
}

.hover-info .stat-item {
    background: rgba(240, 177, 41, 0.1);
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 0.8em;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid rgba(240, 177, 41, 0.2);
}

.hover-info .stat-label {
    color: var(--main-color);
    font-weight: bold;
}

.hover-info .stat-value {
    color: var(--link-color);
    font-weight: bold;
}

@keyframes cardEntrance {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.champion-card {
    animation: cardEntrance 0.6s ease-out;
}

.champion-card:nth-child(even) {
    animation-delay: 0.1s;
}

.champion-card:nth-child(3n) {
    animation-delay: 0.2s;
}

/* Responsive Champion Grid */

@media (min-width: 1255px) and (max-width: 1770px) {
    #champion-cards {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 768px) and (max-width: 1255px) {
    #champion-cards {
        grid-template-columns: repeat(2, 1fr);
        padding: 0 15px;
    }
}

@media (min-width: 481px) and (max-width: 767px) {
    #champion-cards {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
        padding: 0 10px;
    }

    .champion-card {
        /* max-width: 320px; */
        height: 450px;
        margin: 0 auto;
    }

    .page-title {
        font-size: 1.9em;
    }

    .hover-info {
        padding: 18px;
    }

    .hover-info .stats-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    #champion-cards {
        grid-template-columns: 1fr;
        padding: 0 10px;
    }

    .champion-card {
        max-width: 100%;
    }

    .page-title {
        font-size: 1.8em;
    }

    .info {
        padding: 15px;
        gap: 10px;
    }

    .sicon {
        width: 50px;
        height: 50px;
    }

    .details strong {
        font-size: 1.2em;
    }

    .details small {
        font-size: 0.85em;
    }

    .hover-info {
        padding: 15px;
    }

    .hover-info .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* Items View Styles */
.items-view {
    /* padding: 20px; */
    max-width: 1400px;
    margin: 0 auto;
}

.items-view h2 {
    text-align: center;
    margin-bottom: 30px;
    background: linear-gradient(45deg, var(--link-color), var(--main-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 2em;
}

.items-filters {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.items-filters label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--main-color);
    font-weight: bold;
    font-size: 0.95em;
}

.filter-search {
    padding: 8px 12px;
    background: var(--nav-bg-color);
    border: 2px solid var(--secondary-color);
    border-radius: 8px;
    color: var(--main-color);
    font-size: 0.9em;
    transition: all 0.3s ease;
    min-width: 200px;
}

.filter-search::placeholder {
    color: #888;
}

.filter-search:hover {
    border-color: var(--link-color);
    box-shadow: 0 0 10px rgba(240, 177, 41, 0.3);
}

.filter-search:focus {
    outline: none;
    border-color: var(--link-color);
    box-shadow: 0 0 15px rgba(240, 177, 41, 0.5);
}

.filter-select {
    padding: 8px 12px;
    background: var(--nav-bg-color);
    border: 2px solid var(--secondary-color);
    border-radius: 8px;
    color: var(--main-color);
    font-size: 0.9em;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 140px;
}

.filter-select:hover {
    border-color: var(--link-color);
    box-shadow: 0 0 10px rgba(240, 177, 41, 0.3);
}

.filter-select:focus {
    outline: none;
    border-color: var(--link-color);
    box-shadow: 0 0 15px rgba(240, 177, 41, 0.5);
}

.items-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 45px;
    margin-top: 20px;
}

.item-item {
    background: linear-gradient(145deg, var(--nav-bg-color), var(--secondary-color));
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    transition: all 0.3s ease;
    border: 1px solid rgba(240, 177, 41, 0.2);
    display: flex;
    flex-direction: column;
}

.item-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.9), 0 0 30px rgba(240, 177, 41, 0.3);
}

.item-image {
    width: 100%;
    height: 150px;
    object-fit: contain;
    background: rgba(0, 0, 0, 0.3);
    padding: 10px;
    transition: all 0.3s ease;
}

.item-item:hover .item-image {
    transform: scale(1.05);
}

.item-info {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.item-info h3 {
    font-size: 1.2em;
    color: var(--main-color);
    margin-bottom: 5px;
    font-weight: bold;
}

.item-info p {
    font-size: 0.9em;
    color: var(--main-color);
    line-height: 1.4;
    margin: 0;
}

.item-description {
    margin-bottom: 8px !important;
    white-space: pre-line; /* Preserve line breaks */
}

.stat-highlight {
    color: var(--link-color);
    font-weight: bold;
    background: rgba(240, 177, 41, 0.1);
    padding: 2px 4px;
    border-radius: 3px;
    border: 1px solid rgba(240, 177, 41, 0.3);
}

.item-tier {
    color: var(--link-color) !important;
    font-weight: bold;
}

.item-maps {
    color: var(--last-color) !important;
    font-style: italic;
}

/* Responsive Items Grid */
@media (min-width: 1200px) {
    .items-list {
        grid-template-columns: repeat(4, 1fr);
        gap: 45px;
    }
}

@media (min-width: 768px) and (max-width: 1199px) {
    .items-list {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

@media (min-width: 481px) and (max-width: 767px) {
    .items-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .items-filters {
        gap: 15px;
    }

    .filter-select {
        min-width: 120px;
        font-size: 0.85em;
    }
}

@media (max-width: 480px) {
    .items-list {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .items-view h2 {
        font-size: 1.5em;
    }

    .items-filters {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    .items-filters label {
        font-size: 0.9em;
    }

    .filter-select {
        min-width: 160px;
        font-size: 0.85em;
    }

    .item-image {
        height: 100px;
    }

    .item-info {
        padding: 10px;
    }

    .item-info h3 {
        font-size: 1.1em;
    }
}

/* Summoner Search Styles */
.summoner-search {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    justify-content: center;
}

.summoner-input {
    padding: 12px 16px;
    border: 2px solid var(--secondary-color);
    border-radius: 8px;
    background: var(--nav-bg-color);
    color: var(--main-color);
    font-size: 1em;
    transition: all 0.3s ease;
    min-width: 140px;
}

.summoner-input:focus {
    outline: none;
    border-color: var(--link-color);
    box-shadow: 0 0 10px rgba(240, 177, 41, 0.3);
}

.game-name-input {
    min-width: 160px;
}

.tag-input {
    min-width: 80px;
}

.hash-symbol {
    color: var(--link-color);
    font-size: 1.2em;
    font-weight: bold;
    margin: 0 5px;
}

.region-select {
    padding: 12px 16px;
    border: 2px solid var(--secondary-color);
    border-radius: 8px;
    background: var(--nav-bg-color);
    color: var(--main-color);
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 100px;
}

.region-select:hover {
    border-color: var(--link-color);
}

.region-select:focus {
    outline: none;
    border-color: var(--link-color);
    box-shadow: 0 0 10px rgba(240, 177, 41, 0.3);
}

.search-button {
    padding: 12px 24px;
    background: linear-gradient(45deg, var(--link-color), var(--secondary-color));
    border: none;
    border-radius: 8px;
    color: var(--nav-bg-color);
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(240, 177, 41, 0.3);
}

.search-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(240, 177, 41, 0.5);
}

.search-button:active {
    transform: translateY(0);
}

/* Responsive Summoner Search */
@media (max-width: 768px) {
    .summoner-search {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }

    .summoner-input,
    .region-select {
        min-width: 100%;
    }

    .hash-symbol {
        align-self: center;
        margin: 10px 0;
    }

    .search-button {
        align-self: center;
        min-width: 120px;
    }
}

@media (max-width: 480px) {
    .summoner-search {
        gap: 10px;
    }

    .summoner-input,
    .region-select,
    .search-button {
        padding: 10px 14px;
        font-size: 0.9em;
    }

    .hash-symbol {
        font-size: 1em;
    }
}

/* Match History Styles */
.match-history {
    margin-top: 30px;
    padding: 20px;
    background: linear-gradient(145deg, var(--nav-bg-color), var(--secondary-color));
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(240, 177, 41, 0.2);
}

.match-history h2 {
    text-align: center;
    margin-bottom: 20px;
    background: linear-gradient(45deg, var(--link-color), var(--main-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.8em;
}

.summoner-info {
    color: var(--nav-bg-color);
    font-weight: normal;
    font-size: 0.9em;
    opacity: 0.9;
}

.match-list {
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 10px;
}

.match-item {
    padding: 15px 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    border: 1px solid rgba(240, 177, 41, 0.1);
    transition: all 0.3s ease;
    color: var(--main-color);
    font-family: monospace;
    font-size: 0.95em;
}

.match-item:hover {
    background: rgba(240, 177, 41, 0.1);
    border-color: var(--link-color);
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(240, 177, 41, 0.2);
}

.match-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.match-id {
    font-family: monospace;
    font-size: 0.9em;
    color: var(--last-color);
    flex: 1;
    min-width: 120px;
}

.champion-name {
    font-weight: bold;
    color: var(--main-color);
    flex: 1;
    text-align: center;
}

.kda {
    font-family: monospace;
    font-weight: bold;
    color: var(--link-color);
    flex: 0 0 auto;
}

.result {
    font-weight: bold;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85em;
    flex: 0 0 auto;
}

.result.win {
    background: rgba(46, 125, 50, 0.8);
    color: white;
}

.result.loss {
    background: rgba(211, 47, 47, 0.8);
    color: white;
}

.mh-duration {
    font-family: monospace;
    font-size: 0.85em;
    color: var(--last-color);
    flex: 0 0 auto;
}

.mh-date {
    font-size: 0.82em;
    color: var(--last-color);
    flex: 0 0 auto;
    opacity: 0.8;
}

.mh-teams-strip {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.mh-team-icons {
    display: flex;
    gap: 3px;
    align-items: center;
    padding: 4px 8px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.25);
}

.mh-team-icons--blue {
    border: 1px solid rgba(47, 128, 237, 0.35);
}

.mh-team-icons--red {
    border: 1px solid rgba(235, 87, 87, 0.35);
}

.mh-champ-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.no-matches {
    text-align: center;
    color: var(--main-color);
    font-style: italic;
    padding: 20px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    border: 1px solid rgba(240, 177, 41, 0.1);
}

.match-history-actions {
    margin-top: 18px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
}

.match-history-action-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
}

.save-history-button {
    min-width: 220px;
    padding: 12px 18px;
    background: linear-gradient(135deg, var(--link-color), #c99012);
    color: var(--nav-bg-color);
    border: none;
    border-radius: 999px;
    font-weight: bold;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.save-history-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(240, 177, 41, 0.25);
}

.save-history-button:disabled {
    cursor: wait;
    opacity: 0.7;
}

.save-all-details-button {
    margin-left: auto;
}

.save-history-status {
    min-height: 20px;
    font-size: 0.9em;
    color: var(--last-color);
}

.save-history-status.success {
    color: #7bd88f;
}

.save-history-status.error {
    color: #ff7b72;
}

.save-history-status.pending {
    color: var(--link-color);
}

/* Responsive Match History */
@media (max-width: 768px) {
    .match-history {
        padding: 15px;
        margin-top: 20px;
    }

    .match-history h2 {
        font-size: 1.5em;
    }

    .match-item {
        padding: 12px 15px;
        font-size: 0.9em;
    }

    .match-summary {
        gap: 10px;
    }

    .match-id {
        min-width: 100px;
        font-size: 0.8em;
    }

    .champion-name {
        flex: 1;
        text-align: left;
    }

    .kda {
        flex: 0 0 auto;
        font-size: 0.9em;
    }

    .save-history-button {
        width: 100%;
    }

    .match-history-action-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .save-all-details-button {
        margin-left: 0;
    }
}

@media (max-width: 480px) {
    .match-history {
        padding: 10px;
    }

    .match-history h2 {
        font-size: 1.3em;
    }

    .match-item {
        padding: 10px 12px;
        font-size: 0.85em;
    }

    .match-summary {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .match-id {
        min-width: auto;
        width: 100%;
    }

    .champion-name {
        width: 100%;
        text-align: left;
    }

    .kda, .result {
        align-self: flex-end;
    }

    .match-history-actions {
        align-items: stretch;
    }
}

/* Map View Styles */
.map-view {
    margin-top: 30px;
    padding: 20px;
    background: linear-gradient(145deg, var(--nav-bg-color), var(--secondary-color));
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(240, 177, 41, 0.2);
}

.map-view h2 {
    text-align: center;
    margin-bottom: 8px;
    background: linear-gradient(45deg, var(--link-color), var(--main-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.8em;
}

.map-view-subtitle {
    text-align: center;
    margin: 0 0 18px;
    color: var(--last-color);
    font-size: 0.98em;
}

.heatmap-controls {
    max-width: 420px;
    margin: 0 auto 16px;
    display: grid;
    gap: 8px;
}

.heatmap-filter-label {
    color: var(--last-color);
    font-size: 0.88em;
    text-align: center;
    letter-spacing: 0.03em;
}

.heatmap-filter-select {
    width: 100%;
}

.map-frame-selector {
    max-width: 420px;
    margin: 0 auto 16px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(240, 177, 41, 0.2);
    border-radius: 10px;
    display: grid;
    gap: 8px;
}

.map-frame-playback {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 10px;
}

.map-frame-slider {
    width: 100%;
    accent-color: var(--link-color);
}

.map-frame-counter {
    color: var(--last-color);
    font-size: 0.88em;
    min-width: 56px;
    text-align: center;
    font-family: monospace;
}

.map-autoplay-button {
    padding: 8px 14px;
    background: var(--nav-bg-color);
    border: 1px solid var(--link-color);
    color: var(--main-color);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 600;
}

.map-autoplay-button:hover:not(:disabled) {
    background: var(--secondary-color);
    color: var(--last-color);
}

.map-autoplay-button:disabled {
    cursor: not-allowed;
    opacity: 0.65;
}

.map-image-container {
    position: relative;
    width: min(100%, 900px);
    margin: 0 auto;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(240, 177, 41, 0.2);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

.map-image {
    display: block;
    width: 100%;
    height: auto;
}

.map-overlay {
    position: absolute;
    inset: 0;
}

.heatmap-overlay {
    pointer-events: none;
}

.heatmap-cell {
    position: absolute;
    box-sizing: border-box;
    border: 1px solid rgba(0, 0, 0, 0.35);
    opacity: 0.7;
    display: flex;
    align-items: center;
    justify-content: center;
}

.heatmap-cell-label {
    font-size: 0.62em;
    font-weight: 700;
    color: #111;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.35);
}

.map-player-marker {
    position: absolute;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    pointer-events: auto;
}

.map-player-badge {
    width: 24px;
    height: 24px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78em;
    font-weight: 700;
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
}

.map-player-label {
    padding: 3px 6px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.72);
    color: var(--main-color);
    font-size: 0.72em;
    font-weight: 600;
    white-space: nowrap;
}

.map-player-marker.team-100 .map-player-badge {
    background: #2f80ed;
}

.map-player-marker.team-200 .map-player-badge {
    background: #eb5757;
}

.map-team-lists {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
    margin-top: 20px;
}

.map-team-list {
    padding: 16px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(240, 177, 41, 0.12);
    transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.map-team-list.is-winner {
    border-color: rgba(240, 177, 41, 0.65);
    box-shadow: 0 0 18px rgba(240, 177, 41, 0.25);
    transform: translateY(-2px);
}

.map-team-list h3 {
    margin: 0 0 12px;
}

.map-team-list.team-100 h3 {
    color: #7cb7ff;
}

.map-team-list.team-200 h3 {
    color: #ff8c8c;
}

.map-team-list ul {
    margin: 0;
    padding: 0;
    list-style: none;
    color: var(--main-color);
    display: grid;
    gap: 8px;
}

.map-team-list-item {
    display: grid;
    gap: 2px;
    padding: 8px 10px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
}

.map-team-list-champion {
    font-weight: 700;
    color: var(--secondary-color);
}

.map-team-list-summoner {
    font-size: 0.9em;
    color: var(--main-color);
}

.map-team-list-coords {
    font-size: 0.78em;
    color: var(--last-color);
    font-family: monospace;
}

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

    .map-frame-counter {
        justify-self: start;
        text-align: left;
    }

    .map-autoplay-button {
        justify-self: start;
    }

    .map-player-label {
        display: none;
    }
}

/* Match Detail View Styles */
.match-detail-view {
    margin-top: 24px;
    padding: 20px;
    background: linear-gradient(145deg, var(--nav-bg-color), var(--secondary-color));
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(240, 177, 41, 0.2);
}

.tc-container {
    margin-top: 24px;
    padding: 20px;
    background: linear-gradient(145deg, var(--nav-bg-color), var(--secondary-color));
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(240, 177, 41, 0.2);
}
.tc-title {
    margin: 0 0 8px;
}

.tc-subtitle {
    margin: 0 0 14px;
    color: var(--last-color);
}

.tc-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.tc-sort-label {
    font-weight: 600;
    color: var(--main-color);
}

.tc-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
}

.tc-item {
    padding: 10px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--main-color);
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid rgba(240, 177, 41, 0.12);
}

.tc-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    flex: 0 0 auto;
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.tc-item-body {
    min-width: 0;
}

.tc-champion-name {
    margin: 0 0 4px;
    font-size: 0.98em;
}

.tc-stat {
    margin: 0;
    font-size: 0.84em;
    color: var(--last-color);
}

@media (max-width: 1100px) {
    .tc-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .tc-list {
        grid-template-columns: 1fr;
    }
}

.match-detail-view h2 {
    text-align: center;
    margin-bottom: 8px;
    background: linear-gradient(45deg, var(--link-color), var(--main-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.8em;
}

.match-detail-summoner {
    text-align: center;
    color: var(--last-color);
    font-size: 0.95em;
    margin-bottom: 20px;
}

.loading {
    text-align: center;
    padding: 40px;
    color: var(--main-color);
    font-size: 1.2em;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    border: 1px solid rgba(240, 177, 41, 0.1);
}

.match-selector-container {
    margin-bottom: 18px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(240, 177, 41, 0.2);
    border-radius: 10px;
    display: grid;
    gap: 8px;
}

.match-selector-label {
    color: var(--last-color);
    font-size: 0.9em;
    font-weight: bold;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.match-selector {
    width: 100%;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(240, 177, 41, 0.45);
    border-radius: 8px;
    color: var(--main-color);
    padding: 10px 12px;
    font-size: 0.95em;
}

.match-selector:focus {
    outline: none;
    border-color: var(--link-color);
    box-shadow: 0 0 0 2px rgba(240, 177, 41, 0.2);
}

.match-detail-actions {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.save-detail-button {
    min-width: 240px;
    padding: 12px 18px;
    border: none;
    border-radius: 999px;
    font-weight: bold;
    letter-spacing: 0.04em;
    color: var(--nav-bg-color);
    background: linear-gradient(135deg, var(--link-color), #c99012);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.save-detail-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(240, 177, 41, 0.25);
}

.save-detail-button:disabled {
    cursor: wait;
    opacity: 0.7;
}

.save-detail-status {
    min-height: 20px;
    font-size: 0.9em;
    color: var(--last-color);
}

.save-detail-status.success {
    color: #7bd88f;
}

.save-detail-status.error {
    color: #ff7b72;
}

.save-detail-status.pending {
    color: var(--link-color);
}

.match-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    border: 1px solid rgba(240, 177, 41, 0.1);
}

.match-info p {
    margin: 0;
    color: var(--main-color);
    font-size: 0.95em;
}

.team-section {
    margin-bottom: 30px;
    padding: 20px;
    border-radius: 12px;
    border: 2px solid;
}

.team-100 {
    background: linear-gradient(145deg, rgba(52, 152, 219, 0.1), rgba(52, 152, 219, 0.05));
    border-color: rgba(52, 152, 219, 0.3);
}

.team-200 {
    background: linear-gradient(145deg, rgba(231, 76, 60, 0.1), rgba(231, 76, 60, 0.05));
    border-color: rgba(231, 76, 60, 0.3);
}

.team-section h3 {
    margin-bottom: 15px;
    font-size: 1.4em;
    font-weight: bold;
}

.team-winner {
    color: #4CAF50;
}

.team-loser {
    color: #f44336;
}

.participants-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 12px;
}

.participant-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    border: 1px solid rgba(240, 177, 41, 0.1);
    transition: all 0.3s ease;
    flex-wrap: wrap;
}

.participant-item:hover {
    background: rgba(240, 177, 41, 0.1);
    border-color: var(--link-color);
    transform: translateY(-2px);
}

.participant-name {
    font-weight: bold;
    color: var(--main-color);
    min-width: 200px;
    flex: 1;
}

.participant-kda {
    font-family: monospace;
    font-weight: bold;
    color: var(--link-color);
    background: rgba(240, 177, 41, 0.1);
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid rgba(240, 177, 41, 0.3);
}

.participant-level,
.participant-gold,
.participant-cs {
    color: var(--last-color);
    font-size: 0.9em;
    font-weight: 500;
}

.participant-items {
    display: flex;
    gap: 5px;
    margin-left: auto;
}

.item-icon {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    border: 1px solid rgba(240, 177, 41, 0.3);
    transition: all 0.2s ease;
}

.item-icon:hover {
    transform: scale(1.1);
    box-shadow: 0 0 10px rgba(240, 177, 41, 0.5);
}

/* Responsive Match Detail View */
@media (max-width: 768px) {
    .match-detail-view {
        padding: 15px;
        margin-top: 20px;
    }

    .match-detail-view h2 {
        font-size: 1.5em;
    }

    .match-info {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 12px;
    }

    .match-selector {
        font-size: 0.9em;
    }

    .save-detail-button {
        width: 100%;
    }

    .team-section {
        padding: 15px;
    }

    .team-section h3 {
        font-size: 1.2em;
    }

    .participant-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 10px 12px;
    }

    .participant-name {
        min-width: auto;
        width: 100%;
    }

    .participant-items {
        margin-left: 0;
        margin-top: 8px;
    }

    .item-icon {
        width: 28px;
        height: 28px;
    }
}

@media (max-width: 480px) {
    .match-detail-view {
        padding: 10px;
    }

    .match-detail-view h2 {
        font-size: 1.3em;
    }

    .match-info {
        padding: 10px;
    }

    .team-section {
        padding: 12px;
        margin-bottom: 20px;
    }

    .participant-item {
        padding: 8px 10px;
    }

    .participant-name {
        font-size: 0.9em;
    }

    .participant-kda,
    .participant-level,
    .participant-gold,
    .participant-cs {
        font-size: 0.85em;
    }

    .item-icon {
        width: 24px;
        height: 24px;
    }
}

/* Summoner Profile View Styles */
.summoner-profile-view {
    margin: 0 auto;
    padding: 20px;
    margin-top: 20px;
}

.summoner-profile-header {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 25px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 12px;
    border: 1px solid rgba(240, 177, 41, 0.2);
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.summoner-profile-icon {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 3px solid var(--link-color);
    box-shadow: 0 0 20px rgba(240, 177, 41, 0.3);
}

.summoner-profile-info {
    flex: 1;
    min-width: 250px;
}

.summoner-profile-name {
    font-size: 2.2em;
    font-weight: bold;
    color: var(--main-color);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.summoner-profile-tag {
    background: rgba(240, 177, 41, 0.2);
    color: var(--link-color);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 500;
    border: 1px solid rgba(240, 177, 41, 0.3);
}

.summoner-profile-level {
    font-size: 1.4em;
    color: var(--last-color);
    margin-bottom: 15px;
    font-weight: 500;
}

.summoner-profile-stats {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-top: 15px;
}

.stat-item {
    background: rgba(0, 0, 0, 0.3);
    padding: 12px 15px;
    border-radius: 8px;
    border: 1px solid rgba(240, 177, 41, 0.1);
    text-align: center;
}

.stat-label {
    font-size: 0.9em;
    color: var(--last-color);
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 1.3em;
    font-weight: bold;
    color: var(--main-color);
}

.summoner-profile-loading {
    text-align: center;
    padding: 50px;
    color: var(--last-color);
    font-size: 1.2em;
}

.summoner-profile-error {
    background: rgba(244, 67, 54, 0.1);
    border: 1px solid rgba(244, 67, 54, 0.3);
    color: #f44336;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    margin: 20px 0;
}

.summoner-profile-match-history {
    margin-top: 30px;
}

.summoner-profile-match-history h3 {
    font-size: 1.8em;
    color: var(--main-color);
    margin-bottom: 20px;
    border-bottom: 2px solid var(--link-color);
    padding-bottom: 10px;
}

/* Responsive Summoner Profile View */
@media (max-width: 768px) {
    .summoner-profile-view {
        padding: 15px;
        margin-top: 20px;
    }

    .summoner-profile-header {
        padding: 20px;
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .summoner-profile-icon {
        width: 80px;
        height: 80px;
    }

    .summoner-profile-name {
        font-size: 1.8em;
        flex-direction: column;
        gap: 8px;
    }

    .summoner-profile-tag {
        align-self: center;
    }

    .summoner-profile-level {
        font-size: 1.2em;
    }

    .summoner-profile-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .stat-item {
        padding: 10px 12px;
    }

    .stat-value {
        font-size: 1.1em;
    }
}

@media (max-width: 480px) {
    .summoner-profile-view {
        padding: 10px;
    }

    .summoner-profile-header {
        padding: 15px;
    }

    .summoner-profile-icon {
        width: 70px;
        height: 70px;
    }

    .summoner-profile-name {
        font-size: 1.5em;
    }

    .summoner-profile-level {
        font-size: 1.1em;
    }

    .summoner-profile-stats {
        grid-template-columns: 1fr;
    }

    .stat-item {
        padding: 8px 10px;
    }

    .stat-label {
        font-size: 0.8em;
    }

    .stat-value {
        font-size: 1em;
    }
}