/* 登录页面样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /* 防止iOS双击缩放 */
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    /* 防止iOS橡皮筋效果 */
    overscroll-behavior: none;
}

.login-container {
    width: 100%;
    max-width: 450px;
}

.login-box {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.login-box h1 {
    text-align: center;
    color: #667eea;
    margin-bottom: 30px;
    font-size: 2em;
}

/* 切换标签 */
.tabs {
    display: flex;
    margin-bottom: 30px;
    border-bottom: 2px solid #e0e0e0;
}

.tab-btn {
    flex: 1;
    padding: 15px;
    border: none;
    background: none;
    font-size: 1.1em;
    cursor: pointer;
    transition: all 0.3s;
    color: #666;
    position: relative;
}

.tab-btn.active {
    color: #667eea;
    font-weight: bold;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 3px;
    background: #667eea;
}

/* 表单容器 */
.form-container {
    animation: fadeIn 0.3s;
}

.form-container h2 {
    color: #333;
    margin-bottom: 25px;
    text-align: center;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 表单组 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: #333;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
    transition: all 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* 按钮 */
.btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
    /* 移动端触摸优化 */
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

/* 提示信息 */
.tips {
    margin-top: 20px;
    text-align: center;
    color: #666;
    font-size: 0.9em;
}

.tips p {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 5px;
    border-left: 3px solid #667eea;
}

/* 消息提示 */
.message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
    animation: slideIn 0.3s;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-error {
    background: #fee;
    color: #c33;
    border: 1px solid #fcc;
}

.message-success {
    background: #efe;
    color: #3c3;
    border: 1px solid #cfc;
}

/* 响应式 */
@media (max-width: 768px) {
    body {
        padding: 15px;
    }
    
    .login-box {
        padding: 30px 20px;
    }

    .login-box h1 {
        font-size: 1.6em;
    }

    .tab-btn {
        font-size: 1em;
        padding: 14px;
    }
    
    .form-group input {
        padding: 14px;
        font-size: 1em;
    }
    
    .btn {
        padding: 16px;
        font-size: 1em;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    .login-box {
        padding: 25px 15px;
        border-radius: 15px;
    }

    .login-box h1 {
        font-size: 1.4em;
        margin-bottom: 20px;
    }

    .tab-btn {
        font-size: 0.95em;
        padding: 12px;
    }
    
    .form-container h2 {
        font-size: 1.3em;
        margin-bottom: 20px;
    }
    
    .form-group {
        margin-bottom: 15px;
    }
    
    .form-group label {
        font-size: 0.95em;
    }
    
    .form-group input {
        padding: 12px;
        font-size: 0.95em;
    }
    
    .btn {
        padding: 14px;
        font-size: 1em;
    }
    
    .message {
        padding: 12px;
        font-size: 0.9em;
    }
}

/* 横屏优化 */
@media (max-width: 768px) and (orientation: landscape) {
    body {
        padding: 10px;
        align-items: flex-start;
    }
    
    .login-box {
        margin: 20px 0;
        padding: 20px;
    }
    
    .login-box h1 {
        font-size: 1.3em;
        margin-bottom: 15px;
    }
    
    .tabs {
        margin-bottom: 15px;
    }
    
    .form-container h2 {
        font-size: 1.2em;
        margin-bottom: 15px;
    }
    
    .form-group {
        margin-bottom: 12px;
    }
    
    .form-group input {
        padding: 10px 12px;
    }
}
