/* ========== 徽章墙弹窗样式 ========== */

.modal-badge-wall {
    width: 900px;
    max-width: 95%;
    max-height: calc(85vh + 100px);
}

.modal-badge-wall .modal-body {
    max-height: calc(80vh + 60px);
    overflow-y: auto;
}

/* 统计信息行 - 固定不随滚动 */
.badge-stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 25px;
    position: sticky;
    top: 0;
    z-index: 10;
    background: #fff;
    padding: 15px 0;
}

.badge-stat-card {
    background: #fff;
    border-radius: 12px;
    padding: 12px 15px;
    height: 110px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    border: 3px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
}

.badge-stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
}

.badge-stat-card.stat-total {
    background: #fff;
    border-color: #c5b3e6;
}

.badge-stat-card.stat-used {
    background: #fff;
    border-color: #f0b8cc;
}

.badge-stat-card.stat-available {
    background: #fff;
    border-color: #a8d8ea;
}

.stat-icon {
    font-size: 22px;
    margin-bottom: 4px;
    line-height: 1;
    font-weight: bold;
}

.stat-value {
    font-size: 30px;
    font-weight: bold;
    margin-bottom: 4px;
    line-height: 1.1;
}

.stat-total .stat-value {
    color: #6c5ba7;
}

.stat-used .stat-value {
    color: #d4577a;
}

.stat-available .stat-value {
    color: #3a9bc5;
}

.stat-label {
    font-size: 13px;
    font-weight: bold;
    line-height: 1;
}

.stat-total .stat-label {
    color: #8a7cb8;
}

.stat-used .stat-label {
    color: #e08aa0;
}

.stat-available .stat-label {
    color: #5bb0d4;
}

/* 徽章收藏区域 */
.badge-collection-section,
.exchange-history-section {
    margin-bottom: 25px;
}

.badge-collection-section h4,
.exchange-history-section h4 {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

/* 徽章网格 */
.badge-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
    max-height: 300px;
    overflow-y: auto;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 8px;
}

.badge-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.badge-item:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.badge-item img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 10px;
    border: 3px solid var(--theme-color);
}

.badge-item-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    text-align: center;
    margin-bottom: 5px;
}

.badge-item-date {
    font-size: 12px;
    color: #999;
    text-align: center;
}

/* 徽章使用状态圆点 - 左上角 */
.badge-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: block;
    position: absolute;
    top: 8px;
    left: 8px;
}

.badge-status-dot.used {
    background-color: #e57373;
    box-shadow: 0 0 4px rgba(229, 115, 115, 0.5);
}

.badge-status-dot.available {
    background-color: #81c784;
    box-shadow: 0 0 4px rgba(129, 199, 132, 0.5);
}

/* 兑换记录列表 */
.exchange-history-list {
    max-height: 250px;
    overflow-y: auto;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 8px;
}

.exchange-history-item {
    display: flex;
    align-items: center;
    padding: 12px;
    margin-bottom: 10px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.exchange-history-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.exchange-history-item:last-child {
    margin-bottom: 0;
}

.exchange-history-icon {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: cover;
    margin-right: 15px;
    flex-shrink: 0;
}

.exchange-history-info {
    flex: 1;
}

.exchange-history-name {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.exchange-history-meta {
    font-size: 13px;
    color: #666;
}

.exchange-history-badges {
    font-size: 14px;
    font-weight: 600;
    color: var(--theme-color);
    white-space: nowrap;
}

/* 导出按钮区域 */
.export-section {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.btn-export {
    padding: 12px 40px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 25px;
    background: linear-gradient(135deg, var(--theme-color) 0%, color-mix(in srgb, var(--theme-color) 80%, #000) 100%);
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.btn-export:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

/* 空状态 */
.badge-empty,
.exchange-empty {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-size: 14px;
}

/* ========== 导出弹窗样式 ========== */

.modal-export {
    width: 800px;
    max-width: 95%;
    max-height: calc(85vh + 100px);
}

.modal-export .modal-body {
    max-height: calc(80vh + 60px);
    overflow-y: auto;
}

.export-section {
    margin-bottom: 25px;
}

.section-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    text-align: left;
}

/* 导出类型按钮 */
.export-type-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.export-type-btn {
    padding: 12px 16px;
    border: 2px solid #ddd;
    border-radius: 10px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 12px;
}

.export-type-btn:hover {
    border-color: var(--theme-color);
    box-shadow: 0 4px 12px rgba(var(--theme-color-rgb), 0.15);
}

.export-type-btn.active {
    border-color: var(--theme-color);
    background: rgba(var(--theme-color-rgb), 0.06);
    box-shadow: 0 2px 8px rgba(var(--theme-color-rgb), 0.12);
}

.export-type-btn .btn-icon {
    font-size: 32px;
    flex-shrink: 0;
    line-height: 1;
}

.export-type-btn .btn-text-wrap {
    flex: 1;
    min-width: 0;
}

.export-type-btn .btn-title {
    font-size: 15px;
    font-weight: bold;
    margin-bottom: 3px;
    color: #333;
}

.export-type-btn .btn-desc {
    font-size: 12px;
    color: #888;
    line-height: 1.4;
}

/* 模版按钮 */
.template-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.template-btn {
    padding: 12px 16px;
    border: 2px solid #ddd;
    border-radius: 10px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 12px;
}

.template-btn:hover {
    border-color: var(--theme-color);
    box-shadow: 0 4px 12px rgba(var(--theme-color-rgb), 0.15);
}

.template-btn.active {
    border-color: var(--theme-color);
    background: rgba(var(--theme-color-rgb), 0.06);
    box-shadow: 0 2px 8px rgba(var(--theme-color-rgb), 0.12);
}

/* 模版颜料盘图标 */
.template-palette {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.golden-palette,
.candy-palette {
    background: none;
    border: none;
}

.template-btn .btn-text-wrap {
    flex: 1;
    min-width: 0;
}

.template-btn .btn-title {
    font-size: 15px;
    font-weight: bold;
    margin-bottom: 3px;
    color: #333;
}

.template-btn .btn-desc {
    font-size: 12px;
    color: #888;
    line-height: 1.4;
}

/* 徽章选择列表 - 网格卡片布局 */
.export-badge-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
    max-height: 300px;
    overflow-y: auto;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 8px;
}

.export-badge-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px 10px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
}

.export-badge-item:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.export-badge-item.selected {
    background: rgba(var(--theme-color-rgb), 0.06);
    border-color: var(--theme-color);
    box-shadow: 0 4px 12px rgba(var(--theme-color-rgb), 0.25);
}

.export-badge-item img {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #ddd;
    margin-bottom: 8px;
}

.export-badge-item.selected img {
    border-color: var(--theme-color);
}

.export-badge-info {
    text-align: center;
    width: 100%;
}

.export-badge-name {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.export-badge-date {
    font-size: 11px;
    color: #999;
}

.export-badge-checkbox {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--theme-color);
}

/* 日期输入 */
.date-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.date-input:focus {
    outline: none;
    border-color: var(--theme-color);
    box-shadow: 0 0 0 3px rgba(211, 91, 126, 0.1);
}

/* 操作按钮 */
.export-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .modal-badge-wall,
    .modal-export {
        width: 95%;
    }
    
    .badge-stats-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .badge-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 10px;
    }
    
    .export-type-buttons,
    .template-buttons {
        grid-template-columns: 1fr;
    }
    
    .export-badge-list {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 10px;
    }
    
    .export-badge-item img {
        width: 55px;
        height: 55px;
    }
}

@media (max-width: 480px) {
    .badge-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }
    
    .badge-item img {
        width: 60px;
        height: 60px;
    }
    
    .stat-value {
        font-size: 28px;
    }
    
    .stat-label {
        font-size: 12px;
    }
}
