/* 统一门户 — 对齐《统一门户页面交互原型》 */
* { box-sizing: border-box; }
html, body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", sans-serif;
    /*background: #0d1526;*/
    color: #1c2b45;
}
a { text-decoration: none; }
img { max-width: 100%; }

/* ===== 登录页 ===== */
.login-screen {
    min-height: 100vh;
    display: flex;
}
.login-left {
    flex: 1.4;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 80px;
    background: linear-gradient(135deg, #0a1a33 0%, #0e2a52 55%, #123a6b 100%);
}
.login-left::before {
    content: "";
    position: absolute;
    width: 520px;
    height: 520px;
    border-radius: 50%;
    border: 1px solid rgba(80, 160, 255, 0.25);
    top: -160px;
    right: -140px;
}
.login-left::after {
    content: "";
    position: absolute;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    border: 1px dashed rgba(80, 200, 255, 0.18);
    bottom: -100px;
    left: -80px;
}
.grid-lines {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(90, 150, 240, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(90, 150, 240, 0.06) 1px, transparent 1px);
    background-size: 46px 46px;
}
.login-brand { position: relative; z-index: 2; }
.login-brand .logo-row {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 34px;
}
.logo-cube {
    width: 46px;
    height: 46px;
    border-radius: 10px;
    background: linear-gradient(135deg, #2f80ed, #56ccf2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0;
    flex-shrink: 0;
}
.logo-cube.sm {
    width: 34px;
    height: 34px;
    font-size: 13px;
    border-radius: 8px;
}
.login-brand h1 {
    margin: 0;
    font-size: 30px;
    color: #fff;
    letter-spacing: 2px;
    font-weight: 700;
}
.login-brand .sub {
    font-size: 18px;
    color: #9fc3ef;
    letter-spacing: 6px;
    margin-bottom: 46px;
}
.login-brand .slogan {
    font-size: 40px;
    font-weight: bold;
    color: #eaf3ff;
    line-height: 1.5;
}
.login-brand .slogan span { color: #56ccf2; }
.login-brand .platforms {
    margin-top: 42px;
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}
.login-brand .platforms span {
    font-size: 13px;
    color: #a9c6ec;
    border: 1px solid rgba(120, 170, 240, 0.35);
    padding: 5px 14px;
    border-radius: 16px;
    background: rgba(30, 70, 130, 0.35);
}
.login-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f4f7fc;
    padding: 40px 24px;
}
.login-card {
    width: 400px;
    max-width: 100%;
    background: #fff;
    border-radius: 16px;
    padding: 46px 42px;
    box-shadow: 0 18px 50px rgba(20, 50, 100, 0.14);
}
.login-card h2 {
    margin: 0 0 6px;
    font-size: 22px;
    color: #1c2b45;
}
.login-card .tip {
    font-size: 13px;
    color: #8494ad;
    margin-bottom: 30px;
}
.login-card .field {
    margin-bottom: 20px;
}
.login-card .field > label,
.login-card .form-group > label {
    display: block;
    font-size: 13px;
    color: #51607a;
    margin-bottom: 7px;
    font-weight: 500;
}
.login-card .form-group {
    margin-bottom: 20px;
}
.login-card .help-block {
    margin: 6px 0 0;
    font-size: 12px;
    color: #e0563f;
}
.login-card .has-error .input-wrap {
    border-color: #e0563f;
}
.input-wrap {
    display: flex;
    border: 1px solid #d8e0ec;
    border-radius: 8px;
    overflow: hidden;
    transition: 0.2s;
    background: #fff;
}
.input-wrap:focus-within {
    border-color: #2f80ed;
    box-shadow: 0 0 0 3px rgba(47, 128, 237, 0.12);
}
.input-wrap input {
    flex: 1;
    border: none !important;
    outline: none;
    box-shadow: none !important;
    padding: 12px 14px;
    font-size: 14px;
    color: #1c2b45;
    background: transparent;
    height: auto;
    border-radius: 0;
}
.input-wrap .suffix {
    padding: 0 12px;
    display: flex;
    align-items: center;
    color: #9aa8bd;
    font-size: 12px;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}
.login-opts {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #51607a;
    margin-bottom: 26px;
}
.login-opts label {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    font-weight: normal;
    cursor: pointer;
}
.login-opts a { color: #2f80ed; }
.btn-login {
    width: 100%;
    padding: 13px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(90deg, #2f80ed, #3d9bef);
    color: #fff;
    font-size: 16px;
    letter-spacing: 8px;
    cursor: pointer;
    transition: 0.2s;
}
.btn-login:hover {
    filter: brightness(1.08);
    box-shadow: 0 6px 18px rgba(47, 128, 237, 0.4);
    color: #fff;
}
.login-foot {
    margin-top: 22px;
    text-align: center;
    font-size: 12px;
    color: #a5b1c4;
}
.login-alert {
    background: #fff1f0;
    border: 1px solid #ffccc7;
    color: #cf1322;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 13px;
    margin-bottom: 16px;
}

/* ===== 板块展示页 ===== */
.portal {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: radial-gradient(1200px 500px at 50% -10%, #16305c 0%, #0d1526 60%);
}
.portal-top {
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    border-bottom: 1px solid rgba(120, 160, 220, 0.14);
}
.portal-top .left {
    display: flex;
    align-items: center;
    gap: 12px;
}
.portal-top .brand-name {
    font-size: 17px;
    color: #e8f0fc;
    font-weight: bold;
    letter-spacing: 1px;
}
.portal-top .right {
    display: flex;
    align-items: center;
    gap: 18px;
}
.avatar {
    display: flex;
    align-items: center;
    gap: 8px;
}
.avatar .img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f2a65a, #f76b1c);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: #fff;
    font-weight: 600;
}
.avatar .uname {
    font-size: 13px;
    color: #c9d8ee;
}
.btn-logout {
    font-size: 13px;
    color: #9db6d9;
    padding: 7px 14px;
    border-radius: 8px;
    border: 1px solid rgba(120, 170, 240, 0.28);
    background: rgba(120, 170, 240, 0.08);
    transition: 0.2s;
}
.btn-logout:hover {
    color: #fff;
    background: rgba(120, 170, 240, 0.2);
}
.portal-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 44px 40px;
}
.portal-cards {
    display: flex;
    gap: 32px;
    flex-wrap: wrap;
    justify-content: center;
}
.p-card {
    width: 400px;
    max-width: 100%;
    background: #121f38;
    border: 1px solid rgba(120, 160, 220, 0.18);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s;
    text-decoration: none;
    color: inherit;
}
.p-card.clickable { cursor: pointer; }
.p-card.clickable:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 44px rgba(0, 20, 50, 0.5);
    border-color: rgba(86, 204, 242, 0.55);
}
.p-card .pic {
    height: 220px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.p-card .pic .scene-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}
.p-card.clickable:hover .pic .scene-img { transform: scale(1.05); }
.p-card .pic .scene {
    position: relative;
    z-index: 1;
    font-size: 56px;
    font-weight: 700;
    letter-spacing: 4px;
    color: rgba(255, 255, 255, 0.88);
    line-height: 1;
    text-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
    transition: transform 0.35s ease;
}
.p-card.clickable:hover .pic .scene { transform: scale(1.05); }
.logo-img {
    height: 48px;
    display: block;
    object-fit: contain;
}
.logo-img.sm {
    height: 34px;
}
.p-card .pic .mask {
    position: absolute;
    inset: auto 0 0 0;
    height: 70px;
    background: linear-gradient(transparent, rgba(9, 15, 28, 0.92));
}
.p-card.card-pd .pic { background: linear-gradient(140deg, #0f3d63 0%, #14508c 60%, #1a6fb5 100%); }
.p-card.card-mg .pic { background: linear-gradient(140deg, #0b4a3a 0%, #0f7a55 60%, #19a974 100%); }
.p-card.card-vpp .pic { background: linear-gradient(140deg, #4a2f66 0%, #6d3f92 60%, #9257b8 100%); }
.p-card .body {
    padding: 22px 24px 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.p-card h3 {
    margin: 0 0 12px;
    font-size: 20px;
    color: #eef4fd;
    letter-spacing: 0.5px;
}
.p-card .desc {
    font-size: 13.5px;
    line-height: 1.85;
    color: #a7bcd8;
    margin: 0 0 18px;
    flex: 1;
}
.p-card .tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}
.p-card .tags span {
    font-size: 12px;
    color: #8fd0f5;
    background: rgba(86, 204, 242, 0.1);
    border: 1px solid rgba(86, 204, 242, 0.3);
    padding: 3px 12px;
    border-radius: 12px;
}
.p-card.card-mg .tags span {
    color: #8fe6bf;
    background: rgba(60, 200, 140, 0.1);
    border-color: rgba(60, 200, 140, 0.3);
}
.p-card.card-vpp .tags span {
    color: #d4b3f0;
    background: rgba(180, 120, 240, 0.1);
    border-color: rgba(180, 120, 240, 0.32);
}
.enter-btn {
    display: block;
    text-align: center;
    padding: 11px;
    border-radius: 8px;
    font-size: 14px;
    letter-spacing: 4px;
    transition: 0.2s;
}
.p-card.card-pd .enter-btn {
    color: #bfe0ff;
    background: rgba(47, 128, 237, 0.18);
    border: 1px solid rgba(77, 155, 239, 0.5);
}
.p-card.card-pd.clickable:hover .enter-btn {
    background: #2f80ed;
    color: #fff;
}
.p-card.card-mg .enter-btn {
    color: #c2f2dd;
    background: rgba(25, 169, 116, 0.18);
    border: 1px solid rgba(45, 190, 130, 0.5);
}
.p-card.card-mg.clickable:hover .enter-btn {
    background: #19a974;
    color: #fff;
}
.p-card.card-vpp .enter-btn {
    color: #e6d4f7;
    background: rgba(146, 87, 184, 0.2);
    border: 1px solid rgba(170, 110, 215, 0.55);
}
.p-card.card-vpp.clickable:hover .enter-btn {
    background: #8a4fc2;
    color: #fff;
}
.p-card.locked {
    filter: grayscale(0.85) brightness(0.7);
    cursor: not-allowed;
}
.p-card.locked:hover {
    transform: none;
    box-shadow: none;
    border-color: rgba(120, 160, 220, 0.18);
}
.p-card.locked .enter-btn {
    background: rgba(140, 150, 170, 0.15);
    border-color: rgba(140, 150, 170, 0.35);
    color: #99a5b8;
    letter-spacing: 2px;
}
.portal-foot {
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    font-size: 12px;
    color: #5c7091;
}

/* SSO 过渡 */
.portal-transition {
    position: fixed;
    inset: 0;
    background: rgba(8, 14, 26, 0.88);
    z-index: 998;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 22px;
    backdrop-filter: blur(3px);
}
.portal-transition.show { display: flex !important; }
.portal-transition .spinner {
    width: 44px;
    height: 44px;
    border: 3px solid rgba(86, 204, 242, 0.2);
    border-top-color: #56ccf2;
    border-radius: 50%;
    animation: portal-spin 0.8s linear infinite;
}
@keyframes portal-spin { to { transform: rotate(360deg); } }
.portal-transition .txt {
    font-size: 14px;
    color: #c9d8ee;
    letter-spacing: 2px;
}

@media (max-width: 960px) {
    .login-screen { flex-direction: column; }
    .login-left {
        flex: none;
        padding: 48px 28px;
        min-height: 42vh;
    }
    .login-brand .slogan { font-size: 28px; }
    .login-brand h1 { font-size: 24px; }
    .login-card { padding: 36px 28px; }
    .portal-main { padding: 28px 16px; }
    .p-card { width: 100%; max-width: 400px; }
}
