/* ============================================
   湘红智旅 - 认证页面样式 (登录/注册/重置密码)
   设计风格：红色文化主题，移动端优先
   主色：#C41E3A  深红：#8B0000  金：#DAA520
   ============================================ */

/* --- 认证页面容器 --- */
.page.auth-page {
    background: linear-gradient(180deg, #C41E3A 0%, #8B0000 45%, #5C0011 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 28px;
    overflow-y: auto;
    position: relative;
    scrollbar-width: none;
    -ms-overflow-style: none;
    animation: authPageIn 0.35s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    -webkit-animation: authPageIn 0.35s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.page.auth-page::-webkit-scrollbar {
    display: none;
}

@keyframes authPageIn {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@-webkit-keyframes authPageIn {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* --- 页面淡入类 --- */
.fade-in {
    animation: fadeInUp 0.4s ease both;
    -webkit-animation: fadeInUp 0.4s ease both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@-webkit-keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- 顶部返回按钮 --- */
.auth-back-btn {
    position: absolute;
    top: calc(var(--status-bar-height, 44px) * 0.55 + 8px);
    left: 12px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.95);
    font-size: 17px;
    cursor: pointer;
    background: transparent;
    border: none;
    transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1);
    -webkit-transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1);
    z-index: 10;
    animation: fadeIn 0.3s ease 0.05s both;
    -webkit-animation: fadeIn 0.3s ease 0.05s both;
    -webkit-tap-highlight-color: transparent;
}
.auth-back-btn:active {
    background: rgba(255,255,255,0.15);
    border-radius: 50%;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

@-webkit-keyframes fadeIn {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

/* --- Logo 区域 --- */
.auth-logo-area {
    margin-top: 56px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}
.auth-logo-icon {
    width: 76px;
    height: 76px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: logoFloat 3s ease-in-out infinite;
}
@keyframes logoFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}
.auth-logo-icon svg {
    width: 72px;
    height: 72px;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.3));
}
.auth-app-name {
    font-size: 22px;
    font-weight: 700;
    color: #FFFFFF;
    letter-spacing: 4px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.auth-app-slogan {
    font-size: 12px;
    color: rgba(255,255,255,0.7);
    letter-spacing: 2px;
    margin-top: -6px;
}

/* --- 表单卡片 --- */
.auth-card {
    width: 100%;
    background: #FFFFFF;
    border-radius: 20px;
    padding: 28px 24px 24px;
    margin-top: 32px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
    display: flex;
    flex-direction: column;
    gap: 18px;
    flex-shrink: 0;
}
.auth-card-title {
    font-size: 20px;
    font-weight: 700;
    color: #2D2D2D;
    text-align: center;
    margin-bottom: 4px;
}
.auth-card-subtitle {
    font-size: 13px;
    color: #999999;
    text-align: center;
    margin-top: -12px;
    margin-bottom: 4px;
}

/* --- 输入框组 --- */
.auth-input-group {
    position: relative;
    display: flex;
    align-items: center;
}
.auth-input-icon {
    position: absolute;
    left: 14px;
    font-size: 15px;
    color: #C41E3A;
    z-index: 2;
    width: 20px;
    text-align: center;
}
.auth-input {
    width: 100%;
    height: 48px;
    border: 1.5px solid #E8E8E8;
    border-radius: 12px;
    padding: 0 14px 0 42px;
    font-size: 15px;
    color: #2D2D2D;
    background: #FAFAFA;
    outline: none;
    transition: all 0.25s;
    font-family: inherit;
}
.auth-input::placeholder {
    color: #BBBBBB;
    font-size: 14px;
}
.auth-input:focus {
    border-color: #C41E3A;
    background: #FFFFFF;
    box-shadow: 0 0 0 3px rgba(196,30,58,0.1);
}
.auth-input-group .auth-toggle-pwd {
    position: absolute;
    right: 14px;
    font-size: 15px;
    color: #BBBBBB;
    cursor: pointer;
    transition: color 0.2s;
    z-index: 2;
}
.auth-input-group .auth-toggle-pwd:active {
    color: #C41E3A;
}

/* 验证码输入框特殊样式 */
.auth-input-group.otp-group .auth-input {
    padding-right: 110px;
}
.auth-otp-btn {
    position: absolute;
    right: 6px;
    height: 34px;
    padding: 0 12px;
    border-radius: 8px;
    background: linear-gradient(135deg, #C41E3A, #E8384F);
    color: #FFFFFF;
    font-size: 12px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    font-family: inherit;
}
.auth-otp-btn:active {
    transform: scale(0.85);
    opacity: 0.85;
}
.auth-otp-btn:disabled {
    background: #CCCCCC;
    cursor: not-allowed;
    transform: none;
}

/* --- 协议勾选 --- */
.auth-agreement {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 0 2px;
    margin-top: -4px;
}
.auth-checkbox {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    border: 1.5px solid #D0D0D0;
    background: #FFFFFF;
    cursor: pointer;
    flex-shrink: 0;
    margin-top: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    -webkit-appearance: none;
    appearance: none;
}
.auth-checkbox:checked {
    background: linear-gradient(135deg, #C41E3A, #E8384F);
    border-color: #C41E3A;
}
.auth-checkbox:checked::after {
    content: '✓';
    color: #FFFFFF;
    font-size: 12px;
    font-weight: 700;
}
.auth-agreement-text {
    font-size: 12.5px;
    color: #666666;
    line-height: 1.6;
}
.auth-agreement-text a {
    color: #C41E3A;
    text-decoration: none;
    font-weight: 500;
}
.auth-agreement-text a:active {
    opacity: 0.7;
}

/* --- 主按钮 --- */
.auth-btn-primary {
    width: 100%;
    height: 48px;
    border-radius: 24px;
    background: linear-gradient(135deg, #C41E3A, #E8384F);
    color: #FFFFFF;
    font-size: 16px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(196,30,58,0.4);
    transition: all 0.2s;
    letter-spacing: 2px;
    font-family: inherit;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.auth-btn-primary:active {
    transform: scale(0.87);
    box-shadow: 0 2px 8px rgba(196,30,58,0.3);
}
.auth-btn-primary:disabled {
    background: linear-gradient(135deg, #E88888, #F0A0A0);
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

/* --- 登录按钮加载状态 --- */
.auth-btn-primary.loading {
    pointer-events: none;
    background: linear-gradient(135deg, #D84A5F, #E85A6F);
}
.auth-btn-primary.loading .btn-text {
    visibility: hidden;
}
.auth-btn-primary.loading .btn-loading-spinner {
    display: inline-flex;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}
.btn-loading-spinner {
    display: none;
    width: 22px;
    height: 22px;
}
.btn-loading-spinner::after {
    content: '';
    display: block;
    width: 22px;
    height: 22px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top-color: #FFFFFF;
    border-radius: 50%;
    animation: btnSpin 0.8s linear infinite;
    box-sizing: border-box;
}
@keyframes btnSpin {
    to { transform: rotate(360deg); }
}

/* --- 次要链接 --- */
.auth-link-row {
    display: flex;
    justify-content: center;
    gap: 6px;
    font-size: 13px;
    color: #999999;
    margin-top: -4px;
}
.auth-link-row a {
    color: #C41E3A;
    text-decoration: none;
    font-weight: 500;
}
.auth-link-row a:active {
    opacity: 0.7;
}

/* --- 分隔线 "OR" --- */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 4px 0;
}
.auth-divider-line {
    flex: 1;
    height: 1px;
    background: #E8E8E8;
}
.auth-divider-text {
    font-size: 12px;
    color: #BBBBBB;
    white-space: nowrap;
}

/* --- 第三方登录 --- */
.auth-third-party {
    display: flex;
    justify-content: center;
    gap: 28px;
    margin-top: 2px;
}
.auth-third-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #F5F5F5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid #E8E8E8;
}
.auth-third-btn:active {
    transform: scale(0.8);
    background: #EBEBEB;
}

/* --- 底部文字 --- */
.auth-footer-text {
    font-size: 11px;
    color: rgba(255,255,255,0.45);
    text-align: center;
    margin-top: auto;
    padding-bottom: 24px;
    padding-top: 16px;
    animation: fadeInUp 0.4s ease 0.3s both;
    -webkit-animation: fadeInUp 0.4s ease 0.3s both;
}

/* --- 重置密码成功提示 --- */
.auth-success-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4CAF50, #2E7D32);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    box-shadow: 0 4px 16px rgba(76,175,80,0.3);
}
.auth-success-icon i {
    font-size: 28px;
    color: #FFFFFF;
}

/* --- 协议页面专用样式 --- */
.page.agreement-page {
    background: #FFFFFF;
    display: flex;
    flex-direction: column;
}
.agreement-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px 20px 40px;
    line-height: 1.9;
    font-size: 14px;
    color: #444444;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.agreement-content::-webkit-scrollbar {
    display: none;
}
.agreement-content h2 {
    font-size: 18px;
    font-weight: 700;
    color: #2D2D2D;
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid #F0F0F0;
}
.agreement-content h3 {
    font-size: 15px;
    font-weight: 600;
    color: #C41E3A;
    margin: 20px 0 8px;
}
.agreement-content p {
    margin-bottom: 10px;
    text-align: justify;
}
.agreement-content .clause-title {
    font-weight: 600;
    color: #333333;
    margin-top: 14px;
    margin-bottom: 4px;
}
.agreement-content .effective-date {
    text-align: center;
    font-size: 12px;
    color: #999999;
    margin-top: -12px;
    margin-bottom: 18px;
}
.agreement-scroll-hint {
    text-align: center;
    font-size: 11px;
    color: #BBBBBB;
    padding: 8px 0 4px;
}

/* --- 页面入场动画 --- */
.auth-page .auth-logo-area {
    animation: authSlideUp 0.45s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
    -webkit-animation: authSlideUp 0.45s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
}
.auth-page .auth-card {
    animation: authSlideUp 0.45s cubic-bezier(0.22, 1, 0.36, 1) 0.2s both;
    -webkit-animation: authSlideUp 0.45s cubic-bezier(0.22, 1, 0.36, 1) 0.2s both;
}
@keyframes authSlideUp {
    from { 
        opacity: 0; 
        transform: translateY(20px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

@-webkit-keyframes authSlideUp {
    from { 
        opacity: 0; 
        transform: translateY(20px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

/* --- 错误提示 --- */
.auth-error-msg {
    font-size: 12px;
    color: #E8384F;
    padding-left: 4px;
    margin-top: -10px;
    display: none;
}
.auth-error-msg.show {
    display: block;
    animation: shakeX 0.4s ease;
}
@keyframes shakeX {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    75% { transform: translateX(6px); }
}

/* --- 响应式微调 --- */
@media screen and (max-height: 700px) {
    .auth-logo-area {
        margin-top: 32px;
        gap: 10px;
    }
    .auth-logo-icon {
        width: 64px;
        height: 64px;
    }
    .auth-logo-icon svg {
        width: 56px;
        height: 56px;
    }
    .auth-app-name {
        font-size: 22px;
    }
    .auth-app-slogan {
        font-size: 12px;
    }
    .auth-card {
        padding: 20px 18px 18px;
        margin-top: 16px;
        gap: 12px;
    }
    .auth-card-title {
        font-size: 20px;
    }
    .auth-footer-text {
        padding-bottom: 16px;
        padding-top: 12px;
    }
}

/* --- 超小屏幕适配 --- */
@media screen and (max-width: 360px) {
    .page.auth-page {
        padding: 0 20px;
    }
    .auth-card {
        padding: 18px 16px 16px;
    }
    .auth-input {
        font-size: 14px;
    }
}

/* --- 触摸优化 - 移动端APP体验 --- */
@media (hover: none) and (pointer: coarse) {
    .auth-back-btn {
        min-width: 44px;
        min-height: 44px;
    }
    
    .auth-btn-primary {
        min-height: 48px;
    }
    
    .auth-third-btn {
        min-width: 50px;
        min-height: 50px;
    }
}
