@font-face {
    font-family: "rocom-home";
    src: url("../../ttf/HYWenHei-85W-1.ttf") format("truetype");
    font-display: swap;
}

@font-face {
    font-family: "rocom-skill";
    src: url("../../ttf/fzlant.D5FI9Et0.ttf") format("truetype");
    font-display: swap;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    display: inline-block;
    width: fit-content;
    min-width: 0;
    height: auto;
    min-height: 0;
    background: transparent;
    color: #ffffff;
    font-family: "rocom-home", "Microsoft YaHei", "PingFang SC", sans-serif;
}

.home-pets-page {
    position: relative;
    width: 1000px;
    min-height: 760px;
    overflow: hidden;
    padding-bottom: 24px;
    background: #efe6d2;
}

.page-bg-img {
    position: absolute;
    inset: 0 auto auto 0;
    z-index: 0;
    width: 1000px;
    /* height 而非 min-height：背景图按容器高度裁切，避免大图溢出被算进 scrollHeight 导致截图尾部大片空白 */
    height: 100%;
    object-fit: cover;
    object-position: top center;
    pointer-events: none;
}

.home-top {
    position: relative;
    z-index: 1;
    height: 228px;
}

.top-bg,
.title-fg {
    position: absolute;
    left: 0;
    top: 0;
    width: 1000px;
    pointer-events: none;
}

.top-bg {
    height: 250px;
    object-fit: cover;
}

.title-fg {
    height: 210px;
    object-fit: contain;
}

.avatar-wrap {
    position: absolute;
    left: 31px;
    top: 14px;
    width: 152px;
    height: 152px;
    overflow: hidden;
    border-radius: 50%;
    filter: drop-shadow(0 8px 10px rgba(0, 0, 0, 0.22));
}

.avatar-img {
    width: 152px;
    height: 152px;
    object-fit: cover;
}

.home-profile {
    position: absolute;
    left: 200px;
    top: 70px;
    right: 130px;
    text-shadow: none;
}

.home-owner {
    overflow: hidden;
    color: #ffffff;
    font-family: "rocom-skill", "rocom-home", "Microsoft YaHei", sans-serif;
    font-size: 46px;
    font-weight: 400;
    line-height: 1;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.home-uid {
    margin-top: 11px;
    color: #ffffff;
    font-family: "rocom-skill", "rocom-home", "Microsoft YaHei", sans-serif;
    font-size: 38px;
    font-weight: 400;
    line-height: 1;
}

.update-time {
    position: absolute;
    right: 28px;
    top: 18px;
    padding: 7px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.23);
    color: #ffffff;
    font-size: 15px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.28);
}

.pets-summary {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 28px;
    margin: 18px 46px 0;
    padding: 14px 22px;
    border-radius: 18px;
    background: rgba(42, 93, 16, 0.62);
    font-size: 26px;
}

.pets-summary strong {
    color: #ffff00;
    font-weight: 400;
    font-size: 30px;
    padding: 0 4px;
}

.egg-summary strong {
    color: #ffd24d;
}

.pets-content {
    position: relative;
    z-index: 1;
    padding-top: 14px;
}

.pet-grid {
    display: grid;
    grid-template-columns: repeat(2, 486px);
    justify-content: center;
    gap: 6px 0;
    margin-top: 12px;
}

.pet-card {
    position: relative;
    width: 486px;
    height: 206px;
}

.card-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.pet-avatar-box {
    position: absolute;
    left: 24px;
    top: 28px;
    width: 150px;
    height: 150px;
}

.pet-avatar {
    width: 150px;
    height: 150px;
    object-fit: contain;
}

.pet-star {
    position: absolute;
    left: -3px;
    top: -30px;
    width: 70px;
    height: 70px;
    object-fit: contain;
}

.pet-empty {
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.18);
    color: rgba(255, 255, 255, 0.72);
    font-size: 22px;
}

.level-badge {
    position: absolute;
    left: 38px;
    top: 97px;
    width: 82px;
    height: 48px;
    transform: rotate(10deg);
}

.level-badge img {
    width: 74px;
    height: 39px;
}

.level-badge span {
    position: absolute;
    left: 0;
    top: 9px;
    width: 74px;
    text-align: center;
    color: #ffffff;
    font-size: 22px;
    line-height: 1;
}

.pet-info {
    position: absolute;
    left: 186px;
    top: 30px;
    width: 282px;
}

.pet-name {
    overflow: hidden;
    color: #ffff00;
    font-family: "rocom-skill", "rocom-home", "Microsoft YaHei", sans-serif;
    font-size: 28px;
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pet-name-text {
    display: inline-block;
    max-width: 190px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: bottom;
}

.egg-badge {
    display: inline-block;
    margin-left: 8px;
    padding: 3px 10px;
    border-radius: 999px;
    background: #d84315;
    color: #ffffff;
    font-size: 17px;
    font-style: normal;
    line-height: 1.2;
    vertical-align: middle;
}

.pet-attrs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 10px;
    margin-top: 12px;
}

.attr {
    color: #ffffff;
    font-size: 20px;
    line-height: 1.2;
    white-space: nowrap;
}

.attr i {
    margin-right: 6px;
    color: #ffe9a8;
    font-style: normal;
}

.pet-variant {
    display: inline-block;
    margin-top: 10px;
    padding: 3px 12px;
    border-radius: 999px;
    background: rgba(103, 58, 183, 0.85);
    color: #ffffff;
    font-size: 19px;
    line-height: 1.2;
}

.pet-egg {
    margin-top: 8px;
    color: #ffe9a8;
    font-size: 20px;
    line-height: 1.2;
}

.empty-state {
    margin: 40px 60px;
    padding: 40px 24px;
    border-radius: 20px;
    background: rgba(42, 93, 16, 0.5);
    color: #ffffff;
    font-size: 26px;
    text-align: center;
}

.pets-footer {
    position: relative;
    z-index: 1;
    margin-top: 26px;
    color: rgba(255, 255, 255, 0.75);
    font-size: 18px;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.28);
}
