/* Buy Now 弹窗样式 */
.buy-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

[data-theme="dark"] .buy-modal {
    backdrop-filter: blur(2px);
}

.buy-modal.show {
    display: flex;
    opacity: 1;
}

.buy-modal.hide {
    opacity: 0;
}

.buy-modal__content {
    background: var(--bg-secondary);
    border-radius: 16px;
    /* padding: 32px; */
    position: relative;
    width: 100%;
    max-width: 518px;
    max-height: 90vh;
    /* max-height: 810px; */
    transform: scale(0.9);
    overflow: hidden;
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    display: flex;
    flex-direction: column;
}

.buy-modal.show .buy-modal__content {
    transform: scale(1);
    opacity: 1;
}

.buy-modal.hide .buy-modal__content {
    transform: scale(0.9);
    opacity: 0;
}

.buy-modal__close {
    position: absolute;
    right: 24px;
    top: 24px;
    width: 32px;
    height: 32px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    padding: 0;
}

.buy-modal__close:hover {
    background: var(--bg-hover);
}

.buy-modal__close svg {
    width: 16px;
    height: 16px;
}

.buy-modal__title {
    font-family: 'Roboto', sans-serif;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.4;
    color: var(--text-secondary-inverse);
    margin: 0;
    text-transform: capitalize;
    padding: 32px 32px 24px 32px;
}

.buy-modal__stores {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 0 32px 16px 32px;
    overflow: hidden;
    overflow-y: auto;
}

.buy-modal__store-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.buy-modal__store-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.buy-modal__store-logo {
    width: 56px;
    height: 56px;
    border: 1px solid var(--border-dark2);
    border-radius: 12px;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--card-bg);
    overflow: hidden;
    box-sizing: border-box;
    flex-shrink: 0;
}

.buy-modal__store-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.buy-modal__store-name {
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.1;
    color: var(--text-secondary-inverse);
    text-transform: capitalize;
}

.buy-modal__store-btn {
    background: var(--bg-primary);
    border: 1px solid var(--primary-green-hover);
    border-radius: 15px;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    color: var(--primary-green-hover);
}

.buy-modal__store-btn:hover {
    background: var(--primary-green-hover);
    box-shadow: 0px 8px 10px 0px var(--primary-green-shadow);
    color: #ffffff;
}

.buy-modal__btn-text {
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.1;
    text-transform: capitalize;
}

.buy-modal__btn-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.buy-modal__divider {
    height: 1px;
    background: var(--border-color);
    width: 100%;
}

/* 深色模式特定样式 */
[data-theme="dark"] .buy-modal__store-btn {
    background: #313432;
    border: 1px solid transparent;
    color: #ffffff;
}

[data-theme="dark"] .buy-modal__store-btn:hover {
    background: var(--primary-green-hover);
    border-color: transparent;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .buy-modal__content {
        max-width: calc(100% - 32px);
        padding: 24px;
        margin: 16px;
    }
    
    .buy-modal__title {
        font-size: 20px;
        margin-bottom: 12px;
        padding: 0;
    }
    
    .buy-modal__stores {
        gap: 16px;
        padding: 16px 0;
    }

    .buy-modal__close{
        top: 16px;
        right: 16px;
    }
    
    .buy-modal__store-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .buy-modal__store-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .buy-modal__content {
        padding: 20px;
    }
    
    .buy-modal__title {
        font-size: 18px;
    }
    
    .buy-modal__store-logo {
        width: 70px;
        height: 26px;
    }
    
    .buy-modal__store-name {
        font-size: 14px;
    }
    
    .buy-modal__store-btn {
        padding: 10px 20px;
    }
    
    .buy-modal__btn-text {
        font-size: 14px;
    }
}
