:root {
    --bg-color: #0b0b0f;
    --accent-color: #ffd100;
    --accent-soft: rgba(255, 209, 0, 0.1);
    --text-color: #e6e8ee;
    --text-muted: rgba(230, 232, 238, 0.6);
    --font-main: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    --accent-glow: 0 0 20px rgba(255, 209, 0, 0.18);
    --card-bg: rgba(255, 255, 255, 0.03);
    --card-border: rgba(255, 255, 255, 0.06);
    --input-bg: #161922;
    --radius-md: 12px;
    --radius-lg: 24px;
    --transition: all 0.2s ease-out;
}

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

body {
    background:
        radial-gradient(circle at top left, rgba(122, 92, 255, 0.12), transparent 32%),
        radial-gradient(circle at bottom right, rgba(255, 209, 0, 0.05), transparent 28%),
        linear-gradient(180deg, #0b0b0f 0%, #07070a 100%);
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-main);
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.bg-glow-container {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
    background: radial-gradient(circle at 50% 50%, #0b0b0f 0%, #07070a 100%);
}

.glow-blob {
    position: absolute;
    width: 800px;
    height: 800px;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.08;
    animation: float 20s infinite alternate cubic-bezier(0.45, 0, 0.55, 1);
}

.glow-1 {
    background: radial-gradient(circle, var(--accent-color) 0%, transparent 70%);
    top: -200px;
    left: -100px;
    animation-duration: 28s;
}

.glow-2 {
    background: radial-gradient(circle, #7a5cff 0%, transparent 70%);
    bottom: -300px;
    right: -100px;
    animation-duration: 30s;
    animation-delay: -5s;
}

.glow-3 {
    background: radial-gradient(circle, #ffd100 0%, transparent 70%);
    top: 40%;
    left: 50%;
    width: 600px;
    height: 600px;
    opacity: 0.1;
    animation-duration: 22s;
    animation-delay: -10s;
}

@keyframes float {
    0% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(100px, 150px) scale(1.1);
    }

    66% {
        transform: translate(-50px, 200px) scale(0.9);
    }

    100% {
        transform: translate(40px, -60px) scale(1.05);
    }
}

.hero-section {
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    position: relative;
}

@keyframes logo-shimmer {
    0% {
        opacity: 0.9;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.9;
    }
}

.logo-shimmer {
    animation: logo-shimmer 4s infinite ease-in-out;
}

.logo-top {
    position: absolute;
    top: 10vh;
    width: min(900px, 80vw);
    filter: drop-shadow(0 0 50px rgba(0, 0, 0, 0.8));
    animation: heroFade 1.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.logo-top img {
    width: 100%;
    height: auto;
    display: block;
}

.main-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.footer-brand {
    position: absolute;
    bottom: 6vh;
    left: 50%;
    transform: translateX(-50%);
    font-size: 18px;
    letter-spacing: 5px;
    color: #ffffff;
    text-transform: uppercase;
    font-weight: 600;
    white-space: nowrap;
    z-index: 100;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
    opacity: 1;
}

.logo-top {
    width: 900px;
    margin-bottom: 8vh;
    filter: drop-shadow(0 0 50px rgba(0, 0, 0, 0.8));
    animation: heroFade 1.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.logo-top img {
    width: 100%;
    height: auto;
    display: block;
}

@keyframes heroFade {
    from {
        opacity: 0;
        transform: scale(0.98) translateY(20px);
        filter: blur(10px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
        filter: blur(0);
    }
}

.portal {
    display: flex;
    gap: 16px;
    background: transparent;
    border-radius: 40px;
    padding: 0;
    overflow: visible;
    margin-top: -160px;
    animation: portalFade 1.5s cubic-bezier(0.16, 1, 0.3, 1) 0.3s both;
}

@keyframes portalFade {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.portal-item {
    position: relative;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    padding: 52px 40px;
    text-decoration: none;
    color: inherit;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 380px;
    border-radius: 24px;
}

.portal-item:first-child,
.portal-item:last-child {
    border-radius: 32px;
}

.portal-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent, rgba(255, 221, 0, 0.03));
    opacity: 0;
    transition: opacity 0.6s;
    pointer-events: none;
}

.portal-item:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--accent-color);
    transform: translateY(-6px);
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.35), 0 0 20px var(--accent-soft);
}

.portal-item:hover::after {
    opacity: 1;
}

.icon-box {
    font-size: 40px;
    color: rgba(255, 255, 255, 0.18);
    margin-bottom: 40px;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.portal-item:hover .icon-box {
    color: var(--accent-color);
    transform: translateY(-3px);
    text-shadow: 0 0 20px var(--accent-glow);
}

.portal-item h2 {
    font-size: 22px;
    font-weight: 500;
    letter-spacing: 4px;
    margin-left: 8px;
    margin-bottom: 20px;
    text-transform: uppercase;
    transition: all 0.6s;
}

.portal-item:hover h2 {
    letter-spacing: 5px;
    color: var(--accent-color);
}

.portal-item p {
    color: rgba(230, 232, 238, 0.58);
    font-size: 13px;
    line-height: 1.8;
    text-align: center;
    max-width: 280px;
    font-weight: 300;
    letter-spacing: 1px;
}

.portal-single-auth {
    width: 100%;
    max-width: 680px;
    justify-content: center;
    animation: heroFade 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.portal-single-auth .portal-item {
    width: 100%;
    padding: 72px 84px;
    border-radius: 40px;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.auth-login-card {
    background: rgba(17, 18, 23, 0.86);
}

.auth-card-kicker {
    font-size: 10px;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.3);
    margin-bottom: 18px;
}

.auth-form {
    width: 100%;
    margin-top: 26px;
}

.auth-form .field {
    margin-bottom: 24px;
    text-align: left;
}

.auth-select-wrap {
    position: relative;
}

.auth-select-wrap select {
    width: 100%;
    min-height: 52px;
    padding: 14px 18px;
    background: var(--input-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    color: #fff;
    font-size: 16px;
    letter-spacing: 1px;
    text-align: left;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
}

.auth-select-wrap select option {
    background: #111;
    color: #fff;
}

.auth-select-arrow {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.45);
    pointer-events: none;
    font-size: 12px;
}

.auth-form label {
    display: block;
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.48);
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.auth-form select,
.auth-form input[type="password"] {
    text-align: left;
    letter-spacing: 1px;
}

.auth-error {
    margin-top: 18px;
    color: var(--accent-color);
    font-size: 11px;
    letter-spacing: 1px;
    text-align: left;
}

.login-card {
    width: 100%;
    max-width: 500px;
    padding: 80px;
    text-align: center;
    animation: heroFade 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.field {
    margin-bottom: 40px;
    position: relative;
}

input[type="text"],
input[type="password"],
select,
textarea {
    width: 100%;
    padding: 14px 18px;
    background: var(--input-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    color: #fff;
    outline: none;
    font-size: 15px;
    letter-spacing: 0.5px;
    transition: var(--transition);
}

select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 16px;
    padding-right: 40px;
}

input:focus,
select:focus,
textarea:focus {
    border-color: rgba(122, 92, 255, 0.55);
    background: #1c2030;
    box-shadow: 0 0 0 3px rgba(122, 92, 255, 0.12);
}

input[type="password"] {
    width: 100%;
    padding: 14px 18px;
    background: var(--input-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    color: #fff;
    outline: none;
    font-size: 18px;
    text-align: left;
    letter-spacing: 4px;
    transition: var(--transition);
}

input[type="password"]:focus {
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.08);
}

.login-btn {
    background: var(--accent-color);
    border: none;
    padding: 16px 32px;
    color: #000;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 2px;
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: var(--transition);
    text-transform: uppercase;
}

.login-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(255, 209, 0, 0.18);
    filter: brightness(1.04);
}

.login-btn:active {
    transform: translateY(0);
}

.logout-link {
    position: fixed;
    bottom: 40px;
    color: rgba(255, 255, 255, 0.2);
    text-decoration: none;
    font-size: 11px;
    letter-spacing: 2px;
    transition: color 0.3s;
}

.logout-link:hover {
    color: var(--accent-color);
}

.footer-brand {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.15);
    text-transform: uppercase;
    font-weight: 300;
    white-space: nowrap;
    z-index: 100;
}

@media (max-width: 1000px) {
    .logo-top {
        width: 80%;
    }

    .portal {
        flex-direction: column;
        border-radius: 20px;
    }

    .portal-item {
        width: 100%;
        padding: 60px 40px;
    }

    .portal-item:first-child {
        border-radius: 20px 20px 0 0;
    }

    .portal-item:last-child {
        border-radius: 0 0 20px 20px;
    }

    .footer-brand {
        bottom: 20px;
        font-size: 8px;
    }

    .portal-single-auth {
        max-width: 100%;
    }

    .portal-single-auth .portal-item {
        padding: 46px 28px;
        border-radius: 20px;
    }
}
