/* 文章详情页样式 - 新设计 */

/* ========== 主容器 ========== */
.qm-article-detail {
    min-height: 100vh;
    background: #f5f5f5;
}

/* ========== 顶部横幅区域 ========== */
.qm-article-hero {
    position: relative;
    width: 100%;
    min-height: 400px;
    padding: 80px 0 60px;
    overflow: visible;
}

.qm-article-hero-wrapper {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    min-height: 400px;
    border-radius: 24px;
    overflow: hidden;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 50%, #1d4ed8 100%);
    box-shadow: 0 10px 40px rgba(59, 130, 246, 0.3);
}

.qm-article-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    opacity: 0.3;
    z-index: 1;
}

.qm-article-hero-content {
    position: relative;
    z-index: 2;
    padding: 60px 40px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
}

.qm-article-hero-main {
    flex: 1;
    color: white;
}

.qm-article-hero-title {
    font-size: 42px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 20px;
    color: white;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.qm-article-hero-tagline {
    margin-bottom: 20px;
}

.qm-hero-tagline-text {
    display: inline-block;
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    font-size: 16px;
    font-weight: 500;
    color: white;
}

.qm-article-hero-features {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}

.qm-hero-feature-item {
    padding: 6px 16px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    font-size: 14px;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.qm-article-hero-description {
    font-size: 18px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.95);
    max-width: 800px;
}

/* 右侧图片区域 - Mockup 框架 */
.qm-article-hero-image {
    position: relative;
    flex-shrink: 0;
    width: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qm-hero-mockup-area {
    position: relative;
    width: 100%;
    aspect-ratio: 1200 / 980;
    overflow: visible;
}

/* 屏幕区域 - 显示文章图片 */
.qm-hero-mockup-screen {
    position: absolute;
    left: 7.33%;
    top: 8.88%;
    width: 85.33%;
    height: 58.78%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #1a1a2e;
    z-index: 0;
    border-radius: 4px;
    overflow: hidden;
}

.qm-hero-mockup-screen.qm-hero-mockup-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
}

.qm-hero-mockup-placeholder i {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.7;
}

.qm-hero-mockup-placeholder span {
    font-size: 14px;
    font-weight: 500;
}

/* SVG 框架 - 覆盖在图片上方 */
.qm-hero-mockup-frame {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    filter: drop-shadow(0 20px 60px rgba(0, 0, 0, 0.3));
}

.qm-hero-image-decoration {
    position: absolute;
    top: -20px;
    right: -30px;
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.05));
    border-radius: 50%;
    z-index: 1;
    animation: float 6s ease-in-out infinite;
}

.qm-hero-image-decoration::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 150px;
    height: 150px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.05));
    border-radius: 50%;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(5deg);
    }
}

/* 统计信息 */
.qm-article-hero-stats {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: flex-end;
}

.qm-hero-stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.2);
    min-width: 100px;
    justify-content: center;
}

.qm-hero-stat-item i {
    font-size: 18px;
}

/* ========== 主内容区域 ========== */
.qm-article-content-wrapper {
    background: white;
    padding: 40px 0;
}

.qm-article-content-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 面包屑导航 */
.qm-article-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 30px;
    font-size: 14px;
    color: #666;
}

.qm-article-breadcrumb a {
    color: #3b82f6;
    text-decoration: none;
    transition: color 0.2s;
}

.qm-article-breadcrumb a:hover {
    color: #2563eb;
}

.qm-breadcrumb-sep {
    color: #999;
}

.qm-breadcrumb-current {
    color: #333;
    font-weight: 500;
}

/* 作者信息区域 */
.qm-article-author-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 0;
    margin-bottom: 30px;
    border-bottom: 1px solid #e5e7eb;
}

.qm-author-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.qm-author-avatar {
    position: relative;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    overflow: visible;
    background: #f3f4f6;
    flex-shrink: 0;
    border: 3px solid #a78bfa;
    padding: 2px;
}

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


.qm-author-details {
    flex: 1;
}

.qm-author-name-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.qm-author-name {
    font-size: 20px;
    font-weight: 700;
    color: #000;
    text-decoration: none;
    transition: color 0.2s;
    letter-spacing: 0.5px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    height: 28px;
}

.qm-author-name:hover {
    color: #3b82f6;
}

/* 确保徽章与用户名完美对齐 */
.qm-author-name-row .qm-level-badge-inline {
    flex-shrink: 0;
    margin-left: 0;
    display: inline-block;
    vertical-align: middle;
}

/* 使用统一的等级徽章样式 - 已在 style.css 中定义 */

.qm-author-update-time {
    font-size: 13px;
    color: #6b7280;
    margin-top: 2px;
}

.qm-author-actions {
    display: flex;
    gap: 12px;
}

.qm-author-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: white;
    color: #374151;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 90px;
    justify-content: center;
}

.qm-author-btn:hover {
    border-color: #3b82f6;
    color: #3b82f6;
    background: #eff6ff;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15);
}

.qm-author-btn.qm-author-follow:hover {
    border-color: #ec4899;
    color: #ec4899;
    background: #fdf2f8;
    box-shadow: 0 2px 8px rgba(236, 72, 153, 0.15);
}

.qm-author-btn i {
    font-size: 16px;
}

/* 文章内容 */
.qm-article-body {
    margin-bottom: 40px;
}

.qm-article-content {
    font-size: 16px;
    line-height: 1.8;
    color: #374151;
}

.qm-article-content h1,
.qm-article-content h2,
.qm-article-content h3,
.qm-article-content h4,
.qm-article-content h5,
.qm-article-content h6 {
    margin-top: 32px;
    margin-bottom: 16px;
    font-weight: 700;
    color: #1f2937;
    line-height: 1.4;
}

.qm-article-content h2 {
    font-size: 28px;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 10px;
}

.qm-article-content h3 {
    font-size: 24px;
}

.qm-article-content p {
    margin-bottom: 16px;
}

.qm-article-content ul,
.qm-article-content ol {
    margin-bottom: 16px;
    padding-left: 24px;
}

.qm-article-content li {
    margin-bottom: 8px;
}

.qm-article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 24px 0;
    display: block;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* 确保文章内容中的图片不添加框架效果 */
.qm-article-content img:not(.qm-hero-mockup-frame) {
    border: none;
    background: transparent;
}

.qm-article-content blockquote {
    margin: 24px 0;
    padding: 16px 20px;
    background: #f9fafb;
    border-left: 4px solid #3b82f6;
    border-radius: 4px;
    color: #6b7280;
    font-style: italic;
}

.qm-article-content code {
    padding: 2px 6px;
    background: #f3f4f6;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    color: #dc2626;
}

.qm-article-content pre {
    margin: 24px 0;
    padding: 16px;
    background: #1f2937;
    border-radius: 8px;
    overflow-x: auto;
}

.qm-article-content pre code {
    background: transparent;
    color: #e5e7eb;
    padding: 0;
}

/* 操作按钮区域 */
.qm-article-actions {
    display: flex;
    gap: 16px;
    margin: 40px 0;
    padding: 24px;
    background: #f9fafb;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.qm-action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
    flex: 1;
    justify-content: center;
}

.qm-action-download {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    border: none;
}

.qm-action-download:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.qm-action-preview {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
}

.qm-action-preview:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.qm-action-vip {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    border: none;
}

.qm-action-vip:hover {
    background: linear-gradient(135deg, #d97706, #b45309);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

/* 标签区域 */
.qm-article-tags {
    margin: 40px 0;
    padding: 24px;
    background: #f9fafb;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.qm-tags-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
}

.qm-tags-header i {
    color: #3b82f6;
}

.qm-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.qm-tag-item {
    display: inline-block;
    padding: 6px 14px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 14px;
    color: #374151;
    text-decoration: none;
    transition: all 0.2s;
}

.qm-tag-item:hover {
    border-color: #3b82f6;
    color: #3b82f6;
    background: #eff6ff;
}

/* 相关文章 */
.qm-article-related {
    margin: 40px 0;
}

.qm-related-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
    font-size: 22px;
    font-weight: 700;
    color: #1f2937;
}

.qm-related-title i {
    color: #3b82f6;
}

.qm-related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.qm-related-item {
    display: block;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    transition: all 0.2s;
}

.qm-related-item:hover {
    border-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1);
    transform: translateY(-2px);
}

.qm-related-thumb {
    width: 100%;
    height: 140px;
    overflow: hidden;
    background: #f3f4f6;
}

.qm-related-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.qm-related-item:hover .qm-related-thumb img {
    transform: scale(1.05);
}

.qm-related-content {
    padding: 16px;
}

.qm-related-item-title {
    font-size: 15px;
    font-weight: 600;
    color: #1f2937;
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 评论区 */
.qm-article-comments {
    margin: 40px 0;
    padding: 24px;
    background: white;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

/* 暗色模式支持 */
.dark .qm-article-detail {
    background: #111827;
}

.dark .qm-article-content-wrapper {
    background: #1f2937;
}

.dark .qm-article-breadcrumb {
    color: #9ca3af;
}

.dark .qm-article-breadcrumb a {
    color: #60a5fa;
}

.dark .qm-breadcrumb-current {
    color: #f3f4f6;
}

.dark .qm-article-author-section {
    border-bottom-color: #374151;
}

.dark .qm-author-name {
    color: #f3f4f6;
}

.dark .qm-author-avatar {
    border-color: #8b5cf6;
}

.dark .qm-author-update-time {
    color: #9ca3af;
}

.dark .qm-author-btn {
    background: #374151;
    border-color: #4b5563;
    color: #d1d5db;
}

.dark .qm-author-btn:hover {
    background: #4b5563;
    border-color: #60a5fa;
    color: #60a5fa;
}

.dark .qm-article-content {
    color: #d1d5db;
}

.dark .qm-article-content h1,
.dark .qm-article-content h2,
.dark .qm-article-content h3,
.dark .qm-article-content h4,
.dark .qm-article-content h5,
.dark .qm-article-content h6 {
    color: #f3f4f6;
}

.dark .qm-article-content h2 {
    border-bottom-color: #374151;
}

.dark .qm-article-content blockquote {
    background: #374151;
    color: #9ca3af;
}

.dark .qm-article-content code {
    background: #374151;
    color: #fca5a5;
}

.dark .qm-article-content pre {
    background: #111827;
}

.dark .qm-article-actions {
    background: #374151;
    border-color: #4b5563;
}

.dark .qm-article-tags {
    background: #374151;
    border-color: #4b5563;
}

.dark .qm-tags-header {
    color: #f3f4f6;
}

.dark .qm-tag-item {
    background: #4b5563;
    border-color: #6b7280;
    color: #d1d5db;
}

.dark .qm-tag-item:hover {
    border-color: #60a5fa;
    color: #60a5fa;
    background: #1e3a8a;
}

.dark .qm-related-title {
    color: #f3f4f6;
}

.dark .qm-related-item {
    background: #374151;
    border-color: #4b5563;
}

.dark .qm-related-item:hover {
    border-color: #60a5fa;
}

.dark .qm-related-thumb {
    background: #4b5563;
}

.dark .qm-related-item-title {
    color: #f3f4f6;
}

.dark .qm-article-comments {
    background: #374151;
    border-color: #4b5563;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .qm-article-hero {
        padding: 30px 0;
    }
    
    .qm-article-hero-wrapper {
        padding: 0 15px;
        border-radius: 16px;
        min-height: auto;
    }
    
    .qm-article-hero-content {
        padding: 30px 15px;
        flex-direction: column;
        gap: 25px;
    }
    
    .qm-article-hero-title {
        font-size: 24px;
        line-height: 1.4;
        margin-bottom: 15px;
    }
    
    .qm-hero-tagline-text {
        font-size: 14px;
        padding: 6px 16px;
    }
    
    .qm-hero-feature-item {
        font-size: 12px;
        padding: 5px 12px;
    }
    
    .qm-article-hero-description {
        font-size: 15px;
        line-height: 1.6;
    }
    
    .qm-article-hero-image {
        width: 100%;
        max-width: 280px;
        margin: 0 auto;
        order: -1; /* 图片移到最前面 */
    }
    
    .qm-hero-mockup-area {
        width: 100%;
    }
    
    .qm-hero-image-decoration {
        display: none; /* 移动端隐藏装饰元素 */
    }
    
    .qm-article-hero-stats {
        flex-direction: row;
        width: 100%;
        justify-content: space-around;
        gap: 10px;
    }
    
    .qm-hero-stat-item {
        flex: 1;
        min-width: auto;
        padding: 10px 12px;
        font-size: 14px;
    }
    
    .qm-hero-stat-item i {
        font-size: 16px;
    }
    
    .qm-article-content-container {
        padding: 0 15px;
    }
    
    .qm-article-breadcrumb {
        font-size: 12px;
        margin-bottom: 20px;
    }
    
    .qm-article-author-section {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        padding: 20px 0;
    }
    
    .qm-author-info {
        width: 100%;
    }
    
    .qm-author-avatar {
        width: 56px;
        height: 56px;
        border-width: 2px;
    }
    
    .qm-author-name {
        font-size: 18px;
    }
    
    /* 移动端徽章稍小（继续放大） */
    .qm-level-badge-inline {
        width: 60px;
        height: 60px;
    }
    
    .qm-author-update-time {
        font-size: 13px;
    }
    
    .qm-author-actions {
        width: 100%;
        display: flex;
        gap: 10px;
    }
    
    .qm-author-btn {
        flex: 1;
        padding: 10px 16px;
        font-size: 13px;
    }
    
    .qm-article-content {
        font-size: 15px;
        line-height: 1.7;
    }
    
    .qm-article-content h2 {
        font-size: 22px;
        margin-top: 24px;
    }
    
    .qm-article-content h3 {
        font-size: 20px;
    }
    
    .qm-article-actions {
        flex-direction: column;
        padding: 20px;
        gap: 12px;
    }
    
    .qm-action-btn {
        padding: 12px 20px;
        font-size: 14px;
    }
    
    .qm-article-tags {
        padding: 20px;
    }
    
    .qm-tags-header {
        font-size: 15px;
        margin-bottom: 12px;
    }
    
    .qm-tag-item {
        font-size: 13px;
        padding: 5px 12px;
    }
    
    .qm-related-title {
        font-size: 20px;
        margin-bottom: 20px;
    }
    
    .qm-related-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .qm-related-thumb {
        height: 120px;
    }
    
    .qm-article-comments {
        padding: 20px;
    }
}

