#page-top {
    padding: 20px;
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    height: 100vh;
    overflow: hidden;
    box-sizing: border-box;
    width: 100%;
    max-width: 100vw;
}

.top-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.top-tab {
    flex: 1;
    min-width: 100px;
    padding: 9px 14px;
    background-image: url('/knopkamenu.webp');
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-color: transparent;
    border: none;
    color: #fff;
    font-size: 14px;
    font-weight: bold;
    
    white-space: nowrap;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
    transition: transform 0.15s;
}

.top-tab.active {
    color: #FFD700;
}

.top-tab:active {
    transform: scale(0.97);
}

.top-subtabs {
    display: flex;
    gap: 6px;
    margin-bottom: 15px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.top-subtab {
    flex: 1 1 auto;
    padding: 10px 8px;
    background-image: url('/knopkamenu.webp');
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-color: transparent;
    border: none;
    color: #fff;
    font-size: clamp(9px, 2.8vw, 12px);
    font-weight: bold;
    
    white-space: nowrap;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
    transition: transform 0.15s;
}

.top-subtab.active {
    color: #FFD700;
}

.top-subtab:active {
    transform: scale(0.97);
}

.top-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    overflow-y: auto;
    padding-bottom: 20px;
    width: 100%;
    max-width: 100%;
}

.top-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background-image: url('/knopkamenu.webp');
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-color: transparent;
    border: none;
    padding: 14px 20px;
    
    transition: transform 0.15s;
    min-height: 60px;
    overflow: hidden;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.top-item:active {
    transform: scale(0.98);
}

.top-place {
    font-size: 16px;
    font-weight: bold;
    color: #fff;
    min-width: 30px;
    text-align: center;
}

.top-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #2a2a3a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: bold;
    color: #fff;
    flex-shrink: 0;
}
#page-top .ava-wrap {
    width: 40px;
    height: 40px;
}
.top-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.top-name {
    flex: 1 1 0;
    min-width: 0;
    font-size: 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.top-value {
    font-size: 15px;
    font-weight: bold;
    color: #4ade80;
    flex-shrink: 0;
    width: 40px;
    text-align: right;
}

.top-empty {
    text-align: center;
    color: #fff;
    padding: 40px 20px;
    font-size: 15px;
}
.top-tab-icon {
    width: 32px;
    height: 32px;
    object-fit: cover;
    border-radius: 50%;
    vertical-align: middle;
    pointer-events: none;
}