/* ================================
   游戏详情弹窗 - 可爱奶油风
   ================================ */

/* 弹窗容器 */
.game-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 181, 197, 0.25);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 20px;
    backdrop-filter: blur(8px);
}

.game-modal.active {
    opacity: 1;
    visibility: visible;
}

/* 弹窗主体 */
.game-modal-content {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 560px;
    height: 85vh;
    max-height: 720px;
    overflow: hidden;
    transform: scale(0.95) translateY(20px);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-lg);
    border: 2px solid var(--bg-border);
    display: flex;
    flex-direction: column;
}

.game-modal.active .game-modal-content {
    transform: scale(1) translateY(0);
}

.game-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    background: rgba(255, 181, 197, 0.9);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 181, 197, 0.3);
    backdrop-filter: blur(8px);
    outline: none !important;
    -webkit-tap-highlight-color: transparent;
    box-shadow: none !important;
}

.game-modal-close:hover {
    background: rgba(255, 181, 197, 1);
    transform: rotate(90deg) scale(1.05);
}

.game-modal-close svg {
    width: 18px;
    height: 18px;
    fill: white;
    transition: fill 0.3s;
}

.game-modal-close:hover svg {
    fill: white;
}

.game-modal-title {
    font-size: 1.6rem;
    color: white;
    margin-bottom: 4px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.game-modal-subtitle {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.88rem;
}

/* 游戏介绍区域 */
.game-intro {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(139, 126, 200, 0.08);
    flex-shrink: 0;
    background: linear-gradient(180deg, rgba(139, 126, 200, 0.02) 0%, transparent 100%);
}

.game-intro-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 12px;
}

.game-intro-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    overflow: hidden;
    flex-shrink: 0;
    border: 2px solid rgba(139, 126, 200, 0.15);
    box-shadow: 0 4px 12px rgba(139, 126, 200, 0.15);
}

.game-intro-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.game-intro-info h4 {
    font-size: 1.05rem;
    color: var(--text-dark);
    margin-bottom: 2px;
    font-weight: 600;
}

.game-intro-info p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.game-intro-desc {
    color: var(--text-body);
    font-size: 0.88rem;
    line-height: 1.7;
}

/* Tab 切换 */
.game-tabs {
    display: flex;
    gap: 8px;
    padding: 16px;
    background: rgba(255, 181, 197, 0.05);
    border-bottom: 2px solid var(--bg-border);
    flex-shrink: 0;
    flex-wrap: wrap;
}

.game-tab {
    flex: 1;
    min-width: fit-content;
    max-width: 50%;
    padding: 12px 20px;
    text-align: center;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-muted);
    transition: all var(--transition-bounce);
    position: relative;
    border: 2px solid transparent;
    background: var(--bg-card);
    border-radius: var(--radius-full);
    font-size: 0.88rem;
    user-select: none;
    outline: none !important;
    -webkit-tap-highlight-color: transparent;
    box-shadow: none !important;
}

.game-tab:hover {
    color: var(--primary-deep);
    border-color: var(--primary-soft);
    transform: translateY(-2px);
}

.game-tab:focus {
    outline: none !important;
    box-shadow: none !important;
    -webkit-tap-highlight-color: transparent;
}

.game-tab.active {
    color: var(--primary-deep);
    background: var(--primary-soft);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 181, 197, 0.25);
}

.game-tab:active {
    outline: none !important;
    box-shadow: none !important;
    -webkit-tap-highlight-color: transparent;
}

.game-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 3px;
    background: var(--primary-deep);
    border-radius: 3px;
}

/* Tab 图标 */
.game-tab-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.game-tab-icon svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
    transition: transform 0.3s;
}

.game-tab:hover .game-tab-icon svg {
    transform: scale(1.1);
}

/* Tab 计数 */
.game-tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    font-size: 0.72rem;
    font-weight: 700;
    margin-left: 6px;
}

.game-tab.active .game-tab-count {
    background: rgba(255, 255, 255, 0.25);
}

/* Tab 内容容器 */
.game-tab-contents {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Tab 内容 */
.game-tab-content {
    display: none;
    padding: 20px 24px;
    flex: 1;
    overflow-y: auto;
    animation: fadeSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.game-tab-content.active {
    display: block;
    animation: tabReveal 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeSlideIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes tabReveal {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Tab 内容滚动条 */
.game-tab-content::-webkit-scrollbar {
    width: 6px;
}

.game-tab-content::-webkit-scrollbar-track {
    background: transparent;
}

.game-tab-content::-webkit-scrollbar-thumb {
    background: var(--primary-soft);
    border-radius: 6px;
}

.game-tab-content::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Tab 内容通用样式 */
.game-tab-content p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.7;
    margin: 0 0 12px 0;
}

.game-tab-content ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.game-tab-content li {
    color: var(--text-secondary);
    font-size: 0.88rem;
    padding: 8px 0;
    border-bottom: 1px dashed var(--bg-border);
}

.game-tab-content li:last-child {
    border-bottom: none;
}

.service-list-item {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 16px;
    margin-bottom: 12px;
    border: 1px solid var(--bg-border);
}

.notice-box,
.fun-box {
    background: rgba(255, 181, 197, 0.1);
    border-radius: var(--radius-lg);
    padding: 16px;
}

.price-note-list li {
    padding-left: 20px;
    position: relative;
}

.price-note-list li::before {
    content: '•';
    position: absolute;
    left: 6px;
    color: var(--primary);
}

/* Tab 图片样式 */
.game-tab-image {
    width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
    margin: 8px 0;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-bounce), box-shadow var(--transition-base);
}

.game-tab-image:hover {
    transform: scale(1.03);
    box-shadow: var(--shadow-md);
}

/* 服务列表 */
.service-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.service-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 18px;
    background: rgba(139, 126, 200, 0.04);
    border-radius: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(139, 126, 200, 0.06);
    position: relative;
    overflow: hidden;
}

.service-list-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary), var(--secondary));
    opacity: 0;
    transition: opacity 0.3s;
}

.service-list-item:hover {
    background: rgba(139, 126, 200, 0.08);
    border-color: rgba(139, 126, 200, 0.12);
    transform: translateX(4px);
}

.service-list-item:hover::before {
    opacity: 1;
}

.service-list-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.service-list-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary-soft), var(--primary));
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(139, 126, 200, 0.2);
}

.service-list-icon svg {
    width: 20px;
    height: 20px;
    fill: white;
}

.service-list-info h5 {
    font-size: 0.95rem;
    color: var(--text-dark);
    margin-bottom: 3px;
    font-weight: 600;
}

.service-list-info p {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.service-list-price {
    text-align: right;
}

.service-list-price .price {
    font-size: 1.1rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.service-list-price .unit {
    font-size: 0.72rem;
    color: var(--text-muted);
    display: block;
}

/* 价格说明 */
.price-note {
    background: rgba(139, 126, 200, 0.04);
    padding: 18px;
    border-radius: 14px;
    margin-top: 6px;
    border: 1px solid rgba(139, 126, 200, 0.08);
}

.price-note h5 {
    font-size: 0.92rem;
    color: var(--text-dark);
    margin-bottom: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.price-note h5::before {
    content: '';
    width: 4px;
    height: 16px;
    background: linear-gradient(180deg, var(--primary), var(--secondary));
    border-radius: 2px;
}

.price-note ul {
    list-style: none;
    padding: 0;
}

.price-note li {
    font-size: 0.85rem;
    color: var(--text-body);
    padding: 7px 0;
    padding-left: 18px;
    position: relative;
    border-bottom: 1px dashed rgba(139, 126, 200, 0.08);
}

.price-note li:last-child {
    border-bottom: none;
}

.price-note li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    background: linear-gradient(135deg, var(--primary-soft), var(--primary));
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(139, 126, 200, 0.4);
}

/* 响应式 */
@media (max-width: 640px) {
    .game-modal {
        padding: 0;
    }

    .game-modal-content {
        height: 100%;
        max-height: none;
        border-radius: 0;
        border: none;
    }

    .game-intro {
        padding: 16px 18px;
    }

    .game-tabs {
        padding: 10px 12px;
        gap: 6px;
    }

    .game-tab {
        padding: 10px 14px;
        font-size: 0.85rem;
        border-radius: 10px 10px 0 0;
    }

    .game-tab-icon svg {
        width: 14px;
        height: 14px;
    }

    .game-tab-count {
        min-width: 18px;
        height: 18px;
        font-size: 0.68rem;
        margin-left: 4px;
    }

    .game-tab-content {
        padding: 16px;
    }

    .service-list {
        gap: 10px;
    }

    .service-list-item {
        padding: 14px;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .service-list-price {
        text-align: left;
        display: flex;
        align-items: baseline;
        gap: 4px;
    }

    .service-list-left {
        gap: 12px;
    }

    .service-list-icon {
        width: 38px;
        height: 38px;
    }

    .service-list-icon svg {
        width: 18px;
        height: 18px;
    }

    .price-note {
        padding: 14px;
    }
}

/* 图片预览灯箱 */
.image-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10001;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    overflow-y: auto;
    padding: 20px 0;
}

.image-lightbox.active {
    opacity: 1;
    visibility: visible;
}

/* 灯箱滚动条样式 */
.image-lightbox::-webkit-scrollbar {
    width: 6px;
}

.image-lightbox::-webkit-scrollbar-track {
    background: transparent;
}

.image-lightbox::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.image-lightbox::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 1;
}

.lightbox-close {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 10;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.lightbox-close svg {
    width: 24px;
    height: 24px;
    stroke: white;
}

.lightbox-image {
    width: auto;
    max-width: min(95%, 800px);
    max-height: max-content;
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    z-index: 5;
    animation: lightboxZoom 0.3s ease;
    /* object-fit: contain; */
}

@keyframes lightboxZoom {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@media (max-width: 640px) {
    .lightbox-close {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
    }
}