/* 网络收藏夹系统样式 */

/* 全局样式 */
body {
    padding-top: 60px;
    padding-bottom: 40px;
    background-color: #f8f9fa;
}

/* 卡片样式 */
.card {
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.bookmark-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* 标签样式 */
.tag-badge {
    margin-right: 5px;
    margin-bottom: 5px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tag-badge:hover {
    opacity: 0.8;
}

/* 导航栏样式 */
.navbar-brand {
    font-weight: bold;
}

/* 搜索框样式 - 使用固定宽度确保在所有设备上都有足够空间 */
.navbar-form {
    min-width: 300px !important;
    width: auto !important;
}

.search-form {
    min-width: 400px !important;
    width: 400px !important;
    flex: 0 0 auto !important; /* 防止收缩 */
    display: flex !important;
    align-items: center !important;
}

.search-input {
    min-width: 300px !important;
    width: 300px !important;
    flex: 0 0 auto !important; /* 防止收缩 */
    padding: 0.375rem 0.75rem !important; /* 保持Bootstrap默认内边距 */
    border: 1px solid #ced4da !important; /* 保持Bootstrap默认边框 */
    border-radius: 0.375rem !important; /* 保持Bootstrap默认圆角 */
    font-size: 1rem !important; /* 保持Bootstrap默认字体大小 */
    line-height: 1.5 !important; /* 保持Bootstrap默认行高 */
    background-color: #fff !important; /* 保持Bootstrap默认背景色 */
    background-clip: padding-box !important;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out !important;
}

.search-input:focus {
    color: #212529;
    background-color: #fff;
    border-color: #86b7fe;
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* 在大屏幕上增加宽度 */
@media (min-width: 992px) {
    .search-form {
        min-width: 450px !important;
        width: 450px !important;
    }
    
    .search-input {
        min-width: 450px !important;
        width: 450px !important;
    }
}

@media (min-width: 1200px) {
    .search-form {
        min-width: 550px !important;
        width: 550px !important;
    }
    
    .search-input {
        min-width: 550px !important;
        width: 550px !important;
    }
}

/* 表单样式 */
.form-control:focus {
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
    border-color: #86b7fe;
}

/* 按钮样式 */
.btn {
    border-radius: 4px;
}

.btn-primary {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.btn-primary:hover {
    background-color: #0b5ed7;
    border-color: #0a58ca;
}

/* 页脚样式 */
footer {
    border-top: 1px solid #dee2e6;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .card-title {
        font-size: 1.1rem;
    }
    
    /* 移动端搜索框优化 */
    .navbar-form {
        min-width: 180px !important;
    }
    
    .search-form {
        min-width: 100% !important;
        width: 100% !important;
        margin-top: 10px !important;
    }
    
    .search-input {
        min-width: 100% !important;
        width: 100% !important;
    }
}

/* 导航栏结构调整 */
.navbar-collapse .d-flex.flex-column.flex-lg-row.w-100 {
    width: 100%;
}

.navbar-collapse .d-flex.flex-column.flex-lg-row.align-items-lg-center.w-100 {
    width: 100%;
}

/* 确保搜索表单在导航栏中有足够空间 */
.navbar-nav.me-auto {
    flex-grow: 1;
}

/* 强制覆盖Bootstrap默认样式 */
.d-flex.flex-nowrap {
    flex-wrap: nowrap !important;
}

/* 动画效果 */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}