/* 心愿单面板 */
.wishlist-panel {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 1001; /* 必须高于导航栏的1000 */
    padding: 2.08vw;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.2s ease, visibility 0s linear;
}

.wishlist-panel.is-preorder-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0s linear 0.2s;
}

.wishlist-container {
    position: relative;
    transition: all 0.3s ease;
    min-height: 6.25vw; /* 确保容器高度足够 */
    width: 35.21vw;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 默认按钮状态 */
.wishlist-btn {
    width: 15.73vw;
    height: 5.36vw;
    position: absolute;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: transparent;
    border: 0;
    padding: 0;
    color: inherit;
    font: inherit;
    z-index: 10; /* 确保在最上层 */
}

.wishlist-btn-bg {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 15.73vw;
    height: 5.36vw;
    background-image: url('../assets/icons/wishlist-btn-bg.png');
    background-size: cover;
    background-position: center;
    opacity: 1;
    pointer-events: none; /* 不阻挡鼠标事件 */
    z-index: 1;
}

.wishlist-btn-text {
    position: relative;
    z-index: 2;
    color: rgba(255, 255, 255, 0.8);
    text-shadow: 0px 4px 24px rgba(120, 136, 135, 0.4);
    text-align: center;
    line-height: 1.5;
    white-space: nowrap;
    transition: color 0.3s ease;
    pointer-events: none; /* 不阻挡鼠标事件 */
}

.wishlist-btn-text-cn {
    font-size: 1.67vw;
}

.wishlist-btn-text-en {
    font-size: 1.25vw;
    font-weight: 500;
}

.wishlist-btn:hover .wishlist-btn-text {
    color: rgba(255, 255, 255, 1);
}

/* Hover展开状态 - 默认隐藏 */
.wishlist-expanded {
    position: absolute;
    top: 0;
    right: 0; /* 改为靠右对齐，与 wishlist-btn 对齐 */
    opacity: 0;
    pointer-events: none;
    padding: calc(2.08vw * 0.8); /* 80% */
    display: flex;
    flex-direction: column;
    gap: calc(0.42vw * 0.8); /* 80% */
    align-items: center;
    width: calc(35.21vw * 0.8); /* 80% = 28.17vw */
    transition: opacity 0.3s ease;
    z-index: 20;
}

/* 首页时显示展开状态，隐藏按钮 */
.wishlist-container.expanded .wishlist-btn {
    visibility: hidden;
}

.wishlist-container.expanded .wishlist-expanded {
    opacity: 1;
    pointer-events: auto;
}

/* Hover时显示展开状态，隐藏按钮 */
.wishlist-btn:hover ~ .wishlist-expanded,
.wishlist-expanded:hover {
    opacity: 1;
    pointer-events: auto;
}

/* 当展开状态激活时，隐藏按钮 */
.wishlist-container:has(.wishlist-expanded:hover) .wishlist-btn,
.wishlist-container:has(.wishlist-btn:hover) .wishlist-btn {
    visibility: hidden;
}

/* 心愿单标题 */
.wishlist-header {
    position: relative;
    width: calc(31.98vw * 0.8); /* 80% = 25.58vw */
    height: calc(4.58vw * 0.8); /* 80% = 3.66vw */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: calc(0.47vw * 0.8) calc(3.33vw * 0.8) calc(0.47vw * 0.8) calc(4.17vw * 0.8); /* 80% */
    border: 0;
    color: inherit;
    background: transparent;
    font: inherit;
    cursor: pointer;
}

.wishlist-bg {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: calc(31.35vw * 0.8); /* 80% = 25.08vw */
    height: calc(4.48vw * 0.8); /* 80% = 3.58vw */
    background-image: url('../assets/icons/wishlist-btn-bg-animated.png');
    background-size: 100.67% 104.43%;
    background-position: 2.05% -4.98%;
    opacity: 0.4;
}

.wishlist-title {
    position: relative;
    z-index: 2;
    font-size: var(--font-size-wishlist-title); /* 使用 CSS 变量，已在 i18n-fonts.css 中定义 */
    color: rgba(255, 255, 255, 0.88);
    text-shadow: 0px calc(0.21vw * 0.8) calc(1.25vw * 0.8) rgba(120, 136, 135, 0.4); /* 80% */
    text-align: center;
    line-height: 1.5;
    white-space: nowrap;
    transition: color 0.16s ease;
}

.wishlist-header:hover .wishlist-title,
.wishlist-header:focus-visible .wishlist-title {
    color: #fff;
}

.wishlist-header:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.82);
    outline-offset: 2px;
}

/* 平台按钮 */
.wishlist-platforms {
    display: flex;
    gap: calc(0.83vw * 0.8); /* 80% */
    padding: calc(0.21vw * 0.8) 0; /* 80% */
    width: 100%;
    justify-content: center;
}

.platform-btn-small {
    width: calc(8.75vw * 0.8); /* 80% = 7vw */
    height: calc(3.75vw * 0.8); /* 80% = 3vw */
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.platform-btn-small::before {
    content: '';
    position: absolute;
    inset: calc(1vw * 0.8);
    border-radius: calc(1vw * 0.8);
    background-color: #FFF;
    filter: blur(1vw);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.platform-btn-small:hover::before {
    opacity: 1;
}

.platform-btn-small img {
    object-fit: contain;
    transition: transform 0.3s ease;
}

.platform-btn-small:hover img {
    transform: scale(1.2);
}

.ps5-btn-small img {
    width: calc(7.08vw * 0.8); /* 80% */
    height: calc(1.54vw * 0.8); /* 80% */
}

.steam-btn-small img {
    width: calc(6.67vw * 0.8); /* 80% */
    height: calc(2.01vw * 0.8); /* 80% */
}

.epic-btn-small img {
    width: calc(6.25vw * 0.8); /* 80% */
    height: calc(2.24vw * 0.8); /* 80% */
}

/* 分隔线 */
.wishlist-divider {
    width: calc(28vw * 0.8); /* 80% = 24.83vw */
    height: calc(0.68vw * 0.8); /* 80% */
    display: flex;
    align-items: center;
    justify-content: center;
    transform: rotate(180deg) scaleY(-1);
}

.wishlist-divider img {
    width: 100%;
    height: 4px;
}

/* 发布日期 */
.wishlist-footer {
    width: calc(31.04vw * 0.8); /* 80% = 24.83vw */
    height: calc(2.92vw * 0.8); /* 80% = 2.34vw */
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: calc(0.63vw * 0.8) calc(2.5vw * 0.8); /* 80% */
    overflow: hidden;
    color: rgba(255, 255, 255, 0.88);
    text-align: center;
    white-space: nowrap;
}

.release-date-label {
    font-size: var(--font-size-wishlist-label); /* 使用 CSS 变量 */
    text-shadow: 0px calc(0.14vw * 0.8) calc(0.86vw * 0.8) rgba(120, 136, 135, 0.4); /* 80% */
    line-height: 1.5;
}

.release-date-value {
    font-size: var(--font-size-wishlist-footer); /* 使用 CSS 变量 */
    font-weight: 700;
    text-shadow: 0px calc(0.21vw * 0.8) calc(1.25vw * 0.8) rgba(120, 136, 135, 0.4); /* 80% */
    line-height: 1.5;
}
