* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

/* 整体布局 */
.login-layout {
    height: 100vh;
    width: 100%;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.login-bg {
    position: relative;
    height: 100vh;
    width: 120%;
    overflow: hidden;
    display: flex;
    align-items: stretch;
    justify-content: flex-end;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(2px);
    z-index: 1;
}

/* 背景图层 */
.login-hero {
    position: absolute;
    inset: 0;
    background-image: url("/images/login.png");
    background-size: 100%;
    background-position: left center;
    background-repeat: no-repeat;
    z-index: 0;
    pointer-events: none;
}

/* 背景叠层 */
.login-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(107, 107, 107, 0.15);
    backdrop-filter: blur(1px);
    z-index: 1;
    animation: brightenOverlay 300ms ease-out forwards;
    pointer-events: none;
}

.login-layout.fade-out .login-hero::before {
    animation: brightenOverlay 300ms ease-out forwards;
}

/* 右侧容器 - 横向布局，卡片在左侧，文案在右侧 */
.login-container {
    position: relative;
    z-index: 10;
    width: 70%;
    height: 100%;
    display: flex;
    flex-direction: row-reverse; /* 反转顺序：卡片在左，文案在右 */
    align-items: center;
    justify-content: flex-end;
    gap: 80px;
    padding: 80px 100px 60px 40px; /* 左侧留给卡片，右侧留给文案 */
    background: transparent;
    overflow-y: auto;
    box-sizing: border-box;
}

/* 左侧文案 - 现在在右侧 */
.login-left {
    position: relative;
    z-index: 5;
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: auto;
    max-width: 350px;
    text-align: right;
    align-items: flex-end;
    flex-shrink: 0;
    align-self: center;
}

.login-left-title {
    font-family: 'Noto Serif SC', serif;
    font-size: 40px;
    font-weight: 900;
    color: #333333;
    line-height: 1.3;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
    letter-spacing: 0.02em;
    word-break: break-word;
    margin: 0;
}

    .login-left-title strong {
        font-family: 'Noto Serif SC', serif;
        display: block;
        color: #7A2E2E;
        font-size: 40px;
        text-shadow: 0 2px 8px rgba(122, 46, 46, 0.2);
        font-weight: 900;
        margin-top: 6px;
    }

.login-left-subtitle {
    display: block;
    text-align: right;
    padding-left: 0;
    border-left: none;
    font-size: 12px;
    color: rgba(122, 46, 46, 0.7);
    letter-spacing: 0.15em;
    font-weight: 300;
    text-transform: uppercase;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
    margin-top: 12px;
}

/* 顶部 Logo */
.login-header {
    position: absolute;
    top: 32px;
    left: 32px;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(12px);
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid rgba(241, 241, 241, 0.1);
}

.login-header-image {
    width: 100px;
    height: 100px;
    object-fit: contain;
    display: block;
    opacity: 0.95;
}

.login-header-divider {
    width: 1px;
    height: 100px;
    background: rgba(241, 241, 241, 0.15);
}

.login-header-text {
    color: #F1F1F1;
}

.login-header-title {
    font-size: 20px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.login-header-subtitle {
    font-size: 15px;
    opacity: 0.7;
    letter-spacing: 0.08em;
    margin-top: -2px;
    font-weight: 300;
}


/* 版本号 */
.login-version {
    position: absolute;
    bottom: 24px;
    left: 32px;
    font-size: 10px;
    color: rgba(241, 241, 241, 0.25);
    letter-spacing: 1em;
    font-family: monospace;
    text-transform: uppercase;
    z-index: 10;
    font-weight: 300;
}

/* 登录卡片 */
.login-card-wrapper {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 420px;
    flex-shrink: 0;
    align-self: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card {
    /* ensure card sits above overlays and is clearly visible */
    position: relative;
    z-index: 30;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 12px;
    padding: 20px 16px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.15);
    overflow: visible;
    width: 100%;
    max-width: 420px;
}

.login-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: none;
    pointer-events: none;
}

.login-card-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 2px solid #7A2E2E;
    padding-bottom: 12px;
    margin-bottom: 18px;
}

.login-card-heading {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.login-card-header-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    margin-top: -4px;
    margin-right: -8px;
}

.login-card-logo-image {
    width: 115px;
    aspect-ratio: auto;
    object-fit: contain;
    display: block;
    opacity: 0.85;
    flex-shrink: 0;
}

.login-card-logo-divider {
    width: 1px;
    height: 64px;
    background: rgba(0, 0, 0, 0.08);
    flex-shrink: 0;
    display: none;
}

.login-card-logo-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    white-space: nowrap;
}

.login-card-logo-title {
    font-size: 12px;
    font-weight: 500;
    color: #666666;
    letter-spacing: 0.02em;
}

.login-card-logo-subtitle {
    font-size: 12px;
    color: #888888;
    letter-spacing: 0.05em;
    font-weight: 300;
}

.login-card-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.login-card-title {
    font-size: 24px;
    font-weight: 900;
    color: #2a2a2a;
    letter-spacing: -0.02em;
}

.login-card-subtitle {
    font-size: 10px;
    color: #a0a0a0;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 400;
    margin-top: 4px;
}

.login-card-badge {
    font-size: 12px;
    color: #7A2E2E;
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* 表单区域 */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-top: 0;
    position: relative;
    z-index: 100;
}

.login-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
    z-index: 100;
}

/* 输入框样式 */
.login-form-input-field {
    padding: 12px 18px;
    height: 48px;
    width: 100%;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    box-shadow: none;
    font-size: 14px;
    color: #555555;
    font-family: inherit;
    font-weight: 400;
    line-height: 24px;
    margin: 0;
    box-sizing: border-box;
    transition: border-color 180ms ease, box-shadow 180ms ease;
    position: relative;
    z-index: 1000 !important;
    cursor: text !important;
    pointer-events: auto !important;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.login-form-input-field::placeholder {
    color: #b0b0b0;
    font-weight: 300;
    opacity: 1;
}

.login-form-input-field:focus {
    outline: none;
    border-color: rgba(122, 46, 46, 0.35);
    box-shadow: 0 4px 16px rgba(122, 46, 46, 0.08);
    position: relative;
    z-index: 1000 !important;
}

.login-form-input-field:disabled {
    background: rgba(0, 0, 0, 0.04);
    color: #a0a0a0;
    cursor: not-allowed;
    pointer-events: none;
}

/* 登录按钮 基本样式（保持为参考但 will be overridden by stronger rules below） */
.login-btn {
    margin-top: 4px;
    padding: 12px 28px;
    background: #2a2a2a;
    color: #F5F6FA;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 6px 20px rgba(75, 93, 184, 0.15);
    height: 48px;
    line-height: 1.2;
}

.login-btn:hover {
    background: #1a1a1a;
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(75, 93, 184, 0.2);
}

.login-btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(75, 93, 184, 0.15);
}

/* 强制按钮尺寸，覆盖 MudBlazor 默认样式（更有力度的覆盖放在这里） */
.login-btn,
.mud-button-root.login-btn,
button.mud-button.login-btn {
    height: 48px !important;
    min-height: 48px !important;
    padding: 12px 28px !important;
    font-size: 15px !important;
    line-height: 1.2 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    box-shadow: 0 6px 20px rgba(75, 93, 184, 0.12) !important;
}

/* 在卡片内的按钮也同样适用 */
.login-card .login-btn,
.login-card .mud-button-root.login-btn {
    align-self: center !important;
}

/* 移除可能影响高度的内部元素样式 */
.login-btn .mud-button-label,
.login-btn .mud-button-content,
.login-btn .mud-button-wrapper {
    padding: 0 !important;
    margin: 0 !important;
    line-height: 1 !important;
}

/* 响应式：小屏幕上按钮改为 44px 高且占满宽度 */
@media (max-width: 768px) {
    .login-btn,
    .mud-button-root.login-btn,
    button.mud-button.login-btn {
        height: 44px !important;
        min-height: 44px !important;
        padding: 10px 18px !important;
        font-size: 14px !important;
        width: 100% !important;
    }
}

/* 底部提示 */
.login-footnote {
    margin-top: 16px;
    text-align: center;
    font-size: 10px;
    color: #a0a0a0;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* 响应式布局 - 1024px 以下 */
@media (max-width: 1024px) {
    .login-container {
        width: 100%;
        padding: 40px 30px;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    .login-left {
        width: 100%;
        text-align: center;
        align-items: center;
    }

    .login-left-title {
        font-size: 32px;
    }

    .login-left-title strong {
        font-size: 32px;
    }

    .login-card-wrapper {
        width: 100%;
        max-width: 380px;
    }

    .login-card {
        padding: 32px 24px;
    }
}

/* 响应式布局 - 768px 以下 */
@media (max-width: 768px) {
    .login-container {
        width: 100%;
        flex-direction: column;
        gap: 32px;
        padding: 30px 20px;
    }

    .login-left {
        width: 100%;
        text-align: center;
        align-items: center;
    }

    .login-left-title {
        font-size: 24px;
        line-height: 1.4;
    }

    .login-left-title strong {
        font-size: 24px;
        margin-top: 6px;
    }

    .login-left-subtitle {
        font-size: 10px;
        letter-spacing: 0.1em;
    }

    .login-header {
        top: 16px;
        left: 16px;
        padding: 8px 12px;
    }

    .login-header-image {
        width: 40px;
        height: 40px;
    }

    .login-header-divider {
        height: 30px;
    }

    .login-header-title {
        font-size: 10px;
    }

    .login-header-subtitle {
        font-size: 8px;
    }

    .login-version {
        bottom: 16px;
        left: 16px;
        font-size: 9px;
    }

    .login-card-wrapper {
        width: 100%;
        max-width: 100%;
    }

    .login-card {
        padding: 24px 16px;
        border-radius: 10px;
    }

    .login-card-title {
        font-size: 20px;
    }

    .login-form-input {
        padding: 10px 12px;
        font-size: 13px;
    }

    .login-btn {
        padding: 12px 24px;
        font-size: 11px;
        width: 100%;
    }
}

/* 响应式布局 - 480px 以下 */
@media (max-width: 480px) {
    .login-container {
        padding: 20px 16px;
        gap: 24px;
    }

    .login-left-title {
        font-size: 20px;
        line-height: 1.3;
    }

    .login-left-title strong {
        font-size: 20px;
    }

    .login-card-wrapper {
        width: 100%;
    }

    .login-card {
        padding: 20px 12px;
    }

    .login-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .login-card-title {
        font-size: 18px;
    }

    .login-card-badge {
        align-self: flex-start;
    }

    .login-form {
        gap: 16px;
    }
    .login-layout {
        animation: fadeIn 300ms ease-in forwards;
    }

        .login-layout.fade-out {
            animation: fadeOut 300ms ease-out forwards;
        }

    @keyframes fadeIn {
        from {
            opacity: 0;
        }

        to {
            opacity: 1;
        }
    }

    @keyframes fadeOut {
        from {
            opacity: 1;
        }

        to {
            opacity: 0;
        }
    }

    @keyframes brightenOverlay {
        from {
            background: rgba(107, 107, 107, 0.15);
        }

        to {
            background: rgba(255, 255, 255, 0.05);
        }
    }
}
