body {
    /*padding-top: 70px; !* 避免内容被导航栏遮住 *!*/

    background-color: #000;
    color: #fff;
}

a {
    text-decoration: none;
    color: inherit; /* 可改为 black、#333 等 */
}


/* 自定义断点确保大屏幕每行9个 */
@media (min-width: 1200px) {
    .col-xxl-9th {
        flex: 0 0 11%;
        max-width: 11%;
    }
}

/* 响应式调整 */
@media (max-width: 576px) {
    .poster-container {
        min-height: 100px;
        max-height: 300px;
    }

    .card-title {
        -webkit-line-clamp: 1; /* 手机端也保持2行 */
        min-height: 1.2rem;
        color: #ffffff;
    }
}

.nav-link {
    color: #ffffff;
}

/* 卡片整体样式 */
.movie-card {
    background-color: #000000;
    transition: all 0.3s ease;
    /*margin-bottom: 20px;*/
    height: 100%;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.movie-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

/* 海报容器 - 关键改进 */
.poster-container {
    flex: 1;
    display: flex;
    align-items: flex-start; /* 确保顶部对齐 */
    overflow: hidden;
    background-color: #000000;

    /*border-radius: 5px 5px 0 0;*/
    min-height: 120px; /* 最小高度保证 */
    /*min-height: 100px; !* 最小高度保证 *!*/
    max-height: 350px;
}

/* 海报图片样式 */
.movie-poster {
    width: 100%;
    height: auto;
    object-fit: cover;
    align-self: flex-start; /* 确保从顶部开始 */
    aspect-ratio: 16 / 22 !important;
}

/* 卡片内容区域 */
.card-body {
    padding: .25rem;
    flex: 0 0 auto; /* 不伸缩 */
}

/* 标题样式 - 关键改进：所有设备都允许换行 */
.card-title {
    color: #ffffff;
    font-size: 0.85rem;
    white-space: nowrap; /* 不换行 */
    overflow: hidden; /* 溢出隐藏 */
    text-overflow: ellipsis; /* 溢出显示省略号 */
    margin-bottom: 0.5rem;
    min-height: 1.2rem !important; /* 保持高度一致 */
    line-height: 1.2rem; /* 与高度一致，垂直居中 */
}

/* 元信息样式 */
.movie-meta {
    font-size: 0.75rem;
    color: #6c757d;
}

.movie-stats {
    font-size: 0.75rem;
}

/* 图标样式 */
.stats-icon {
    margin-right: 5px;
    color: #6c757d;
}


/* 返回顶部按钮样式 */
#back-to-top {
    position: fixed;
    bottom: 150px;
    right: 20px;
    display: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #0d6efd;
    color: white;
    text-align: center;
    /*line-height: 50px;*/
    font-size: 20px;
    z-index: 999;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    transition: all 0.3s;
    border: none;
}

#back-to-top:hover {
    background-color: #0b5ed7;
    transform: translateY(-3px);
}

.search-container {
    width: 100%;
    max-width: 500px;
}

/* 确保输入框和按钮不换行 */
.search-container form {
    flex-wrap: nowrap !important; /* 强制不换行 */
}

/* 手机端调整按钮宽度 */
@media (max-width: 576px) {
    .search-container .btn {
        min-width: 80px; /* 防止按钮太窄 */
    }
}


.h {
    display: inline-block; /* 或者 block，如果你希望它换行占满整行 */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}


.text-truncate-1 {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    display: block; /* 或 inline-block，如果你用在 span 上 */
}

.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-all; /* 可强制英文词断开，防止溢出 */
    overflow-wrap: break-word; /* 英文换行更智能 */
}

.fs-7 {
    font-size: 0.875rem !important;
}

@media (max-width: 576px) {
    .fs-md-8 {
        font-size: 0.875rem !important;
    }
}
