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

/* 移动端性能优化 */
html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    /* 移动端滚动优化 */
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0px 20px 20px 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 头部样式 */
.header {
    background: white;
    backdrop-filter: blur(20px);
    border-radius: 12px;
    padding: 8px 24px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    min-height: 48px;
}

.header-left h1 {
    font-size: 20px;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    margin: 0;
}

/* 导航菜单样式 */
.header-nav {
    flex: 1;
    margin: 0 32px;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
}

.nav-link {
    text-decoration: none;
    color: #546e7a;
    font-size: 16px;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    white-space: nowrap;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(-50%);
    border-radius: 1px;
}

.nav-link:hover {
    color: #667eea;
    background: rgba(102, 126, 234, 0.08);
}

.nav-link:hover::after {
    width: 70%;
}

.nav-link:active {
    transform: scale(0.95);
}

.nav-link.active {
    color: #667eea;
    background: rgba(102, 126, 234, 0.08);
}

.nav-link.active::after {
    width: 70%;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* 认证链接样式 */
.auth-links {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    background: transparent;
    color: #546e7a;
    white-space: nowrap;
}

.btn-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn-primary-link:hover {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.btn-secondary-link:hover {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

/* 用户信息显示样式 */
.user-info-display {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 24px;
    border: 1px solid rgba(102, 126, 234, 0.2);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.user-avatar {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.user-avatar-img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid rgba(102, 126, 234, 0.3);
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    background: #667eea;
    margin-bottom: 4px;
}

.user-welcome {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.user-welcome:hover {
    background-color: rgba(102, 126, 234, 0.1);
}

.user-name {
    font-size: 13px;
    font-weight: 600;
    color: #2c3e50;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
}

.user-status {
    font-size: 11px;
    color: #7f8c8d;
    font-weight: 400;
}

/* 用户下拉菜单样式 */
.user-welcome-dropdown {
    position: relative;
    display: inline-block;
}

.user-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border: 1px solid #e1e8ed;
    min-width: 160px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    margin-top: 8px;
}

.user-welcome-dropdown:hover .user-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    color: #2c3e50;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
    color: #667eea;
}

.dropdown-item.logout-item:hover {
    background-color: #fee;
    color: #dc3545;
}

.dropdown-item i {
    width: 16px;
    text-align: center;
    font-size: 14px;
}

.dropdown-divider {
    height: 1px;
    background-color: #e9ecef;
    margin: 4px 0;
}

/* 底部样式 */
.footer {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px 0;
    margin-top: 20px;
    text-align: center;
    border-radius: 10px;
    backdrop-filter: blur(10px);
    position: relative;
    width: 100%;
    left: 0;
    bottom: 0;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer p {
    color: white;
    font-size: 14px;
    margin: 0;
    opacity: 0.8;
}

/* 移动端菜单按钮 */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: background-color 0.3s ease;
}

.mobile-menu-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}