/* 白色拟态主题 - 会员卡兑换模板样式 */

/* ========== CSS变量定义（与header.css保持一致） ========== */
:root {
    --background-color: #ebecf0;
    --greyLight-1: #e4ebf5;
    --greyLight-2: #c8d0e7;
    --greyLight-3: #bec8e4;
    --greyDark: #6d85c1;
    --white: #fff;
    --text-a-color: #7a7e90;
    --text-a-hover: #8897d8;
    --text-li-color: #565e82;
    --primary: #6d5dfc;
    --primary-dark: #5b0eeb;
}

/* ========== 会员卡兑换容器 ========== */
.card-redeem-container {
    width: 100%;
    max-width: 2000px;
    margin: 0 auto;
    min-height: calc(100vh - 140px);
    background: var(--background-color);
    padding: 40px 40px;
    box-sizing: border-box;
}

/* ========== 头部标题区域 ========== */
.card-redeem-header {
    text-align: center;
    margin-bottom: 35px;
}

.card-redeem-title {
    font-size: 36px;
    font-weight: 700;
    color: var(--text-li-color);
    margin-bottom: 12px;
    letter-spacing: 1px;
}

.card-redeem-description {
    font-size: 16px;
    color: var(--text-a-color);
    line-height: 1.8;
    max-width: 800px;
    margin: 0 auto;
}

/* ========== 工具选择区域 ========== */
.card-redeem-tools-section {
    max-width: 1200px;
    margin: 0 auto;
}

.card-redeem-tools-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-li-color);
    margin-bottom: 25px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.card-redeem-tools-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 25px;
    margin-bottom: 40px;
}

/* ========== 工具卡片样式 ========== */
.card-redeem-tool-card {
    background: var(--background-color);
    border: none;
    border-radius: 12px;
    padding: 30px 25px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    width: 280px;
    box-shadow: 0.2rem 0.2rem 0.4rem var(--greyLight-2), -0.1rem -0.1rem 0.3rem var(--white);
}

.card-redeem-tool-card:hover {
    box-shadow: 0.3rem 0.3rem 0.6rem var(--greyLight-2), -0.2rem -0.2rem 0.5rem var(--white);
    transform: translateY(-2px);
}

.card-redeem-tool-card.active {
    box-shadow: inset 0.2rem 0.2rem 0.4rem var(--greyLight-2), inset -0.1rem -0.1rem 0.3rem var(--white);
    background: var(--background-color);
}

/* ========== 工具图标 ========== */
.card-redeem-tool-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--background-color);
    border-radius: 12px;
    font-size: 32px;
    overflow: hidden;
    box-shadow: 0.2rem 0.2rem 0.4rem var(--greyLight-2), -0.1rem -0.1rem 0.3rem var(--white);
    border: none;
}

.card-redeem-tool-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

.card-redeem-tool-icon:has(img) {
    background: transparent;
    padding: 0;
    box-shadow: none;
}

.card-redeem-tool-card.active .card-redeem-tool-icon {
    box-shadow: inset 0.2rem 0.2rem 0.4rem var(--greyLight-2), inset -0.1rem -0.1rem 0.3rem var(--white);
}

.card-redeem-tool-card.active .card-redeem-tool-icon:has(img) {
    background: transparent;
    box-shadow: none;
}

/* ========== 工具名称 ========== */
.card-redeem-tool-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-li-color);
    text-align: center;
    margin-bottom: 12px;
}

/* ========== 工具描述 ========== */
.card-redeem-tool-description {
    font-size: 14px;
    color: var(--text-a-color);
    text-align: center;
    line-height: 1.6;
    margin-bottom: 0;
}

/* ========== 选中标记 ========== */
.card-redeem-tool-check {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 20px;
    height: 20px;
    background: var(--primary);
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 12px;
    font-weight: 600;
    box-shadow: 0.2rem 0.2rem 0.4rem var(--greyLight-2), -0.1rem -0.1rem 0.3rem var(--white);
    border: none;
}

.card-redeem-tool-card.active .card-redeem-tool-check {
    display: flex;
}

/* ========== 空状态 ========== */
.card-redeem-empty-state {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-a-color);
}

.card-redeem-empty-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.card-redeem-empty-text {
    font-size: 16px;
    line-height: 1.6;
}

/* ========== 领取界面区域 ========== */
.card-redeem-redeem-section {
    max-width: 800px;
    margin: 0 auto;
    display: none;
}

.card-redeem-redeem-section.active {
    display: block;
}

.card-redeem-redeem-card {
    background: var(--background-color);
    border-radius: 12px;
    padding: 40px;
    border: none;
    box-shadow: 0.2rem 0.2rem 0.4rem var(--greyLight-2), -0.1rem -0.1rem 0.3rem var(--white);
}

.card-redeem-redeem-header {
    text-align: center;
    margin-bottom: 35px;
    padding-bottom: 25px;
    border-bottom: 1px solid var(--greyLight-2);
}

.card-redeem-redeem-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--background-color);
    border-radius: 12px;
    font-size: 32px;
    overflow: hidden;
    box-shadow: 0.2rem 0.2rem 0.4rem var(--greyLight-2), -0.1rem -0.1rem 0.3rem var(--white);
    border: none;
}

.card-redeem-redeem-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

.card-redeem-redeem-icon:has(img) {
    background: transparent;
    padding: 0;
    box-shadow: none;
}

.card-redeem-redeem-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-li-color);
    margin-bottom: 8px;
}

.card-redeem-redeem-subtitle {
    font-size: 14px;
    color: var(--text-a-color);
}

/* ========== 卡密显示区域 ========== */
.card-redeem-card-display {
    margin-bottom: 30px;
    padding: 20px;
    background: var(--background-color);
    border-radius: 12px;
    border: none;
    text-align: center;
    display: none;
    box-shadow: inset 0.2rem 0.2rem 0.4rem var(--greyLight-2), inset -0.1rem -0.1rem 0.3rem var(--white);
}

.card-redeem-card-display.show {
    display: block;
}

.card-redeem-card-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.card-redeem-card-value {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-li-color);
    font-family: 'Courier New', monospace;
    letter-spacing: 2px;
    word-break: break-all;
    padding: 12px;
    background: var(--background-color);
    border-radius: 12px;
    border: none;
    margin-bottom: 12px;
    box-shadow: 0.2rem 0.2rem 0.4rem var(--greyLight-2), -0.1rem -0.1rem 0.3rem var(--white);
}

.card-redeem-card-copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--background-color);
    color: var(--text-li-color);
    border: none;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0.2rem 0.2rem 0.4rem var(--greyLight-2), -0.1rem -0.1rem 0.3rem var(--white);
}

.card-redeem-card-copy-btn:hover {
    box-shadow: inset 0.2rem 0.2rem 0.4rem var(--greyLight-2), inset -0.1rem -0.1rem 0.3rem var(--white);
    color: var(--primary);
}

.card-redeem-card-copy-btn.copied {
    color: #10b981;
}

/* ========== 提交按钮 ========== */
.card-redeem-submit-btn {
    width: 100%;
    padding: 14px 24px;
    background: var(--background-color) !important;
    color: var(--text-li-color) !important;
    border: none !important;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 10px;
    box-shadow: 0.2rem 0.2rem 0.4rem var(--greyLight-2), -0.1rem -0.1rem 0.3rem var(--white) !important;
}

.card-redeem-submit-btn:hover {
    box-shadow: inset 0.2rem 0.2rem 0.4rem var(--greyLight-2), inset -0.1rem -0.1rem 0.3rem var(--white);
    color: var(--primary);
}

.card-redeem-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: var(--background-color) !important;
    box-shadow: 0.2rem 0.2rem 0.4rem var(--greyLight-2), -0.1rem -0.1rem 0.3rem var(--white) !important;
    color: var(--text-li-color) !important;
}

/* ========== 结果显示区域 ========== */
.card-redeem-result {
    margin-top: 20px;
    padding: 20px;
    border-radius: 12px;
    display: none;
    background: var(--background-color);
    box-shadow: 0.2rem 0.2rem 0.4rem var(--greyLight-2), -0.1rem -0.1rem 0.3rem var(--white);
    border: none;
}

.card-redeem-result.show {
    display: block;
}

.card-redeem-result.success {
    background: var(--background-color);
    box-shadow: 0.2rem 0.2rem 0.4rem var(--greyLight-2), -0.1rem -0.1rem 0.3rem var(--white);
    border: none;
    color: #2e7d32;
}

.card-redeem-result.success .card-redeem-result-header,
.card-redeem-result.success .card-redeem-result-content {
    color: #2e7d32;
}

.card-redeem-result.error {
    color: #c62828;
}

.card-redeem-result.info {
    color: var(--primary);
}

.card-redeem-result-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    font-size: 16px;
    font-weight: 600;
}

.card-redeem-result-content {
    font-size: 14px;
    line-height: 1.6;
}

.card-redeem-result-data {
    margin-top: 12px;
    padding: 12px;
    background: var(--background-color);
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    box-shadow: inset 0.1rem 0.1rem 0.2rem var(--greyLight-2), inset -0.05rem -0.05rem 0.15rem var(--white);
    border: none;
}

.card-redeem-back-btn {
    margin-top: 30px;
    margin-bottom: 20px;
    padding: 10px 20px;
    background: var(--background-color);
    color: var(--text-li-color);
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0.2rem 0.2rem 0.4rem var(--greyLight-2), -0.1rem -0.1rem 0.3rem var(--white);
}

.card-redeem-back-btn:hover {
    box-shadow: inset 0.2rem 0.2rem 0.4rem var(--greyLight-2), inset -0.1rem -0.1rem 0.3rem var(--white);
    color: var(--primary);
}

/* ========== 响应式设计 ========== */
@media (max-width: 1024px) {
    .card-redeem-container {
        padding: 40px 30px;
    }
    
    .card-redeem-tools-grid {
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .card-redeem-container {
        padding: 30px 20px;
    }
    
    .card-redeem-header {
        margin-bottom: 35px;
    }
    
    .card-redeem-title {
        font-size: 28px;
        margin-bottom: 10px;
    }
    
    .card-redeem-description {
        font-size: 14px;
        line-height: 1.6;
    }
    
    .card-redeem-tools-title {
        font-size: 18px;
        margin-bottom: 20px;
    }
    
    .card-redeem-tools-grid {
        gap: 18px;
    }
    
    .card-redeem-tool-card {
        padding: 25px 20px;
        width: 100%;
        max-width: 280px;
    }
    
    .card-redeem-tool-icon {
        width: 60px;
        height: 60px;
        font-size: 30px;
        margin-bottom: 15px;
    }
    
    .card-redeem-tool-name {
        font-size: 16px;
        margin-bottom: 10px;
    }
    
    .card-redeem-tool-description {
        font-size: 13px;
    }
    
    .card-redeem-empty-state {
        padding: 60px 20px;
    }
    
    .card-redeem-empty-icon {
        font-size: 48px;
    }
    
    .card-redeem-empty-text {
        font-size: 14px;
    }
    
    .card-redeem-redeem-card {
        padding: 30px 20px;
    }
    
    .card-redeem-redeem-icon {
        width: 50px;
        height: 50px;
        font-size: 28px;
    }
    
    .card-redeem-redeem-title {
        font-size: 20px;
    }
    
    .card-redeem-submit-btn {
        font-size: 14px;
        padding: 12px 20px;
    }
    
    .card-redeem-card-display {
        padding: 15px;
    }
    
    .card-redeem-card-value {
        font-size: 16px;
        padding: 10px;
    }
}

