/* 消息滚动栏样式 */
.news-bar {
    background: linear-gradient(135deg, #2D5A27 0%, #7FB069 100%);
    color: white;
    padding: 10px 0;
    overflow: hidden;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 9999;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: block !important;
    visibility: visible !important;
}

.news-scroll {
    display: flex;
    white-space: nowrap;
    animation: scroll-news 40s linear infinite;
}

.news-scroll:hover {
    animation-play-state: paused;
}

@keyframes scroll-news {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.news-item {
    display: inline-block;
    padding: 0 50px;
    font-size: 14px;
    font-weight: 500;
    flex-shrink: 0;
}

/* 移动端和平板消息栏样式 */
@media (max-width: 1024px) {
    .news-bar {
        padding: 8px 0;
    }

    .news-item {
        padding: 0 30px;
        font-size: 12px;
    }

    .news-scroll {
        animation: scroll-news 35s linear infinite;
    }
}

@media (max-width: 640px) {
    .news-bar {
        padding: 6px 0;
        font-size: 12px;
    }

    .news-scroll {
        animation-duration: 30s;
    }

    .news-item {
        padding: 0 18px;
        line-height: 1.4;
    }
}

/* 导航栏样式 */
.font-english {
    font-family: 'Inter', sans-serif;
}

.text-forest-green {
    color: #2D5A27;
}

.bg-forest-green {
    background-color: #2D5A27;
}

.text-text-dark {
    color: #2c3e50;
}

.language-btn.active {
    background-color: #2D5A27;
    color: white;
}

nav {
    z-index: 9999 !important;
}

/* 响应式字体 - 使用clamp实现流畅缩放 */
/* 当屏幕宽度小于1260px时，字体开始缩小 */

/* Logo区域字体 - Pawsitive (text-xl) */
nav .text-xl.font-english,
nav .text-xl.font-bold {
    font-size: clamp(0.875rem, 1.5vw + 0.5rem, 1.25rem) !important;
}

/* Logo区域字体 - 寵心出發 (text-lg) */
nav .text-lg.text-forest-green:not(.font-english) {
    /*font-size: clamp(0.75rem, 1.2vw + 0.4rem, 1.125rem) !important;*/
}

/* 导航链接字体 */
@media (min-width: 1024px) {
    nav div[class*="lg:flex"] a,
    nav div[class*="hidden"][class*="lg:flex"] a {
        font-size: clamp(0.875rem, 0.8vw + 0.6rem, 1rem) !important;
    }
}

/* 语言按钮字体 */
nav .language-btn {
    font-size: clamp(0.7rem, 0.6vw + 0.5rem, 0.875rem) !important;
    padding: clamp(0.25rem, 0.3vw + 0.2rem, 0.5rem) clamp(0.5rem, 0.8vw + 0.4rem, 0.75rem) !important;
}

/* 用户菜单和按钮字体 */
nav .text-sm {
    font-size: clamp(0.75rem, 0.7vw + 0.5rem, 0.875rem) !important;
}

/* 管理员登录链接 */
nav a[href*="DgVbUrapHK"] {
    font-size: clamp(0.7rem, 0.6vw + 0.5rem, 0.875rem) !important;
}

/* 按钮字体 */
nav button,
nav a.bg-forest-green,
nav a.bg-green-700 {
    font-size: clamp(0.75rem, 0.7vw + 0.5rem, 0.875rem) !important;
    padding: clamp(0.4rem, 0.5vw + 0.3rem, 0.5rem) clamp(0.75rem, 1vw + 0.5rem, 1rem) !important;
}

/* 导航栏间距调整 - 1260px以下开始缩小间距 */
@media (max-width: 1260px) {
    /* 导航链接间距 */
    nav div[class*="lg:flex"][class*="space-x-8"] {
        gap: clamp(0.5rem, 1vw + 0.2rem, 2rem) !important;
    }
    
    /* 右侧按钮区域间距 */
    nav .flex.items-center.space-x-4 {
        gap: clamp(0.5rem, 0.8vw + 0.2rem, 1rem) !important;
    }
    
    /* Logo区域间距 */
    nav a.flex.items-center.space-x-2 {
        gap: clamp(0.25rem, 0.5vw + 0.1rem, 0.5rem) !important;
    }
}

/* 在更小的屏幕上进一步缩小 */
@media (max-width: 1024px) {
    nav .text-xl.font-english,
    nav .text-xl.font-bold {
        font-size: clamp(0.8rem, 1.2vw + 0.4rem, 1rem) !important;
    }
    
    nav .text-lg.text-forest-green:not(.font-english) {
        /*font-size: clamp(0.7rem, 1vw + 0.3rem, 0.875rem) !important;*/
    }
    
    nav div[class*="lg:flex"] a {
        font-size: clamp(0.8rem, 0.7vw + 0.5rem, 0.9rem) !important;
    }
}

nav.fixed {
    top: 40px;
    transition: top 0.2s ease;
}

@media (max-width: 1024px) {
    nav.fixed {
        top: 36px !important;
    }
}

@media (max-width: 640px) {
    nav.fixed {
        top: 32px !important;
    }
}

/* 移动端和平板导航栏样式 */
@media (max-width: 1024px) {
    nav .text-sm {
        font-size: 0.75rem !important;
    }
    
    nav .text-lg {
        font-size: 1rem !important;
    }
    
    nav .text-xl {
        font-size: 1.125rem !important;
    }
    
    nav .text-xl.font-english {
        font-size: 1.25rem !important;
    }
    
    nav .text-lg:not(.font-english) {
        font-size: 1.25rem !important;
    }
    
    nav button {
        padding: 0.5rem 1rem !important;
        font-size: 0.875rem !important;
    }

    nav .language-btn {
        padding: 0.25rem 0.5rem !important;
        font-size: 0.75rem;
        min-width: 44px;
    }

    nav .flex.items-center.space-x-4 {
        gap: 0.5rem;
    }

    nav #mobileMenu {
        position: fixed;
        top: 90px;
        left: 0;
        width: 100%;
        max-height: calc(100vh - 90px);
        overflow-y: auto;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
        border-bottom-left-radius: 1rem;
        border-bottom-right-radius: 1rem;
    }
}

@media (max-width: 480px) {
    nav #mobileMenu {
        top: 80px;
        max-height: calc(100vh - 80px);
    }

    .news-bar {
        font-size: 11px;
    }
}

/* 用户下拉菜单样式 */
.user-menu-container {
    position: relative;
    z-index: 1000;
}

#userMenuBtn {
    cursor: pointer;
    background: none;
    border: none;
    padding: 0.25rem 0.5rem;
}

#userMenuDropdown {
    animation: fadeInDown 0.2s ease-out;
    min-width: 12rem;
    max-width: 16rem;
}

#userMenuDropdown.hidden {
    display: none !important;
}

#userMenuDropdown:not(.hidden) {
    display: block !important;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#userMenuDropdown a {
    display: flex;
    align-items: center;
    text-decoration: none;
}

#userMenuDropdown a:hover {
    background-color: #f3f4f6;
}

#userMenuDropdown a i {
    width: 16px;
    text-align: center;
    flex-shrink: 0;
}

