/* DNA螺旋商店样式 */

/* 商店视图容器 */
#shop-view {
    width: 100%;
    height: 100vh;
    overflow: hidden;
    position: relative;
}

/* 商店头部 */
.shop-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: rgba(10, 14, 39, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid rgba(136, 204, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

/* 返回按钮 */
.back-button {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(136, 204, 255, 0.1);
    border: 2px solid rgba(136, 204, 255, 0.3);
    color: #88ccff;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.back-button:hover {
    background: rgba(136, 204, 255, 0.2);
    border-color: rgba(136, 204, 255, 0.5);
    transform: translateX(-5px);
}

.back-icon {
    font-size: 20px;
}

/* 商店标题 */
.shop-title {
    text-align: center;
    flex: 1;
}

.shop-title h1 {
    font-size: 28px;
    color: #88ccff;
    margin: 0;
    text-shadow: 0 0 20px rgba(136, 204, 255, 0.5);
}

.shop-subtitle {
    font-size: 14px;
    color: rgba(136, 204, 255, 0.7);
    margin: 5px 0 0 0;
}

/* 货币显示 */
.shop-currency {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(212, 175, 55, 0.1);
    border: 2px solid rgba(212, 175, 55, 0.3);
    padding: 10px 20px;
    border-radius: 8px;
}

.currency-icon {
    width: 24px;
    height: 24px;
}

.currency-amount {
    font-size: 20px;
    font-weight: bold;
    color: #d4af37;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

.currency-name {
    font-size: 14px;
    color: rgba(212, 175, 55, 0.8);
}

/* 背包按钮 */
.inventory-button {
    position: relative;
    background: rgba(139, 0, 0, 0.2);
    border: 2px solid rgba(139, 0, 0, 0.5);
    color: #ff6b6b;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.inventory-button:hover {
    background: rgba(139, 0, 0, 0.3);
    border-color: #8b0000;
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(139, 0, 0, 0.5);
}

.inventory-button:hover::after {
    content: '背包';
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    pointer-events: none;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.inventory-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #8b0000;
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

/* 3D场景容器 */
.shop-scene-container {
    position: absolute;
    top: 80px;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    z-index: 1;
}

#shop-canvas {
    width: 100%;
    height: 100%;
    display: block;
    background: transparent;
}

/* 加载指示器 */
.shop-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 200;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(136, 204, 255, 0.2);
    border-top-color: #88ccff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-text {
    color: #88ccff;
    font-size: 18px;
    margin-bottom: 15px;
}

.loading-progress {
    width: 200px;
    height: 4px;
    background: rgba(136, 204, 255, 0.2);
    border-radius: 2px;
    overflow: hidden;
}

.loading-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #88ccff, #a0d8ff);
    width: 0%;
    transition: width 0.3s ease;
}



/* 商品详情面板 */
.product-detail-panel {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-detail-panel.hidden {
    display: none;
}

.panel-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.panel-content {
    position: relative;
    background: linear-gradient(135deg, #1a1f3a 0%, #0f1428 100%);
    border: 3px solid rgba(136, 204, 255, 0.5);
    border-radius: 20px;
    width: 98%;
    max-width: 1200px;
    max-height: 95vh;
    overflow-y: auto;
    box-shadow: 0 10px 50px rgba(136, 204, 255, 0.3);
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 50px;
}

.panel-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(139, 0, 0, 0.3);
    border: 2px solid rgba(139, 0, 0, 0.5);
    color: #ff6b6b;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.panel-close-btn:hover {
    background: rgba(139, 0, 0, 0.5);
    transform: rotate(90deg);
}

/* 商品预览 */
.product-preview {
    position: relative;
    width: 100%;
    height: 600px;
    background: rgba(136, 204, 255, 0.05);
    border: 2px solid rgba(136, 204, 255, 0.2);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

#product-preview-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.product-rarity-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, #d4af37, #f4d03f);
    color: #1a1f3a;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
    text-transform: uppercase;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.5);
}

/* 商品信息 */
.product-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.product-name {
    font-size: 36px;
    color: #88ccff;
    margin: 0;
    text-shadow: 0 0 15px rgba(136, 204, 255, 0.5);
}

.product-category {
    font-size: 16px;
    color: rgba(136, 204, 255, 0.7);
    text-transform: uppercase;
    margin: 0;
}

.product-description {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.8;
    margin: 0;
}

/* 商品属性 */
.product-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding: 15px;
    background: rgba(136, 204, 255, 0.05);
    border: 1px solid rgba(136, 204, 255, 0.2);
    border-radius: 8px;
}

.stat-item {
    text-align: center;
}

.stat-label {
    font-size: 12px;
    color: rgba(136, 204, 255, 0.7);
    display: block;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 20px;
    color: #88ccff;
    font-weight: bold;
}

/* 商品价格 */
.product-price {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 25px;
    background: rgba(212, 175, 55, 0.1);
    border: 2px solid rgba(212, 175, 55, 0.3);
    border-radius: 12px;
}

.price-icon {
    width: 48px;
    height: 48px;
}

.price-amount {
    font-size: 48px;
    font-weight: bold;
    color: #d4af37;
    text-shadow: 0 0 15px rgba(212, 175, 55, 0.5);
}

.price-unit {
    font-size: 24px;
    color: rgba(212, 175, 55, 0.8);
}

/* 操作按钮 */
.product-actions {
    display: flex;
    gap: 15px;
}

.btn-purchase,
.btn-cancel {
    flex: 1;
    padding: 20px;
    border-radius: 10px;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid;
}

.btn-purchase {
    background: linear-gradient(135deg, #d4af37, #f4d03f);
    border-color: #d4af37;
    color: #1a1f3a;
}

.btn-purchase:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.5);
}

.btn-purchase:disabled {
    background: rgba(136, 204, 255, 0.2);
    border-color: rgba(136, 204, 255, 0.3);
    color: rgba(136, 204, 255, 0.5);
    cursor: not-allowed;
}

.btn-cancel {
    background: rgba(139, 0, 0, 0.2);
    border-color: rgba(139, 0, 0, 0.5);
    color: #ff6b6b;
}

.btn-cancel:hover {
    background: rgba(139, 0, 0, 0.3);
}

/* 已拥有标记 */
.product-owned-badge {
    text-align: center;
    padding: 15px;
    background: rgba(76, 175, 80, 0.2);
    border: 2px solid rgba(76, 175, 80, 0.5);
    border-radius: 10px;
    color: #4caf50;
    font-size: 18px;
    font-weight: bold;
}

.product-owned-badge.hidden {
    display: none;
}

/* 提示消息 */
.toast {
    position: fixed;
    top: 100px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(76, 175, 80, 0.95);
    color: white;
    padding: 15px 30px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: bold;
    z-index: 400;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.3s ease;
}

.toast.hidden {
    display: none;
}

.toast-error {
    background: rgba(139, 0, 0, 0.95);
}

.toast-icon {
    font-size: 24px;
}

@keyframes slideDown {
    from {
        transform: translate(-50%, -100%);
        opacity: 0;
    }
    to {
        transform: translate(-50%, 0);
        opacity: 1;
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .shop-header {
        height: 60px;
        padding: 0 15px;
    }
    
    .shop-title h1 {
        font-size: 20px;
    }
    
    .shop-subtitle {
        display: none;
    }
    
    .back-text {
        display: none;
    }
    
    .panel-content {
        width: 95%;
        padding: 20px;
    }
    
    .product-name {
        font-size: 22px;
    }
    
    .product-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}




