/* ========== 1.css - 优化版 ========== */

/* ===== 全局重置 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ===== 页面背景 ===== */
body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Microsoft YaHei', 'PingFang SC', Arial, sans-serif;
    padding: 20px;
}

/* ===== 登录卡片 ===== */
form {
    max-width: 420px;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    padding: 40px 35px 30px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease;
}

form:hover {
    transform: translateY(-5px);
}

/* ===== 标题 ===== */
form::before {
    content: '🔐 用户登录';
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: #333;
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 3px solid #667eea;
    letter-spacing: 2px;
}

/* ===== 表单行 ===== */
div {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    position: relative;
}

/* ===== 标签 ===== */
span {
    width: 75px;
    font-size: 15px;
    font-weight: 600;
    color: #555;
    flex-shrink: 0;
}

/* ===== 输入框 ===== */
input[type="text"],
input[type="password"] {
    flex: 1;
    padding: 13px 16px;
    border: 2px solid #e8e8e8;
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #f8f9fa;
    color: #333;
    outline: none;
    font-family: inherit;
}

/* 输入框聚焦效果 */
input[type="text"]:focus,
input[type="password"]:focus {
    border-color: #667eea;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15);
}

/* 输入框占位文字 */
input[type="text"]::placeholder,
input[type="password"]::placeholder {
    color: #aaa;
    font-size: 14px;
}

/* ===== 登录按钮 ===== */
input[type="submit"] {
    width: 100%;
    padding: 15px;
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 3px;
    margin-top: 10px;
    font-family: inherit;
}

input[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.4);
}

input[type="submit"]:active {
    transform: translateY(0);
    box-shadow: none;
}

/* ===== 底部链接 ===== */
a {
    display: block;
    text-align: center;
    margin-top: 20px;
    color: #667eea;
    text-decoration: none;
    font-size: 14px;
    padding-top: 18px;
    border-top: 1px solid #eee;
    transition: color 0.3s ease;
}

a:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* ===== 响应式：手机适配 ===== */
@media (max-width: 480px) {
    form {
        padding: 25px 20px 20px;
        border-radius: 16px;
    }

    form::before {
        font-size: 22px;
    }

    div {
        flex-direction: column;
        align-items: stretch;
        gap: 5px;
    }

    span {
        width: 100%;
        font-size: 14px;
    }

    input[type="text"],
    input[type="password"] {
        width: 100%;
        padding: 12px 14px;
        font-size: 14px;
    }

    input[type="submit"] {
        font-size: 16px;
        padding: 13px;
    }
}