/* CW 盲盒游戏样式 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background: linear-gradient(135deg, #0c0c0c 0%, #1a1a2e 50%, #16213e 100%);
    color: #e6f0ff;
    min-height: 100vh;
}

#blindbox-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 15px;
    background: transparent;
    min-height: 100vh;
}

/* 响应式容器宽度 */
@media (min-width: 1400px) {
    #blindbox-container {
        max-width: 1600px;
    }
}

@media (max-width: 1399px) and (min-width: 1200px) {
    #blindbox-container {
        max-width: 1200px;
    }
}

@media (max-width: 1199px) and (min-width: 992px) {
    #blindbox-container {
        max-width: 960px;
    }
}

@media (max-width: 768px) {
    #blindbox-container {
        max-width: 100%;
        padding: 15px 10px;
    }
}

/* 游戏头部 */
.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #00ff00;
    border-radius: 0;
    box-shadow: 
        0 0 20px rgba(0, 255, 0, 0.3),
        inset 0 0 20px rgba(0, 255, 0, 0.1);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.game-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 0, 0.1), transparent);
    transition: left 0.5s ease;
}

.game-header:hover {
    transform: translateY(-5px);
    box-shadow: 
        0 0 30px rgba(0, 255, 0, 0.5),
        inset 0 0 30px rgba(0, 255, 0, 0.2);
    border-color: #00ff00;
}

.game-header:hover::before {
    left: 100%;
}

.brand {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    background: linear-gradient(135deg, #00ff00 0%, #00cc00 100%);
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.3);
}

.titles h1 {
    font-size: 28px;
    font-weight: 800;
    background: linear-gradient(135deg, #00ff00, #00cc00);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
}

.subtitle {
    font-size: 14px;
    color: #00cc00;
    margin-top: 5px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 30px;
}

.credits-display {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid #00ff00;
    border-radius: 0;
    box-shadow: 
        0 0 10px rgba(0, 255, 0, 0.2),
        inset 0 0 10px rgba(0, 255, 0, 0.05);
    backdrop-filter: blur(5px);
}

.credits-icon {
    font-size: 20px;
}

.credits-amount {
    font-size: 24px;
    font-weight: 800;
    color: #00ff00;
    text-shadow: 0 0 8px rgba(0, 255, 0, 0.3);
}

.credits-label {
    font-size: 14px;
    opacity: 0.8;
}

.user-stats {
    display: flex;
    gap: 20px;
}

.stat {
    text-align: center;
    padding: 10px 15px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid #00ff00;
    border-radius: 0;
    box-shadow: 
        0 0 10px rgba(0, 255, 0, 0.2),
        inset 0 0 10px rgba(0, 255, 0, 0.05);
    backdrop-filter: blur(5px);
}

.stat span {
    display: block;
    font-size: 20px;
    font-weight: 800;
    color: #00ff00;
    text-shadow: 0 0 8px rgba(0, 255, 0, 0.3);
}

.stat label {
    font-size: 12px;
    opacity: 0.7;
    margin-top: 5px;
}

/* 盲盒展示区域 */
.blindbox-showcase {
    margin-bottom: 40px;
}

.blindbox-showcase h2 {
    font-size: 24px;
    margin-bottom: 20px;
    text-align: center;
    background: linear-gradient(135deg, #00ff00, #00cc00);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
}

.blindbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.blindbox-card {
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #00ff00;
    border-radius: 0;
    padding: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 0 20px rgba(0, 255, 0, 0.3),
        inset 0 0 20px rgba(0, 255, 0, 0.1);
    backdrop-filter: blur(10px);
}

.blindbox-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 0, 0.1), transparent);
    transition: left 0.5s ease;
}

.blindbox-card:hover {
    transform: translateY(-10px);
    box-shadow: 
        0 0 30px rgba(0, 255, 0, 0.5),
        inset 0 0 30px rgba(0, 255, 0, 0.2);
    border-color: #00ff00;
}

.blindbox-card:hover::before {
    left: 100%;
}


.blindbox-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.blindbox-name {
    font-size: 20px;
    font-weight: 700;
    color: #00ff00;
    text-shadow: 0 0 8px rgba(0, 255, 0, 0.3);
}

.blindbox-price {
    font-size: 18px;
    font-weight: 800;
    color: #00cc00;
    text-shadow: 0 0 8px rgba(0, 204, 0, 0.3);
}

.blindbox-description {
    font-size: 14px;
    opacity: 0.8;
    margin-bottom: 15px;
    line-height: 1.5;
}

.blindbox-stats {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: 16px;
    font-weight: 700;
    color: #00ff00;
    text-shadow: 0 0 8px rgba(0, 255, 0, 0.3);
}

.stat-label {
    font-size: 12px;
    opacity: 0.7;
}

.blindbox-actions {
    display: flex;
    gap: 10px;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.btn-primary {
    background: transparent;
    color: #00ff00;
    border: 2px solid #00ff00;
    text-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
    flex: 1;
    font-family: 'Orbitron', monospace;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 0;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: rgba(0, 255, 0, 0.1);
    box-shadow: 
        0 0 20px rgba(0, 255, 0, 0.5),
        inset 0 0 20px rgba(0, 255, 0, 0.1);
    transform: translateY(-2px);
}

.btn-secondary {
    background: rgba(0, 0, 0, 0.6);
    color: #00ff00;
    border: 1px solid #00ff00;
    text-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
    font-family: 'Orbitron', monospace;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 0;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: rgba(0, 255, 0, 0.1);
    box-shadow: 
        0 0 20px rgba(0, 255, 0, 0.5),
        inset 0 0 20px rgba(0, 255, 0, 0.1);
    transform: translateY(-2px);
}

/* 收藏区域 */
.collection-section {
    margin-bottom: 40px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-header h2 {
    font-size: 24px;
    background: linear-gradient(135deg, #00ff00, #00cc00);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
}

.collection-stats {
    font-size: 14px;
    opacity: 0.8;
}

.collection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.item-card {
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #00ff00;
    border-radius: 0;
    padding: 15px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 0 20px rgba(0, 255, 0, 0.3),
        inset 0 0 20px rgba(0, 255, 0, 0.1);
    backdrop-filter: blur(10px);
}

.item-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 0, 0.1), transparent);
    transition: left 0.5s ease;
}

.item-card:hover {
    transform: translateY(-10px);
    box-shadow: 
        0 0 30px rgba(0, 255, 0, 0.5),
        inset 0 0 30px rgba(0, 255, 0, 0.2);
    border-color: #00ff00;
}

.item-card:hover::before {
    left: 100%;
}

.item-image {
    width: 80px;
    height: 80px;
    margin: 0 auto 10px;
    border-radius: 10px;
    background: linear-gradient(135deg, #00ff00, #00cc00);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.3);
}

.item-name {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 5px;
    color: #00ff00;
    text-shadow: 0 0 8px rgba(0, 255, 0, 0.3);
}

.item-rarity {
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 10px;
    margin-bottom: 5px;
    display: inline-block;
}

.rarity-1 { background: rgba(255,255,255,0.2); color: #fff; }
.rarity-2 { background: rgba(76, 175, 80, 0.3); color: #4caf50; }
.rarity-3 { background: rgba(33, 150, 243, 0.3); color: #2196f3; }
.rarity-4 { background: rgba(156, 39, 176, 0.3); color: #9c27b0; }
.rarity-5 { background: rgba(255, 193, 7, 0.3); color: #ffc107; }

.item-description {
    font-size: 12px;
    opacity: 0.7;
    line-height: 1.4;
}

/* 历史记录 */
.history-section h2 {
    font-size: 24px;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #00ff00, #00cc00);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
}

.history-list {
    max-height: 300px;
    overflow-y: auto;
}

.history-item {
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #00ff00;
    border-radius: 0;
    padding: 15px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 
        0 0 20px rgba(0, 255, 0, 0.3),
        inset 0 0 20px rgba(0, 255, 0, 0.1);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.history-item:hover {
    transform: translateY(-5px);
    box-shadow: 
        0 0 30px rgba(0, 255, 0, 0.5),
        inset 0 0 30px rgba(0, 255, 0, 0.2);
}

.history-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.history-time {
    font-size: 12px;
    opacity: 0.7;
}

.history-items {
    display: flex;
    gap: 5px;
}

.history-item-preview {
    width: 30px;
    height: 30px;
    border-radius: 5px;
    background: linear-gradient(135deg, #00ff00, #00cc00);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.3);
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.9);
    border: 2px solid #00ff00;
    border-radius: 0;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    box-shadow: 
        0 0 30px rgba(0, 255, 0, 0.5),
        inset 0 0 30px rgba(0, 255, 0, 0.1);
    backdrop-filter: blur(15px);
}

.box-container {
    position: relative;
    margin: 30px 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.mystery-box {
    width: 150px;
    height: 150px;
    position: relative;
    transform-style: preserve-3d;
    animation: boxFloat 2s ease-in-out infinite;
}

.box-lid {
    width: 100%;
    height: 30px;
    background: linear-gradient(135deg, #00ff00, #00cc00);
    border-radius: 10px 10px 0 0;
    position: absolute;
    top: 0;
    transform-origin: bottom;
    transition: transform 0.5s ease;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.3);
}

.box-body {
    width: 100%;
    height: 120px;
    background: linear-gradient(135deg, #00cc00, #00aa00);
    border-radius: 0 0 10px 10px;
    position: absolute;
    bottom: 0;
    box-shadow: 0 0 20px rgba(0, 204, 0, 0.3);
}

.box-glow {
    position: absolute;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(0, 255, 0, 0.3), transparent);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes boxFloat {
    0%, 100% { transform: translateY(0px) rotateY(0deg); }
    50% { transform: translateY(-10px) rotateY(5deg); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.opening-text {
    font-size: 18px;
    font-weight: 600;
    margin: 20px 0;
    color: #00ff00;
    text-shadow: 0 0 8px rgba(0, 255, 0, 0.3);
}

.result-display {
    margin: 20px 0;
}

.modal-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
}

/* 批量开盒 */
.batch-options {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin: 20px 0;
    flex-wrap: wrap;
}

.batch-btn {
    padding: 15px 25px;
    background: transparent;
    color: #00ff00;
    border: 2px solid #00ff00;
    text-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
    border-radius: 0;
    font-family: 'Orbitron', monospace;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.batch-btn:hover {
    background: rgba(0, 255, 0, 0.1);
    box-shadow: 
        0 0 20px rgba(0, 255, 0, 0.5),
        inset 0 0 20px rgba(0, 255, 0, 0.1);
    transform: translateY(-2px);
}

.batch-result {
    max-height: 300px;
    overflow-y: auto;
    margin: 20px 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .game-header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .user-info {
        flex-direction: column;
        gap: 15px;
    }
    
    .blindbox-grid {
        grid-template-columns: 1fr;
    }
    
    .collection-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .modal-content {
        width: 95%;
        padding: 20px;
    }
    
    .batch-options {
        flex-direction: column;
    }
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(78, 205, 196, 0.3);
    border-radius: 50%;
    border-top-color: #4ecdc4;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 稀有度特效 */
.rarity-effect {
    position: relative;
    overflow: hidden;
}

.rarity-effect::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(transparent, rgba(78, 205, 196, 0.3), transparent);
    animation: rotate 2s linear infinite;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.rarity-effect:hover::before {
    opacity: 1;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
