:root {
    --bg-color: #F5F6F5;
    --text-color: #2D3436;
    --secondary-text: #636E72;
    --card-bg: #FFFFFF;
    --card-border: #DFE6E9;
    --header-bg: #FFFFFF;
    --hover-bg: #E6ECF0;
    --link-color: #0984E3;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --highlight-color: #E67E22;
    --tier-color: #E67E22;
    --tier-hover: #C0392B;
    --tier1-bg: linear-gradient(to bottom, rgba(255, 215, 0, 0.3), rgba(255, 215, 0, 0.5));
    --tier1-ht-bg: linear-gradient(to bottom, rgba(255, 215, 0, 0.5), rgba(255, 215, 0, 0.7));
    --tier2-bg: linear-gradient(to bottom, rgba(192, 192, 192, 0.3), rgba(192, 192, 192, 0.5));
    --tier2-ht-bg: linear-gradient(to bottom, rgba(192, 192, 192, 0.5), rgba(192, 192, 192, 0.7));
    --tier3-bg: linear-gradient(to bottom, rgba(205, 127, 50, 0.3), rgba(205, 127, 50, 0.5));
    --tier3-ht-bg: linear-gradient(to bottom, rgba(205, 127, 50, 0.5), rgba(205, 127, 50, 0.7));
    --tier4-bg: linear-gradient(to bottom, rgba(128, 0, 128, 0.3), rgba(128, 0, 128, 0.5));
    --tier4-ht-bg: linear-gradient(to bottom, rgba(128, 0, 128, 0.5), rgba(128, 0, 128, 0.7));
    --tier5-bg: linear-gradient(to bottom, rgba(127, 140, 141, 0.3), rgba(127, 140, 141, 0.5));
    --tier5-ht-bg: linear-gradient(to bottom, rgba(127, 140, 141, 0.5), rgba(127, 140, 141, 0.7));
    --tier1-color: #FFD700;
    --tier1-ht-color: #FFC107;
    --tier2-color: #C0C0C0;
    --tier2-ht-color: #A9A9A9;
    --tier3-color: #CD7F32;
    --tier3-ht-color: #B76E22;
    --tier4-color: #800080;
    --tier4-ht-color: #6A006A;
    --tier5-color: #A3BFFA;
    --tier5-ht-color: #8B9DC3;
    --title-grandma-color: #FFD700;
    --title-ace-color: #FFD700;
    --title-talented-color: #FF6B6B;
    --title-senior-color: #C71585;
    --title-striker-color: #D8BFD8;
    --title-rookie-color: #D8BFD8;
    --title-unknown-color: #808080;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #1A1D26;
        --text-color: #E0E6ED;
        --secondary-text: #A3BFFA;
        --card-bg: #2D2F3A;
        --card-border: #3A3F4F;
        --header-bg: #2D2F3A;
        --hover-bg: #2A2D38;
        --link-color: #4FC3F7;
        --shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    }
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

.header {
    background-color: var(--header-bg);
    color: var(--text-color);
    padding: 0.75rem;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 200;
    box-shadow: var(--shadow);
    border-bottom: 1px solid var(--card-border);
    display: flex;
    flex-direction: column;
    align-items: center;
    height: auto;
}

.header .logo {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    display: flex;
    align-items: center;
}

.custom-logo {
    position: fixed;
    top: 0.5rem;
    left: 0.5rem;
    width: 50px;
    height: auto;
    z-index: 300;
    box-shadow: var(--shadow);
}

.menu-button {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-color);
    cursor: pointer;
    margin-right: 0.5rem;
}

.menu-button:hover {
    color: var(--link-color);
}

.nav-links {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 1rem;
    padding: 0.5rem 0;
    width: 100%;
    justify-content: space-between;
    scrollbar-width: thin;
    scrollbar-color: var(--card-border) var(--card-bg);
}

.nav-links::-webkit-scrollbar {
    height: 8px;
}

.nav-links::-webkit-scrollbar-track {
    background: var(--card-bg);
}

.nav-links::-webkit-scrollbar-thumb {
    background-color: var(--card-border);
    border-radius: 4px;
    border: 2px solid var(--card-bg);
}

.nav-links a {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--secondary-text);
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--link-color);
}

.nav-links img {
    width: 24px;
    height: 24px;
    margin-bottom: 2px;
}

.sidebar {
    width: 200px;
    background-color: var(--card-bg);
    color: var(--text-color);
    position: fixed;
    top: 120px;
    left: 0;
    height: calc(100% - 120px);
    padding: 1rem;
    transition: transform 0.3s ease-in-out;
    transform: translateX(-100%);
    box-shadow: 2px 0 10px var(--shadow);
    z-index: 150;
    border-right: 1px solid var(--card-border);
}

.sidebar.open {
    transform: translateX(0);
}

.sidebar a {
    color: var(--secondary-text);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 4px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.sidebar a:hover {
    color: var(--link-color);
    background-color: var(--hover-bg);
}

.content {
    margin-left: 0;
    transition: margin-left 0.3s ease-in-out;
    padding: 120px 0.5rem 1rem;
    min-height: calc(100vh - 120px - 60px);
    opacity: 0;
    animation: fadeIn 0.5s forwards;
    z-index: 100;
}

.content.shifted {
    margin-left: 200px;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

.game-section {
    display: flex;
    flex-wrap: nowrap;
    gap: 1rem;
    padding: 0.5rem 0;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--card-border) var(--card-bg);
    -webkit-overflow-scrolling: touch;
}

.game-section::-webkit-scrollbar {
    height: 8px;
}

.game-section::-webkit-scrollbar-track {
    background: var(--card-bg);
}

.game-section::-webkit-scrollbar-thumb {
    background-color: var(--card-border);
    border-radius: 4px;
    border: 2px solid var(--card-bg);
}

.tier-column {
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    padding: 1rem;
    min-width: 140px;
    flex: 0 0 auto;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease;
    margin-bottom: 1rem;
}

.tier-column:hover {
    transform: translateY(-2px);
}

.tier-column h3 {
    color: var(--text-color);
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
    text-align: center;
}

.tier-column ul {
    list-style: none;
    padding: 0;
}

.tier-column ul li {
    padding: 0.375rem 0.5rem;
    color: var(--secondary-text);
    font-size: 0.9rem;
    transition: color 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tier-column ul li a {
    color: var(--link-color);
    text-decoration: none;
    flex: 1;
}

.tier-column ul li a:hover {
    text-decoration: underline;
}

.tier-column ul li .player-tier {
    font-size: 0.8rem;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    min-width: 40px;
    text-align: center;
    font-weight: 600;
}

.tier-column ul li .player-tier.tier1 {
    background: var(--tier1-bg);
    color: var(--tier1-color);
}

.tier-column ul li .player-tier.tier1-ht {
    background: var(--tier1-ht-bg);
    color: var(--tier1-ht-color);
    font-weight: 700;
}

.tier-column ul li .player-tier.tier2 {
    background: var(--tier2-bg);
    color: var(--tier2-color);
}

.tier-column ul li .player-tier.tier2-ht {
    background: var(--tier2-ht-bg);
    color: var(--tier2-ht-color);
    font-weight: 700;
}

.tier-column ul li .player-tier.tier3 {
    background: var(--tier3-bg);
    color: var(--tier3-color);
}

.tier-column ul li .player-tier.tier3-ht {
    background: var(--tier3-ht-bg);
    color: var(--tier3-ht-color);
    font-weight: 700;
}

.tier-column ul li .player-tier.tier4 {
    background: var(--tier4-bg);
    color: var(--tier4-color);
}

.tier-column ul li .player-tier.tier4-ht {
    background: var(--tier4-ht-bg);
    color: var(--tier4-ht-color);
    font-weight: 700;
}

.tier-column ul li .player-tier.tier5 {
    background: var(--tier5-bg);
    color: var(--tier5-color);
}

.tier-column ul li .player-tier.tier5-ht {
    background: var(--tier5-ht-bg);
    color: var(--tier5-ht-color);
    font-weight: 700;
}

.ranking-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background-color: var(--card-bg);
    box-shadow: var(--shadow);
    border-radius: 8px;
    overflow: hidden;
}

.ranking-table th, .ranking-table td {
    padding: 0.75rem;
    text-align: center;
    border-bottom: 1px solid var(--card-border);
    color: var(--text-color);
    font-size: 0.85rem;
}

.ranking-table th {
    background-color: var(--hover-bg);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ranking-table tr {
    transition: background-color 0.2s ease;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.ranking-table tr:nth-child(even) {
    background-color: var(--hover-bg);
}

.ranking-table tr:hover {
    background-color: color-mix(in srgb, var(--hover-bg), var(--link-color) 10%);
}

.ranking-table .rank-1 td:first-child {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-color);
}

.ranking-table .rank-2 td:first-child {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-color);
}

.ranking-table .rank-3 td:first-child {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-color);
}

.ranking-table td:first-child {
    font-size: 1rem;
    font-weight: 500;
}

.title-combat-grandma {
    color: var(--title-grandma-color);
}

.title-combat-ace {
    color: var(--title-ace-color);
}

.title-combat-talented {
    color: var(--title-talented-color);
}

.title-combat-senior {
    color: var(--title-senior-color);
}

.title-combat-striker {
    color: var(--title-striker-color);
}

.title-combat-rookie {
    color: var(--title-rookie-color);
}

.title-unknown-combat {
    color: var(--title-unknown-color);
}

#overall {
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
}

#overall h2 {
    display: flex;
    align-items: center;
    justify-content: center;
}

#overall h2 img {
    margin-right: 0.5rem;
    width: 24px;
    height: 24px;
}

#information table {
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

#information th, #information td {
    padding: 0.5rem;
    text-align: left;
    border-bottom: 1px solid var(--card-border);
    color: var(--text-color);
    font-size: 0.85rem;
}

#information th {
    background-color: var(--hover-bg);
    font-weight: 600;
}

#searchContainer {
    position: fixed;
    top: 0.5rem;
    right: 0.5rem;
    margin: 0;
    padding: 0;
    width: 180px;
    z-index: 300;
}

#searchInput {
    width: 100%;
    padding: 0.375rem 2.5rem 0.375rem 0.5rem;
    border: 1px solid var(--card-border);
    border-radius: 6px;
    background-color: var(--card-bg);
    color: var(--text-color);
    font-size: 0.8rem;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
    transition: border-color 0.3s ease;
}

#searchInput:focus {
    border-color: var(--link-color);
    outline: none;
}

#confirmButton {
    position: absolute;
    right: 0.25rem;
    top: 50%;
    transform: translateY(-50%);
    padding: 0.25rem 0.5rem;
    background-color: var(--link-color);
    border: none;
    border-radius: 4px;
    color: var(--card-bg);
    cursor: pointer;
    font-size: 0.7rem;
    transition: background-color 0.3s ease;
}

#confirmButton:hover {
    background-color: color-mix(in srgb, var(--link-color), #000000 20%);
}

#themeToggle {
    position: fixed;
    top: 0.5rem;
    right: 200px;
    background-color: var(--link-color);
    border: none;
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
    cursor: pointer;
    color: var(--card-bg);
    font-size: 0.7rem;
    transition: background-color 0.3s ease;
}

#themeToggle:hover {
    background-color: color-mix(in srgb, var(--link-color), #000000 20%);
}

#suggestions {
    position: absolute;
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 6px;
    max-height: 100px;
    overflow-y: auto;
    z-index: 310;
    width: 100%;
    max-width: 180px;
    top: 100%;
    left: 0;
    box-shadow: var(--shadow);
    font-size: 0.75rem;
}

#suggestions div {
    padding: 0.4rem 0.5rem;
    cursor: pointer;
    color: var(--text-color);
    transition: background-color 0.3s ease;
}

#suggestions div:hover {
    background-color: var(--hover-bg);
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.modal-content {
    background-color: var(--card-bg);
    margin: 10% auto;
    padding: 1.5rem;
    border-radius: 8px;
    width: 90%;
    max-width: 400px;
    color: var(--text-color);
    box-shadow: var(--shadow);
    font-size: 0.9rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.modal-content.ace-background,
.modal-content.grandma-background {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    position: relative;
    overflow: hidden;
}

.modal-content.ace-background .sparkle,
.modal-content.grandma-background .sparkle {
    content: '';
    position: absolute;
    width: 4px;
    height: 4px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.9) 0%, rgba(255, 215, 0, 0.5) 70%, transparent 100%);
    border-radius: 50%;
    z-index: 0;
    animation: sparkle 1.5s infinite;
}

.modal-content.ace-background .sparkle:nth-child(1),
.modal-content.grandma-background .sparkle:nth-child(1) {
    top: 15%;
    left: 20%;
    animation-delay: 0.2s;
    width: 3px;
    height: 3px;
}

.modal-content.ace-background .sparkle:nth-child(2),
.modal-content.grandma-background .sparkle:nth-child(2) {
    top: 25%;
    right: 15%;
    animation-delay: 0.5s;
    width: 4px;
    height: 4px;
}

.modal-content.ace-background .sparkle:nth-child(3),
.modal-content.grandma-background .sparkle:nth-child(3) {
    bottom: 20%;
    left: 25%;
    animation-delay: 0.8s;
    width: 5px;
    height: 5px;
}

.modal-content.ace-background .sparkle:nth-child(4),
.modal-content.grandma-background .sparkle:nth-child(4) {
    bottom: 15%;
    right: 20%;
    animation-delay: 1.1s;
    width: 3px;
    height: 3px;
}

.modal-content.ace-background .sparkle:nth-child(5),
.modal-content.grandma-background .sparkle:nth-child(5) {
    top: 30%;
    left: 10%;
    animation-delay: 1.4s;
    width: 4px;
    height: 4px;
}

.modal-content.ace-background .sparkle:nth-child(6),
.modal-content.grandma-background .sparkle:nth-child(6) {
    bottom: 25%;
    right: 10%;
    animation-delay: 1.7s;
    width: 5px;
    height: 5px;
}

@keyframes sparkle {
    0%, 100% {
        opacity: 0.5;
        transform: scale(1);
        box-shadow: 0 0 5px rgba(255, 255, 255, 0.6);
    }
    50% {
        opacity: 1;
        transform: scale(1.3);
        box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
    }
}

.modal-content .highlighted-tier {
    font-weight: 600;
    color: var(--tier-color);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    transition: color 0.3s ease;
}

.modal-content .highlighted-tier:hover {
    color: var(--tier-hover);
    text-decoration: underline;
}

.close {
    color: var(--secondary-text);
    float: right;
    font-size: 1.25rem;
    cursor: pointer;
    transition: color 0.3s ease;
    z-index: 2;
}

.close:hover {
    color: #E74C3C;
}

.content-section {
    display: none;
}

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

.footer {
    background-color: var(--card-bg);
    color: var(--secondary-text);
    padding: 1rem 0;
    text-align: center;
    box-shadow: 0 -2px 10px var(--shadow);
    border-top: 1px solid var(--card-border);
    z-index: 50;
    font-size: 0.85rem;
}

.footer a {
    color: var(--secondary-text);
    text-decoration: none;
    margin: 0 0.5rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: var(--link-color);
}

.to-top {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    background-color: var(--link-color);
    color: var(--card-bg);
    border: none;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    cursor: pointer;
    display: none;
    z-index: 300;
    box-shadow: var(--shadow);
    font-size: 0.75rem;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.to-top:hover {
    background-color: color-mix(in srgb, var(--link-color), #000000 20%);
    transform: scale(1.1);
}

.notifications {
    position: fixed;
    top: 120px;
    right: 0.5rem;
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 6px;
    padding: 0.75rem;
    max-width: 250px;
    box-shadow: var(--shadow);
    z-index: 200;
    color: var(--text-color);
    font-size: 0.85rem;
    animation: fadeIn 0.5s ease-out;
}

.mode-icon {
    width: 32px;
    height: 32px;
    vertical-align: middle;
    margin-right: 5px;
}

.modal-player-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 10px;
    position: relative;
    padding: 0.5rem;
    border-radius: 6px;
    z-index: 2;
}

.modal-player-tier {
    font-size: 0.95rem;
    font-weight: 700;
    margin-top: 5px;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    transition: color 0.3s ease;
    z-index: 2;
}

.modal-player-tier.tier1 {
    background: color-mix(in srgb, var(--tier1-bg) 70%, var(--card-bg) 30%);
    color: var(--tier1-color);
}

.modal-player-tier.tier1-ht {
    background: color-mix(in srgb, var(--tier1-ht-bg) 70%, var(--card-bg) 30%);
    color: var(--tier1-ht-color);
    font-weight: 800;
}

.modal-player-tier.tier2 {
    background: color-mix(in srgb, var(--tier2-bg) 70%, var(--card-bg) 30%);
    color: var(--tier2-color);
}

.modal-player-tier.tier2-ht {
    background: color-mix(in srgb, var(--tier2-ht-bg) 70%, var(--card-bg) 30%);
    color: var(--tier2-ht-color);
    font-weight: 800;
}

.modal-player-tier.tier3 {
    background: color-mix(in srgb, var(--tier3-bg) 70%, var(--card-bg) 30%);
    color: var(--tier3-color);
}

.modal-player-tier.tier3-ht {
    background: color-mix(in srgb, var(--tier3-ht-bg) 70%, var(--card-bg) 30%);
    color: var(--tier3-ht-color);
    font-weight: 800;
}

.modal-player-tier.tier4 {
    background: color-mix(in srgb, var(--tier4-bg) 70%, var(--card-bg) 30%);
    color: var(--tier4-color);
}

.modal-player-tier.tier4-ht {
    background: color-mix(in srgb, var(--tier4-ht-bg) 70%, var(--card-bg) 30%);
    color: var(--tier4-ht-color);
    font-weight: 800;
}

.modal-player-tier.tier5 {
    background: color-mix(in srgb, var(--tier5-bg) 70%, var(--card-bg) 30%);
    color: var(--tier5-color);
}

.modal-player-tier.tier5-ht {
    background: color-mix(in srgb, var(--tier5-ht-bg) 70%, var(--card-bg) 30%);
    color: var(--tier5-ht-color);
    font-weight: 800;
}

.mode-icon-circle {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 3px solid #FFD700;
    object-fit: contain;
    padding: 2px;
    transition: transform 0.2s ease;
    z-index: 2;
}

.mode-icon-circle img {
    width: 24px;
    height: 24px;
}

.mode-icon-circle:hover {
    transform: scale(1.1);
}

.score-tooltip {
    display: none;
    position: absolute;
    top: -25px;
    background-color: var(--card-bg);
    color: var(--text-color);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    z-index: 10;
    box-shadow: var(--shadow);
    white-space: nowrap;
}

.mode-icon-circle:hover + .score-tooltip {
    display: block;
}

.player-body {
    width: 20px;
    height: 40px;
    margin-right: 0.5rem;
    vertical-align: middle;
}

.player-skin {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid #FFD700;
    object-fit: cover;
    object-position: center 30%;
    margin: 0 auto 0.5rem;
    display: block;
    z-index: 2;
}

.title-icon {
    width: 24px;
    height: 24px;
    vertical-align: middle;
    margin-right: 0.5rem;
}

.modal-title {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 0.25rem;
    font-size: 1rem;
    font-weight: 600;
    z-index: 2;
}

.modal-title.title-combat-ace span {
    color: var(--title-ace-color);
    animation: pulse 1.5s infinite;
}

.modal-title.title-combat-grandma span {
    color: var(--title-grandma-color);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@media (max-width: 768px) {
    .header {
        height: auto;
        padding: 0.5rem;
    }
    .header .logo {
        font-size: 1.2rem;
        margin-bottom: 0.25rem;
    }
    .nav-links {
        padding: 0.25rem 0;
        gap: 0.5rem;
    }
    .nav-links img {
        width: 20px;
        height: 20px;
    }
    .nav-links a {
        font-size: 0.75rem;
    }
    .menu-button {
        display: block;
    }
    .nav-links {
        display: none;
    }
    .nav-links.active {
        display: flex;
    }
    .custom-logo {
        width: 40px;
    }
    .sidebar {
        width: 180px;
        top: 120px;
        padding: 0.75rem;
    }
    .sidebar a {
        padding: 0.375rem;
        font-size: 0.8rem;
    }
    .content {
        padding: 120px 0.25rem 0.5rem;
    }
    .content.shifted {
        margin-left: 180px;
    }
    .game-section {
        flex-direction: row;
        overflow-x: auto;
    }
    .tier-column {
        min-width: 120px;
        flex: 0 0 auto;
        padding: 0.75rem;
    }
    .tier-column h3 {
        font-size: 0.95rem;
    }
    .tier-column ul li {
        font-size: 0.75rem;
        padding: 0.25rem 0.4rem;
    }
    .tier-column ul li .player-tier {
        font-size: 0.7rem;
        padding: 0.15rem 0.3rem;
        min-width: 35px;
    }
    #searchContainer {
        top: 0.5rem;
        right: 0.25rem;
        width: 140px;
    }
    #searchInput {
        padding: 0.25rem 2rem 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
    #confirmButton {
        padding: 0.2rem 0.4rem;
        font-size: 0.65rem;
    }
    #themeToggle {
        right: 170px;
        padding: 0.2rem 0.4rem;
        font-size: 0.65rem;
    }
    #suggestions {
        max-height: 100px;
        max-width: 140px;
        font-size: 0.7rem;
    }
    .modal-content {
        max-width: 85%;
        padding: 0.75rem;
        font-size: 0.8rem;
    }
    .modal-content.ace-background .sparkle,
    .modal-content.grandma-background .sparkle {
        width: 2px;
        height: 2px;
    }
    .modal-content.ace-background .sparkle:nth-child(1),
    .modal-content.grandma-background .sparkle:nth-child(1) {
        top: 15%;
        left: 20%;
        animation-delay: 0.2s;
        width: 2px;
        height: 2px;
    }
    .modal-content.ace-background .sparkle:nth-child(2),
    .modal-content.grandma-background .sparkle:nth-child(2) {
        top: 25%;
        right: 15%;
        animation-delay: 0.5s;
        width: 3px;
        height: 3px;
    }
    .modal-content.ace-background .sparkle:nth-child(3),
    .modal-content.grandma-background .sparkle:nth-child(3) {
        bottom: 20%;
        left: 25%;
        animation-delay: 0.8s;
        width: 3px;
        height: 3px;
    }
    .modal-content.ace-background .sparkle:nth-child(4),
    .modal-content.grandma-background .sparkle:nth-child(4) {
        bottom: 15%;
        right: 20%;
        animation-delay: 1.1s;
        width: 2px;
        height: 2px;
    }
    .modal-content.ace-background .sparkle:nth-child(5),
    .modal-content.grandma-background .sparkle:nth-child(5) {
        top: 30%;
        left: 10%;
        animation-delay: 1.4s;
        width: 3px;
        height: 3px;
    }
    .modal-content.ace-background .sparkle:nth-child(6),
    .modal-content.grandma-background .sparkle:nth-child(6) {
        bottom: 25%;
        right: 10%;
        animation-delay: 1.7s;
        width: 3px;
        height: 3px;
    }
    .close {
        font-size: 1.1rem;
    }
    .footer {
        padding: 0.75rem 0;
        font-size: 0.75rem;
    }
    .player-body {
        width: 16px;
        height: 32px;
    }
    .player-skin {
        width: 60px;
        height: 60px;
        object-position: center 25%;
    }
    .title-icon {
        width: 20px;
        height: 20px;
    }
    .modal-title img {
        width: 16px;
        height: 16px;
    }
    .mode-icon-circle {
        width: 24px;
        height: 24px;
        border: 2.5px solid #FFD700;
        padding: 1.5px;
    }
    .mode-icon-circle img {
        width: 20px;
        height: 20px;
    }
    .modal-player-tier {
        font-size: 0.85rem;
        padding: 0.2rem 0.5rem;
    }
    .ranking-table th, .ranking-table td {
        font-size: 0.8rem;
        padding: 0.5rem;
    }
    .ranking-table .rank-1 td:first-child {
        font-size: 1.2rem;
    }
    .ranking-table .rank-2 td:first-child {
        font-size: 1.1rem;
    }
    .ranking-table .rank-3 td:first-child {
        font-size: 1rem;
    }
    .ranking-table td:first-child {
        font-size: 0.9rem;
    }
}
