/* 全局样式 */
body {
    font-family: 'Microsoft YaHei', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
    background-color: #f8f8f8;

}

a {
    color: #d9534f;
}

a:hover {
    color: #c9302c;
    text-decoration: none;
}

/* 导航栏样式 */
.navbar-default {
    background-color: #fff;
    border-color: #e7e7e7;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-weight: bold;
    color: #d9534f !important;
}

.navbar-nav > li > a:hover,
.navbar-nav > li > a:focus {
    background-color: #f8f8f8;
    color: #d9534f;
}

/* Jumbotron样式 */
.jumbotron {
    background-color: #d9534f;
    color: white;
    margin-bottom: 30px;
    padding: 30px 0;
    border-radius: 0;
}

.jumbotron h1 {
    font-size: 36px;
    margin-bottom: 15px;
}

.jumbotron p {
    font-size: 18px;
    margin-bottom: 0;
}

/* 面板样式 */
.panel {
    margin-bottom: 20px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.panel-heading {
    padding: 10px 15px;
    border-bottom: 1px solid #ddd;
    background-color: #f5f5f5;
}

.panel-title {
    margin-top: 0;
    margin-bottom: 0;
    font-size: 16px;
    color: #333;
}

.panel-body {
    padding: 15px;
}

/* 表单样式 */
.form-horizontal .control-label {
    padding-top: 7px;
    margin-bottom: 0;
    text-align: right;
}

.form-group {
    margin-bottom: 15px;
}

.form-control:focus {
    border-color: #d9534f;
    outline: 0;
    box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(217, 83, 79, 0.4);
}

/* 按钮组样式 */
.btn-group {
    margin-bottom: 10px;
}

.btn-group .btn {
    margin-right: 5px;
}

.btn-danger {
    background-color: #337ab7;
    border-color: #2e6da4;
}

.btn-danger:hover {
    background-color: #286090;
    border-color: #204d74;
}

.btn-primary {
    background-color: #337ab7;
    border-color: #2e6da4;
}

.btn-primary:hover {
    background-color: #286090;
    border-color: #204d74;
}



.btn-default {
    background-color: #fff;
    border-color: #ccc;
}

.btn-default:hover {
    background-color: #e6e6e6;
    border-color: #adadad;
}

/* 视频列表样式 */
.thumbnail {
    display: block;
    padding: 4px;
    margin-bottom: 20px;
    line-height: 1.42857143;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: all .3s ease-in-out;
}

.thumbnail:hover {
    border-color: #d9534f;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-3px);
}

.video-thumbnail {
    position: relative;
    overflow: hidden;
}

.img-responsive {
    display: block;
    max-width: 100%;
    height: auto;
}

.play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 3rem;
    opacity: 0.8;
    transition: all 0.3s ease;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.thumbnail:hover .play-icon {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
}

.caption {
    padding: 9px;
}

.video-title {
    font-size: 16px;
    font-weight: 600;
    margin-top: 0;
    margin-bottom: 10px;
    line-height: 1.4;
    height: 44px; /* 两行高度 */
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    text-overflow: ellipsis; /* 超出显示省略号 */
}

.video-title a {
    color: #333;
}

.video-title a:hover {
    color: #d9534f;
}

.video-meta {
    margin-bottom: 8px;
    font-size: 12px;
    color: #777;
}

.video-meta .views,
.video-meta .date {
    margin-right: 10px;
}

.video-author {

    margin-bottom: 5px;
}

.author-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    margin-right: 5px;
    vertical-align: middle;
}

.duration {
    position: absolute;
    bottom: 5px;
    right: 5px;
    font-size: 11px;
    padding: 1px 5px;
}

/* 分页样式 */
.pagination {
    display: inline-block;
    padding-left: 0;
    margin: 20px 0;
    border-radius: 4px;
}

.pagination > li {
    display: inline;
}

.pagination > li > a,
.pagination > li > span {
    position: relative;
    float: left;
    padding: 6px 12px;
    margin-left: -1px;
    line-height: 1.42857143;
    color: #d9534f;
    text-decoration: none;
    background-color: #fff;
    border: 1px solid #ddd;
}

.pagination > li:first-child > a,
.pagination > li:first-child > span {
    margin-left: 0;
    border-top-left-radius: 4px;
    border-bottom-left-radius: 4px;
}

.pagination > li:last-child > a,
.pagination > li:last-child > span {
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
}

.pagination > li > a:hover,
.pagination > li > span:hover,
.pagination > li > a:focus,
.pagination > li > span:focus {
    color: #c9302c;
    background-color: #eee;
    border-color: #ddd;
}

.pagination > .active > a,
.pagination > .active > span,
.pagination > .active > a:hover,
.pagination > .active > span:hover,
.pagination > .active > a:focus,
.pagination > .active > span:focus {
    z-index: 2;
    color: #fff;
    cursor: default;
    background-color: #d9534f;
    border-color: #d9534f;
}

.pagination > .disabled > span,
.pagination > .disabled > span:hover,
.pagination > .disabled > span:focus,
.pagination > .disabled > a,
.pagination > .disabled > a:hover,
.pagination > .disabled > a:focus {
    color: #777;
    cursor: not-allowed;
    background-color: #fff;
    border-color: #ddd;
}

.page-info {
    margin-top: 10px;
    color: #777;
    font-size: 13px;
}

/* 页脚样式 */
.footer {

}

.footer h4 {
    color: #fff;
    margin-bottom: 20px;
    font-size: 18px;
}

.footer p {
    color: #9d9d9d;
    margin-bottom: 10px;
}

.footer a {
    color: #9d9d9d;
}

.footer a:hover {
    color: #fff;
}

.social-links {
    margin-top: 15px;
}

.social-links .btn {
    margin-right: 5px;
    margin-bottom: 5px;
}

.footer hr {
    border-top-color: #333;
    margin: 20px 0;
}

.copyright {
    color: #9d9d9d;
    font-size: 13px;
}

/* 视频播放页样式 */
.video-player-section {
    padding: 30px 0;
}

.video-player-container {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.video-player {
    position: relative;
    padding-top: 56.25%; /* 16:9 比例 */
    background-color: #000;
}

#main-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.video-details {
    padding: 20px;
}

.video-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 10px;
}

.video-meta {
    display: flex;
    gap: 20px;
    color: #6c757d;
    font-size: 14px;
    margin-bottom: 15px;
}

.video-author-info {
    display: flex;
    align-items: center;
    gap: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e9ecef;
}

.author-avatar img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}

.author-details h4 {
    font-size: 18px;
    margin-bottom: 5px;
}

.author-details p {
    color: #6c757d;
    margin: 0;
}

.video-description h4, .video-tags h4 {
    font-size: 18px;
    margin-bottom: 10px;
}

.video-description p {
    color: #495057;
    line-height: 1.7;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.badge-primary {
    background-color: #007bff;
}

/* 相关视频样式 */
.related-videos {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
}

.section-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e9ecef;
}

.related-video-item {
    margin-bottom: 15px;
    transition: transform 0.3s ease;
}

.related-video-item:hover {
    transform: translateX(5px);
}

.related-thumbnail {
    position: relative;
    border-radius: 4px;
    overflow: hidden;
}

.related-thumbnail img {
    width: 100%;
    height: 70px;
    object-fit: cover;
}

.duration {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background-color: rgba(0, 0, 0, 0.7);
    color: #fff;
    font-size: 12px;
    padding: 2px 5px;
    border-radius: 2px;
}

.related-info {
    padding: 0 10px;
}

.related-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 5px;
    line-height: 1.4;
    height: 40px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.related-author, .related-views {
    font-size: 12px;
    color: #6c757d;
    margin-bottom: 3px;
}

/* 评论区样式 */
.comments-section {
    padding-bottom: 40px;
}

.comments-container {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
}

.comment-form textarea {
    resize: none;
    border-radius: 4px;
}

.comment-item {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e9ecef;
}

.comment-avatar img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.comment-content {
    flex-grow: 1;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.comment-author {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

.comment-date {
    font-size: 12px;
    color: #6c757d;
}

.comment-text {
    color: #495057;
    margin-bottom: 10px;
}

.comment-actions {
    display: flex;
    gap: 15px;
}

.comment-reply, .comment-like {
    font-size: 14px;
    color: #6c757d;
}

.comment-reply:hover, .comment-like:hover {
    color: #dc3545;
    text-decoration: none;
}

.reply-item {
    display: flex;
    gap: 15px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #f1f3f5;
    margin-left: 20px;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .jumbotron h1 {
        font-size: 30px;
    }
    
    .jumbotron p {
        font-size: 16px;
    }
}

@media (max-width: 768px) {
    body {
        padding-top: 50px;
    }
    
    .form-horizontal .control-label {
        text-align: left;
        margin-bottom: 5px;
    }
    
    .btn-group {
        display: block;
        width: 100%;
    }
    
    .btn-group .btn {
        display: block;
        width: 100%;
        margin-right: 0;
        margin-bottom: 5px;
        border-radius: 4px !important;
    }
    
    .video-title {
        height: auto;
        white-space: normal;
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }
    
    .footer h4 {
        margin-top: 20px;
    }
}

@media (max-width: 576px) {
    .jumbotron {
        padding: 20px 0;
    }
    
    .jumbotron h1 {
        font-size: 24px;
    }
    
    .panel-title {
        font-size: 14px;
    }
    
    .video-meta {
        display: block;
    }
    
    .video-meta .views,
    .video-meta .date {
        display: block;
        margin-bottom: 5px;
    }
    
    .pagination > li > a,
    .pagination > li > span {
        padding: 4px 8px;
        font-size: 12px;
    }
    
    .social-links .btn {
        display: block;
        width: 100%;
        margin-bottom: 10px;
    }
}