/* 传奇商品购买页面样式 - 手机端优先 */

/* 基础重置和全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', '微软雅黑', 'Arial', sans-serif;
    background: linear-gradient(135deg, #f5f1e8 0%, #e8dcc6 100%);
    color: #333;
    min-height: 100vh;
    line-height: 1.6;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 顶部用户信息区域 */
.header-bar {
    background: linear-gradient(135deg, #2c1810 0%, #4a2c1a 100%);
    color: white;
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.header-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    font-size: 32px;
    color: #d4af37;
    border: 2px solid #d4af37;
    border-radius: 50%;
    padding: 5px;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-details {
    line-height: 1.2;
}

.user-title {
    font-size: 16px;
    font-weight: bold;
    color: #d4af37;
}

.user-subtitle {
    font-size: 12px;
    color: #b8b8b8;
    margin-top: 2px;
}

.exit-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #dc3545;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    border: none;
    font-size: 14px;
}

.exit-btn:hover {
    background: #c82333;
    transform: translateY(-1px);
}

.exit-btn i {
    font-size: 16px;
}

.exit-text {
    font-size: 11px;
    opacity: 0.8;
}

/* 主要内容区域 */
.main-content {
    padding: 20px 0 40px;
    min-height: calc(100vh - 400px);
}

/* 页面标题 */
.page-title {
    text-align: center;
    margin-bottom: 25px;
}

.page-title h1 {
    font-size: 24px;
    color: #2c1810;
    margin-bottom: 5px;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.page-title h2 {
    font-size: 16px;
    color: #666;
    font-weight: normal;
}

/* 汇率信息 */
.exchange-rate {
    background: linear-gradient(135deg, #fff8dc 0%, #f0e68c 100%);
    border: 2px solid #d4af37;
    border-radius: 12px;
    padding: 15px;
    margin: 0 auto 25px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.2);
    max-width: 400px;
}

.exchange-rate i {
    color: #d4af37;
    font-size: 18px;
    margin-right: 8px;
}

.rate-text {
    font-size: 16px;
    font-weight: bold;
    color: #2c1810;
    display: block;
    margin-bottom: 3px;
}

.rate-english {
    font-size: 12px;
    color: #666;
}

/* 商品网格 */
.items-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 25px;
}

/* 商品卡片 */
.item-card {
    background: white;
    border-radius: 10px;
    padding: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.06);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    max-width: 220px;
    margin: 0 auto;
}

.item-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.12);
}

/* 传奇品质 */
.item-card.legendary {
    border-color: #ff6b35;
    background: linear-gradient(135deg, #fff 0%, #fff5f0 100%);
}

.item-card.legendary .item-badge {
    background: linear-gradient(135deg, #ff6b35 0%, #ff8c42 100%);
}

/* 史诗品质 */
.item-card.epic {
    border-color: #8b5cf6;
    background: linear-gradient(135deg, #fff 0%, #faf7ff 100%);
}

.item-card.epic .item-badge {
    background: linear-gradient(135deg, #8b5cf6 0%, #a78bfa 100%);
}

/* 稀有品质 */
.item-card.rare {
    border-color: #3b82f6;
    background: linear-gradient(135deg, #fff 0%, #f0f9ff 100%);
}

.item-card.rare .item-badge {
    background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);
}

/* 品质标签 */
.item-badge {
    position: absolute;
    top: 6px;
    left: 6px;
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 8px;
    font-weight: bold;
    text-align: center;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
    z-index: 2;
    line-height: 1.1;
}

.badge-english {
    display: block;
    font-size: 6px;
    opacity: 0.9;
    margin-top: 0px;
}

/* 商品图片 */
.item-image {
    text-align: center;
    margin-bottom: 8px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle, rgba(0,0,0,0.02) 0%, transparent 70%);
    border-radius: 6px;
    position: relative;
    overflow: hidden;
}

.item-img {
    max-width: 60px;
    max-height: 60px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.12));
    transition: transform 0.3s ease;
}

.item-card:hover .item-img {
    transform: scale(1.03);
}

/* 当图片加载失败时的占位符 */
.item-img[src*="placeholder"] {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #f0f0f0 0%, #e0e0e0 100%);
    border-radius: 4px;
}

/* 商品信息 */
.item-info {
    text-align: center;
}

.item-name {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 13px;
    font-weight: bold;
    color: #2c1810;
    margin-bottom: 2px;
    line-height: 1.2;
}

.item-name i {
    color: #d4af37;
    font-size: 12px;
}

.item-name-english {
    font-size: 9px;
    color: #666;
    margin-bottom: 8px;
    line-height: 1.1;
}

/* 价格区域 */
.price-section {
    margin-bottom: 10px;
}

.price-label {
    font-size: 10px;
    color: #333;
    font-weight: bold;
    margin-bottom: 0px;
}

.price-label-english {
    font-size: 8px;
    color: #666;
    margin-bottom: 4px;
}

.price-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-bottom: 4px;
}

.original-price {
    font-size: 10px;
    color: #999;
    text-decoration: line-through;
}

.current-price {
    font-size: 14px;
    font-weight: bold;
    color: #d4af37;
    display: flex;
    align-items: center;
    gap: 3px;
}

.current-price i {
    font-size: 12px;
}

.price-usd {
    font-size: 10px;
    color: #666;
    text-align: center;
    line-height: 1.1;
}

.price-usd-english {
    font-size: 8px;
    color: #999;
    margin-top: 0px;
}

/* 购买按钮 */
.purchase-btn {
    width: 100%;
    background: linear-gradient(135deg, #d4af37 0%, #ffd700 100%);
    color: #2c1810;
    border: none;
    padding: 8px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.2);
    line-height: 1.1;
}

.purchase-btn:hover {
    background: linear-gradient(135deg, #b8941f 0%, #e6c200 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

.purchase-btn:active {
    transform: translateY(0);
}

.btn-english {
    font-size: 8px;
    opacity: 0.8;
}

/* 底部区域 */
.footer {
    background: linear-gradient(135deg, #2c1810 0%, #1a0f08 100%);
    color: white;
    padding: 30px 0 20px;
    margin-top: 40px;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
    margin-bottom: 20px;
}

.footer-section h4 {
    color: #d4af37;
    font-size: 16px;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-title-english {
    font-size: 12px;
    color: #b8b8b8;
    margin-bottom: 15px;
}

.footer-section p {
    font-size: 13px;
    line-height: 1.4;
    margin-bottom: 5px;
    color: #e0e0e0;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    font-size: 13px;
    line-height: 1.4;
    margin-bottom: 3px;
    color: #e0e0e0;
}

.footer-bottom {
    border-top: 1px solid #444;
    padding-top: 15px;
    text-align: center;
}

.footer-bottom p {
    font-size: 12px;
    color: #b8b8b8;
    margin-bottom: 3px;
}

/* 平板端适配 (768px以上) */
@media (min-width: 768px) {
    .container {
        padding: 0 30px;
    }
    
    .header-bar {
        padding: 15px 0;
    }
    
    .user-avatar {
        font-size: 36px;
        width: 50px;
        height: 50px;
    }
    
    .user-title {
        font-size: 18px;
    }
    
    .user-subtitle {
        font-size: 14px;
    }
    
    .exit-btn {
        padding: 10px 15px;
        font-size: 15px;
    }
    
    .page-title h1 {
        font-size: 32px;
    }
    
    .page-title h2 {
        font-size: 18px;
    }
    
    .items-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .item-card {
        max-width: 240px;
        padding: 14px;
    }
    
    .item-image {
        height: 80px;
    }
    
    .item-img {
        max-width: 70px;
        max-height: 70px;
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
}

/* PC端适配 (1024px以上) */
@media (min-width: 1024px) {
    .main-content {
        padding: 30px 0 50px;
    }
    
    .page-title h1 {
        font-size: 36px;
    }
    
    .page-title h2 {
        font-size: 20px;
    }
    
    .items-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 20px;
        max-width: 750px;
        margin: 25px auto 0;
    }
    
    .item-card {
        padding: 15px;
        max-width: 200px;
    }
    
    .item-image {
        height: 90px;
    }
    
    .item-img {
        max-width: 75px;
        max-height: 75px;
    }
    
    .footer-content {
        grid-template-columns: repeat(3, 1fr);
        gap: 40px;
    }
    
    .exit-btn {
        flex-direction: column;
        gap: 2px;
        text-align: center;
        min-width: 80px;
    }
    
    .exit-text {
        font-size: 10px;
    }
}

/* 大屏幕优化 (1200px以上) */
@media (min-width: 1200px) {
    .header-bar .container {
        max-width: 1400px;
    }
    
    .container {
        max-width: 1400px;
    }
    
    .items-grid {
        max-width: 800px;
        max-width: 1200px;
        gap: 25px;
    }
    
    .item-card {
        max-width: 220px;
    }
    
    .item-card:hover {
        transform: translateY(-8px);
    }
}

/* 加载动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.item-card {
    animation: fadeInUp 0.6s ease forwards;
}

.item-card:nth-child(1) {
    animation-delay: 0.1s;
}

.item-card:nth-child(2) {
    animation-delay: 0.2s;
}

.item-card:nth-child(3) {
    animation-delay: 0.3s;
}

/* 钻石图标闪烁效果 */
@keyframes gemSparkle {
    0%, 100% {
        transform: scale(1);
        filter: brightness(1);
    }
    50% {
        transform: scale(1.1);
        filter: brightness(1.2);
    }
}

.current-price i,
.purchase-btn i {
    animation: gemSparkle 2s ease-in-out infinite;
}

/* 无商品状态样式 */
.no-goods {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.no-goods-icon {
    font-size: 48px;
    color: #ccc;
    margin-bottom: 20px;
    opacity: 0.8;
}

.no-goods-text h3 {
    font-size: 18px;
    color: #999;
    margin-bottom: 8px;
}

.no-goods-text p {
    font-size: 14px;
    color: #bbb;
}

/* 无图片时的占位符样式 */
.item-img[alt]:after {
    content: attr(alt);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 10px;
    border-radius: 5px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.item-img[src=""]:after,
.item-img[src="#"]:after {
    opacity: 1;
}
