/* 认证页面样式 Authentication Page Styles */
.auth-container {
    min-height: calc(100vh - 200px);
    padding: 60px 0;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.auth-form-container {
    max-width: 600px;
    margin: 0 auto;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    position: relative;
}

.auth-form-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.auth-header {
    text-align: center;
    padding: 40px 40px 30px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--light-text);
}

.auth-header h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    font-weight: 700;
}

.auth-header p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 5px;
}

.auth-form {
    padding: 40px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.95rem;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper i {
    position: absolute;
    left: 15px;
    color: #999;
    font-size: 1.1rem;
    z-index: 2;
}

.input-wrapper input {
    width: 100%;
    padding: 15px 15px 15px 45px;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.input-wrapper input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(78, 84, 200, 0.1);
}

.input-wrapper input.error {
    border-color: #dc3545;
    background: #fff5f5;
}

.input-wrapper input.error:focus {
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.password-toggle {
    position: absolute;
    right: 15px;
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0;
    z-index: 2;
    transition: color 0.3s ease;
}

.password-toggle:hover {
    color: var(--primary-color);
}

.error-message {
    color: #dc3545;
    font-size: 0.85rem;
    margin-top: 8px;
    display: none;
}

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

/* 密码强度指示器 Password Strength Indicator */
.password-strength {
    margin-top: 15px;
}

.strength-bar {
    width: 100%;
    height: 6px;
    background: #e1e5e9;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}

.strength-fill {
    height: 100%;
    width: 0%;
    transition: all 0.3s ease;
    border-radius: 3px;
}

.strength-fill.weak {
    width: 33.33%;
    background: #dc3545;
}

.strength-fill.medium {
    width: 66.66%;
    background: #ffc107;
}

.strength-fill.strong {
    width: 100%;
    background: #28a745;
}

.strength-text {
    font-size: 0.85rem;
    color: #666;
}

/* 兴趣选择网格 Interest Selection Grid */
.interests-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

/* 语言能力输入 Language Proficiency Input */
.languages-container {
    margin-top: 15px;
}

.language-input {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    align-items: center;
}

.language-select,
.level-select {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 0.9rem;
    background: #f8f9fa;
    transition: all 0.3s ease;
}

.language-select:focus,
.level-select:focus {
    outline: none;
    border-color: var(--primary-color);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(78, 84, 200, 0.1);
}

/* 文本域样式 Textarea Styles */
.input-wrapper textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    min-height: 80px;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.input-wrapper textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(78, 84, 200, 0.1);
}

/* 下拉选择框样式 Select Styles */
.input-wrapper select {
    width: 100%;
    padding: 15px 15px 15px 45px;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
    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 15px center;
    background-size: 16px;
    padding-right: 45px;
}

.input-wrapper select:focus {
    outline: none;
    border-color: var(--primary-color);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(78, 84, 200, 0.1);
}

/* 电话号码输入框 Phone Number Input */
.input-wrapper input[type="tel"] {
    padding-left: 45px;
}

.interest-item {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.interest-item:hover {
    border-color: var(--primary-color);
    background: #fff;
}

.interest-item input[type="checkbox"] {
    display: none;
}

.interest-checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-radius: 4px;
    margin-right: 12px;
    position: relative;
    transition: all 0.3s ease;
    background: #fff;
}

.interest-item input[type="checkbox"]:checked + .interest-checkbox {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.interest-item input[type="checkbox"]:checked + .interest-checkbox::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 12px;
    font-weight: bold;
}

.interest-text {
    font-size: 0.9rem;
    color: var(--text-color);
    font-weight: 500;
}

/* 表单选项 Form Options */
.form-options {
    margin: 30px 0;
}

.checkbox-wrapper {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
    cursor: pointer;
    font-size: 0.9rem;
    line-height: 1.5;
}

.checkbox-wrapper input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-radius: 4px;
    margin-right: 12px;
    margin-top: 2px;
    position: relative;
    transition: all 0.3s ease;
    background: #fff;
    flex-shrink: 0;
}

.checkbox-wrapper input[type="checkbox"]:checked + .checkmark {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.checkbox-wrapper input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 12px;
    font-weight: bold;
}

.checkbox-wrapper a {
    color: var(--primary-color);
    text-decoration: underline;
}

.checkbox-wrapper a:hover {
    color: var(--secondary-color);
}

.forgot-password {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9rem;
    margin-left: auto;
}

.forgot-password:hover {
    text-decoration: underline;
}

/* 按钮样式 Button Styles */
.btn-full {
    width: 100%;
    padding: 16px 24px;
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 20px;
    position: relative;
    overflow: hidden;
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.btn-preview {
    flex: 1;
    padding: 16px 24px;
    font-size: 1rem;
    font-weight: 600;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-preview:hover {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.btn-text {
    transition: opacity 0.3s ease;
}

.btn:disabled .btn-text {
    opacity: 0;
}

/* 社交登录 Social Login */
.social-login {
    text-align: center;
    padding: 30px 40px;
    border-top: 1px solid #e1e5e9;
    background: #f8f9fa;
}

.social-login p {
    margin-bottom: 20px;
    color: #666;
    font-size: 0.95rem;
}

.social-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-social {
    flex: 1;
    min-width: 120px;
    padding: 12px 20px;
    border: 2px solid #e1e5e9;
    background: #fff;
    color: var(--text-color);
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-social:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.btn-google:hover {
    border-color: #db4437;
    color: #db4437;
}

.btn-facebook:hover {
    border-color: #4267B2;
    color: #4267B2;
}

.btn-wechat:hover {
    border-color: #07C160;
    color: #07C160;
}

.btn-social i {
    margin-right: 8px;
}

/* 认证页脚 Auth Footer */
.auth-footer {
    text-align: center;
    padding: 20px 40px;
    background: #f8f9fa;
    border-top: 1px solid #e1e5e9;
}

.auth-footer p {
    margin: 0;
    color: #666;
    font-size: 0.95rem;
}

.auth-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* 响应式设计 Responsive Design */
@media (max-width: 768px) {
    .auth-container {
        padding: 40px 0;
    }
    
    .auth-form-container {
        margin: 0 20px;
        border-radius: 15px;
    }
    
    .auth-header {
        padding: 30px 30px 20px;
    }
    
    .auth-header h1 {
        font-size: 2rem;
    }
    
    .auth-form {
        padding: 30px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .interests-grid {
        grid-template-columns: 1fr;
    }
    
    .language-input {
        flex-direction: column;
        gap: 10px;
    }
    
    .language-select,
    .level-select {
        width: 100%;
    }
    
    .social-buttons {
        flex-direction: column;
    }
    
    .btn-social {
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .auth-form-container {
        margin: 0 15px;
    }
    
    .auth-header {
        padding: 25px 25px 15px;
    }
    
    .auth-form {
        padding: 25px;
    }
    
    .auth-header h1 {
        font-size: 1.8rem;
    }
}

/* 动画效果 Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 模态框样式 Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.show {
    opacity: 1;
}

.modal {
    background: white;
    border-radius: 15px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal-overlay.show .modal {
    transform: scale(1);
}

.modal-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.3rem;
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.modal-body {
    padding: 20px;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid #e1e5e9;
    text-align: right;
}

/* 预览内容样式 Preview Content Styles */
.preview-content {
    font-size: 0.95rem;
}

.preview-section {
    margin-bottom: 25px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid var(--primary-color);
}

.preview-section h4 {
    margin: 0 0 15px 0;
    color: var(--primary-color);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.preview-row {
    display: flex;
    margin-bottom: 10px;
    align-items: flex-start;
}

.preview-label {
    font-weight: 600;
    color: #666;
    min-width: 120px;
    flex-shrink: 0;
}

.preview-value {
    color: var(--text-color);
    flex: 1;
}

.preview-interests {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.interest-tag {
    background: var(--primary-color);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.no-interests {
    color: #999;
    font-style: italic;
}

.auth-form-container {
    animation: fadeInUp 0.6s ease-out;
}

.form-group {
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.form-group:nth-child(1) { animation-delay: 0.1s; }
.form-group:nth-child(2) { animation-delay: 0.2s; }
.form-group:nth-child(3) { animation-delay: 0.3s; }
.form-group:nth-child(4) { animation-delay: 0.4s; }
.form-group:nth-child(5) { animation-delay: 0.5s; }
.form-group:nth-child(6) { animation-delay: 0.6s; }
.form-group:nth-child(7) { animation-delay: 0.7s; }
.form-group:nth-child(8) { animation-delay: 0.8s; }

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

.loading .btn-text {
    opacity: 0;
}

.loading .btn-loading {
    display: block !important;
}

/* 成功状态 Success States */
.success {
    border-color: #28a745 !important;
    background: #fff !important;
}

.success:focus {
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1) !important;
}

/* 错误状态 Error States */
.error {
    border-color: #dc3545 !important;
    background: #fff5f5 !important;
}

.error:focus {
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1) !important;
}