/* 认证表单样式 */

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

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

/* 禁用文件上传 label 的点击行为 */
.form-group:has(.file-upload) label {
    pointer-events: none;
}

/* 输入框样式 */
.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #4a5568;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
    background: #2d3748;
    color: #e2e8f0;
}

.form-group input:focus {
    outline: none;
    border-color: #14b8a6;
    background: #1a202c;
}

.form-group input::placeholder {
    color: #718096;
}

/* 密码输入框容器 */
.password-input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-container input {
    width: 100%;
    padding-right: 45px; /* 为眼睛图标留出空间 */
}

/* 密码切换按钮 */
.password-toggle-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #a0aec0;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    z-index: 10;
}

.password-toggle-btn:hover {
    color: #14b8a6;
    background: rgba(20, 184, 166, 0.1);
}

.password-toggle-btn:active {
    color: #0d9488;
    background: rgba(20, 184, 166, 0.2);
}

.password-toggle-btn i {
    font-size: 14px;
}

/* 下拉框样式 - 与输入框保持一致 */
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #4a5568;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
    background: #2d3748;
    color: #e2e8f0;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-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='%23a0aec0' 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 12px center;
    background-size: 16px;
    padding-right: 40px;
}

.form-group select:focus {
    outline: none;
    border-color: #14b8a6;
    background: #1a202c;
    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='%23a0aec0' 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 12px center;
    background-size: 16px;
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.1);
}

.form-group select:hover {
    border-color: #14b8a6;
    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='%23a0aec0' 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 12px center;
    background-size: 16px;
}

.form-group select:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background-color: #1a202c;
    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='%23a0aec0' 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 12px center;
    background-size: 16px;
}

/* 下拉框选项样式 */
.form-group select option {
    background: #2d3748;
    color: #e2e8f0;
    padding: 8px 12px;
}

.form-group select option:hover {
    background: #14b8a6;
    color: white;
}

.form-group select option:checked {
    background: #14b8a6;
    color: white;
}

/* 文本域样式 */
textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #4a5568;
    border-radius: 8px;
    background: #2d3748;
    color: #e2e8f0;
    font-size: 16px;
    font-family: inherit;
    resize: vertical;
    min-height: 100px;
}

textarea:focus {
    outline: none;
    border-color: #14b8a6;
    background: #1a202c;
}

textarea::placeholder {
    color: #718096;
}

/* 手机号输入容器 */
.phone-input-container {
    display: flex;
    gap: 8px;
}

/* 国家代码选择框特殊样式 */
.country-code-select {
    width: auto !important;
    min-width: 80px;
    flex-shrink: 0;
    padding: 12px 8px !important;
    padding-right: 30px !important;
    font-size: 14px;
    text-align: center;
}

.phone-input-container input {
    flex: 1;
}

/* 标签包装器 */
.label-wrapper {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.label-wrapper label {
    margin-bottom: 0;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* 帮助图标 */
.help-icon {
    color: #a0aec0;
    cursor: help;
    font-size: 12px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgba(160, 174, 192, 0.15);
    position: relative;
    flex-shrink: 0;
    margin-left: 2px;
}

.help-icon::before {
    content: '\f059';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
}

.help-icon:hover {
    color: #14b8a6;
    background: rgba(20, 184, 166, 0.2);
    transform: scale(1.1);
}

/* 工具提示 */
.tooltip {
    position: absolute;
    top: -35px;
    left: 50%;
    transform: translateX(-50%);
    background: #1a202c;
    color: #e2e8f0;
    padding: 6px 8px;
    border-radius: 6px;
    font-size: 11px;
    white-space: nowrap;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    border: 1px solid #4a5568;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    pointer-events: none;
    max-width: 200px;
    word-wrap: break-word;
}

/* 确保tooltip不会超出容器边界 */
.help-icon {
    position: relative;
}

.help-icon .tooltip {
    left: 0;
    transform: none;
}

/* 如果tooltip会超出右边界，则向左对齐 */
.help-icon .tooltip.right-overflow {
    left: auto;
    right: 0;
}

.tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #1a202c;
}

.help-icon:hover .tooltip {
    opacity: 1;
    visibility: visible;
}

/* 手机号选项容器 */
.phone-option-container {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    background: #2d3748;
    border-radius: 8px;
    border: 1px solid #4a5568;
}

.phone-option-title {
    font-weight: 500;
    color: #e2e8f0;
    margin: 0;
}

.phone-option-buttons {
    display: flex;
    gap: 8px;
}

.phone-option-btn {
    padding: 6px 16px;
    border: 2px solid #4a5568;
    border-radius: 6px;
    background: #1a202c;
    color: #e2e8f0;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    min-width: 50px;
}

.phone-option-btn:hover {
    border-color: #14b8a6;
    color: #14b8a6;
}

.phone-option-btn.active {
    border-color: #14b8a6;
    background: #14b8a6;
    color: white;
}

.phone-fields {
    transition: all 0.3s ease;
}

.phone-fields.hidden {
    display: none;
}

.hidden {
    display: none !important;
}

/* 短信验证码容器 */
.sms-code-container {
    display: flex;
    gap: 10px;
}

.sms-code-container input {
    flex: 1;
}

/* 发送短信按钮 */
.send-sms-btn {
    padding: 12px 15px;
    background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.send-sms-btn:hover {
    background: linear-gradient(135deg, #0f766e 0%, #0d5a52 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(20, 184, 166, 0.3);
}

.send-sms-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* 表单选项 */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.remember-me {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: #a0aec0;
}

.remember-me input[type="checkbox"] {
    margin-right: 8px;
    width: auto;
}

/* 必填字段标记 */
.required {
    color: #e53e3e;
    font-weight: bold;
}

/* 消息样式 */
.message {
    margin-top: 15px;
    padding: 10px;
    border-radius: 5px;
    font-size: 14px;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}
