* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    overflow-x: hidden;
}

:root {
    --primary: #00e5ff;
    --secondary: #7700ff;
    --dark: #060818;
    --darker: #010212;
    --card-bg: rgba(15, 22, 55, 0.7);
    --text: #e0f7ff;
    --border-glow: rgba(0, 229, 255, 0.3);
}

body {
    font-family: 'Exo 2', sans-serif;
    background: var(--darker);
    color: var(--text);
    overflow-x: hidden;
    min-height: 100vh;
    background-image:
            radial-gradient(circle at 10% 20%, rgba(29, 28, 75, 0.1) 0%, transparent 20%),
            radial-gradient(circle at 90% 80%, rgba(65, 11, 106, 0.1) 0%, transparent 20%);
}

.door-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    pointer-events: none;
}

.door-left, .door-right {
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, var(--darker), var(--dark));
    position: relative;
    transition: transform 1.2s cubic-bezier(0.77, 0, 0.175, 1);
}

.door-left {
    border-right: 1px solid var(--primary);
    transform: translateX(0);
}

.door-right {
    border-left: 1px solid var(--primary);
    transform: translateX(0);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    opacity: 0;
    animation: fadeIn 0.8s forwards;
    animation-delay: 1.5s;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 导航栏样式 */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--border-glow);
    position: relative;
}

.logo {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: 1.5px;
    text-shadow: 0 0 10px rgba(0, 229, 255, 0.3);
    position: relative;
}

.logo::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 3px;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

nav a {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1rem;
    position: relative;
    padding: 5px 10px;
    transition: all 0.3s ease;
}

nav a:hover {
    color: var(--primary);
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

nav a:hover::after {
    width: 100%;
}

nav a.active {
    color: var(--primary);
}

nav a.active::after {
    width: 100%;
}

/* 页脚样式 */
footer {
    margin-top: 80px;
    padding: 30px 0;
    text-align: center;
    border-top: 1px solid rgba(0, 229, 255, 0.1);
    color: #708aa3;
    font-size: 0.9rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.8rem;
    }

    .articles-container {
        grid-template-columns: 1fr;
    }

    nav ul {
        gap: 15px;
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* 粒子背景效果 */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.particle {
    position: absolute;
    border-radius: 50%;
    background: var(--primary);
    opacity: 0.7;
}

/* 登录/注册模态框 */
.login-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 5px 15px rgba(0, 229, 255, 0.4);
    cursor: pointer;
    z-index: 99;
    transition: all 0.3s ease;
}

.login-btn:hover {
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 0 25px var(--primary);
}

.login-btn i {
    font-size: 1.8rem;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(3, 6, 29, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(10px);
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.auth-modal {
    background: var(--card-bg);
    width: 100%;
    max-width: 450px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 0 50px rgba(0, 229, 255, 0.2);
    border: 1px solid rgba(0, 229, 255, 0.1);
    position: relative;
}

.modal-header {
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    padding: 25px;
    text-align: center;
}

.modal-header h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 2rem;
    color: white;
    letter-spacing: 1px;
}

.tabs {
    display: flex;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.tab {
    flex: 1;
    text-align: center;
    padding: 20px 0;
    cursor: pointer;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    background: rgba(0, 0, 0, 0.2);
}

.tab.active {
    background: transparent;
    color: var(--primary);
    box-shadow: inset 0 -3px 0 var(--primary);
}

.modal-body {
    padding: 30px;
}

.form-container {
    display: none;
}

.form-container.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

.input-group {
    margin-bottom: 25px;
    position: relative;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    color: #a9c2d4;
    font-size: 0.9rem;
}

.input-group input {
    width: 100%;
    background: rgba(10, 15, 45, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 8px;
    color: var(--text);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.input-group input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(0, 229, 255, 0.3);
    outline: none;
}

.submit-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    letter-spacing: 1px;
}

.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 229, 255, 0.4);
}

.divider {
    text-align: center;
    margin: 25px 0;
    position: relative;
    color: #a9c2d4;
}

.divider::before, .divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.1), transparent);
}

.divider::before {
    left: 0;
}

.divider::after {
    right: 0;
}

.social-login {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.social-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    color: white;
    font-size: 1.3rem;
    transition: all 0.3s ease;
}

.social-btn:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.1);
}

/*汉堡菜单*/
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    width: 40px;
    height: 40px;
    cursor: pointer;
    margin-left: 15px;
    z-index: 1001;
}
.hamburger span {
    display: block;
    height: 4px;
    width: 100%;
    background: var(--primary);
    margin: 6px 0;
    border-radius: 2px;
    transition: all 0.3s;
}

.footer-link {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s;
}
.footer-link:hover {
    color: var(--secondary);
    text-decoration: underline;
}

@media (max-width: 768px) {
    nav ul {
        position: fixed;
        top: 70px;
        right: 0;
        width: 200px;
        background: linear-gradient(135deg, rgba(15,22,55,0.92) 80%, #1a1f3a 100%);
        flex-direction: column;
        gap: 0;
        box-shadow: 0 8px 32px rgba(0,229,255,0.12);
        border-radius: 12px 0 0 12px;
        padding: 18px 0 18px 0;
        transition: transform 0.3s;
        z-index: 1000;
        transform: translateX(100%);
        border-left: 2px solid var(--primary);
        will-change: transform;
    }
    nav ul.open {
        transform: translateX(0);
    }
    nav ul li {
        width: 100%;
        text-align: center;
        padding: 0 10px;
    }
    nav ul li:not(:last-child) {
        border-bottom: 1px solid rgba(0,229,255,0.08);
    }
    nav ul li a {
        display: block;
        padding: 16px 0;
        font-size: 1.15rem;
        color: var(--text);
        border-radius: 6px;
        transition: background 0.2s, color 0.2s;
    }
    nav ul li a:hover,
    nav ul li a.active {
        background: rgba(0,229,255,0.08);
        color: var(--primary);
    }
    .hamburger {
        display: flex;
    }
}

.oauth-btn {
    padding: 12px 24px;
    font-size: 16px;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 0;
}