/* css/style.css - 现代简约 + 毛玻璃效果 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: url('https://archmap.cn/images/939.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: #333;
    line-height: 1.6;
    position: relative;
}

/* 黑色半透明遮罩层 */
body::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: -1;
}

.container {
    width: 90%;
    max-width: 500px;
    padding: 40px 50px;
    backdrop-filter: blur(10px); /* 毛玻璃效果 */
    background: rgba(255, 255, 255, 0.25); /* 半透明白 */
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    text-align: center;
}

.container h1 {
    font-size: 28px;
    font-weight: 500;
    margin-bottom: 10px;
    color: white;
}

.container p {
    margin: 10px 0;
    font-size: 14px;
}

.welcome strong {
    color: #fff;
    font-weight: bold;
}

.form-row {
    display: flex;
    align-items: center;
    margin: 15px 0;
    flex-wrap: nowrap;
}

.form-label {
    width: 80px;
    text-align: right;
    padding-right: 12px;
    color: rgba(255, 255, 255, 0.9);
    white-space: nowrap;
}

@media (max-width: 480px) {
    .form-row {
        flex-direction: column;
        align-items: flex-start;
    }
    .form-label {
        width: 100%;
        text-align: left;
        padding-bottom: 8px;
        padding-right: 0;
    }
    .form-row input {
        width: 100%;
    }
}


/* ===== 输入框统一样式（含 autofill 支持）===== */

input[type="text"],
input[type="password"],
input[type="email"] {
    width: 100%;
    padding: 12px 15px;
    margin: 10px 0;
    border: none;
    border-radius: 8px;

    /* 半透明黑色背景 */
    background: rgba(0, 0, 0, 0.3);
    color: white;

    font-size: 16px;
    outline: none;
    transition: all 0.3s;
    caret-color: #0099ff;

    /* 防止 autofill 初始闪烁 */
    -webkit-transition: none !important;
    -webkit-animation: none !important;
}

/* 占位符文字 */
input::placeholder {
    color: rgba(255, 255, 255, 0.6);
    opacity: 1;
}

/* 聚焦状态 */
input:focus {
    background: rgba(0, 0, 0, 0.4);
    box-shadow: 
        0 0 0 2px rgba(255, 255, 255, 0.3),
        0 0 10px rgba(0, 153, 255, 0.2);
}

/* ===== 修复 Chrome 自动填充背景 ===== */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-text-fill-color: white !important;
    -webkit-box-shadow: 0 0 0px 1000px rgba(0, 0, 0, 0.3) inset !important;
    box-shadow: 0 0 0px 1000px rgba(0, 0, 0, 0.3) inset !important;
    background: rgba(0, 0, 0, 0.3) !important;
    background-color: rgba(0, 0, 0, 0.3) !important;
    transition: background-color 5000s ease-in-out 0s !important;
    border: none;
}

/* 取消自动填充后的闪烁动画 */
@keyframes autofill-fix {
    to {
        background: rgba(0, 0, 0, 0.3);
    }
}


/* 聚焦时效果 */
input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus {
    background: rgba(0, 0, 0, 0.4);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.4);
    transform: translateY(-1px);
}


/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 12px 50px;
    margin: 10px 5px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.4);
    transition: all 0.3s;
    backdrop-filter: blur(4px);
}
.btn:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: translateY(-2px);
}

.btn-danger {
    background: rgba(220, 53, 69, 0.2);
    border-color: rgba(220, 53, 69, 0.4);
}
.btn-danger:hover {
    background: rgba(220, 53, 69, 0.35);
}

.link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 14px;
}
.link:hover {
    text-decoration: underline;
    color: white;
}

.error {
    background: rgba(255, 0, 0, 0.2);
    color: #ffcccc;
    padding: 12px;
    border-radius: 8px;
    margin: 10px 0;
    border: 1px solid rgba(255, 0, 0, 0.3);
}

.success {
    background: rgba(40, 167, 69, 0.2);
    color: #d4edda;
    padding: 12px;
    border-radius: 8px;
    margin: 10px 0;
    border: 1px solid rgba(40, 167, 69, 0.3);
}

footer {
    margin-top: 30px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}
