/* 全局重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', 'Microsoft YaHei', sans-serif;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* 背景图片 */
.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Logo */
.logo {
    position: absolute;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

.logo img {
    height: 50px;
    width: auto;
    border-radius: 8px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    transition: all 0.3s ease;
}

.logo img:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.4));
}

/* 主容器 */
.container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* 登录卡片 */
.login-card {
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 16px;
    padding: 40px;
    width: 100%;
    max-width: 400px;
    box-shadow:
            0 20px 40px rgba(0, 0, 0, 0.5),
            inset 0 1px 0 rgba(212, 175, 55, 0.1);
    position: relative;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.5), transparent);
}

/* 卡片头部 */
.card-header {
    text-align: center;
    margin-bottom: 30px;
}

.card-header h1 {
    color: #d4af37;
    font-size: 24px;
    font-weight: 300;
    letter-spacing: 2px;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(212, 175, 55, 0.3);
}

.card-header p {
    color: #999;
    font-size: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* 消息提示 */
.message {
    padding: 12px 20px;
    margin-bottom: 20px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    backdrop-filter: blur(10px);
}

.message.error {
    background: rgba(220, 53, 69, 0.15);
    color: #ff6b7a;
    border: 1px solid rgba(220, 53, 69, 0.3);
}

.message.success {
    background: rgba(40, 167, 69, 0.15);
    color: #4caf50;
    border: 1px solid rgba(40, 167, 69, 0.3);
}

.message.info {
    background: rgba(212, 175, 55, 0.15);
    color: #d4af37;
    border: 1px solid rgba(212, 175, 55, 0.3);
}

/* 表单 */
.login-form {
    margin-bottom: 20px;
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    color: #d4af37;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}

.input-group input {
    width: 100%;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 12px;
    color: #fff;
    font-size: 15px;
    transition: all 0.3s ease;
    outline: none;
    backdrop-filter: blur(10px);
}

.input-group input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.input-group input:hover {
    border-color: rgba(212, 175, 55, 0.4);
    background: rgba(255, 255, 255, 0.08);
}

.input-group input:focus {
    border-color: rgba(212, 175, 55, 0.6);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
    background: rgba(255, 255, 255, 0.1);
}

/* 提交按钮 */
.submit-btn {
    width: 100%;
    padding: 14px;
    background: rgba(212, 175, 55, 0.15);
    border: 1px solid rgba(212, 175, 55, 0.4);
    border-radius: 12px;
    color: #d4af37;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.1), transparent);
    transition: left 0.5s;
}

.submit-btn:hover {
    background: rgba(212, 175, 55, 0.25);
    border-color: rgba(212, 175, 55, 0.6);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.15);
}

.submit-btn:hover::before {
    left: 100%;
}

.submit-btn:active {
    transform: translateY(0);
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* 卡片底部 */
.card-footer {
    text-align: center;
    margin-top: 20px;
}

.register-link {
    color: #d4af37;
    text-decoration: none;
    font-size: 13px;
    padding: 8px 16px;
    border-radius: 8px;
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

.register-link:hover {
    background: rgba(212, 175, 55, 0.1);
    border-color: rgba(212, 175, 55, 0.2);
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

/* 联系信息 */
.contact-info {
    background: rgba(212, 175, 55, 0.1);
    padding: 16px;
    border-radius: 12px;
    margin-top: 12px;
    font-size: 13px;
    border: 1px solid rgba(212, 175, 55, 0.2);
    backdrop-filter: blur(10px);
}

.contact-info strong {
    color: #d4af37;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .logo {
        top: 20px;
        left: 20px;
        transform: none; /* 移动端恢复左上角位置 */
    }

    .logo img {
        height: 40px;
    }

    .container {
        padding: 15px;
    }

    .login-card {
        padding: 30px 25px;
        max-width: 100%;
    }

    .card-header h1 {
        font-size: 20px;
        letter-spacing: 1px;
    }

    .input-group input {
        padding: 12px 16px;
        font-size: 16px; /* 防止iOS缩放 */
    }

    .submit-btn {
        padding: 12px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }

    .login-card {
        padding: 25px 20px;
    }

    .card-header h1 {
        font-size: 18px;
    }
}

.forgot-password-link {
    text-align: right;
    margin-top: 8px;
}

.forgot-password-link a {
    color: #667eea;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.forgot-password-link a:hover {
    color: #764ba2;
    text-decoration: underline;
}