
/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
}

/* 主容器 */
.main-top-intro {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

/* 头部 */
header {
    text-align: center;
    margin-bottom: 30px;
}

.header-w3layouts h1 {
    color: #fff;
    font-size: 28px;
    font-weight: 300;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.navbar-brand.logo {
    display: inline-block;
}

/* 内容区域 */
.content-inner-info {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 40px 30px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.content-inner-info h2 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 24px;
    font-weight: 400;
    color: #333;
}

/* 表单样式 */
.content-w3layouts-main {
    width: 100%;
}

.form, #register_form, #login_form, #reset_form, #token_form {
    width: 100%;
}

/* 输入组 */
.input-group, .form-group {
    margin-bottom: 20px;
    position: relative;
}

/* 输入框样式 */
input[type="text"], 
input[type="email"], 
input[type="password"], 
.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: #fff;
}

input[type="text"]:focus, 
input[type="email"]:focus, 
input[type="password"]:focus,
.form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* 选择框样式 */
select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 14px;
    background: #fff;
    cursor: pointer;
}

/* 邮箱输入框与后缀选择器组合 */
.email-with-postfix {
    position: relative;
}

.email-with-postfix input {
    padding-right: 120px; /* 为选择框留出空间 */
}

.email-postfix-select {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    width: auto;
    min-width: 100px;
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    background: #f8f9fa;
    font-size: 12px;
    color: #666;
    cursor: pointer;
    border-left: 1px solid #e1e5e9;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 12px;
    padding-right: 28px;
}

.email-postfix-select:focus {
    outline: none;
    background: #e9ecef;
    box-shadow: none;
}

/* 并排输入框 */
.input-group input[type="password"] + input[type="password"] {
    margin-top: 10px;
}

/* 按钮样式 */
button, .btn {
    width: 100%;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

/* 主要按钮 */
#login_submit, 
#register_submit, 
#reset_submit, 
#token_submit {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    margin-bottom: 10px;
}

#login_submit:hover, 
#register_submit:hover, 
#reset_submit:hover, 
#token_submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

#login_submit:disabled, 
#register_submit:disabled, 
#reset_submit:disabled, 
#token_submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* 次要按钮 */
#register_button, 
#login_button {
    background: transparent;
    color: #667eea;
    border: 2px solid #667eea;
    margin-bottom: 0;
}

#register_button:hover, 
#login_button:hover {
    background: #667eea;
    color: #fff;
}

/* 发送验证码按钮 */
#send_email {
    width: auto;
    padding: 8px 16px;
    font-size: 12px;
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: #667eea;
    color: #fff;
    border-radius: 6px;
}

#send_email:hover {
    background: #5a6fd8;
}

/* 验证码输入框调整 */
.input-group:has(#send_email) input {
    padding-right: 100px;
}

/* 复选框样式 */
.checkbox {
    margin: 20px 0;
    text-align: center;
}

.checkbox label {
    font-size: 13px;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.checkbox input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.checkbox a {
    color: #667eea;
    text-decoration: none;
}

.checkbox a:hover {
    text-decoration: underline;
}

/* 底部按钮区域 */
.bottom {
    margin-top: 30px;
}

.bottom button + button {
    margin-top: 10px;
}

/* 链接区域 */
.mt-10 {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e1e5e9;
    font-size: 14px;
    color: #666;
}

.mt-10 a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.mt-10 a:hover {
    text-decoration: underline;
}

/* 验证码容器 */
.form-group .embed-captcha,
.form-group .g-recaptcha,
.form-group .cf-turnstile {
    margin: 20px 0;
    text-align: center;
}

/* 响应式设计 */
@media (max-width: 480px) {
    .main-top-intro {
        padding: 15px;
    }
    
    .content-inner-info {
        padding: 30px 20px;
    }
    
    .header-w3layouts h1 {
        font-size: 24px;
    }
    
    .content-inner-info h2 {
        font-size: 20px;
    }
    
    .email-with-postfix input {
        padding-right: 100px;
    }
    
    .email-postfix-select {
        min-width: 80px;
        font-size: 11px;
        padding: 6px 8px;
        padding-right: 24px;
    }
}

/* 加载状态 */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* 错误状态 */
.error {
    border-color: #e74c3c !important;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1) !important;
}

/* 成功状态 */
.success {
    border-color: #27ae60 !important;
    box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.1) !important;
}

/* 隐藏元素 */
[style*="display: none"] {
    display: none !important;
}