/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    background-color: #f7f9fc;
}

/* 容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 顶部导航栏 */
.header {
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    padding: 16px 0;
    margin-bottom: 32px;
}

.header h1 {
    font-size: 20px;
    font-weight: 600;
    color: #1890ff;
    text-align: center;
}

/* 主要功能区 */
.main {
    padding: 40px 0;
}

/* 卡片样式 */
.card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    padding: 32px;
    max-width: 800px;
    margin: 0 auto;
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}

.card h2 {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin-bottom: 24px;
    text-align: center;
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    margin-bottom: 8px;
}

.form-control {
    width: 100%;
    height: 40px;
    padding: 0 12px;
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #1890ff;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}

/* 输入组 */
.input-group {
    position: relative;
}

.clear-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 16px;
    color: #999;
    cursor: pointer;
    padding: 0 5px;
    transition: color 0.3s ease;
}

.clear-btn:hover {
    color: #666;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 0 24px;
    height: 40px;
    line-height: 40px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: #1890ff;
    color: #fff;
    width: 100%;
}

.btn-primary:hover {
    background-color: #40a9ff;
    box-shadow: 0 2px 8px rgba(24, 144, 255, 0.3);
}

/* 错误提示 */
.error-message {
    display: none;
    padding: 12px 16px;
    background-color: #fff1f0;
    color: #ff4d4f;
    border: 1px solid #ffccc7;
    border-radius: 4px;
    margin-top: 12px;
    margin-bottom: 16px;
    font-size: 14px;
}

/* 说明框 */
.info-box {
    background-color: #e6f7ff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 24px;
    border-left: 4px solid #1890ff;
}

.info-box ol {
    margin-left: 20px;
    color: #333;
}

.info-box li {
    margin-bottom: 12px;
    line-height: 1.6;
}

/* 底部信息 */
.footer {
    background-color: #fff;
    box-shadow: 0 -1px 3px rgba(0,0,0,0.1);
    padding: 24px 0;
    margin-top: 48px;
}

.footer p {
    text-align: center;
    font-size: 13px;
    color: #999;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .card {
        max-width: 100%;
        padding: 20px;
    }
    
    .header {
        padding: 12px 0;
        margin-bottom: 20px;
    }
    
    .header h1 {
        font-size: 18px;
    }
    
    .main {
        padding: 20px 0;
    }
    
    .footer {
        margin-top: 32px;
        padding: 16px 0;
    }
    
    .code-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-secondary {
        width: 100%;
        max-width: 200px;
    }
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #1890ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 表单动画 */
.form-control {
    transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
}

.btn {
    transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
}

/* 卡片动画 */
.card {
    transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
}

/* 获取兑换码方框 */
.code-source-box {
    background-color: #e6f7ff;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #91d5ff;
}

.code-source-box p {
    font-size: 14px;
    font-weight: 500;
    color: #1890ff;
    margin-bottom: 16px;
    text-align: center;
}

.code-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.platform-icon {
    width: 16px;
    height: 16px;
    margin-right: 8px;
    vertical-align: middle;
}

.btn-secondary {
    background-color: #f0f0f0;
    color: #333;
    border: 1px solid #d9d9d9;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    white-space: nowrap;
}

.btn-secondary:hover {
    background-color: #e6e6e6;
    border-color: #1890ff;
    color: #1890ff;
    text-decoration: none;
}