/* ========================================
   博客列表页样式 (blog-list)
   与 blog-common.css 配合使用
   ======================================== */

.btn-primary {
    background: #6c757d !important;
    border: none;
}
body {
    padding-top: 50px;
    background-image: url('https://t.alcy.cc/fj');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    min-height: 100vh;
}

.page-wrapper {
    min-height: calc(100vh - 70px);
    display: flex;
    flex-direction: column;
    position: relative;
}

.main-content {
    flex: 1 0 auto;
    padding-bottom: 2rem;
}

footer {
    flex-shrink: 0;
    margin-top: auto;
}

.container.my-5.main-content {
    background-color: transparent;
    border-radius: 10px;
    padding: 20px;
    margin-top: 0.5rem !important;
}

.blog-list-card {
    background-color: rgba(255, 255, 255, 0.2) !important;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.blog-list-card .col-md-4.d-none.d-md-block {
    background-color: rgba(255, 255, 255, 0.65);
    border-radius: 0 var(--bs-card-inner-border-radius) var(--bs-card-inner-border-radius) 0;
}
.view-grid .blog-list-card .col-md-4.d-none.d-md-block {
    border-radius: var(--bs-card-inner-border-radius) var(--bs-card-inner-border-radius) 0 0;
}

.blog-list-card .card-body {
    background-color: rgba(255, 255, 255, 0.45);
    border-radius: inherit;
}

.navbar {
    background-color: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.navbar.fixed-top {
    transition: all 0.3s ease-in-out;
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid #dee2e6 !important;
    padding-bottom: 8px !important;
}

.navbar-brand {
    color: #212529 !important;
    font-weight: 600;
}

.navbar-nav .nav-link {
    color: #212529 !important;
}

.navbar.fixed-top.scrolled {
    background: rgba(255, 255, 255, 0.95) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

body footer {
    background: #ffffff !important;
    background-color: #ffffff !important;
    background-image: none !important;
    border-top: 1px solid #dee2e6 !important;
    padding: 1rem 0 !important;
    font-size: 0.9rem !important;
    color: #495057 !important;
    margin-top: auto !important;
    flex-shrink: 0 !important;
    width: 100% !important;
}

.btn-primary {
    background: linear-gradient(135deg, #36d1dc 0%, #5b86e5 100%) !important;
    border: none;
}
body footer .container {
    padding-top: 1rem !important;
    padding-bottom: 1rem !important;
}
body footer .container > div {
    border-top: none !important;
    padding-top: 0 !important;
    margin-top: 0 !important;
}
body footer .footer-links a {
    color: #6c757d !important;
    text-decoration: none;
    transition: color 0.2s;
}
body footer .footer-links a i {
    color: #495057 !important;
}
body footer .footer-links a:hover {
    color: #007bff !important;
}
body footer .footer-links a:hover i {
    color: #007bff !important;
}
body footer .footer-info {
    color: #495057 !important;
}
body footer > .container > p:first-child {
    color: #495057 !important;
    text-shadow: none !important;
    font-weight: normal !important;
    font-size: 0.9rem !important;
    margin-bottom: 0.5rem !important;
}
body footer .text-white {
    color: #6c757d !important;
}
body footer .text-white-50 {
    color: #6c757d !important;
}

.category-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 13px;
    color: white;
    font-weight: 500;
}
.color-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 6px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}
.tag-badge {
    display: inline-flex;
    align-items: center;
    margin: 2px;
    font-size: 12px;
}
.tag-color-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 4px;
}
.blog-list-card {
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}
.blog-list-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}
.loading {
    text-align: center;
    padding: 40px 0;
}
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@media (max-width: 768px) {
    body {
        padding-top: 60px;
    }
    .navbar.fixed-top {
        min-height: 60px;
    }
    .navbar.fixed-top.scrolled {
        box-shadow: 0 2px 15px rgba(0, 0, 0, 0.15);
    }
}

@media (min-width: 992px) {
    .navbar.fixed-top {
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
    }
}

.modal-content {
    background-color: rgba(255, 255, 255, 0.9) !important;
}

.modal-backdrop {
    background-color: rgba(0, 0, 0, 0.3) !important;
}

.search-highlight {
    background-color: #fff3cd;
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: 500;
}

.form-control-wrapper {
    position: relative;
    flex: 1 1 auto;
    width: 1%;
    min-width: 0;
}

.form-control-wrapper .form-control {
    padding-right: 35px;
    border-left: none;
    border-right: none;
}

.form-control-wrapper .form-control:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
    border-left: none;
    border-right: none;
}

.btn-clear {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 0;
    color: #6c757d;
    font-size: 16px;
    cursor: pointer;
    z-index: 3;
    transition: color 0.2s ease;
}

.btn-clear:hover {
    color: #dc3545;
}

.btn-clear:focus {
    outline: none;
    color: #dc3545;
}

.navbar .input-group {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 0.375rem;
    overflow: hidden;
    height: 38px;
}

.navbar .input-group-text {
    background-color: rgba(248, 249, 250, 0.9);
    border-color: #ced4da;
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
}

.navbar .form-control {
    background-color: rgba(255, 255, 255, 0.9);
    border-color: #ced4da;
    height: 100%;
    font-size: 14px;
    padding: 0.375rem 0.75rem;
}

.navbar .form-control:focus {
    background-color: #fff;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.15);
}

.navbar .btn-primary {
    background: linear-gradient(135deg, #36d1dc 0%, #5b86e5 100%);
    border: none;
    font-size: 14px;
    padding: 0.375rem 0.75rem;
    height: 38px;
    display: flex;
    align-items: center;
}

.navbar .btn-sm {
    height: 38px;
    display: flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    font-size: 14px;
}

.navbar {
    align-items: center !important;
}

.navbar .container {
    align-items: center !important;
    display: flex !important;
}

.navbar-brand {
    height: 38px !important;
    display: flex !important;
    align-items: center !important;
    font-size: 1.1rem;
    line-height: 1 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin-top: 0 !important;
    vertical-align: middle;
}

.navbar .text-dark {
    height: 38px;
    font-size: 14px;
    line-height: 1;
    white-space: nowrap;
}

.sidebar {
    position: sticky;
    top: 70px;
}

.sidebar-card {
    background-color: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

.sidebar-card .card-header {
    border-bottom: 2px solid #f0f0f0;
    font-weight: 600;
    color: #333;
}

.tag-cloud-container {
    position: relative;
    overflow: hidden;
    height: 100px;
    padding: 10px 0;
    background: linear-gradient(135deg, rgba(240, 248, 255, 0.3), rgba(255, 250, 240, 0.3));
    border-radius: 8px;
}

.tag-carousel {
    position: relative;
    width: 100%;
    height: 100%;
}

.tag-row {
    position: absolute;
    width: 200%;
    display: flex;
    gap: 12px;
    justify-content: flex-start;
    align-items: center;
    padding: 0 10px;
    height: 40px;
    overflow: visible;
    white-space: nowrap;
}

.tag-carousel .tag-row:nth-child(1) {
    top: 5px;
    animation: scrollLeft 30s linear infinite;
}

.tag-carousel .tag-row:nth-child(2) {
    top: 50px;
    animation: scrollRight 25s linear infinite;
}

@keyframes scrollLeft {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

@keyframes scrollRight {
    0% { transform: translateX(-50%); }
    100% { transform: translateX(0); }
}

.tag-pill {
    opacity: 0;
    transform: translateX(30px) scale(0.8);
    animation: slideInTag 0.8s ease-out forwards;
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: 50px;
    color: white;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
}

.tag-carousel .tag-row:nth-child(1) .tag-pill:nth-child(1) { animation-delay: 0.1s; }
.tag-carousel .tag-row:nth-child(1) .tag-pill:nth-child(2) { animation-delay: 0.2s; }
.tag-carousel .tag-row:nth-child(1) .tag-pill:nth-child(3) { animation-delay: 0.3s; }
.tag-carousel .tag-row:nth-child(1) .tag-pill:nth-child(4) { animation-delay: 0.4s; }
.tag-carousel .tag-row:nth-child(1) .tag-pill:nth-child(5) { animation-delay: 0.5s; }
.tag-carousel .tag-row:nth-child(1) .tag-pill:nth-child(6) { animation-delay: 0.6s; }
.tag-carousel .tag-row:nth-child(1) .tag-pill:nth-child(7) { animation-delay: 0.7s; }
.tag-carousel .tag-row:nth-child(1) .tag-pill:nth-child(8) { animation-delay: 0.8s; }
.tag-carousel .tag-row:nth-child(1) .tag-pill:nth-child(9) { animation-delay: 0.9s; }
.tag-carousel .tag-row:nth-child(1) .tag-pill:nth-child(10) { animation-delay: 1.0s; }

.tag-carousel .tag-row:nth-child(2) .tag-pill:nth-child(1) { animation-delay: 1.1s; }
.tag-carousel .tag-row:nth-child(2) .tag-pill:nth-child(2) { animation-delay: 1.2s; }
.tag-carousel .tag-row:nth-child(2) .tag-pill:nth-child(3) { animation-delay: 1.3s; }
.tag-carousel .tag-row:nth-child(2) .tag-pill:nth-child(4) { animation-delay: 1.4s; }
.tag-carousel .tag-row:nth-child(2) .tag-pill:nth-child(5) { animation-delay: 1.5s; }
.tag-carousel .tag-row:nth-child(2) .tag-pill:nth-child(6) { animation-delay: 1.6s; }
.tag-carousel .tag-row:nth-child(2) .tag-pill:nth-child(7) { animation-delay: 1.7s; }
.tag-carousel .tag-row:nth-child(2) .tag-pill:nth-child(8) { animation-delay: 1.8s; }
.tag-carousel .tag-row:nth-child(2) .tag-pill:nth-child(9) { animation-delay: 1.9s; }
.tag-carousel .tag-row:nth-child(2) .tag-pill:nth-child(10) { animation-delay: 2.0s; }

@keyframes slideInTag {
    0% { opacity: 0; transform: translateX(30px) scale(0.8); }
    60% { transform: translateX(-5px) scale(1.05); }
    100% { opacity: 1; transform: translateX(0) scale(1); }
}

.tag-pill:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
    z-index: 10;
    position: relative;
}

.tag-cloud-container:hover .tag-row {
    animation-play-state: paused;
}

.tag-cloud-container:hover .tag-pill {
    animation-play-state: paused;
}

.recommended-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.recommended-item {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e9ecef;
}

.recommended-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.recommended-link {
    display: block;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    line-height: 1.5;
    transition: all 0.3s ease;
    padding: 8px 10px;
    border-radius: 6px;
}

.recommended-link:hover {
    color: #007bff;
    background-color: rgba(0, 123, 255, 0.05);
    padding-left: 15px;
}

.recommended-link i {
    color: #007bff;
}

@media (max-width: 991px) {
    .tag-carousel {
        animation: none;
    }
}

/* 网格视图 */
.view-grid .row.g-4 > .col-md-12 {
    width: 33.333333%;
    flex: 0 0 33.333333%;
}
.view-grid .row.g-4 {
    align-items: stretch;
    padding-bottom: 4rem;
}
.view-grid .row.g-4 > .col-md-12:nth-child(3n+1) {
    transform: translateY(1.5rem);
}
.view-grid .row.g-4 > .col-md-12:nth-child(3n+2) {
    transform: translateY(-1rem);
}
.view-grid .row.g-4 > .col-md-12:nth-child(3n+3) {
    transform: translateY(2.5rem);
}
@media (max-width: 991px) {
    .view-grid .row.g-4 {
        padding-bottom: 2rem;
    }
    .view-grid .row.g-4 > .col-md-12 {
        width: 50%;
        flex: 0 0 50%;
    }
    .view-grid .row.g-4 > .col-md-12:nth-child(3n+1),
    .view-grid .row.g-4 > .col-md-12:nth-child(3n+2),
    .view-grid .row.g-4 > .col-md-12:nth-child(3n+3) {
        transform: none;
    }
    .view-grid .row.g-4 > .col-md-12:nth-child(even) {
        transform: translateY(2.5rem);
    }
    .view-grid .row.g-4 > .col-md-12:nth-child(odd) {
        transform: translateY(-0.5rem);
    }
}
@media (max-width: 768px) {
    .view-grid .row.g-4 {
        padding-bottom: 0;
    }
    .view-grid .row.g-4 > .col-md-12 {
        width: 100%;
        flex: 0 0 100%;
    }
    .view-grid .row.g-4 > .col-md-12:nth-child(even),
    .view-grid .row.g-4 > .col-md-12:nth-child(odd),
    .view-grid .row.g-4 > .col-md-12:nth-child(3n+2),
    .view-grid .row.g-4 > .col-md-12:nth-child(3n+3) {
        transform: none;
    }
}
.view-grid .blog-list-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}
.view-grid .blog-list-card .row.g-0 {
    flex-direction: column;
    height: 100%;
}
.view-grid .blog-list-card .col-md-8 {
    order: 2;
    width: 100%;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
}
.view-grid .blog-list-card .card-body {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 1.5rem 1rem;
}
.view-grid .blog-list-card .h5 {
    margin-bottom: 0 !important;
    font-size: 1.1rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: bold;
    text-align: center;
    width: 100%;
    margin-top: 0.5rem !important;
}
.view-grid .blog-list-card .h5 a {
    text-decoration: none !important;
}
.view-grid .blog-list-card .content-preview,
.view-grid .blog-list-card .text-muted.small,
.view-grid .blog-list-card .tags-container {
    display: none !important;
}
.view-grid .blog-list-card .title-container {
    justify-content: center !important;
    margin-bottom: 0 !important;
    width: 100%;
}
.view-grid .blog-list-card .col-md-4 {
    order: 1;
    width: 100%;
    display: block !important;
    background-color: transparent !important;
}
.view-grid .blog-list-card .col-md-4 .d-flex {
    padding: 0 !important;
    height: 180px !important;
}
.view-grid .blog-list-card .col-md-4 img {
    width: 100%;
    height: 100%;
    max-height: 180px !important;
    object-fit: cover;
    border-radius: var(--bs-card-inner-border-radius) var(--bs-card-inner-border-radius) 0 0 !important;
    box-shadow: none !important;
}
