/* ===== Detail Page Specific Styles ===== */

/* Loading 状态 */
.detail-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    min-height: 300px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e0e0e0;
    border-top-color: var(--primary-purple, #852d88);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.loading-text {
    margin-top: 16px;
    color: #999;
    font-size: 0.95rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.main-content {
    padding: 3rem 5%;
    max-width: 1000px;
    margin: 0 auto;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-purple);
    text-decoration: none;
    font-weight: 500;
    margin-bottom: 2rem;
    transition: all 0.3s;
}

.back-link:hover {
    gap: 1rem;
}

.detail-category {
    display: inline-block;
    background: var(--primary-purple);
    color: white;
    padding: 0.3rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    margin-bottom: 1rem;
    margin-left: 1rem;
}

.detail-title {
    font-size: 2.2rem;
    color: var(--dark-green);
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

.detail-meta {
    display: flex;
    gap: 2rem;
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #eee;
}

.detail-meta-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.detail-views {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: #888;
}

.detail-image {
    width: 100%;
    height: 450px;
    object-fit: cover;
    border-radius: 15px;
    margin-bottom: 2rem;
}

.detail-content {
    background: white;
    border-radius: 15px;
    padding: 2.5rem;
    box-shadow: 0 2px 15px rgba(0,0,0,0.06);
}

.detail-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #444;
    margin-bottom: 1.5rem;
    text-align: justify;
}

.detail-content h2 {
    font-size: 1.5rem;
    color: var(--dark-green);
    margin: 2rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-purple);
}

.detail-content h3 {
    font-size: 1.25rem;
    color: #333;
    margin: 1.5rem 0 1rem;
}

.detail-content ul,
.detail-content ol {
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.detail-content li {
    margin-bottom: 0.5rem;
    color: #444;
    line-height: 1.6;
}

.detail-content blockquote {
    border-left: 4px solid var(--primary-purple);
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    color: #666;
    font-style: italic;
}

.detail-tags {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
}

.detail-tags span {
    display: inline-block;
    background: #f5f5f5;
    color: #666;
    padding: 0.3rem 0.8rem;
    border-radius: 10px;
    font-size: 0.85rem;
    margin-right: 0.75rem;
    margin-bottom: 0.5rem;
}

.share-section {
    margin-top: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.share-label {
    font-weight: 500;
    color: #555;
}

.share-links {
    display: flex;
    gap: 1rem;
}

.share-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: transform 0.3s;
}

.share-link:hover {
    transform: translateY(-3px);
}

.share-wechat {
    background: #10b981;
}

.share-weibo {
    background: #ff4757;
}

.share-qq {
    background: #3b82f6;
}

.share-link i {
    font-size: 1.1rem;
}

.related-news {
    margin-top: 3rem;
}

.related-news h3 {
    font-size: 1.3rem;
    color: var(--dark-green);
    margin-bottom: 1.5rem;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.related-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.related-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    transition: transform 0.3s, box-shadow 0.3s;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.related-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.12);
}

.related-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.related-content {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.related-category {
    font-size: 0.8rem;
    color: var(--primary-purple);
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.related-title-text {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.75rem;
    font-size: 1rem;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    flex: 1;
}

.related-date {
    font-size: 0.85rem;
    color: #999;
    margin-top: auto;
}

/* Responsive */
@media (max-width: 768px) {
    .main-content {
        padding: 2rem 5%;
    }

    .detail-title {
        font-size: 1.6rem;
    }

    .detail-meta {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .detail-image {
        height: 250px;
    }

    .detail-content {
        padding: 1.5rem;
    }

    .detail-content p {
        font-size: 1rem;
    }

    .share-section {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .related-grid {
        grid-template-columns: 1fr;
    }
}