/* 首先导入 Montserrat 字体 */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@500;600&display=swap');

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    position: fixed;  
    width: 100%;
    max-width: 1200px;
    height: 60px;
    z-index: 1000;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 30px;
    padding: 0 30px;
    margin: 0 auto;
}

.navbar-left {
    display: flex;
    align-items: center;
    gap: 32px;
}

.navbar-logo {
    width: 90px;
    height: 46px;
}

.navbar-brand {
    font-size: 19px;
    font-weight: bold;
    color: #2c3e50;
}

.navbar-center {
    display: flex;
    gap: 32px;
}

.nav-item {
    position: relative;
    padding: 8px 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 0.5px;
    color: #4a5568;
}

.nav-item:hover {
    color: #939597;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 200px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

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

.dropdown-item {
    display: block;
    padding: 12px 16px;
    color: #333333;
    text-decoration: none;
    transition: all 0.3s ease;
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.dropdown-item:hover {
    background: #f8fafc;
    color: #3b82f6;
}

.try-button {
    background: #4361ee;
    color: white;
    padding: 10px 24px;
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.3s ease;
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 16px;
}

.try-button:hover {
    background: #3b4fd8;
    transform: translateY(-2px);
}

@media (max-width: 1024px) {
    .navbar {
        padding: 0 16px;
    }
    .navbar-center {
        gap: 16px;
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 0 20px;
    }
    .navbar-center {
        position: fixed;
        top: 80px;
        left: 50%;
        transform: translateX(-50%);
        width: 90%;
        background: rgba(255, 255, 255, 0.95);
        border-radius: 20px;
        padding: 20px;
        flex-direction: column;
        gap: 16px;
        box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
        display: none;
    }
    .navbar-center.active {
        display: flex;
    }
    .nav-item {
        padding: 16px;
        width: 100%;
        text-align: left;
        border-bottom: 1px solid #eee;
        position: relative;
        transform: none !important;
        transition: none !important;
    }
    .nav-item:hover {
        transform: none !important;
        background-color: #f5f5f5;
    }
    .dropdown-menu {
        position: static;
        width: 100%;
        box-shadow: none;
        padding: 8px 0;
        margin-top: 8px;
        background-color: #f5f5f5;
        transform: none !important;
        transition: none !important;
    }
    .dropdown-item {
        padding: 14px 16px;
        transform: none !important;
        transition: background-color 0.3s ease;
    }
    .dropdown-item:hover {
        transform: none !important;
        background-color: #e5e5e5;
    }
    .navbar-right {
        margin-top: 16px;
    }
}

@media (max-width: 480px) {
    .navbar-brand {
        font-size: 16px;
    }
    .navbar-logo {
        width: 70px;
        height: 36px;
    }
}

.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: #333;
    transition: all 0.3s ease;
}

@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }
    .navbar-center {
        position: fixed;
        top: 8vh;
        left: 0;
        width: 100%;
        background: white;
        flex-direction: column;
        padding: 16px;
        transform: translateY(-150%);
        transition: transform 0.3s ease;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        z-index: 1000;
    }
    .navbar-center.active {
        transform: translateY(0);
    }
    .nav-item {
        width: 100%;
        text-align: center;
        padding: 16px 0;
    }
    .dropdown-menu {
        position: static;
        width: 100%;
        box-shadow: none;
        margin-top: 8px;
    }
}