@media (min-width: 1200px) {
    /* 
     * 我们使用一个精确但不“霸道”的选择器来定位内容区。
     * 这为大多数遵循WooCommerce标准结构的主题提供了开箱即用的宽屏体验。
     * 用户如果需要，依然可以用更高优先级的选择器在“额外CSS”中覆盖它。
     */
    .woocommerce-account .woocommerce-MyAccount-content {
        max-width: 100%; /* 尝试解除最大宽度限制 */
    }
}
:root { --rarity-color: #a0a0a0; }

/* 1. 布局与控制面板 (保持不变) */
.collection-controls {
    display: flex;
    flex-wrap: wrap; /* 允许在小屏幕上换行 */
    align-items: center;
    gap: 15px 25px; /* 减小垂直间距，保持水平间距 */
    margin-bottom: 30px;
    padding: 20px;
    background-color: #f9f9f9;
    border: 1px solid #e9e9e9;
    border-radius: 8px;
}
.control-group {
    display: flex;
    align-items: center;
    gap: 10px; /* 减小标签和控件之间的间距 */
    flex-shrink: 0; /* 防止控件被压缩变形 */
}
/* 让“系列”和“排序”下拉框在空间不足时可以稍微缩小 */
.control-group:not(.control-group-pills) {
    flex-grow: 1; /* 允许它们伸展以填充空间 */
    min-width: 220px; /* 设置一个最小宽度 */
}
.control-group label {
    font-weight: 600;
    font-size: 14px;
    color: #333;
    white-space: nowrap; /* 防止标签文字换行 */
}
.control-group select {
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 8px 12px;
    font-size: 14px;
    cursor: pointer;
    width: 100%; /* 【核心】让下拉框宽度自适应其容器 */
    min-width: 150px; /* 保持一个可接受的最小宽度 */
    transition: border-color 0.2s;
}
.control-group select:hover {
    border-color: #bbb;
}
.control-group-pills {
    align-items: center;
}
.bcore-pills-container {
    display: flex;
    background-color: #e9ecef; /* 按钮组的浅灰色背景 */
    border-radius: 20px; /* 容器圆角 */
    padding: 4px;
}
.bcore-pill-btn {
    border: none;
    background: transparent; /* 默认透明背景 */
    padding: 8px 18px;
    font-size: 14px;
    font-weight: 600;
    color: #495057; /* 默认文字颜色 */
    border-radius: 16px; /* 按钮自身圆角 */
    cursor: pointer;
    transition: all 0.25s ease;
}
.bcore-pill-btn:hover:not(.active) {
    background-color: #dee2e6; /* 非激活按钮的悬停效果 */
}
.bcore-pill-btn.active {
    background-color: #fff; /* 激活状态：白色背景 */
    color: #007bff; /* 激活状态：主题蓝色文字 */
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
/* 2. 卡片网格与卡片本身 (保持不变) */
.collection-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 25px; }
.collection-card { border: 1px solid #e5e5e5; border-radius: 12px; text-align: center; background: #fff; display: flex; flex-direction: column; position: relative; box-shadow: 0 4px 10px rgba(0,0,0,0.05); transition: transform 0.2s ease-out, box-shadow 0.2s ease-out; overflow: hidden; }
.collection-card:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.08); }

/* 3. 顶部颜色条 (保持不变) */
.collection-card.opened::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 5px; background-color: var(--rarity-color); z-index: 1; }
/* UR卡片动态边框... (保持不变) */

/* 4. 卡片内部元素 (保持不变) */
.card-image { aspect-ratio: 1 / 1; padding: 10px; margin-top: 5px; }
.card-image img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.card-body { padding: 0 15px 15px; flex-grow: 1; display: flex; flex-direction: column; justify-content: center; }
.card-title { font-size: 1.05em; font-weight: 600; margin: 5px 0; min-height: 44px; color: #222; }
.card-time, .card-status { font-size: 0.85em; color: #888; }
.card-footer { background-color: #f9f9f9; padding: 10px 15px; border-top: 1px solid #f0f0f0; border-bottom-left-radius: 12px; border-bottom-right-radius: 12px; }

/* 5. 稀有度标签 (保持不变) */
.card-rarity-corner { position: absolute; top: 0; right: 0; width: 45px; height: 30px; background: var(--rarity-color); border-bottom-left-radius: 10px; z-index: 2; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 13px; font-weight: bold; }
.card-rarity-corner::before { content: attr(data-rarity); }


/* 6. 开盒弹窗 (Modal) - 深色主题改造 */
.bcore-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85); /* 加深遮罩 */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}
.bcore-modal-content {
    background: #1a1d24; /* 深邃的背景色 */
    padding: 30px;
    border-radius: 12px;
    position: relative;
    text-align: center;
    width: 90%;
    max-width: 650px; /* 为滚动条留出更多空间 */
    box-shadow: 0 0 25px rgba(245, 166, 35, 0.2); /* 增加辉光效果 */
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #f0f0f0; /* 默认文字颜色改为浅色 */
}
.bcore-modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 28px;
    border: none;
    background: transparent;
    cursor: pointer;
    color: #aaa; /* 关闭按钮颜色 */
    transition: color 0.2s;
}
.bcore-modal-close:hover {
    color: #fff;
}

/* 7. 【全新】开盒动画序列 */
.opening-animation {
    min-height: 220px; /* 给动画留足空间 */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
.bcore-opening-sequence {
    position: relative;
    width: 150px;
    height: 150px;
    margin-bottom: 20px;
}
.sequence-box {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.sequence-box img {
    max-width: 100%;
    transition: transform 0.3s ease;
}
/* 初始摇晃动画 */
.sequence-box.is-shaking {
    animation: shake 0.8s cubic-bezier(.36,.07,.19,.97) both infinite;
}
/* 开启一瞬间的跳动动画 */
.bcore-opening-sequence.is-opening .sequence-box {
    animation: box-open-effect 0.6s ease-in-out forwards;
}
/* 光效伪元素 */
.bcore-opening-sequence::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 10px;
    background: radial-gradient(circle, rgba(255,255,255,1) 0%, rgba(255,229,180,0.8) 50%, rgba(245,166,35,0) 100%);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
}
/* 触发光芒迸发 */
.bcore-opening-sequence.is-flashing::after {
    animation: light-burst-effect 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

/* 8. 最终结果展示 */
.opening-result {
    display: flex; /* 启用Flexbox布局 */
    flex-direction: column; /* 设置主轴为垂直方向 */
    align-items: center; /* 交叉轴（水平）居中对齐 */
}

.opening-result .prize-image img {
    max-width: 200px;
    border-radius: 8px;
    margin-bottom: 15px;
}
.opening-result .prize-name {
    font-size: 1.6em;
    font-weight: bold;
    margin: 10px 0;
    color: #fff;
}
.opening-result .prize-rarity {
    display: inline-block;
    padding: 5px 15px;
    margin-top: 10px;
    border-radius: 20px;
    color: #fff;
    background-color: var(--rarity-color);
}
/* 【新增】最终结果确认按钮样式 */
.bcore-confirm-btn {
    display: inline-block;
    margin-top: 35px; /* 与上方元素拉开距离 */
    padding: 12px 40px;
    font-size: 16px;
    font-weight: bold;
    color: #1a1d24; /* 按钮文字颜色，用回背景色形成对比 */
    background-color: #f5a623; /* 使用和滚动条指针一样的醒目颜色 */
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 4px 15px rgba(245, 166, 35, 0.2);
}
.bcore-confirm-btn:hover {
    transform: translateY(-2px);
    background-color: #ffc107; /* 悬停时更亮 */
    box-shadow: 0 6px 20px rgba(245, 166, 35, 0.3);
}

/* 9. 动画关键帧 (Keyframes) */
@keyframes shake { 10%, 90% { transform: translate3d(-1px, 0, 0); } 20%, 80% { transform: translate3d(2px, 0, 0); } 30%, 50%, 70% { transform: translate3d(-4px, 0, 0); } 40%, 60% { transform: translate3d(4px, 0, 0); } }
@keyframes box-open-effect {
    0% { transform: translateY(0) scale(1); }
    30% { transform: translateY(-20px) scale(1.05); }
    60% { transform: translateY(5px) scale(0.95); }
    100% { transform: translateY(0) scale(1); }
}
@keyframes light-burst-effect {
    0% { transform: translate(-50%, -50%) scale(0); opacity: 0.8; }
    80% { opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(100); opacity: 0; }
}

/* 10. CS:GO 滚动条样式 (微调以适应深色主题) */
.opening-reel-container {
    width: 100%;
    height: 150px;
    overflow: hidden;
    position: relative;
    border: 2px solid rgba(255, 255, 255, 0.2); /* 边框颜色变浅 */
    background: #111; /* 背景更深邃 */
    border-radius: 5px;
    margin: 0 auto;
}
.reel-ticker {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 100%;
    background-color: #f5a623;
    box-shadow: 0 0 15px #f5a623, 0 0 20px rgba(245, 166, 35, 0.5); /* 增强辉光 */
    z-index: 2;
}
.reel-ticker::before, .reel-ticker::after { content: ''; position: absolute; left: 50%; transform: translateX(-50%); border-left: 8px solid transparent; border-right: 8px solid transparent; }
.reel-ticker::before { top: -10px; border-bottom: 10px solid #f5a623; }
.reel-ticker::after { bottom: -10px; border-top: 10px solid #f5a623; }
.item-reel { height: 100%; display: flex; position: absolute; left: 0; top: 0; }
.reel-item { width: 150px; height: 150px; flex-shrink: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; box-sizing: border-box; padding: 10px; position: relative; background-color: #2c2c2c; border-left: 1px solid #444; border-right: 1px solid #444; }
.reel-item .prize-image { width: 80%; height: 80%; }
.reel-item .prize-image img { width: 100%; height: 100%; object-fit: contain; }
.reel-item .prize-name { font-size: 12px; color: #fff; margin-top: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; width: 100%; text-align: center; }
.reel-item::before { content: ''; position: absolute; bottom: 0; left: 5px; right: 5px; height: 4px; background-color: var(--rarity-color); }

/* 其他样式 (保持不变) */
.no-results { grid-column: 1 / -1; text-align: center; padding: 40px; }
.collection-card.static-card:hover { transform: none; box-shadow: 0 4px 10px rgba(0,0,0,0.05); }
.bcore-loot-pool-display { margin-top: 2em; padding-top: 1.5em; border-top: 1px solid #eee; clear: both; }
.bcore-loot-pool-display h3 { font-size: 1.2em; margin-bottom: 1em; }

/* 美化“我的藏品”中的“立即开启”按钮 */
.collection-card.unopened .card-footer .open-blind-box-btn {
    display: inline-block;
    width: 80%; /* 按钮宽度 */
    padding: 12px 10px; /* 按钮内边距 (上下, 左右) */
    font-size: 15px;
    font-weight: bold;
    color: #fff; /* 文字颜色：白色 */
    background-color: #337ab7; /* 主要的品牌蓝色，您可以换成您喜欢的主题色 */
    border: none; /* 移除默认边框 */
    border-radius: 25px; /* 【核心】让按钮变得“圆润”的关键 */
    cursor: pointer;
    text-align: center;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 4px 10px rgba(51, 122, 183, 0.25); /* 添加一点阴影增加立体感 */
}

/* 鼠标悬停效果 */
.collection-card.unopened .card-footer .open-blind-box-btn:hover {
    transform: translateY(-2px); /* 轻微上浮 */
    background-color: #286090; /* 悬停时颜色加深 */
    box-shadow: 0 6px 15px rgba(51, 122, 183, 0.35); /* 阴影加深 */
}

/* 按钮在准备/开启中状态的样式 */
.collection-card.unopened .card-footer .open-blind-box-btn:disabled {
    background-color: #999;
    box-shadow: none;
    transform: none;
    cursor: wait;
}
