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

:root {
    --primary-color: #8B4513;
    --secondary-color: #A0522D;
    --accent-color: #D2691E;
    --text-color: #5D4037;
    --light-text: #8D6E63;
}

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

body {
    font-family: "Microsoft YaHei", sans-serif;
    background: url('/static/image/login-bg.jpg') center/cover no-repeat fixed;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-color);
}

.login-container {
    background: rgba(255, 255, 255, 0.85);
    padding: 2.5rem;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(139, 69, 19, 0.2);
    width: 90%;
    max-width: 450px;
    backdrop-filter: blur(10px);
    opacity: 0;
    animation: slideUpFade 0.6s ease forwards;
}

.title {
    text-align: center;
    margin-bottom: 2rem;
    opacity: 0;
    animation: slideUpFade 0.6s ease forwards;
    animation-delay: 0.2s;
}

.wechat-loading {
    display: none;
    padding: 1.3rem 0 1.8rem;
    text-align: center;
    color: var(--primary-color);
}

.wechat-loading i {
    display: block;
    margin-bottom: 0.65rem;
    color: #07c160;
    font-size: 2.2rem;
}

.wechat-loading strong, .wechat-loading span { display: block; }
.wechat-loading strong { font-size: 1.05rem; }
.wechat-loading span { margin-top: 0.45rem; color: var(--light-text); font-size: 0.86rem; }

html.wechat-pending #loginForm,
html.wechat-pending .notes,
html.wechat-pending .modal { display: none; }
html.wechat-pending .wechat-loading { display: block; }

.main-title {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.sub-title {
    font-size: 1.2rem;
    color: var(--secondary-color);
}

.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.form-group:nth-child(1) {
    opacity: 0;
    animation: slideUpFade 0.6s ease forwards;
    animation-delay: 0.4s;
}

.form-group:nth-child(2) {
    opacity: 0;
    animation: slideUpFade 0.6s ease forwards;
    animation-delay: 0.6s;
}

.form-group i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--light-text);
}

input {
    width: 100%;
    padding: 0.8rem 1rem 0.8rem 2.5rem;
    border: 1px solid #DEB887;
    border-radius: 5px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.9);
}

input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(139, 69, 19, 0.1);
}

.verify-code {
    display: flex;
    gap: 10px;
}

.verify-code input {
    flex: 1;
    min-width: 0;
}

.verify-btn {
    white-space: nowrap;
    padding: 0.8rem 1rem;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.verify-btn:hover {
    background: var(--primary-color);
    transform: translateY(-1px);
}

.verify-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.login-btn {
    width: 100%;
    padding: 0.8rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0;
    animation: slideUpFade 0.6s ease forwards;
    animation-delay: 0.8s;
}

.login-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-1px);
}

.wechat-login-btn {
    display: none;
    width: 100%;
    margin-top: 0.8rem;
    padding: 0.8rem;
    border: 1px solid #07c160;
    border-radius: 5px;
    background: #fff;
    color: #07a957;
    font-size: 1rem;
    cursor: pointer;
}

#notice {
    display: none;
}

.login-toast {
    position: fixed;
    left: 50%;
    bottom: 12%;
    z-index: 1100;
    max-width: calc(100vw - 2rem);
    padding: 0.72rem 1rem;
    border-radius: 0.35rem;
    background: rgba(22, 22, 22, 0.92);
    color: #fff;
    font-size: 0.9rem;
    line-height: 1.45;
    text-align: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 0.6rem);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.login-toast.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

.notes {
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: var(--light-text);
    opacity: 0;
    animation: slideUpFade 0.6s ease forwards;
    animation-delay: 1s;
}

.notes p {
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.notes-btn {
    display: none;
    background: var(--accent-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(139, 69, 19, 0.2);
}

.notes-btn:hover {
    background: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 69, 19, 0.3);
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 25px rgba(139, 69, 19, 0.3);
    animation: slideUpFade 0.3s ease forwards;
}

.modal-close {
    float: right;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--light-text);
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: var(--primary-color);
}

@media (max-width: 768px) {
    .login-container {
        padding: 1.5rem;
    }

    .notes-text {
        display: none;
    }

    .notes {
        text-align: center;
    }

    .notes-btn {
        display: inline-block;
    }
}
