* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
    --primary: #0a192f;
    --secondary: #112240;
    --accent: #64ffda;
    --text: #ccd6f6;
    --text-light: #a8b2d1;
    --card: #172a45;
    --highlight: #233554;
}

body {
    background-color: var(--primary);
    color: var(--text);
    background-image: radial-gradient(circle at 10% 20%, rgba(17, 34, 64, 0.8) 0%, transparent 20%),
    radial-gradient(circle at 90% 80%, rgba(17, 34, 64, 0.8) 0%, transparent 20%);
    line-height: 1.6;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* 电路板纹理 */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(rgba(25, 55, 109, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(25, 55, 109, 0.1) 1px, transparent 1px);
    background-size: 30px 30px;
    z-index: -1;
}

/* 导航栏 */
.navbar {
    background-color: rgba(10, 25, 47, 0.95);
    backdrop-filter: blur(10px);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(100, 255, 218, 0.1);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--accent);
    text-decoration: none;
    z-index: 1001;
}

.logo i {
    color: var(--accent);
    font-size: 1.5rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--accent);
}

.nav-links a::after {
    content: "";
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

/* 移动端导航菜单 */
.mobile-menu-btn {
    display: none;
    background: transparent;
    border: none;
    color: var(--text);
    font-size: 1.8rem;
    cursor: pointer;
    z-index: 1001;
}

.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 320px;
    height: 100vh;
    background: var(--primary);
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    transition: right 0.4s ease-in-out;
    padding: 6rem 2rem 2rem;
    overflow-y: auto;
}

.mobile-menu.active {
    right: 0;
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.mobile-nav-links a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 1.2rem;
    padding: 0.8rem 1rem;
    border-radius: 4px;
    transition: all 0.3s;
}

.mobile-nav-links a:hover,
.mobile-nav-links a.active {
    color: var(--accent);
    background: rgba(100, 255, 218, 0.1);
}

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* 登录区域 */
.login-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6rem 2rem 4rem;
    margin-top: 80px;
    position: relative;
}

.login-card {
    background: var(--card);
    border-radius: 12px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 450px;
    padding: 3rem;
    border: 1px solid rgba(100, 255, 218, 0.2);
    position: relative;
    overflow: hidden;
}

.login-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--accent), #4facfe);
}

.login-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.login-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(90deg, var(--accent), #4facfe);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.login-header p {
    color: var(--text-light);
    font-size: 1.1rem;
}

.form-group {
    margin-bottom: 1.8rem;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 0.6rem;
    color: var(--text-light);
    font-size: 0.95rem;
}

.input-with-icon {
    position: relative;
}

.input-with-icon i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--accent);
    font-size: 1.2rem;
}

.form-control {
    width: 100%;
    padding: 0.9rem 1rem 0.9rem 45px;
    background: rgba(23, 42, 69, 0.8);
    border: 1px solid rgba(100, 255, 218, 0.2);
    border-radius: 6px;
    color: var(--text);
    font-size: 1rem;
    transition: all 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(100, 255, 218, 0.2);
}

.remember-forgot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.8rem;
    font-size: 0.95rem;
}

.remember {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.remember input {
    accent-color: var(--accent);
}

.forgot-password {
    color: var(--accent);
    text-decoration: none;
    transition: opacity 0.3s;
}

.forgot-password:hover {
    opacity: 0.8;
}

.btn {
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--accent);
    padding: 0.9rem;
    font-size: 1.1rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
    width: 100%;
    text-align: center;
    font-weight: 600;
}

.btn:hover {
    background: rgba(100, 255, 218, 0.1);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(100, 255, 218, 0.2);
}

.btn-primary {
    background: var(--accent);
    color: var(--primary);
}

.btn-primary:hover {
    background: #52e0c4;
}

.login-footer {
    text-align: center;
    margin-top: 2rem;
    color: var(--text-light);
    font-size: 0.95rem;
}

.login-footer a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    margin-left: 0.5rem;
    transition: opacity 0.3s;
}

.login-footer a:hover {
    opacity: 0.8;
}

.divider {
    display: flex;
    align-items: center;
    margin: 2rem 0;
}

.divider::before,
.divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: rgba(100, 255, 218, 0.1);
}

.divider span {
    padding: 0 1rem;
    color: var(--text-light);
    font-size: 0.9rem;
}

.social-login {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

.social-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--secondary);
    color: var(--text);
    font-size: 1.2rem;
    border: 1px solid rgba(100, 255, 218, 0.1);
    transition: all 0.3s;
    cursor: pointer;
}

.social-btn:hover {
    background: var(--accent);
    color: var(--primary);
    transform: translateY(-5px);
}

/* 芯片动画 */
.chip {
    position: absolute;
    width: 60px;
    height: 60px;
    background: linear-gradient(145deg, var(--secondary), var(--primary));
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(100, 255, 218, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: float 6s infinite ease-in-out;
    z-index: 0;
    opacity: 0.7;
    border: 1px solid rgba(100, 255, 218, 0.3);
}

.chip i {
    color: var(--accent);
    font-size: 1.5rem;
}

.chip:nth-child(1) {
    top: 15%;
    left: 10%;
    animation-delay: 0s;
}

.chip:nth-child(2) {
    top: 30%;
    right: 15%;
    animation-delay: -2s;
    width: 40px;
    height: 40px;
}

.chip:nth-child(3) {
    bottom: 20%;
    left: 20%;
    animation-delay: -4s;
    width: 50px;
    height: 50px;
}

@keyframes float {
    0% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(5deg);
    }
    100% {
        transform: translateY(0) rotate(0deg);
    }
}

/* 回到顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--accent);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s;
    z-index: 999;
    box-shadow: 0 5px 15px rgba(100, 255, 218, 0.4);
}

.back-to-top.show {
    opacity: 1;
    transform: translateY(0);
}

/* 页脚 */
.footer {
    background: rgba(7, 20, 38, 0.95);
    padding: 4rem 0 2rem;
    border-top: 1px solid rgba(100, 255, 218, 0.1);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.footer-column h3 {
    color: var(--accent);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-column h3::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background: var(--accent);
}

.footer-links a {
    display: block;
    color: var(--text-light);
    margin-bottom: 0.8rem;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--accent);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--card);
    color: var(--text-light);
    transition: all 0.3s;
}

.social-links a:hover {
    background: var(--accent);
    color: var(--primary);
    transform: translateY(-5px);
}

.copyright {
    text-align: center;
    padding-top: 3rem;
    color: var(--text-light);
    font-size: 0.9rem;
    border-top: 1px solid rgba(100, 255, 218, 0.1);
    margin-top: 3rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .login-header h1 {
        font-size: 2.2rem;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    .login-card {
        padding: 2rem;
    }
}

@media (max-width: 480px) {
    .login-header h1 {
        font-size: 2rem;
    }

    .remember-forgot {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .login-container {
        padding: 4rem 1.5rem 2rem;
    }
}

/* 注册浮窗样式 */
.register-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.register-overlay.active {
    opacity: 1;
    visibility: visible;
}

.register-modal {
    background: var(--card);
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid rgba(100, 255, 218, 0.2);
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.register-overlay.active .register-modal {
    transform: translateY(0);
}

.register-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid rgba(100, 255, 218, 0.1);
}

.register-header h2 {
    color: var(--text);
    margin: 0;
    font-size: 1.8rem;
}

.close-btn {
    background: transparent;
    border: none;
    color: var(--text-light);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s;
}

.close-btn:hover {
    color: var(--accent);
}

/* 注册步骤指示器 */
.register-steps {
    display: flex;
    justify-content: center;
    padding: 2rem 0 1rem;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0 1rem;
    opacity: 0.5;
    transition: opacity 0.3s;
}

.step.active {
    opacity: 1;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(100, 255, 218, 0.1);
    border: 2px solid rgba(100, 255, 218, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-weight: 600;
    margin-bottom: 0.5rem;
    transition: all 0.3s;
}

.step.active .step-number {
    background: var(--accent);
    color: var(--primary);
    border-color: var(--accent);
}

.step-title {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* 注册步骤内容 */
.register-step-content {
    display: none;
    padding: 0 2rem 2rem;
}

.register-step-content.active {
    display: block;
}

.resend-code {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-light);
    font-size: 0.9rem;
}

.btn-link {
    background: transparent;
    border: none;
    color: var(--accent);
    cursor: pointer;
    font-size: 0.9rem;
    text-decoration: underline;
    padding: 0;
}

.btn-link:hover {
    opacity: 0.8;
}

.register-footer {
    text-align: center;
    padding: 1rem 2rem;
    border-top: 1px solid rgba(100, 255, 218, 0.1);
    color: var(--text-light);
    font-size: 0.95rem;
}

.register-footer a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    margin-left: 0.5rem;
    transition: opacity 0.3s;
}

.register-footer a:hover {
    opacity: 0.8;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .register-modal {
        width: 95%;
        margin: 1rem;
    }

    .register-header {
        padding: 1rem 1.5rem;
    }

    .register-step-content {
        padding: 0 1.5rem 1.5rem;
    }

    .register-footer {
        padding: 1rem 1.5rem;
    }
}