/* ========================================
   文章详情页样式 (blog-article)
   与 blog-common.css 配合使用
   ======================================== */

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: rgba(255, 255, 255, 0.85);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-top: 0.5rem !important;
}

.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;
}

@media (min-width: 992px) {
    .navbar-nav .dropdown:hover .dropdown-menu {
        display: block;
        margin-top: 0;
        animation: fadeIn 0.3s ease;
    }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.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);
}

.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;
}

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

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: #6c757d !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;
}

.anchor-highlight {
    background-color: #fff3cd !important;
    border: 2px solid #ffc107 !important;
    border-radius: 4px !important;
    padding: 4px 8px !important;
    margin: 4px 0 !important;
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.3) !important;
    animation: anchorGlow 2s ease-in-out infinite alternate !important;
}

@keyframes anchorGlow {
    from { box-shadow: 0 2px 8px rgba(255, 193, 7, 0.3); }
    to { box-shadow: 0 4px 16px rgba(255, 193, 7, 0.6); }
}

.post-content {
    scroll-behavior: smooth;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
}

.post-content a[data-anchor] {
    color: #007bff;
    text-decoration: underline;
    cursor: pointer;
    transition: color 0.2s ease;
}

.post-content a[data-anchor]:hover {
    color: #0056b3;
    text-decoration: underline;
}

.post-content h1, .post-content h2, .post-content h3,
.post-content h4, .post-content h5, .post-content h6 {
    scroll-margin-top: 70px;
}

.comment-item .replies > .reply-item {
    padding-left: 1.5rem !important;
    border-left: 2px solid #dee2e6 !important;
    margin-left: 0 !important;
}
.replies .replies .reply-item {
    padding-left: 0 !important;
    border-left: none !important;
    margin-left: 0 !important;
}

.post-recommendation-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    background: #ffffff;
    overflow: hidden;
    border-radius: 12px;
}

.post-recommendation-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(102, 126, 234, 0.2);
}

.post-recommendation-card .card-title a {
    transition: color 0.2s ease;
}

.post-recommendation-card .card-title a:hover {
    color: #007bff !important;
}

.recommended-posts {
    background: linear-gradient(to bottom, rgba(240, 248, 255, 0.3), transparent);
    border-radius: 8px;
    padding-top: 20px;
}

.recommended-posts h3 {
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
    position: relative;
    margin-bottom: 25px;
}

.recommended-posts h3:after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background: linear-gradient(to right, #007bff, #6c757d);
}

@media (max-width: 768px) {
    .recommended-posts .row {
        display: block !important;
    }
    .recommended-posts .col-md-4 {
        width: 100% !important;
        margin-bottom: 15px;
    }
    .recommended-posts .post-recommendation-card {
        display: block !important;
        padding: 10px 15px;
        background: rgba(0,0,0,0.02);
        border-radius: 8px;
        margin-bottom: 10px;
        transition: background 0.3s ease;
        cursor: pointer;
        position: relative;
    }
    .recommended-posts .post-recommendation-card:hover {
        transform: none !important;
        box-shadow: none !important;
        background: rgba(0,0,0,0.05);
    }
    .recommended-posts .post-recommendation-card::after {
        content: "";
        position: absolute;
        top: 0; left: 0; right: 0; bottom: 0;
        z-index: 1;
    }
    .recommended-posts .card-img-top,
    .recommended-posts .card-body {
        display: inline !important;
        vertical-align: middle;
    }
    .recommended-posts .card-img-top,
    .recommended-posts .card-body .card-text:not(.card-title),
    .recommended-posts .card-body .badge,
    .recommended-posts .card-body .btn {
        display: none !important;
    }
    .recommended-posts .card-body .card-title {
        margin: 0 !important;
        font-size: 16px !important;
        position: relative;
        z-index: 2;
    }
    .recommended-posts .card-body .card-title a {
        display: block !important;
        width: 100% !important;
        height: 100% !important;
    }
}

.category-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.dropdown-menu .category-filter-item {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    transition: background-color 0.2s ease;
}

.dropdown-menu .category-filter-item:hover {
    background-color: #f8f9fa;
}

.dropdown-menu .category-filter-item.active {
    background-color: #e3f2fd;
    color: #1976d2;
    font-weight: 500;
}

.dropdown-menu .category-filter-item.active .category-dot {
    border-color: #1976d2;
}

.category-filter-active {
    background-color: #e3f2fd !important;
    border-color: #1976d2 !important;
    color: #1976d2 !important;
}

.friend-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.friend-link-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(248, 249, 250, 0.95));
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.05);
    position: relative;
}

.friend-link-item:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.98));
    box-shadow: 0 8px 25px rgba(91, 134, 229, 0.2);
    transform: translateY(-5px);
}

.friend-link-logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: 8px;
    background: white;
    padding: 5px;
    flex-shrink: 0;
}

.friend-link-logo-placeholder {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 28px;
    flex-shrink: 0;
}

.friend-link-info {
    flex: 1;
    min-width: 0;
}

.friend-link-info h5 {
    margin: 0 0 5px 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.friend-link-info p {
    margin: 0;
    font-size: 0.9rem;
    color: #666;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-overlay {
    position: relative;
    display: inline-block;
    width: 100%;
}

.video-overlay video {
    display: block;
    width: 100%;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    user-select: none !important;
}

.video-overlay::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 40px;
    height: 100%;
    z-index: 5;
    pointer-events: none;
}

.post-content img {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    pointer-events: auto;
}

/* 页面加载器 */
#page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    background-image: url('https://t.alcy.cc/fj');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    transition: opacity 0.5s ease-in-out, visibility 0.5s ease-in-out;
}

.loader-content {
    text-align: center;
    z-index: 2;
}

.loader-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(13, 110, 253, 0.2);
    border-top-color: #0d6efd;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
    box-shadow: 0 0 20px rgba(13, 110, 253, 0.3);
}

.loader-text {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

.loader-subtext {
    font-size: 0.9rem;
    color: #666;
}

.loader-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.85);
    z-index: 1;
}

#page-loader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
