@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', 'Microsoft YaHei', sans-serif;
    -webkit-overflow-scrolling: touch;
}

.snow-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
}

.snowflake {
    position: fixed;
    top: -10px;
    background: #fff;
    border-radius: 50%;
    pointer-events: none;
    animation: snowfall linear forwards;
}

@keyframes snowfall {
    0% {
        transform: translateY(0) rotate(0deg);
    }
    100% {
        transform: translateY(100vh) rotate(360deg);
    }
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    position: relative;
    background: radial-gradient(circle at 18% 18%, #1e293b 0%, #0f172a 45%, #020617 100%);
    color: #e0f2fe;
    overflow-x: hidden;
    overflow-y: auto;
}

body::-webkit-scrollbar {
    width: 12px;
    background: transparent;
}

body::-webkit-scrollbar-track {
    background: rgba(2, 6, 23, 0.75);
    border-radius: 12px;
    box-shadow: inset 0 0 8px rgba(15, 23, 42, 0.65);
}

body::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(22, 163, 223, 0.95), rgba(99, 102, 241, 0.9));
    border-radius: 12px;
    border: 2px solid rgba(15, 23, 42, 0.8);
    box-shadow: inset 0 0 6px rgba(148, 163, 184, 0.3);
}

body::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(14, 165, 233, 1), rgba(129, 140, 248, 0.95));
}

body::before {
    content: "";
    position: fixed;
    top: -20vh;
    left: -15vw;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.18) 0%, rgba(2, 6, 23, 0) 65%);
    filter: blur(20px);
    z-index: -2;
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    background: linear-gradient(140deg, rgba(15, 23, 42, 0.65), rgba(30, 64, 175, 0.35)),
                url('../images/login_bg.jpg') center/cover no-repeat;
    opacity: 0.55;
    z-index: -3;
    transform: scale(1.05);
    filter: saturate(120%);
}

.container {
    position: relative;
    width: min(1100px, 94vw);
    min-height: 80vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 48px;
    border-radius: 40px;
    backdrop-filter: blur(24px);
    background: linear-gradient(125deg, rgba(15, 23, 42, 0.78), rgba(30, 64, 175, 0.55));
    box-shadow: 0 40px 80px rgba(2, 6, 23, 0.55);
    overflow: visible;
    border: 1px solid rgba(148, 163, 184, 0.25);
    z-index: 1;
    gap: 32px;
}

.container::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 30%, rgba(56, 189, 248, 0.25), transparent 60%),
                radial-gradient(circle at 80% 20%, rgba(236, 72, 153, 0.2), transparent 60%),
                radial-gradient(circle at 60% 90%, rgba(125, 211, 252, 0.18), transparent 70%);
    pointer-events: none;
    opacity: 0.85;
}

.login-box {
    position: relative;
    width: min(520px, 100%);
    padding: 52px 58px 56px;
    background: linear-gradient(140deg, rgba(15, 23, 42, 0.78), rgba(30, 64, 175, 0.68));
    backdrop-filter: blur(26px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-radius: 32px;
    border: 1px solid rgba(59, 130, 246, 0.28);
    box-shadow: 0 35px 65px rgba(2, 6, 23, 0.45);
    gap: 36px;
}

.login-box::after {
    content: "";
    position: absolute;
    inset: 18px;
    border-radius: 28px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    pointer-events: none;
}

.logo {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.logo img {
    width: 280px;
    height: 180px;
    object-fit: contain;
    transition: all 0.6s ease;
    animation: floatGlow 5s infinite ease-in-out;
    filter: drop-shadow(0 18px 28px rgba(56, 189, 248, 0.38));
}

.logo img:hover {
    transform: translateY(-6px) scale(1.03);
    filter: drop-shadow(0 26px 38px rgba(165, 180, 252, 0.45));
}

form {
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 22px;
}

.input-group {
    display: flex;
    flex-direction: column-reverse;
    align-items: flex-start;
    gap: 6px;
}

.input-group label {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.4px;
    color: rgba(148, 163, 184, 0.85);
    text-transform: uppercase;
    padding-left: 4px;
}

.input-group input {
    width: 100%;
    padding: 16px 18px;
    font-size: 16px;
    color: #e2e8f0;
    border: 1px solid rgba(148, 163, 184, 0.45);
    border-radius: 16px;
    outline: none;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.55), rgba(30, 64, 175, 0.45));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
    transition: all 0.3s ease;
}

.input-group input::placeholder {
    color: rgba(148, 163, 184, 0.65);
    letter-spacing: 0.3px;
}

.input-group input:focus {
    border-color: rgba(56, 189, 248, 0.75);
    background: linear-gradient(135deg, rgba(22, 78, 148, 0.75), rgba(14, 165, 233, 0.35));
    box-shadow: 0 18px 30px rgba(56, 189, 248, 0.22);
}

.login-btn {
    width: 60%;
    padding: 12px 0;
    border: none;
    background: linear-gradient(120deg, #22d3ee, #2563eb);
    color: #0b1120;
    font-size: 16px;
    cursor: pointer;
    border-radius: 999px;
    transition: 0.3s;
    margin-bottom: 5px;
    margin-left: auto;
    margin-right: auto;
    box-shadow: 0 22px 46px rgba(37, 99, 235, 0.4);
}

.login-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 30px 52px rgba(14, 165, 233, 0.55);
    filter: brightness(1.06);
}

.register-btn {
    width: 60%;
    padding: 12px 0;
    border: 2px solid rgba(56, 189, 248, 0.55);
    background: transparent;
    color: #e0f2fe;
    font-size: 16px;
    cursor: pointer;
    border-radius: 999px;
    transition: 0.3s;
    margin-left: auto;
    margin-right: auto;
    box-shadow: 0 18px 36px rgba(56, 189, 248, 0.25);
}

.register-btn:hover {
    background: linear-gradient(120deg, rgba(37, 99, 235, 0.18), rgba(59, 130, 246, 0.22));
    color: #38bdf8;
    border-color: rgba(14, 165, 233, 0.65);
    transform: translateY(-3px);
    box-shadow: 0 26px 44px rgba(14, 165, 233, 0.45);
}

.download-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    width: 60%;
    margin: 5px auto;
    padding: 0;
}

.download-btn {
    width: 50%;
    padding: 10px 0;
    border: none;
    font-size: 16px;
    cursor: pointer;
    border-radius: 14px;
    transition: 0.3s;
    color: #f8fafc;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, rgba(30, 64, 175, 0.85), rgba(59, 130, 246, 0.85));
    border: 1px solid rgba(148, 163, 184, 0.25);
    box-shadow: 0 22px 40px rgba(30, 64, 175, 0.35);
}

.download-btn span:first-child {
    font-size: 18px;
    font-weight: 500;
}

.download-btn span:last-child {
    font-size: 14px;
}

.chrome-btn {
    background: linear-gradient(135deg, rgba(22, 163, 223, 0.95), rgba(59, 130, 246, 0.92));
    border: 1px solid rgba(37, 99, 235, 0.55);
}

.chrome-btn:hover {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.95), rgba(59, 130, 246, 0.95));
    transform: translateY(-4px);
    box-shadow: 0 30px 46px rgba(22, 163, 223, 0.45);
}

.teamviewer-btn {
    background: linear-gradient(135deg, rgba(129, 140, 248, 0.95), rgba(236, 72, 153, 0.92));
    border: 1px solid rgba(165, 180, 252, 0.55);
}

.teamviewer-btn:hover {
    background: linear-gradient(135deg, rgba(244, 114, 182, 0.95), rgba(139, 92, 246, 0.95));
    transform: translateY(-4px);
    box-shadow: 0 30px 46px rgba(244, 114, 182, 0.45);
}

.register-form {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(780px, 92vw);
    background: linear-gradient(140deg, rgba(15, 23, 42, 0.94), rgba(37, 99, 235, 0.68));
    padding: 28px 34px 26px;
    border-radius: 16px;
    box-shadow: 0 36px 70px rgba(2, 6, 23, 0.6);
    display: none;
    z-index: 1100;
    backdrop-filter: blur(24px);
    border: 1px solid rgba(59, 130, 246, 0.4);
    flex-direction: column;
    gap: 12px;
}

.register-form.show {
    display: flex;
}

#loginForm.hide {
    display: none;
}

.register-form h2 {
    text-align: left;
    color: #60a5fa;
    margin-bottom: 6px;
    font-size: 22px;
    letter-spacing: 0.6px;
    text-shadow: 0 0 22px rgba(56, 189, 248, 0.45);
}

.register-desc {
    text-align: left;
    color: rgba(226, 232, 240, 0.75);
    margin-bottom: 14px;
    line-height: 1.4;
    font-size: 12px;
}

.reg-group {
    margin-bottom: 8px;
    position: relative;
}

.reg-group label {
    display: block;
    margin-bottom: 4px;
    color: #cbd5f5;
    font-size: 13px;
    font-weight: 500;
}

.reg-group input,
.reg-group select {
    width: 100%;
    padding: 8px 12px;
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(148, 163, 184, 0.45);
    border-radius: 5px;
    font-size: 13px;
    color: #e2e8f0;
    transition: all 0.3s ease;
    box-shadow: inset 0 1px 0 rgba(148, 163, 184, 0.4);
}

.reg-group input:focus,
.reg-group select:focus {
    border-color: rgba(59, 130, 246, 0.68);
    outline: none;
    background: rgba(15, 23, 42, 0.85);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.22);
}

.id-check {
    display: flex;
    gap: 8px;
}

.id-check input {
    flex: 1;
}

.check-btn {
    padding: 8px 15px;
    background: linear-gradient(135deg, #38bdf8, #818cf8);
    color: #0b1120;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s ease;
    box-shadow: 0 18px 32px rgba(99, 102, 241, 0.35);
}

.check-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 26px 40px rgba(59, 130, 246, 0.45);
}

.hint {
    display: block;
    color: #94a3b8;
    font-size: 11px;
    margin-top: 4px;
}

.phone-input {
    display: flex;
    align-items: center;
    gap: 8px;
}

.phone-input input {
    width: 70px;
}

.phone-input input:first-child {
    background: rgba(255, 255, 255, 0.05);
}

.form-buttons {
    grid-column: 1 / -1;
    display: flex;
    gap: 14px;
    margin-top: 10px;
}

.submit-btn,
.cancel-btn {
    flex: 1;
    padding: 8px;
    font-size: 13px;
}

.submit-btn {
    background: linear-gradient(135deg, #38bdf8, #60a5fa);
    color: #ffffff;
    border: none;
    border-radius: 5px;
    transition: all 0.3s ease;
    box-shadow: 0 20px 32px rgba(96, 165, 250, 0.35);
}

.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 28px 40px rgba(14, 165, 233, 0.55);
}

.cancel-btn {
    background: transparent;
    color: rgba(226, 232, 240, 0.8);
    border: 1px solid rgba(148, 163, 184, 0.55);
    border-radius: 5px;
    transition: all 0.3s ease;
}

.cancel-btn:hover {
    border-color: rgba(56, 189, 248, 0.55);
    color: #60a5fa;
    transform: translateY(-3px);
    background: rgba(15, 23, 42, 0.6);
}

.reg-group select {
    width: 100%;
    padding: 8px 12px;
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(148, 163, 184, 0.45);
    border-radius: 5px;
    font-size: 13px;
    color: #e0f2fe;
    transition: all 0.3s ease;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M2.5 4.5L6 8L9.5 4.5' stroke='%2338bdf8' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 35px;
}

.reg-group select:hover {
    border-color: rgba(59, 130, 246, 0.55);
    background-color: rgba(15, 23, 42, 0.78);
}

.reg-group select:focus {
    border-color: rgba(37, 99, 235, 0.75);
    outline: none;
    background-color: rgba(15, 23, 42, 0.9);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

.reg-group select option {
    background-color: #020617;
    color: #cbd5f5;
    padding: 10px;
    font-size: 13px;
}

.reg-group select option:hover,
.reg-group select option:focus,
.reg-group select option:active,
.reg-group select option:checked {
    background-color: #1d4ed8;
    color: #f8fafc;
}

@keyframes floatGlow {
    0% {
        transform: translateY(0) scale(1);
        filter: drop-shadow(0 18px 30px rgba(148, 163, 184, 0.25));
    }
    50% {
        transform: translateY(-8px) scale(1.02);
        filter: drop-shadow(0 26px 40px rgba(96, 165, 250, 0.38));
    }
    100% {
        transform: translateY(0) scale(1);
        filter: drop-shadow(0 18px 30px rgba(148, 163, 184, 0.25));
    }
}

.register-form h2 {
    text-align: left;
    color: #60a5fa;
    font-size: 22px;
    letter-spacing: 0.6px;
    text-shadow: 0 0 22px rgba(56, 189, 248, 0.45);
    margin-bottom: 4px;
}

.register-desc {
    text-align: left;
    color: rgba(226, 232, 240, 0.75);
    line-height: 1.4;
    font-size: 12px;
    margin-bottom: 12px;
}

.register-form form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 26px;
}

.reg-group {
    margin-bottom: 0;
    position: relative;
}

.form-buttons {
    grid-column: 1 / -1;
    display: flex;
    gap: 14px;
    margin-top: 6px;
}

@media screen and (max-width: 1024px) {
    body {
        padding: 20px 0;
    }

    .container {
        width: calc(100% - 48px);
        padding: 36px;
        border-radius: 32px;
    }

    .register-form {
        width: calc(100% - 40px);
        padding: 28px 28px 26px;
        border-radius: 14px;
    }

    .register-form form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px 22px;
    }
}

@media screen and (max-width: 768px) {
    body {
        padding: 18px 0;
    }

    .container {
        flex-direction: column;
        align-items: stretch;
        width: calc(100% - 32px);
        padding: 26px 22px 32px;
        border-radius: 26px;
        gap: 28px;
        min-height: auto;
    }

    .login-box {
        width: 100%;
        height: auto;
        padding: 24px 20px;
        border-radius: 20px;
    }

    .login-box::after {
        display: none;
    }

    .logo img {
        width: 260px;
        height: 180px;
    }

    form {
        padding: 0;
    }

    .login-btn,
    .register-btn {
        width: 100%;
    }

    .register-form {
        width: calc(100% - 32px);
        top: 50%;
        padding: 24px 22px;
        transform: translate(-50%, -50%);
        border-radius: 10px;
    }

    .register-form form {
        grid-template-columns: repeat(1, minmax(0, 1fr));
        gap: 14px 18px;
    }

    .register-form h2 {
        margin-bottom: 5px;
    }

    .register-desc {
        margin-bottom: 10px;
        line-height: 1.3;
    }

    .reg-group {
        margin-bottom: 8px;
    }

    .reg-group input,
    .reg-group select {
        padding: 6px 8px;
    }

    .phone-input {
        gap: 4px;
    }

    .phone-input input {
        padding: 6px 4px;
    }

    .form-buttons {
        gap: 6px;
        margin-top: 10px;
    }

    .submit-btn,
    .cancel-btn {
        padding: 8px;
    }

    .download-buttons {
        width: 80%;
    }

    .download-btn {
        font-size: 14px;
        box-shadow: 0 10px 18px rgba(148, 163, 184, 0.22);
    }
}

@media screen and (max-width: 480px) {
    body {
        padding: 16px 0;
    }

    .container {
        width: calc(100% - 18px);
        padding: 22px 16px 28px;
        border-radius: 20px;
        gap: 24px;
    }

    .logo img {
        width: 240px;
        height: 160px;
    }

    .input-group input {
        font-size: 14px;
    }

    .input-group label {
        font-size: 14px;
    }

    .login-btn,
    .register-btn {
        width: 90%;
        font-size: 14px;
    }

    .register-form {
        width: calc(100% - 24px);
        padding: 18px;
        transform: translate(-50%, -50%);
        top: 50%;
        border-radius: 8px;
    }

    .register-form h2 {
        font-size: 18px;
    }

    .register-form form {
        grid-template-columns: repeat(1, minmax(0, 1fr));
        gap: 12px 16px;
    }

    .register-desc {
        font-size: 10px;
        line-height: 1.2;
        margin-bottom: 8px;
    }

    .reg-group {
        margin-bottom: 6px;
    }

    .reg-group label {
        font-size: 12px;
        margin-bottom: 2px;
    }

    .reg-group input,
    .reg-group select {
        font-size: 12px;
        padding: 8px;
    }

    .phone-input input {
        padding: 6px 4px;
    }

    .form-buttons {
        margin-top: 8px;
    }

    .submit-btn,
    .cancel-btn {
        padding: 7px;
    }

    .hint {
        font-size: 10px;
        margin-top: 2px;
    }

    .download-buttons {
        width: 90%;
    }

    .download-btn {
        font-size: 12px;
        padding: 10px 0;
        box-shadow: 0 8px 14px rgba(148, 163, 184, 0.2);
    }
}

@media (hover: none) {
    .login-btn:active,
    .register-btn:active {
        transform: scale(0.98);
    }

    .submit-btn:active,
    .cancel-btn:active {
        opacity: 0.8;
    }
}