:root {
    --accent: #fe2c55;
    --accent-soft: #ff6b9d;
    --cyan: #00f2fe;
    --glass: rgba(255, 255, 255, 0.08);
    --glass-strong: rgba(255, 255, 255, 0.15);
    --white-dim: rgba(255, 255, 255, 0.8);
    --line: rgba(255, 255, 255, 0.2);
    --shadow-deep: rgba(0, 0, 0, 0.6);
    --shadow-plain: rgba(0, 0, 0, 0.3);
    --panel-radius: 24px;
}

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

body {
    min-height: 100vh;
    overflow-x: hidden;
    color: #fff;
    background: url('/static/image/logbgs.jpg') center center / cover no-repeat fixed;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    position: relative;
}

.gate-stage {
    align-items: center;
    background: transparent;
    display: flex;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    position: relative;
    z-index: 1;
}

.gate-stage__box {
    max-width: 400px;
    position: relative;
    width: 100%;
}

.crest-frame {
    margin: -18% 0 40px;
    text-align: center;
}

.crest-frame img {
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(254, 44, 85, 0.4), 0 4px 16px var(--shadow-plain);
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
    width: 100% !important;
}

.crest-frame img:hover {
    transform: scale(1.05);
}

.entry-shell {
    animation: panelRise 0.6s ease-out;
    backdrop-filter: blur(25px);
    background: var(--glass);
    border: 1px solid var(--glass-strong);
    border-radius: var(--panel-radius);
    box-shadow: 0 25px 60px var(--shadow-deep), 0 8px 25px rgba(254, 44, 85, 0.15);
    overflow: hidden;
    padding: 40px 30px;
    position: relative;
    transition: background 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1), transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.entry-shell::before {
    background: linear-gradient(90deg, var(--accent), var(--cyan), var(--accent));
    border-radius: var(--panel-radius) var(--panel-radius) 0 0;
    content: '';
    height: 3px;
    inset: 0 0 auto;
    position: absolute;
}

.entry-shell:hover {
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 35px 80px rgba(0, 0, 0, 0.7), 0 12px 35px rgba(254, 44, 85, 0.2);
    transform: translateY(-5px);
}

.entry-shell__head {
    margin-bottom: 30px;
    position: relative;
    text-align: center;
}

.access-stack {
    margin-top: 25px;
}

.access-line,
.access-action {
    display: block;
    margin-bottom: 24px;
    position: relative;
}

.access-line {
    transition: transform 0.3s ease;
}

.access-line input {
    backdrop-filter: blur(20px);
    background: var(--glass);
    border: 2px solid var(--line);
    border-radius: 16px;
    color: #fff;
    font-size: 16px;
    font-weight: 500;
    padding: 18px 20px;
    transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
    width: 100%;
}

.access-line input::placeholder {
    color: rgba(255, 255, 255, 0.6);
    font-weight: 400;
}

.access-line input:focus {
    background: var(--glass-strong);
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(254, 44, 85, 0.2), 0 8px 20px var(--shadow-plain), 0 0 20px rgba(254, 44, 85, 0.1);
    outline: none;
    transform: translateY(-2px);
}

.access-ways {
    align-items: center;
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
}

.access-ways a,
.enroll-link a {
    color: var(--white-dim);
    font-size: 14px;
    font-weight: 500;
    position: relative;
    text-decoration: none;
    transition: color 0.3s ease;
}

.enroll-link {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.enroll-link a {
    color: var(--accent);
    font-size: 15px;
    font-weight: 600;
    margin-left: 5px;
}

.access-ways a::after,
.enroll-link a::after {
    background: var(--accent);
    bottom: -2px;
    content: '';
    height: 2px;
    left: 0;
    position: absolute;
    transition: width 0.3s ease;
    width: 0;
}

.access-ways a:hover {
    color: #fff;
}

.enroll-link a:hover {
    color: var(--accent-soft);
}

.access-ways a:hover::after,
.enroll-link a:hover::after {
    width: 100%;
}

.access-commit {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-soft) 100%);
    border: 0;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(254, 44, 85, 0.3), 0 5px 15px rgba(254, 44, 85, 0.2);
    color: #fff;
    cursor: pointer;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0.5px;
    overflow: hidden;
    padding: 18px 35px;
    position: relative;
    transition: background 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
    width: 100%;
}

.access-commit::before {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    content: '';
    height: 100%;
    left: -100%;
    position: absolute;
    top: 0;
    transition: left 0.5s;
    width: 100%;
}

.access-commit:hover {
    background: linear-gradient(135deg, var(--accent-soft) 0%, var(--accent) 100%);
    box-shadow: 0 15px 35px rgba(254, 44, 85, 0.4), 0 8px 20px rgba(254, 44, 85, 0.3);
    transform: translateY(-3px);
}

.access-commit:hover::before {
    left: 100%;
}

.access-commit:active {
    transform: translateY(-1px);
}

.tx-switch {
    align-items: center;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--line);
    border-radius: 16px;
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    position: fixed;
    right: 30px;
    text-decoration: none;
    top: 30px;
    transition: background 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
    z-index: 1000;
}

.tx-switch:hover {
    background: var(--line);
    box-shadow: 0 8px 20px var(--shadow-plain);
    transform: scale(1.05);
}

.tx-switch__mark {
    font-family: 'Material Icons';
    font-size: 20px;
}

.tx-switch__label {
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.hint-bubble {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-soft) 100%);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(254, 44, 85, 0.3);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    max-width: 300px;
    opacity: 0;
    padding: 15px 25px;
    position: fixed;
    right: 20px;
    top: 20px;
    transform: translateX(400px);
    transition: opacity 0.4s ease, transform 0.4s ease;
    z-index: 10000;
}

.hint-bubble.on-screen {
    opacity: 1;
    transform: translateX(0);
}

.wait-cover {
    align-items: center;
    backdrop-filter: blur(10px);
    background: rgba(0, 0, 0, 0.8);
    display: none;
    height: 100%;
    justify-content: center;
    left: 0;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 10001;
}

.wait-cover__ring {
    animation: spinAround 1s linear infinite;
    border: 4px solid rgba(254, 44, 85, 0.3);
    border-radius: 50%;
    border-top-color: var(--accent);
    height: 50px;
    width: 50px;
}

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

@keyframes spinAround {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 768px) {
    .gate-stage {
        padding: 15px;
    }

    .entry-shell {
        border-radius: 20px;
        padding: 35px 25px;
    }

    .tx-switch {
        padding: 10px 14px;
        right: 20px;
        top: 20px;
    }

    .tx-switch__label {
        font-size: 13px;
    }

    .crest-frame img {
        height: 70px;
        width: 70px !important;
    }

    .access-line input {
        font-size: 15px;
        padding: 16px 18px;
    }

    .access-commit {
        font-size: 16px;
        padding: 16px 30px;
    }

    .hint-bubble {
        left: 10px;
        max-width: none;
        right: 10px;
        top: 10px;
        transform: translateY(-100px);
    }

    .hint-bubble.on-screen {
        transform: translateY(0);
    }
}

@media (max-width: 480px) {
    .entry-shell {
        border-radius: 16px;
        padding: 30px 20px;
    }

    .tx-switch {
        padding: 8px 12px;
        right: 15px;
        top: 15px;
    }

    .tx-switch__label {
        font-size: 12px;
    }

    .crest-frame img {
        height: 200px;
        width: 100% !important;
    }

    .access-line input {
        font-size: 14px;
        padding: 15px 16px;
    }

    .access-commit {
        font-size: 15px;
        padding: 15px 25px;
    }
}
