/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 导航栏样式 */
.navbar {
    background-color: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    height: 60px;
    display: flex;
    align-items: center;
}

.navbar:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1rem;
    width: 100%;
    height: 100%;
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: bold;
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.3s ease;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-brand::before {
    content: '';
    display: block;
    width: 24px;
    height: 24px;
    background: url('/images/favicon.svg') no-repeat center center;
    background-size: contain;
}

.nav-brand:hover {
    color: #3498db;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: #666;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.5rem 0;
}

.nav-links a:hover {
    color: #3498db;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #3498db;
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.auth-buttons {
    display: flex;
    gap: 1rem;
    align-items: center;
    height: 100%;
}

/* 按钮样式 */
.btn-outline {
    background-color: transparent;
    border: 2px solid #3498db;
    color: #3498db;
    padding: 0.5rem 1.2rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.btn-outline:hover {
    background-color: #3498db;
    color: #fff;
    transform: translateY(-1px);
}

.btn-primary {
    background-color: #3498db;
    color: #fff;
    padding: 0.5rem 1.2rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid #3498db;
    font-weight: 500;
}

.btn-primary:hover {
    background-color: #2980b9;
    border-color: #2980b9;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.2);
}

/* 汉堡菜单按钮 */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    position: relative;
    margin: auto 0 auto 1rem;
}

.menu-toggle:focus {
    outline: none;
}

.menu-toggle span {
    width: 100%;
    height: 2px;
    background-color: #2c3e50;
    border-radius: 4px;
    transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    position: absolute;
    left: 0;
}

.menu-toggle span:nth-child(1) {
    top: 0;
}

.menu-toggle span:nth-child(2) {
    top: 8px;
    width: 70%;
}

.menu-toggle span:nth-child(3) {
    bottom: 0;
}

.menu-toggle:hover span:nth-child(2) {
    width: 100%;
}

.menu-toggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
    background-color: #3498db;
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(-100%);
    width: 100%;
}

.menu-toggle.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
    background-color: #3498db;
}

/* 欢迎文本样式 */
.auth-buttons span {
    color: #666;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
    display: inline-block;
    vertical-align: middle;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .navbar {
        height: 56px;
    }

    .nav-container {
        padding: 0 1rem;
        position: relative;
    }

    .menu-toggle {
        display: flex;
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        margin: 0;
    }

    .nav-brand {
        order: 0;
    }

    .auth-buttons {
        order: 2;
        height: 100%;
        display: flex;
        align-items: center;
        gap: 0.5rem;
        margin-left: auto;
    }

    /* 移动端欢迎文本样式 */
    .auth-buttons span::before {
        content: none;
    }

    .auth-buttons span {
        display: inline-block;
        font-size: 0.9rem;
        max-width: 80px;
        margin-right: 0.3rem;
    }

    .nav-links {
        display: none;
        position: fixed;
        top: 56px;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        gap: 0.5rem;
        padding: 1rem;
        z-index: 999;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
        border-top: 1px solid rgba(0, 0, 0, 0.05);
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }

    .nav-links.active {
        display: flex;
        opacity: 1;
        visibility: visible;
    }

    .nav-links a {
        font-size: 1.1rem;
        padding: 1rem 2rem;
        margin: 0.2rem 0;
        width: 100%;
        max-width: 300px;
        text-align: center;
        border-radius: 12px;
        transition: all 0.3s ease;
        background-color: rgba(255, 255, 255, 0.7);
        backdrop-filter: blur(5px);
        -webkit-backdrop-filter: blur(5px);
        border: 1px solid rgba(52, 152, 219, 0.1);
        transform: translateY(20px);
        opacity: 0;
        animation: slideIn 0.3s ease forwards;
    }

    .nav-links.active a {
        opacity: 1;
        transform: translateY(0);
    }

    .nav-links a:hover {
        background-color: rgba(52, 152, 219, 0.15);
        transform: scale(1.02);
        box-shadow: 0 2px 8px rgba(52, 152, 219, 0.15);
    }

    .nav-links a:active {
        transform: scale(0.98);
    }

    .nav-links a + a {
        animation-delay: 0.1s;
    }

    .nav-links a:nth-child(3) {
        animation-delay: 0.2s;
    }

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

    .auth-buttons {
        gap: 0.6rem;
    }

    .btn-outline, .btn-primary {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }

    /* 当菜单打开时固定body */
    body.menu-open {
        overflow: hidden;
    }
}

/* 小屏幕设备优化 */
@media (max-width: 480px) {
    .navbar {
        height: 52px;
    }

    .nav-brand {
        font-size: 1.2rem;
    }

    .auth-buttons {
        gap: 0.4rem;
    }

    /* 更小屏幕的欢迎文本样式 */
    .auth-buttons span {
        max-width: 60px;
        font-size: 0.85rem;
    }

    .btn-outline, .btn-primary {
        padding: 0.35rem 0.7rem;
        font-size: 0.85rem;
    }

    .nav-links {
        top: 52px;
        padding: 1rem;
    }

    .nav-links a {
        font-size: 1rem;
        padding: 0.9rem 1.5rem;
        max-width: 280px;
    }
}

/* 确保在横屏模式下也能正常显示 */
@media (max-height: 480px) and (orientation: landscape) {
    .nav-links {
        padding: 0.5rem;
        gap: 0.3rem;
        overflow-y: auto;
    }

    .nav-links a {
        font-size: 0.95rem;
        padding: 0.6rem 1.5rem;
        margin: 0.1rem 0;
    }
}

/* 底栏样式 */
.footer {
    background-color: #fff;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding: 1rem 0;
    text-align: center;
    color: #666;
    font-size: 0.9rem;
    margin-top: auto;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
}

.footer-links a {
    color: #666;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #3498db;
}

@media (max-width: 768px) {
    .footer {
        padding: 0.8rem 0;
        font-size: 0.85rem;
    }

    .footer-content {
        gap: 1rem;
    }
} 