/* auth.css - 认证页面样式 */

/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
    color: #fff;
    overflow-x: hidden;
    touch-action: manipulation;
}

/* 背景样式 */
.auth-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../images/bg.jpg') no-repeat center center;
    background-size: cover;
    filter: blur(5px);
    z-index: -1;
    transform: scale(1.1);
}

/* 容器样式 */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    position: relative;
    width: 100%;
}

.auth-form {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.auth-form::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    z-index: -1;
}

/* Logo样式 */
.logo {
    text-align: center;
    margin-bottom: 30px;
}

.logo h1 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 10px;
    text-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.logo p {
    font-size: 14px;
    opacity: 0.8;
}

/* 表单组样式 */
.form-group {
    position: relative;
    margin-bottom: 25px;
}

.form-group.floating label {
    position: absolute;
    top: 16px;
    left: 15px;
    font-size: 14px;
    color: rgba(255,255,255,0.8);
    pointer-events: none;
    transition: all 0.3s ease;
}

.form-group.floating input {
    width: 100%;
    padding: 16px 15px 6px;
    background: rgba(255,255,255,0.1);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 15px;
    transition: all 0.3s ease;
}

.form-group.floating input:focus {
    outline: none;
    background: rgba(255,255,255,0.2);
}

.form-group.floating input:focus + label,
.form-group.floating input:not(:placeholder-shown) + label {
    transform: translateY(-20px);
    font-size: 12px;
    color: rgba(255,255,255,0.6);
}

.focus-border {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #fff;
    transition: width 0.3s ease;
}

.form-group.floating input:focus ~ .focus-border {
    width: 100%;
}

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

.remember-me {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.remember-me input {
    margin-right: 5px;
}

.forgot-password {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: all 0.3s ease;
}

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

/* 提交按钮样式 */
.submit-button {
    width: 100%;
    padding: 15px;
    background: rgba(255,255,255,0.2);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.submit-button span {
    position: relative;
    z-index: 1;
}

.submit-button svg {
    margin-left: 8px;
    stroke: #fff;
    transition: all 0.3s ease;
}

.submit-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(255,255,255,0.3), rgba(255,255,255,0.1));
    transform: translateX(-100%);
    transition: all 0.3s ease;
}

.submit-button:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.submit-button:hover svg {
    transform: translateX(3px);
}

.submit-button:hover::before {
    transform: translateX(0);
}

/* 脉冲动画 */
.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255,255,255,0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(255,255,255,0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255,255,255,0);
    }
}

/* 切换链接样式 */
.auth-switch {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    opacity: 0.8;
}

.switch-link {
    color: #fff;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.switch-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: #fff;
    transition: width 0.3s ease;
}

.switch-link:hover {
    opacity: 1;
}

.switch-link:hover::after {
    width: 100%;
}

/* 响应式设计 */
@media (max-width: 480px) {
    .auth-form {
        padding: 25px 15px;
        border-radius: 12px;
    }
    
    .logo h1 {
        font-size: 22px;
    }
    
    .logo p {
        font-size: 13px;
    }
    
    .form-group.floating input {
        padding: 12px 15px 2px;
        font-size: 13px;
    }
    
    .form-group.floating label {
        font-size: 13px;
    }
    
    .submit-button {
        padding: 10px;
        font-size: 14px;
    }
    
    .auth-switch {
        font-size: 12px;
    }
}

/* 防止iOS缩放 */
input, textarea, select {
    font-size: 16px;
}

/* 移动端输入优化 */
input, textarea {
    -webkit-appearance: none;
    border-radius: 0;
}

/* 防止长按出现菜单 */
a, button, input, textarea {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}
