/* 认证页面样式 - 橙色毛玻璃 */
:root {
    --primary: #ff6b35;
    --primary-light: #ff8c61;
    --bg-glass: rgba(255, 255, 255, 0.85);
    --bg-glass-hover: rgba(255, 255, 255, 0.95);
    --text-primary: #2d3436;
    --text-secondary: #636e72;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #fff5f2 0%, #ffe8e0 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-container {
    width: 100%;
    max-width: 420px;
    padding: 2rem;
}

.auth-box {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 0 20px 60px rgba(255, 107, 53, 0.15);
}

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

.auth-header h1 {
    color: var(--primary);
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.auth-header p {
    color: var(--text-secondary);
}

.auth-form .form-group {
    margin-bottom: 1.5rem;
}

.auth-form label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.9rem;
}

.auth-form input {
    width: 100%;
    padding: 0.9rem 1rem;
    border: 2px solid rgba(255, 107, 53, 0.2);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    transition: all 0.3s;
}

.auth-form input:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(255, 107, 53, 0.1);
}

.btn {
    display: inline-block;
    padding: 0.9rem 1.5rem;
    border-radius: 12px;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #ff6b35 0%, #ff9f43 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
}

.btn-block {
    width: 100%;
}

.alert {
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.alert-error {
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
    border: 1px solid rgba(231, 76, 60, 0.2);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.form-options a {
    color: var(--primary);
    text-decoration: none;
}

.oauth-section {
    margin-top: 2rem;
    text-align: center;
}

.divider {
    position: relative;
    margin: 1.5rem 0;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.divider::before,
.divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 30%;
    height: 1px;
    background: rgba(0,0,0,0.1);
}

.divider::before { left: 0; }
.divider::after { right: 0; }

.oauth-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1rem;
}

.oauth-btn {
    flex: 1;
    padding: 0.8rem;
    border-radius: 10px;
    text-decoration: none;
    color: white;
    font-weight: 500;
    transition: transform 0.2s;
}

.oauth-btn:hover {
    transform: translateY(-2px);
}

.oauth-btn.qq { background: #12B7F5; }
.oauth-btn.wechat { background: #07C160; }
.oauth-btn.github { background: #333; }

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

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

.password-strength {
    margin-top: 0.5rem;
}

.strength-bar {
    height: 4px;
    border-radius: 2px;
    background: #ecf0f1;
    transition: all 0.3s;
}

.strength-text {
    font-size: 0.8rem;
    margin-top: 0.3rem;
    text-align: right;
}

/* 响应式设计 */
@media (max-width: 480px) {
    .auth-container {
        padding: 1rem;
    }
    
    .auth-box {
        padding: 1.5rem;
        border-radius: 20px;
    }
    
    .auth-header h1 {
        font-size: 1.5rem;
    }
    
    .auth-form input {
        padding: 0.8rem;
        font-size: 0.9rem;
    }
    
    .btn {
        padding: 0.8rem;
        font-size: 0.9rem;
    }
    
    .oauth-buttons {
        gap: 0.8rem;
    }
    
    .oauth-btn {
        padding: 0.7rem;
        font-size: 0.8rem;
    }
}

/* 微动画效果 */
.auth-box {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.oauth-btn {
    position: relative;
    overflow: hidden;
}

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

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

.form-group input {
    position: relative;
    z-index: 1;
}

.form-group input:focus + label {
    color: var(--primary);
    transform: translateY(-10px);
    font-size: 0.8rem;
}

/* 平滑滚动 */
html {
    scroll-behavior: smooth;
}

/* 按钮点击效果 */
.btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3);
}

/* 输入框聚焦动画 */
.auth-form input {
    position: relative;
    z-index: 1;
}

.auth-form input:focus {
    animation: pulse 0.3s ease-in-out;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 4px rgba(255, 107, 53, 0.1);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(255, 107, 53, 0.05);
    }
    100% {
        box-shadow: 0 0 0 4px rgba(255, 107, 53, 0.1);
    }
}

/* 加载按钮样式 */
.btn {
    position: relative;
    overflow: hidden;
}

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

.btn.loading .btn-text {
    visibility: hidden;
}

.btn.loading .btn-loading {
    display: block !important;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

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

/* 优化错误提示样式 */
.alert {
    position: relative;
    overflow: hidden;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-error::before {
    content: '⚠';
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    margin-right: 0.5rem;
}

.alert-error {
    padding-left: 2.5rem;
}

/* 验证码样式 */
.captcha-container {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.captcha-container input {
    flex: 1;
}

.captcha-image {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
}

.captcha-image img {
    width: 120px;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s;
}

.captcha-image img:hover {
    transform: scale(1.05);
}

.refresh-captcha {
    font-size: 0.8rem;
    color: var(--primary);
    text-decoration: none;
    cursor: pointer;
    transition: color 0.2s;
}

.refresh-captcha:hover {
    color: var(--primary-light);
    text-decoration: underline;
}

/* 响应式验证码 */
@media (max-width: 480px) {
    .captcha-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .captcha-image {
        flex-direction: row;
        justify-content: space-between;
    }
    
    .captcha-image img {
        width: 100px;
        height: 36px;
    }
}

/* OAuth绑定样式 */
.oauth-bindings {
    margin-bottom: 1.5rem;
}

.oauth-binding-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    margin-bottom: 0.8rem;
    border: 1px solid rgba(255, 107, 53, 0.1);
}

.oauth-info {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.oauth-provider {
    font-weight: 600;
    color: var(--primary);
    font-size: 1rem;
}

.oauth-id {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.oauth-unbind {
    margin: 0;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
    border: 1px solid rgba(231, 76, 60, 0.2);
}

.btn-small:hover {
    background: rgba(231, 76, 60, 0.2);
    transform: none;
    box-shadow: none;
}

.oauth-bind-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.oauth-bind-buttons .oauth-btn {
    flex: 1;
    text-align: center;
    padding: 0.8rem;
    font-size: 0.9rem;
}

.api-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.api-links .btn {
    flex: 1;
    text-align: center;
    padding: 0.8rem;
    font-size: 0.9rem;
}

.alert-info {
    background: rgba(52, 152, 219, 0.1);
    color: #3498db;
    border: 1px solid rgba(52, 152, 219, 0.2);
}

.alert-info::before {
    content: 'ℹ';
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    margin-right: 0.5rem;
}

.alert-info {
    padding-left: 2.5rem;
    position: relative;
}