/* ===== BabyMusic 统一导航栏 - 全自适应 ===== */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 16px; /* 兼容旧浏览器 */
    padding: 0 clamp(8px, 2vw, 40px);
    height: 56px; /* 兼容旧浏览器 */
    height: clamp(50px, 4.5vw, 64px);
    background: #121220; /* 兼容旧浏览器：纯色背景 */
    background: rgba(18, 18, 32, 0.94);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    z-index: 1000;
}

/* ===== 左侧 - Logo ===== */
.nav-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1 1 0;
    min-width: 0;
}
.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 8px;
}
.logo-img {
    height: 28px;
    width: auto;
    border-radius: 5px;
}
.logo-img.scale {
    height: 28px;
    transform: scale(1.8);
    transform-origin: left center;
}
.logo-text {
    font-size: clamp(13px, 1.2vw, 19px);
    font-weight: 700;
    color: #e8e8f0;
    letter-spacing: 0.3px;
    white-space: nowrap;
}
/* 新版艺术字体logo：www / BabyMusic / .studio 错位排版 */
.logo-art {
    display: inline-flex;
    flex-direction: column;
    line-height: 1;
    position: relative;
    margin-left: 4px;
}
.logo-www {
    font-size: clamp(7px, 0.7vw, 11px);
    color: rgba(255,255,255,0.3);
    letter-spacing: 0.8px;
    font-weight: 300;
    font-family: 'Segoe UI', -apple-system, sans-serif;
    position: relative;
    left: 0;
    line-height: 1.2;
}
.logo-name {
    font-size: clamp(14px, 1.5vw, 23px);
    font-weight: 800;
    color: #f0f0f8;
    letter-spacing: 0.3px;
    line-height: 1.1;
    font-family: 'Segoe UI', -apple-system, sans-serif;
    position: relative;
    left: clamp(8px, 1.1vw, 18px);
}
.logo-studio {
    font-size: clamp(7px, 0.7vw, 11px);
    color: rgba(255,255,255,0.3);
    font-weight: 300;
    font-family: 'Segoe UI', -apple-system, sans-serif;
    letter-spacing: 0.3px;
    position: relative;
    left: clamp(16px, 2.2vw, 32px);
    line-height: 1.2;
}
/* ===== 中间 - 三个搜索按钮（视觉居中） ===== */
.nav-center {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

/* ===== 子页面导航标题（居中） ===== */
.nav-title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-size: clamp(12px, 1.1vw, 18px);
    font-weight: 600;
    color: #c8c8d0;
    white-space: nowrap;
    pointer-events: none;
}
.nav-btn {
    height: clamp(28px, 2.5vw, 40px);
    padding: 0 clamp(8px, 1vw, 18px);
    border-radius: clamp(6px, 0.6vw, 10px);
    font-size: clamp(11px, 0.9vw, 15px);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: clamp(3px, 0.4vw, 8px);
    text-decoration: none;
    color: rgba(255,255,255,0.75);
    background: rgba(168, 130, 255, 0.06);
    border: 1px solid rgba(168, 130, 255, 0.15);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}
.nav-btn:hover {
    background: rgba(168, 130, 255, 0.16);
    border-color: rgba(168, 130, 255, 0.4);
    color: #fff;
    box-shadow: 0 0 14px rgba(168, 130, 255, 0.1);
}
.nav-btn.active {
    background: rgba(168, 130, 255, 0.15);
    border-color: rgba(168, 130, 255, 0.4);
    color: #b894ff;
}
.nav-btn.ai-btn {
    color: #a882ff;
}
.nav-btn.tools-btn {
    color: #fbbf24;
}
.nav-btn.tools-nav-btn {
    color: #a78bfa;
}
.nav-btn.text-btn {
    border-color: rgba(255,255,255,0.12);
    color: rgba(255,255,255,0.55);
}
.nav-btn.text-btn:hover {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.2);
    color: rgba(255,255,255,0.8);
    box-shadow: none;
}

/* 内联搜索框（仅首页展开） */
.search-wrap {
    display: flex;
    flex: 1;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.25s;
}
.search-wrap:focus-within {
    border-color: rgba(168, 130, 255, 0.5);
    background: rgba(255,255,255,0.06);
}
.search-wrap input {
    flex: 1;
    padding: 6px 12px;
    background: transparent;
    border: none;
    color: #e0e0e8;
    font-size: 13px;
    outline: none;
}
.search-wrap input::placeholder { color: rgba(255,255,255,0.3); }
.search-wrap .go-btn {
    padding: 6px 14px;
    border: none;
    background: transparent;
    color: rgba(168, 130, 255, 0.8);
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}
.search-wrap .go-btn:hover { color: #a882ff; }

/* ===== 右侧 - 关于本站 + 登录 ===== */
.nav-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1 1 0;
    min-width: 0;
    justify-content: flex-end;
}
.nav-link-text {
    color: rgba(255,255,255,0.45);
    text-decoration: none;
    font-size: clamp(11px, 0.9vw, 15px);
    transition: color 0.2s;
    white-space: nowrap;
}
.nav-link-text:hover {
    color: rgba(255,255,255,0.8);
}
.login-btn {
    background: linear-gradient(135deg, #4ecdc4, #0d7377);
    color: white;
    padding: clamp(5px, 0.5vw, 9px) clamp(12px, 1.3vw, 22px);
    border-radius: clamp(14px, 1.5vw, 22px);
    cursor: pointer;
    font-size: clamp(11px, 0.9vw, 15px);
    font-weight: 500;
    border: none;
    transition: all 0.3s;
    white-space: nowrap;
}
.login-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(78, 205, 196, 0.35);
}
.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}
.user-avatar-text {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4ecdc4, #0d7377);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: white;
    font-weight: bold;
}
.user-name {
    color: rgba(255,255,255,0.9);
    font-size: 13px;
    font-weight: 500;
}

/* ===== 响应式 ===== */
@media (max-width: 800px) {
    .navbar { padding: 0 2%; }
    .nav-center { gap: 4px; }
    .nav-btn { padding: 0 10px; font-size: 12px; gap: 3px; }
    .logo-text { font-size: 14px; }
}
@media (max-width: 600px) {
    .nav-btn { font-size: 11px; padding: 0 8px; }
    .nav-btn .btn-label { display: none; }
    .nav-link-text { display: none; }
    .nav-left { gap: 10px; }
}

/* ===== 子页面模式（非首页） ===== */
body.sub-page .tools-nav-btn,
body.sub-page .nav-center,
body.sub-page .nav-link-text {
    display: none;
}
.back-home-btn {
    display: inline-flex;
    align-items: center;
    gap: clamp(3px, 0.4vw, 8px);
    height: clamp(28px, 2.5vw, 40px);
    padding: 0 clamp(10px, 1.3vw, 22px);
    border-radius: clamp(6px, 0.6vw, 10px);
    font-size: clamp(11px, 1vw, 17px);
    font-weight: 500;
    text-decoration: none;
    color: rgba(255,255,255,0.8);
    background: rgba(78,205,196,0.1);
    border: 1px solid rgba(78,205,196,0.25);
    cursor: pointer;
    transition: all 0.25s;
    white-space: nowrap;
    margin-right: 6px;
}
.back-home-btn:hover {
    background: rgba(78,205,196,0.2);
    border-color: rgba(78,205,196,0.45);
    color: #fff;
    box-shadow: 0 0 14px rgba(78,205,196,0.15);
    transform: translateY(-1px);
}
body.home-page .back-home-btn {
    display: none;
}
