/* styles.css */
body {
    font-family: 'Roboto', sans-serif;
    background-color: #f9f9f9;
    margin: 0;
    padding: 0;
}

.container {
    width: 80%;
    margin: auto;
    overflow: hidden;
}

header {
    text-align: center;
    padding: 20px 0;
    color: white;
}

header h1 {
    margin: 0;
    font-size: 2.5em;
    color: #b14b43;
}

header p {
    font-size: 1.2em;
    color: #b14b43;
}

.search-container {
    text-align: center;
    margin: 20px 0;
}

#search-input {
    width: 60%;
    padding: 15px; /* 增加输入区域的空间 */
    font-size: 18px; /* 改变输入文字的大小 */
    border: 1px solid #ccc;
    border-radius: 25px; /* 更圆润的边框 */
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); /* 添加阴影效果 */
    transition: all 0.3s ease-in-out; /* 添加过渡效果 */
}


/*#search-input:hover {*/
/*    border-color: #b14b43; !* 输入框悬停时的边框颜色 *!*/
/*}*/

#search-input:focus {
    border-width: 1px;
    border-color: #B14B43 !important;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); /* 输入框聚焦时的阴影效果 */
}

#search-input:focus:valid {
    border-width: 1px;
    border-color: red !important;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); /* 输入框聚焦时的阴影效果 */
}


.tags-container {
    text-align: center;
    margin-bottom: 30px;
}

.tags-subcontainer {
    margin-bottom: 10px; /* 设置底部外边距 */
}

.tag {
    padding: 13px 23px;
    font-size: 0.9em;
    border: none;
    border-radius: 5px;
    color: #fff;
    background-color: #4b5563; /* Neutral color */
    cursor: pointer;
    margin: 5px;
    transition: background-color 0.3s;
}

.tag.selected {
    background-color: #b14b43;
    color: white;
}

.tag:hover {
    background-color: #374151; /* Slightly darker on hover */
}

.card-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); /* 使用响应式布局 */
    gap: 20px;
    justify-content: center;
}

a.card {
    position: relative; /* Add this line */
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin: 10px;
    transition: transform 0.3s;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
}

a.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2); /* 添加阴影效果 */
    background-color: #f0f0f0; /* 鼠标悬停时的背景颜色 */
}

a.card .card-header {
    width: 100%;
    margin-bottom: 10px; /* 减少底部的空白 */
}

a.card .card-header img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 10px;
}

a.card .card-title {
    font-size: 1.5em; /* 调整字体大小 */
    margin: 0;
    color: #333;
    display: flex;
    /*align-items: center;*/
    align-items: center; /* 修改这里 */
}

a.card .card-title img {
    width: 1.2em; /* 确保icon的大小与文字一致 */
    height: 1.2em;
    margin-right: 5px; /* icon和文字之间的间距 */
}
a.card .card-info{
    display: flex;
    align-items: center;
    justify-content: space-between; /* Add this line */
    margin-top: 5px;
}

a.card .card-info .card-meta {
    font-size: 1.0em;
    color: #8f6262;
    text-align: right;
    display: inline-block; /* 修改为内联块元素 */
    flex:0.7;
    margin-left: auto;
    flex-shrink: 0; /* 防止缩小 */
}

a.card .card-info .card-owner {
    /* 新增样式 */
    display: inline-block; /* 设置为内联块元素 */
    text-align: left;
    flex:0.3;
    flex-shrink: 0; /* 防止缩小 */
    font-weight: bold;
    color: #8f6262;
}

a.card p {
    font-size: 0.9em; /* 调整字体大小，使其比标题小 */
    color: #999898;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    margin-top: 5px; /* 减少描述和标题之间的空白 */
    margin-bottom: 0; /* 移除底部默认的空白 */
    line-height: 1.7; /* 增加行间距 */
}


a.card .card-details {
    position: absolute;
    bottom: 10px;
    right: 0px;
    font-size: 1.1em;
    color: #666;
    margin-top: 10px;
    text-align: right;
    text-decoration: none;
    width: 100px;
    box-sizing: border-box;
    background-color: #c30e0e;
}

a.card .card-details:hover {
    color: #c30e0e; /* 鼠标悬停时颜色加深 */
}

a.card .details span {
    display: block;
    margin-bottom: 5px;
}
a.card .btn-primary{
    /*margin:10px auto;*/
    width: 100%;
    background: #b14b43;
    color: #fff;
    border-radius: 6px;
    text-align: center;
    padding: 5px;
    margin-top: auto;
}

a.card .btn-primary:hover {
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    background: #9e3d33;
}

#card-count {
    text-align: center;
    margin: 20px 0;
    font-size: 1.2em;
}

#card-count .selected-tag {
    color: #9e3d33;
    font-weight: bold;
    font-size: 1.0em;
}
/* 响应式布局 */
@media (max-width: 768px) {
    .card-container {
        grid-template-columns: 1fr; /* 小屏幕上显示一列 */
    }
}

/*@media (min-width: 769px) {*/
/*    .card-container {*/
/*        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); !* 大屏幕上显示多列 *!*/
/*    }*/
/*}*/

footer {
    text-align: center;
    padding: 20px 0;
    background-color: #f1f1f1;
    color: #666;
    position: relative;
    bottom: 0;
    margin: 30px 0  auto; /* 将footer推到页面底部 */
    display: flex; /* 使用flexbox布局 */
    justify-content: center; /* 水平居中 */
    align-items: center; /* 垂直居中 */
    height: 50px; /* 设置固定高度 */
}

footer a {
    color: #666;
    color: #8e3232;
    text-decoration: none;
}

@media (min-width: 769px) and (max-width: 1024px) {
    .card-container {
        grid-template-columns: repeat(2, 1fr); /* 中等屏幕上显示两列 */
    }
}

@media (min-width: 1025px) and (max-width: 1440px) {
    .card-container {
        grid-template-columns: repeat(3, 1fr); /* 较大屏幕上显示三列 */
    }
}

@media (min-width: 1441px) {
    .card-container {
        grid-template-columns: repeat(4, 1fr); /* 超大屏幕上显示四列 */
    }
}