/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

/* 容器 */
.container {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    padding: 40px;
    width: 100%;
    max-width: 500px;
}

.container h1 {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
    font-size: 24px;
}

/* 表单组 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
}

.form-group label .required {
    color: #e74c3c;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

/* 复选框 */
.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.checkbox-group label {
    color: #666;
    font-size: 14px;
    cursor: pointer;
}

/* 按钮 */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    width: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
}

.btn-secondary:hover {
    background: #e8e8e8;
}

/* 提示文字 */
.tips {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 13px;
    color: #666;
    line-height: 1.6;
}

.tips ol {
    margin-left: 20px;
}

/* 错误提示 */
.error-msg {
    color: #e74c3c;
    font-size: 14px;
    margin-top: 5px;
    display: none;
}

.error-msg.show {
    display: block;
}

/* 成功提示 */
.success-msg {
    color: #27ae60;
    font-size: 14px;
    margin-top: 5px;
}

/* Toast提示 */
.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 24px;
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s;
}

.toast.show {
    opacity: 1;
}

.toast.error {
    background: #e74c3c;
}

.toast.success {
    background: #27ae60;
}

/* SN列表 */
.sn-list {
    margin-bottom: 20px;
}

.sn-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 12px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
}

.sn-item .number {
    font-weight: bold;
    color: #666;
    min-width: 24px;
}

.sn-item input {
    flex: 1;
    padding: 10px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
}

.sn-item input:focus {
    outline: none;
    border-color: #667eea;
}

.sn-item .model {
    min-width: 150px;
    font-size: 14px;
}

.sn-item .model.found {
    color: #27ae60;
    font-weight: 500;
}

.sn-item .model.not-found {
    color: #e74c3c;
    font-weight: 500;
}

.sn-item .remove-btn {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 18px;
    padding: 5px;
}

.sn-item .remove-btn:hover {
    color: #e74c3c;
}

/* 添加按钮 */
.add-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 16px;
    background: #f0f0f0;
    border: 2px dashed #ccc;
    border-radius: 6px;
    color: #666;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.add-btn:hover {
    border-color: #667eea;
    color: #667eea;
}

/* 完成页面 */
.result-box {
    text-align: center;
    padding: 30px 0;
}

.result-box .icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.result-box h2 {
    color: #333;
    margin-bottom: 15px;
}

.result-box p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 10px;
}

.result-box .email {
    color: #667eea;
    font-weight: 500;
}

/* Loading */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #fff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 响应式 */
@media (max-width: 480px) {
    .container {
        padding: 25px;
    }

    .sn-item {
        flex-wrap: wrap;
    }

    .sn-item .model {
        width: 100%;
        margin-top: 5px;
    }
}
