/* 现代化认证页面样式 */
html, body {
    height: 100%;
    overflow: hidden;
    margin: 0;
    padding: 0;
}

.auth-container {
    height: 100vh;
    width: 100vw;
    background: linear-gradient(135deg, #0a0a0f 0%, #1a1a2e 50%, #16213e 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: fixed;
    top: 0;
    left: 0;
    box-sizing: border-box;
}

/* 背景装饰 */
.auth-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(102, 126, 234, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(74, 172, 254, 0.1) 0%, transparent 50%);
    z-index: 1;
}

.auth-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 2rem;
    width: 100%;
    max-width: 400px;
    max-height: 90vh;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 2;
    box-sizing: border-box;
    overflow: hidden;
}

.auth-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.auth-header h2 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.auth-header p {
    color: #666;
    font-size: 1rem;
    font-weight: 400;
}

/* OAuth 部分样式 */
.oauth-section {
    margin-bottom: 1.2rem;
}

.btn-google {
    width: 100%;
    background: #ffffff;
    color: #3c4043;
    border: 1px solid #dadce0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 12px 18px;
    border-radius: 12px;
    font-size: 0.95rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    box-sizing: border-box;
}

.btn-google::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;
}

.btn-google:hover::before {
    left: 100%;
}

.btn-google:hover {
    background: #f8f9fa;
    border-color: #c6c6c6;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
    color: #202124;
}

.btn-google:active {
    background: #f1f3f4;
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-google svg {
    margin-right: 12px;
    flex-shrink: 0;
}

/* 分隔线样式 */
.divider {
    position: relative;
    text-align: center;
    margin: 1.2rem 0;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #e9ecef, transparent);
}

.divider span {
    background: #ffffff;
    padding: 0 1.5rem;
    color: #666;
    font-size: 0.9rem;
    font-weight: 500;
    position: relative;
    z-index: 1;
}

/* 表单样式 */
.auth-form {
    margin-bottom: 1.2rem;
}

.form-group {
    margin-bottom: 1.2rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.75rem;
    color: #333;
    font-weight: 600;
    font-size: 0.9rem;
}

.form-group input {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

.form-group input:hover {
    border-color: #c6c6c6;
}

/* 按钮样式 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    border: none;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
}

.btn-full {
    width: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-primary:hover::before {
    left: 100%;
}

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

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

/* 消息样式 */
.error-message {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    color: white;
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 1rem;
    text-align: center;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
    white-space: nowrap;
}

.success-message {
    background: linear-gradient(135deg, #51cf66 0%, #40c057 100%);
    color: white;
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 1rem;
    text-align: center;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(81, 207, 102, 0.3);
}

/* 页脚样式 */
.auth-footer {
    text-align: center;
    color: #666;
    margin-top: 1rem;
}

.auth-footer a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.auth-footer a:hover {
    color: #764ba2;
    text-decoration: underline;
}

.auth-footer p {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

/* 响应式设计 */
@media (max-width: 480px) {
    .auth-container {
        padding: 10px;
    }
    
    .auth-card {
        padding: 1.5rem 1.2rem;
        border-radius: 16px;
        max-height: 95vh;
    }
    
    .auth-header {
        margin-bottom: 1rem;
    }
    
    .auth-header h2 {
        font-size: 1.6rem;
        margin-bottom: 0.3rem;
    }
    
    .auth-header p {
        font-size: 0.9rem;
    }
    
    .oauth-section {
        margin-bottom: 1rem;
    }
    
    .divider {
        margin: 1rem 0;
    }
    
    .form-group {
        margin-bottom: 1rem;
    }
    
    .form-group label {
        margin-bottom: 0.5rem;
        font-size: 0.85rem;
    }
    
    .btn-google,
    .btn-primary {
        padding: 10px 16px;
        font-size: 0.9rem;
    }
    
    .form-group input {
        padding: 10px 12px;
        font-size: 0.9rem;
    }
    
    .auth-footer {
        margin-top: 0.8rem;
    }
    
    .auth-footer p {
        margin-bottom: 0.3rem;
        font-size: 0.85rem;
    }
}

@media (max-height: 600px) {
    .auth-card {
        padding: 1.2rem;
        max-height: 95vh;
    }
    
    .auth-header {
        margin-bottom: 0.8rem;
    }
    
    .auth-header h2 {
        font-size: 1.5rem;
        margin-bottom: 0.2rem;
    }
    
    .oauth-section {
        margin-bottom: 0.8rem;
    }
    
    .divider {
        margin: 0.8rem 0;
    }
    
    .form-group {
        margin-bottom: 0.8rem;
    }
    
    .form-group label {
        margin-bottom: 0.4rem;
        font-size: 0.8rem;
    }
    
    .form-group input,
    .btn-google,
    .btn-primary {
        padding: 8px 12px;
        font-size: 0.85rem;
    }
    
    .auth-footer {
        margin-top: 0.6rem;
    }
    
    .auth-footer p {
        margin-bottom: 0.2rem;
        font-size: 0.8rem;
    }
}

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

.auth-card {
    animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 输入框聚焦动画 */
.form-group {
    position: relative;
}

.form-group input:focus + .focus-border {
    transform: scaleX(1);
}

.focus-border {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

/* 复选框样式 */
.checkbox-label {
    display: flex !important;
    align-items: center;
    cursor: pointer;
    font-weight: 500 !important;
    font-size: 0.9rem !important;
    color: #555 !important;
    margin-bottom: 0 !important;
    user-select: none;
}

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

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    margin-right: 12px;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #ffffff;
    flex-shrink: 0;
}

.checkbox-label:hover .checkmark {
    border-color: #667eea;
    transform: scale(1.05);
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: #667eea;
    border-color: #667eea;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-label:active .checkmark {
    transform: scale(0.95);
}

/* 记住我复选框特殊样式 */
.form-group .checkbox-label {
    margin-top: 0.5rem;
    padding: 0.5rem 0;
}