body {
    background: url('../image/background.jpg') no-repeat center center fixed;
    background-size: cover;
}

.container {
    background-color: rgba(255, 255, 255, 0.9);
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.row {
    margin-bottom: 20px;
}

.btn {
    margin-right: 5px;
}

.loading {
    text-align: center;
    margin-top: 20px;
    font-size: 16px;
}

.card {
    flex: 1 1 calc(20% - 40px); /* Adjust to fit five columns with spacing */
    margin: 10px; /* Ensure there is space between the cards */
    padding: 15px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease-in-out;
    cursor: pointer;
}


.card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.card img {
    max-height: 200px;
    width: 100%;
    object-fit: cover;
    display: block;
    margin: 0 auto 10px;
    border-radius: 5px;
}

.card-content {
    padding: 10px;
}

.card-back {
    display: none;
}

.card.expanded .card-content {
    display: none;
}

.card.expanded .card-back {
    display: block;
}

.comments-section {
    margin-top: 20px;
}

.comment {
    padding: 10px;
    margin-bottom: 10px;
    background-color: #f8f8f8;
    border-radius: 5px;
    border-left: 3px solid #007bff;
    /* z-index: 1000; */
}

.modal-body {
    padding: 20px;
}

.modal-header, .modal-footer {
    border: none;
}

#commentAuthorTitle {
    font-weight: bold;
    margin-bottom: 10px;
}

textarea {
    resize: none;
}

textarea::placeholder {
    color: #888;
}

#commentHistory {
    max-height: 200px;
    overflow-y: auto;
}

.note-details {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.note-details .card {
    flex: 1 1 calc(20% - 20px);
}

@media (max-width: 1200px) {
    .card {
        flex: 1 1 calc(25% - 30px); /* Four columns */
    }
}

@media (max-width: 992px) {
    .card {
        flex: 1 1 calc(33.333% - 30px); /* Three columns */
    }
}

@media (max-width: 768px) {
    .card {
        flex: 1 1 calc(50% - 30px); /* Two columns */
    }
}

@media (max-width: 576px) {
    .card {
        flex: 1 1 100%; /* One column */
    }
    .btn-block {
        width: calc(20% - 4px); /* 5 buttons in a row, accounting for spacing */
        margin-right: 4px; /* spacing between buttons */
    }
    .btn-block:last-child {
        margin-right: 0;
    }
}

/* 关于收藏部分的样式 */
.favorite-icon {
    cursor: pointer;
    font-size: 1.5em;
    color: red;
    margin: 0.5em 0;
}

.favorite-icon.fas {
    color: red;
}

.favorite-icon.far {
    color: gray;
}

.favorite-text {
    cursor: pointer;
    /* color: #007bff; */
    color: #28a745; /* Bootstrap success color for a distinct look */
    text-decoration: underline;
}

.favorite-text-active {
    cursor: pointer;
    /* color: #dc3545; */
    color: #155724; /* Darker shade for active state */
    text-decoration: underline;
}

/* 关于点赞部分的样式 */
.like-text {
    cursor: pointer;
    color: #007bff; /* Bootstrap primary color for a modern look */
    text-decoration: none;
    font-weight: 500;
}

.like-text-active {
    cursor: pointer;
    color: #dc3545; /* Bootstrap danger color to indicate active state */
    text-decoration: none;
    font-weight: 500;
}


/* 以下代码用于优化项目输入框，自动筛选的效果 */
.typeahead {
    width: 100%;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.typeahead:focus {
    border-color: #66afe9;
    outline: none;
}

/* General styles for inputs */
input.form-control {
    border-radius: 4px;
    border: 1px solid #ccc;
    padding: 10px;
    width: 100%;
}

/* Style for the typeahead suggestions */
.tt-menu {
    width: 100%;
    margin-top: 2px;
    padding: 8px 12px;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: 0 5px 10px rgba(0, 0, 0, .2);
}

.tt-suggestion {
    padding: 8px 12px;
    border-bottom: 1px solid #ccc;
    cursor: pointer;
}

.tt-suggestion:hover {
    background-color: #f0f0f0;
}

.tt-suggestion:last-child {
    border-bottom: none;
}

/* 主页面搜索框与按钮的高度一致 */
.search-input {
    height: 100%;
}

.search-button {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 768px) {
    .search-input, .search-button {
        height: 100%;/*auto;*/
    }
}
/* 主页面搜索框与按钮的高度一致 */


/* Add CSS to style the dropdown and make the "..." button small: */
.btn-link {
    background-color: white;
    border: none;
    color: black;
    font-size: 16px;
    line-height: 1;
    padding: 0;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: auto;
    right: 0;
    z-index: 1000;
    float: left;
    min-width: 160px;
    padding: 5px 0;
    margin: 0;
    font-size: 14px;
    color: #212529;
    text-align: left;
    list-style: none;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 0.25rem;
}

.dropdown-menu.show {
    display: block;
}

/* Add CSS to style the dropdown and make the "..." button small: */


/* 用于显示卡片中的序号字体效果 */
.text-muted {
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 0; /* Ensure the margin is removed */
}

.mb-0 {
    margin-bottom: 0; /* Ensure the margin is removed */
}

.d-flex {
    display: flex;
}

.justify-content-between {
    justify-content: space-between;
}

.align-items-center {
    align-items: center;
}
/* 用于显示卡片中的序号字体效果 */