* {
    box-sizing: border-box;
}
html, body {
    margin: 0;
    padding: 0;
    overflow: hidden;
    font-family: "Inter", sans-serif;
    touch-action: manipulation;
    height: 100vh;
}
.container {
    display: flex;
    height: 100vh;
    max-width: 100vw;
    overflow: hidden;
}
.column-game {
    flex: 0 0 75%;
    padding: 20px;
    max-width: 100%;
    height: 100vh;
    overflow: hidden;
    position: relative;
    background-image: url('bg.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
.column-stats {
    flex: 0 0 25%;
    background-color: #f0f0f0;
    padding: 20px;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}
.column-stats .top-players, .column-stats .top-countries {
    flex: 0 0 45%;
    margin-bottom: 10px;
}
.column-stats .login-section {
    flex: 0 0 10%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 10px;
}
.column-stats h2 {
    display: flex;
    align-items: center;
    gap: 5px;
    margin: 0 0 10px;
    font-size: 18px;
}
.column-stats h2 img {
    width: 40px;
    height: 40px;
}
.column-stats .stat-row {
    display: grid;
    grid-template-columns: 40px 50px 1fr 40px 60px; /* Rank, avatar, name, flag, count */
    align-items: center;
    margin-bottom: 5px;
    padding: 5px 0;
    border-bottom: 1px solid #ccc;
}
.column-stats .top-countries .stat-row {
    grid-template-columns: 40px 1fr 60px; /* Rank, flag + name, count */
}
.column-stats .stat-row img.avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin-right: 5px;
}
.column-stats .stat-row img.flag {
    width: 24px;
    height: auto;
    margin-right: 5px;
    vertical-align: middle;
}
.column-stats .stat-row .rank {
    text-align: center;
    font-size: 16px;
}
.column-stats .stat-row .username {
    display: flex;
    align-items: center;
}
.column-stats .stat-row .count {
    text-align: right;
}
.login-button, .share-button {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 12px;
    background-color: #1DA1F2;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
}
.login-button img, .share-button img {
    width: 20px;
    height: 20px;
}
.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}
.user-info img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}
.nav-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    top: 10px;
    width: 100%;
    gap: 20px;
}
.nav-bar img {
    width: 60px;
    height: 60px;
}
img#gameImage {
    width: 500px;
    height: 500px;
    cursor: pointer;
}
#clickCount {
    margin: 5px;
    font-size: 60px;
    word-break: break-all;
    color: #ee9a0a;
    text-shadow: 2px 2px 2px rgb(0, 0, 0);
}
#regionInfo {
    margin: 5px;
    font-size: 26px;
    word-break: break-all;
    color: #000;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}
#bappingbonk {
    font-size: 40px;
    word-break: break-all;
    color: #000;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}
#regionInfo img {
    vertical-align: middle;
    margin-right: 5px;
    width: 24px;
}
.stats-menu {
    display: none;
}
#clickCount.animate {
    animation: countPulse 0.3s ease-in-out;
}
@keyframes countPulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}
@media (max-width: 768px) {
    .container {
        flex-direction: column;
        max-height: calc(100vh - 60px);
        max-width: 100vw;
        overflow: hidden;
    }
    .column-game {
        flex: 0 0 100%;
        padding: 20px;
        padding-bottom: 60px;
        max-width: 100vw;
        overflow: hidden;
        background-image: url('bg.jpg');
        background-size: cover;
        background-position: center;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }
    .column-stats {
        display: none;
    }
    .nav-bar {
        top: 10px;
        width: 100%;
        gap: 15px;
    }
    .nav-bar img {
        width: 60px;
        height: 60px;
    }
    img#gameImage {
        width: 350px;
        height: 350px;
    }
    #regionInfo {
        display: none;
    }
    .stats-menu {
        display: block;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100vw;
        background-color: #f0f0f0;
        padding: 10px;
        font-size: 14px;
        box-shadow: 0 -2px 5px rgba(0,0,0,0.2);
        z-index: 1000;
    }
    .stats-menu-header {
        cursor: pointer;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0 10px;
        margin-bottom: 10px;
    }
    .stats-menu-header img.leaderboard-icon {
        width: 40px;
        height: 40px;
        margin-right: 5px;
        vertical-align: middle;
    }
    .stats-menu-header img.flag {
        width: 16px;
        margin-right: 5px;
        vertical-align: middle;
    }
    .stats-menu-content {
        display: none;
        background-color: #fff;
        padding: 10px;
        max-height: 300px; /* Tăng chiều cao */
        overflow-y: auto;
        overflow-x: hidden;
        border-top: 1px solid #ccc;
        margin-top: 10px;
    }
    .stats-menu-content.show {
        display: block;
    }
    .stats-menu-content .leaderboard {
        display: grid;
        grid-template-columns: 1fr 1fr; /* 2 cột: Top Countries, Top Players */
        gap: 10px;
    }
    .stats-menu-content .leaderboard .column {
        display: flex;
        flex-direction: column;
    }
    .stats-menu-content .leaderboard .column h3 {
        font-size: 14px;
        margin: 0 0 5px;
        display: flex;
        align-items: center;
        gap: 5px;
    }
    .stats-menu-content .leaderboard .column h3 img {
        width: 24px;
        height: 24px;
    }
    .stats-menu-content .leaderboard .stat-row {
        display: grid;
        grid-template-columns: 40px 1fr 60px; /* Rank, flag + name, count */
        align-items: center;
        margin-bottom: 5px;
        padding: 5px 0;
        border-bottom: 1px solid #ccc;
    }
    .stats-menu-content .leaderboard .top-players .stat-row {
        grid-template-columns: 40px 1fr 60px; /* Rank, name, count */
    }
    .stats-menu-content .leaderboard .stat-row img.flag {
        width: 16px;
        height: 12px;
        margin-right: 5px;
        vertical-align: middle;
    }
    .stats-menu-content .leaderboard .stat-row img.avatar {
        width: 24px;
        height: 24px;
        border-radius: 50%;
        margin-right: 5px;
    }
    .stats-menu-content .leaderboard .stat-row .rank {
        text-align: center;
        font-size: 14px;
    }
    .stats-menu-content .leaderboard .stat-row .country, 
    .stats-menu-content .leaderboard .stat-row .username {
        display: flex;
        align-items: center;
    }
    .stats-menu-content .leaderboard .stat-row .count {
        text-align: right;
    }
    .stats-menu-header .login-button, .stats-menu-header .share-button {
        font-size: 12px;
        padding: 6px 8px;
    }
    .stats-menu-header .user-info img {
        width: 24px;
        height: 24px;
        border-radius: 50%;
    }
    .arrow {
        margin-left: 10px;
        font-size: 12px;
    }
}