/* 重置和基础样式 */
.navbar {
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    align-items: center;
    height: 60px;
    position: relative;
}

.logo {
    position: relative;
    /* z-index: 1001; */
}

.logo a {
    text-decoration: none;
    color: #ff6b81;
    font-size: 24px;
}

/* 移动端菜单按钮样式 */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: #666;
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1001;
}

/* 导航包装器和链接样式 */
.nav-wrapper {
    display: flex;
    align-items: center;
    flex: 1;
    margin-left: 20px;
}

.nav-links {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links a {
    color: #333;
    text-decoration: none;
    padding: 8px 12px;
    font-size: 15px;
    transition: color 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
    color: #ff6b81;
}

/* 搜索框样式 */
.search-box {
    margin-left: auto;
    margin-right: 20px;
}

.search-box form {
    display: flex;
    align-items: center;
}

.search-box input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-right: 8px;
    width: 200px;
}

/* 移动端响应式样式 */
@media screen and (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }

    .nav-wrapper {
        position: fixed;
        top: 60px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 60px);
        background: #fff;
        flex-direction: column;
        align-items: stretch;
        padding: 20px;
        margin: 0;
        transition: left 0.3s ease;
    }

    .nav-wrapper.active {
        left: 0;
    }

    .nav-links {
        flex-direction: column;
        margin: 0;
    }

    .nav-links li {
        width: 100%;
    }

    .nav-links a {
        padding: 12px 0;
        display: block;
        border-bottom: 1px solid #f0f0f0;
    }

    .search-box {
        margin: 20px 0;
        width: 100%;
    }

    .search-box form {
        width: 100%;
    }

    .search-box input {
        width: 100%;
    }

    .desktop-only {
        display: none !important;
    }
}

/* 桌面端样式 */
@media screen and (min-width: 769px) {
    .nav-wrapper {
        display: flex !important;
        position: relative;
        left: 0;
        width: auto;
        height: auto;
        padding: 0;
        box-shadow: none;
        overflow: visible;
        transition: none;
        background: none;
    }
}

.search-history {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
    margin-top: 5px;
    padding: 8px 0;
    display: none;
    z-index: 1000;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 15px;
    border-bottom: 1px solid #f0f0f0;
    color: #666;
    font-size: 14px;
}

.clear-history {
    color: #999;
    font-size: 12px;
    text-decoration: none;
    padding: 2px 6px;
    border-radius: 4px;
    transition: all 0.3s;
}

.clear-history:hover {
    color: #ff6b81;
    background: #fff5f6;
}

.history-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 200px;
    overflow-y: auto;
}

.history-item {
    padding: 8px 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    color: #333;
    font-size: 14px;
    transition: background 0.3s;
}

.history-item:hover {
    background: #f5f5f5;
}

.history-item i {
    margin-right: 8px;
    color: #999;
    font-size: 12px;
}

.history-dropdown {
    position: relative;
}

.history-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #666;
    text-decoration: none;
    font-size: 14px;
    padding: 8px;
    border-radius: 4px;
    transition: all 0.3s;
}

.history-btn:hover {
    color: #ff6b81;
    background: #fff5f6;
}

.history-panel {
    position: absolute;
    top: 100%;
    right: 0;
    width: 300px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
    margin-top: 5px;
    padding: 8px 0;
    display: none;
    z-index: 1000;
}

.history-panel .history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 15px;
    border-bottom: 1px solid #f0f0f0;
}

.clear-watch-history {
    color: #999;
    font-size: 12px;
    text-decoration: none;
    padding: 2px 6px;
    border-radius: 4px;
    transition: all 0.3s;
}

.clear-watch-history:hover {
    color: #ff6b81;
    background: #fff5f6;
}

.watch-history-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 300px;
    overflow-y: auto;
}

.watch-history-item {
    padding: 10px 15px;
    border-bottom: 1px solid #f5f5f5;
    cursor: pointer;
    transition: background 0.3s;
}

.watch-history-item:hover {
    background: #f5f5f5;
}

.watch-history-item .title {
    font-size: 14px;
    color: #333;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.watch-history-item .meta {
    font-size: 12px;
    color: #999;
    display: flex;
    justify-content: space-between;
}

.history-footer {
    padding: 10px 15px;
    text-align: center;
    border-top: 1px solid #f0f0f0;
}

.view-all {
    color: #666;
    font-size: 13px;
    text-decoration: none;
    transition: color 0.3s;
}

.view-all:hover {
    color: #ff6b81;
}

.no-history {
    padding: 30px 0;
    text-align: center;
    color: #999;
    font-size: 14px;
}
