/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

/* 导航栏样式 */
.navbar {
    background-color: #fff;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin: 0;
    position: fixed;
    top: 0;
    left: 0;
    box-sizing: border-box;
    z-index: 999;
}

.nav-brand a {
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
    text-decoration: none;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links a {
    color: #666;
    text-decoration: none;
    padding: 0.5rem 1rem;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #007bff;
}

.nav-links a.active {
    color: #007bff;
    font-weight: bold;
}

.auth-section {
    position: relative;
    z-index: 1000;
}

.auth-buttons {
    display: flex;
    gap: 1rem;
}

.btn-login, .btn-register {
    padding: 0.5rem 1.5rem;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.3s;
}

.btn-login {
    color: #007bff;
    border: 1px solid #007bff;
}
.btn-login:hover{
    background-color: #f1f7fc;
    color: #007bff !important;
    border:rgb(255, 255, 255)lid #007bff;
}

.btn-register {
    background-color: #007bff;
    color: white !important;
}

.btn-register:hover{
    background-color: #79b8fb;
    color: white !important;
}

/* 用户信息容器 */
.user-info {
    position: relative;
    cursor: pointer;
}

.user-avatar-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 4px 8px;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.user-nickname {
    color: #333;
    font-size: 14px;
}

.dropdown-menu {
    position: absolute;
    visibility: hidden;
    opacity: 0;
    top: calc(100% + 8px);
    right: 50%;
    transform: translateX(50%);
    background: white;
    min-width: 140px;
    border-radius: 8px;
    box-shadow: 0 3px 6px -4px rgba(0,0,0,0.12), 
                0 6px 16px 0 rgba(0,0,0,0.08);
    padding: 4px 0;
    transition: all 0.2s ease;
}

.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 0;
    right: 0;
    height: 10px;
    background: transparent;
}

.user-info:hover .dropdown-menu {
    visibility: visible;
    opacity: 1;
}

.menu-item {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    gap: 8px;
    transition: background-color 0.2s;
}

.menu-item:hover {
    background-color: #f5f5f5;
}

.menu-item i {
    font-size: 14px;
    color: #666;
    width: 16px;
}

/* 主要内容区域 */
main {
    margin-top: 70px;
}

/* 轮播图样式 */
.hero-slider {
    position: relative;
    height: 500px;
    overflow: hidden;
}

.slider-container {
    position: relative;
    height: 100%;
    width: 100%;
}

.slide {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slider-controls button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.7);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
}

.slider-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.slider-dots .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background-color 0.3s;
}

.slider-dots .dot.active {
    background: white;
}

.prev-btn { left: 20px; }
.next-btn { right: 20px; }

/* 特色内容区域 */
.features {
    padding: 4rem 2rem;
    background-color: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.features h2 {
    text-align: center;
    margin-bottom: 3rem;
    color: #333;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-card {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-card i {
    font-size: 2.5rem;
    color: #007bff;
    margin-bottom: 1rem;
}

/* 页脚样式 */
.footer {
    background-color: #333;
    color: white;
    padding: 2rem 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-info a {
    color: #ccc;
    text-decoration: none;
    margin-left: 1rem;
}

.social-links a {
    color: white;
    font-size: 1.5rem;
    margin-left: 1rem;
    transition: color 0.3s;
}

.social-links a:hover {
    color: #007bff;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
}

.auth-buttons {
    display: inline-flex;
    gap: 10px;
}

.error-message {
    color: #ff4444;
    background-color: #ffe0e0;
    padding: 10px;
    border-radius: 4px;
    margin-top: 10px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.error-message i {
    color: #ff4444;
} 