* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
}

body {
    background-color: #eef2f8;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px 10px; /* 整体内边距缩小 */
    position: relative;
    overflow-x: hidden;
}

body::after {
    content: "";
    position: fixed;
    bottom: 0;
    right: 0;
    width: 100px; /* 尺寸缩小 */
    height: 100px;
    background: linear-gradient(135deg, #a855f7 0%, #ec4899 100%);
    border-radius: 100% 0 0 0;
    opacity: 0.5;
    z-index: -1;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 5px; /* 间距缩小 */
    margin-bottom: 10px; /* 间距缩小 */
}

.logo-icon {
    width: 26px; /* 图标缩小 */
    height: 26px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    background-color: #3b82f6;
}
.logo-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.logo-title {
    font-size: 17px; /* 字体缩小 */
    color: #3b82f6;
    font-weight: 600;
}

.logo-subtitle {
    font-size: 8px; /* 字体缩小 */
    color: #5a6e8c;
}

.login-card {
    background-color: #fff;
    width: 100%;
    max-width: 320px; /* 卡片最大宽度缩小 */
    border-radius: 14px; /* 圆角微调 */
    padding: 14px 15px; /* 内边距缩小 */
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
}

.card-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 10px; /* 间距缩小 */
    flex-wrap: wrap;
}

.card-title {
    font-size: 15px; /* 字体缩小 */
    color: #1e293b;
    font-weight: 600;
    letter-spacing: -0.2px;
}

.tag-btn {
    background-color: #f0f2f5;
    color: #2c3e66;
    border: none;
    padding: 3px 8px; /* 内边距缩小 */
    border-radius: 16px;
    font-size: 10px; /* 字体缩小 */
    font-weight: 500;
}

.tab-group {
    border-bottom: 1px solid #eef2f6;
    margin-bottom: 10px; /* 间距缩小 */
}

.tab-item {
    padding: 4px 0 5px 0; /* 内边距缩小 */
    font-size: 13px; /* 字体缩小 */
    color: #3b82f6;
    font-weight: 600;
    border-bottom: 2px solid #3b82f6;
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
    cursor: default;
    display: inline-block;
}

.form-group {
    margin-bottom: 8px; /* 间距缩小 */
}

.form-input {
    width: 100%;
    padding: 7px 10px 7px 30px; /* 内边距缩小，左侧图标位置调整 */
    border: 1px solid #e2e8f0;
    border-radius: 8px; /* 圆角缩小 */
    font-size: 12px; /* 字体缩小 */
    color: #1f2a44;
    outline: none;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E") no-repeat left 10px center;
    background-size: 14px; /* 图标尺寸缩小 */
}

.form-input.password {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='11' width='18' height='11' rx='2' ry='2'/%3E%3Cpath d='M7 11V7a5 5 0 0 1 10 0v4'/%3E%3C/svg%3E");
    background-size: 14px;
}

.password-wrap {
    position: relative;
}

.eye-icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 14px; /* 图标缩小 */
    height: 14px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%238198b0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: contain;
    cursor: pointer;
    opacity: 0.7;
}

.login-btn {
    width: 100%;
    padding: 8px 0; /* 按钮高度缩小 */
    background-color: #3b82f6;
    color: #fff;
    border: none;
    border-radius: 8px; /* 圆角缩小 */
    font-size: 13px; /* 字体缩小 */
    font-weight: 500;
    margin-top: 5px; /* 上边距缩小 */
    cursor: pointer;
    transition: 0.2s;
}

.login-btn:active {
    background-color: #2563eb;
}

.remember-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin: 10px 0 5px 0; /* 上下边距缩小 */
    gap: 6px;
}
.checkbox-custom {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    gap: 4px;
}
.checkbox-custom input {
    width: 14px; /* 复选框缩小 */
    height: 14px;
    margin: 0;
    cursor: pointer;
    accent-color: #3b82f6;
}
.checkbox-custom span {
    font-size: 11px; /* 字体缩小 */
    color: #334155;
    font-weight: 450;
}
.remember-hint {
    font-size: 9px; /* 字体缩小 */
    color: #6c7a8e;
    margin-left: auto;
}

.link-group {
    display: flex;
    justify-content: space-between;
    margin: 8px 0 10px 0; /* 间距缩小 */
}

.link-item {
    font-size: 11px; /* 字体缩小 */
    color: #3b82f6;
    text-decoration: none;
}

.third-party {
    margin-top: 8px; /* 上边距缩小 */
}

.third-title {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6f7c91;
    font-size: 10px; /* 字体缩小 */
    margin-bottom: 8px;
}

.third-title::before,
.third-title::after {
    content: "";
    flex: 1;
    height: 1px;
    background-color: #e9edf2;
    margin: 0 6px;
}

.third-btn {
    width: 100%;
    padding: 6px 0; /* 按钮高度缩小 */
    border: 1px solid #e9edf2;
    border-radius: 8px;
    font-size: 12px; /* 字体缩小 */
    color: #2d3a5e;
    background-color: #ffffff;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px; /* 下边距缩小 */
    cursor: pointer;
    justify-content: center;
}

.third-btn .icon {
    width: 24px; /* 图标容器缩小 */
    height: 24px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.third-btn.qq .icon {
    background-color: #eef3ff;
    color: #3b82f6;
}

.third-btn.wechat .icon {
    background-color: #eafaf0;
    color: #2ecc71;
}

.third-btn .icon svg {
    width: 15px; /* svg图标缩小 */
    height: 15px;
}

.footer {
    margin-top: 14px; /* 上边距缩小 */
    padding: 8px 0 6px;
    text-align: center;
    color: #6c7a8e;
    font-size: 9px; /* 字体缩小 */
    line-height: 1.3;
}

.error-toast {
    position: fixed;
    bottom: 22px;
    left: 50%;
    transform: translateX(-50%) scale(0.95);
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    color: white;
    padding: 6px 16px; /* 内边距缩小 */
    border-radius: 30px;
    font-size: 11px; /* 字体缩小 */
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
    white-space: nowrap;
    font-weight: 500;
    letter-spacing: 0.3px;
}
@media (max-width: 460px) {
    .error-toast { font-size: 11px; white-space: nowrap; padding: 5px 14px; bottom: 16px; }
}