/**
 * 注册页面样式 - 现代化设计
 * 应用首页的设计规范：渐变背景、悬停效果、流动装饰条
 */

/* ========== 注册关闭页面样式 ========== */
.register-closed-container {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.register-closed-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    padding: 40px;
    width: 100%;
    max-width: 450px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* 顶部流动渐变装饰条 */
.register-closed-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #faad14 0%, #ff7875 50%, #b37feb 100%);
    background-size: 200% 100%;
    animation: gradientFlow 3s ease infinite;
}

.register-closed-icon {
    font-size: 64px;
    color: #faad14;
    margin-bottom: 20px;
    text-shadow: 0 4px 12px rgba(250, 173, 20, 0.3);
}

.register-closed-title {
    color: #333;
    margin-bottom: 15px;
    font-size: 24px;
    font-weight: 600;
}

.register-closed-message {
    color: #666;
    margin-bottom: 30px;
    line-height: 1.6;
}

/* ========== 注册主容器样式 ========== */
.login-container {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

/* ========== 注册卡片样式 ========== */
.login-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    padding: 40px;
    width: 100%;
    max-width: 500px;
    margin: 20px auto;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

/* 顶部流动渐变装饰条 */
.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #1890ff 0%, #52c41a 50%, #faad14 100%);
    background-size: 200% 100%;
    animation: gradientFlow 3s ease infinite;
}

@keyframes gradientFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ========== 卡片头部 ========== */
.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    color: #333;
    margin-bottom: 10px;
    font-size: 28px;
    font-weight: 600;
    background: linear-gradient(135deg, #1890ff 0%, #52c41a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-header h1 i {
    background: linear-gradient(135deg, #1890ff 0%, #52c41a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-right: 8px;
}

.login-header p {
    color: #666;
    margin: 0;
    font-size: 14px;
}

/* ========== 表单组样式 ========== */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
    font-size: 14px;
}

/* ========== 输入框组样式 ========== */
.input-group {
    position: relative;
}

.input-group i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    transition: color 0.3s ease;
    z-index: 1;
}

.input-group input {
    padding-left: 40px;
}

.input-group input:focus + i,
.input-group:focus-within i {
    color: #1890ff;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-control:focus {
    outline: none;
    border-color: #1890ff;
    box-shadow: 0 0 0 3px rgba(24, 144, 255, 0.1);
}

/* ========== 提示消息样式 ========== */
.invite-notice {
    background: linear-gradient(135deg, #1890ff 0%, #52c41a 100%);
    color: white;
    padding: 12px 15px;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 20px;
    font-size: 13px;
    box-shadow: 0 4px 12px rgba(24, 144, 255, 0.2);
}

.invite-notice i {
    margin-right: 6px;
}

/* 注册礼物提示 */
.register-gift-notice {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%) !important;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.2);
}

.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 6px;
    text-align: center;
    border: 1px solid transparent;
}

.alert i {
    margin-right: 6px;
}

.alert-action {
    margin-top: 10px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}

/* ========== 验证码和发送按钮 ========== */
.code-group {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.code-input {
    flex: 1;
    min-width: 0;
}

.code-input .input-group {
    height: 100%;
}

.code-input .form-control {
    height: 100%;
}

/* 发送验证码按钮 - 使用更高优先级选择器 */
.code-group .send-btn.btn {
    width: auto !important;
    height: auto !important;
    min-width: auto !important;
    min-height: auto !important;
    max-width: none !important;
    max-height: none !important;
    aspect-ratio: 1 / 1;
    border-radius: 6px;
    background: transparent !important;
    border: 2px solid #f0f0f0 !important;
    color: #8c8c8c !important;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    padding: 12px !important;
    flex-shrink: 0;
    align-self: stretch;
    margin: 0 !important;
    box-shadow: none !important;
    font-weight: normal !important;
}

.code-group .send-btn.btn:hover {
    background: #1890ff !important;
    border-color: #1890ff !important;
    color: white !important;
    transform: scale(1.1) !important;
    box-shadow: none !important;
}

.code-group .send-btn.btn:active {
    transform: scale(0.95) !important;
}

.code-group .send-btn.btn:disabled {
    background: transparent !important;
    border-color: #d9d9d9 !important;
    color: #bfbfbf !important;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.code-group .send-btn.btn i {
    margin: 0 !important;
}

.captcha-group {
    display: flex;
    gap: 12px;
    align-items: center;
}

.captcha-input {
    flex: 1;
}

.captcha-img {
    height: 46px;
    cursor: pointer;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.captcha-img::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s;
}

.captcha-img:hover {
    border-color: #40a9ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(24, 144, 255, 0.25);
}

.captcha-img:hover::before {
    left: 100%;
}

.captcha-img:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(24, 144, 255, 0.2);
}

/* ========== 提示文本 ========== */
.text-muted {
    color: #6c757d;
    font-size: 12px;
    margin-top: 5px;
}

/* ========== 按钮样式 ========== */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #1890ff 0%, #096dd9 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(24, 144, 255, 0.2);
    width: 100%;
    padding: 15px;
    font-size: 16px;
    font-weight: 600;
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #40a9ff 0%, #1890ff 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(24, 144, 255, 0.3);
    color: white;
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    background: #d9d9d9;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-primary i {
    margin-right: 6px;
}

.btn-outline-primary {
    background: white;
    color: #1890ff;
    border: 2px solid #1890ff;
}

.btn-outline-primary:hover {
    background: #1890ff;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(24, 144, 255, 0.2);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

/* ========== 底部链接 ========== */
.login-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.login-footer p {
    margin: 8px 0;
    color: #666;
    font-size: 14px;
}

.login-footer a {
    color: #1890ff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.login-footer a:hover {
    color: #40a9ff;
    text-decoration: underline;
}

/* ========== 字段验证提示 ========== */
.field-error {
    color: #dc3545;
    font-size: 12px;
    margin-top: 4px;
    display: flex;
    align-items: center;
}

.field-error::before {
    content: '⚠';
    margin-right: 4px;
}

.field-success {
    color: #28a745;
    font-size: 12px;
    margin-top: 4px;
    display: flex;
    align-items: center;
}

.field-success::before {
    content: '✓';
    margin-right: 4px;
}

/* ========== 邀请码奖励提示 ========== */
#invite_reward_info {
    margin-top: 5px;
    font-size: 12px;
    font-weight: 500;
}

#invite_reward_info i {
    margin-right: 4px;
}

/* 邀请码奖励颜色状态 */
.invite-reward-success {
    color: #28a745 !important;
}

.invite-reward-info {
    color: #6c757d !important;
}

.invite-reward-error {
    color: #dc3545 !important;
}

.invite-reward-warning {
    color: #ffc107 !important;
}

/* 注册条款 */
.register-terms {
    font-size: 11px;
    color: #999;
    margin-top: 8px;
}

/* ========== 响应式设计 ========== */
@media (max-width: 576px) {
    .login-card {
        padding: 30px 20px;
        margin: 10px;
    }
    
    .login-header h1 {
        font-size: 24px;
    }
    
    .code-group,
    .captcha-group {
        flex-direction: column;
    }
    
    .code-group .send-btn.btn {
        width: auto !important;
        height: auto !important;
        min-width: auto !important;
        max-width: none !important;
        padding: 12px !important;
        aspect-ratio: 1 / 1;
        flex-shrink: 0;
        align-self: stretch;
    }
    
    .captcha-img {
        width: 100%;
    }
    
    .captcha-img {
        height: 60px;
    }
}

/* ========== 加载动画 ========== */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.fa-spinner {
    animation: spin 1s linear infinite;
}

/* ========== 输入框边框颜色状态 ========== */
.form-control[style*="border-color: rgb(40, 167, 69)"],
.form-control[style*="border-color: #28a745"] {
    border-color: #28a745 !important;
}

.form-control[style*="border-color: rgb(220, 53, 69)"],
.form-control[style*="border-color: #dc3545"] {
    border-color: #dc3545 !important;
}

.form-control[style*="border-color: rgb(255, 193, 7)"],
.form-control[style*="border-color: #ffc107"] {
    border-color: #ffc107 !important;
}
