/* 文章详情页面样式 */

/* 文章容器 */
.article-container {
    padding: 2rem 0;
    min-height: 80vh;
}

.article-detail {
    background: #1a1a1a;
    border: 1px solid #333333;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 2rem;
    box-shadow: 0 0 30px rgba(0, 255, 65, 0.1);
}

/* 文章头部 */
.article-header {
    padding: 2rem;
    border-bottom: 1px solid #333333;
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    position: relative;
}

.article-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #00ff41, #00cc33, #00ff41);
    animation: pulse 2s ease-in-out infinite;
}

.article-meta {
    margin-bottom: 2rem;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    font-family: 'Fira Code', monospace;
    font-size: 0.8rem;
    flex-wrap: wrap;
}

.breadcrumb-link {
    color: #00ff41;
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
}

.breadcrumb-link:hover {
    background: rgba(0, 255, 65, 0.1);
    text-shadow: 0 0 10px #00ff41;
}

.breadcrumb-separator {
    color: #666666;
    margin: 0 0.25rem;
}

.breadcrumb-item.current {
    color: #cccccc;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.article-info {
    background: #222222;
    border: 1px solid #333333;
    border-radius: 6px;
    padding: 1rem;
}

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

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    background: #2a2a2a;
    border: 1px solid #333333;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.info-item:hover {
    border-color: #00ff41;
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.2);
}

.info-label {
    color: #888888;
    font-size: 0.8rem;
    font-family: 'Fira Code', monospace;
}

.info-value {
    color: #00ff41;
    font-family: 'Fira Code', monospace;
    font-size: 0.8rem;
    font-weight: bold;
}

.category-link {
    color: #00ff41;
    text-decoration: none;
    transition: all 0.3s ease;
}

.category-link:hover {
    text-shadow: 0 0 10px #00ff41;
}

.article-title {
    font-size: 2.5rem;
    margin: 1.5rem 0;
    color: #00ff41;
    text-shadow: 0 0 20px rgba(0, 255, 65, 0.5);
    line-height: 1.2;
    word-break: break-word;
}

.title-prefix {
    color: #666666;
    margin-right: 0.5rem;
}

.title-cursor {
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.article-description {
    margin-top: 1.5rem;
}

.description-box {
    background: #222222;
    border: 1px solid #333333;
    border-radius: 6px;
    overflow: hidden;
}

.description-header {
    background: #2a2a2a;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #333333;
}

.description-label {
    color: #00ff41;
    font-family: 'Fira Code', monospace;
    font-size: 0.8rem;
    font-weight: bold;
}

.description-content {
    padding: 1rem;
    color: #cccccc;
    line-height: 1.6;
    font-style: italic;
}

/* 标签 */
.article-tags {
    margin-top: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.tags-label {
    color: #888888;
    font-family: 'Fira Code', monospace;
    font-size: 0.8rem;
    white-space: nowrap;
}

.tags-list {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tag-item {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    background: #222222;
    border: 1px solid #333333;
    border-radius: 15px;
    color: #cccccc;
    text-decoration: none;
    font-size: 0.8rem;
    font-family: 'Fira Code', monospace;
    transition: all 0.3s ease;
}

.tag-item:hover {
    border-color: #00ff41;
    color: #00ff41;
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.3);
    transform: translateY(-2px);
}

.tag-hash {
    color: #00ff41;
    margin-right: 0.25rem;
}

/* 文章内容 */
.article-content {
    padding: 2rem;
    position: relative;
}

.content-wrapper {
    display: block;
    width: 100%;
}

/* 目录导航 */
.article-toc {
    position: sticky;
    top: 2rem;
    background: #222222;
    border: 1px solid #333333;
    border-radius: 6px;
    overflow: hidden;
    max-height: 70vh;
    overflow-y: auto;
}

.toc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: #2a2a2a;
    border-bottom: 1px solid #333333;
}

.toc-header h3 {
    margin: 0;
    font-size: 0.9rem;
}

.toc-toggle {
    background: none;
    border: none;
    color: #00ff41;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.toc-toggle:hover {
    background: rgba(0, 255, 65, 0.1);
}

.toc-content {
    padding: 1rem;
}

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

.toc-item {
    margin-bottom: 0.5rem;
}

.toc-link {
    display: block;
    color: #cccccc;
    text-decoration: none;
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    font-size: 0.8rem;
    line-height: 1.4;
    transition: all 0.3s ease;
    border-left: 2px solid transparent;
}

.toc-link:hover {
    color: #00ff41;
    background: rgba(0, 255, 65, 0.1);
    border-left-color: #00ff41;
}

.toc-link.active {
    color: #00ff41;
    background: rgba(0, 255, 65, 0.2);
    border-left-color: #00ff41;
}

.toc-item.level-2 .toc-link {
    padding-left: 1rem;
}

.toc-item.level-3 .toc-link {
    padding-left: 1.5rem;
}

.toc-item.level-4 .toc-link {
    padding-left: 2rem;
}

/* 内容主体 */
.content-body {
    color: #cccccc;
    line-height: 1.9;
    font-size: 1.1rem;
    word-wrap: break-word;
    letter-spacing: 0.02em;
}

.content-body h1,
.content-body h2,
.content-body h3,
.content-body h4,
.content-body h5,
.content-body h6 {
    color: #00ff41;
    margin: 2.5rem 0 1.5rem 0;
    font-family: 'Orbitron', sans-serif;
    position: relative;
    scroll-margin-top: 2rem;
    line-height: 1.4;
}

.content-body h1 {
    font-size: 2rem;
    border-bottom: 2px solid #00ff41;
    padding-bottom: 0.5rem;
}

.content-body h2 {
    font-size: 1.6rem;
    border-bottom: 1px solid #333333;
    padding-bottom: 0.3rem;
}

.content-body h3 {
    font-size: 1.3rem;
}

.content-body h4 {
    font-size: 1.1rem;
}

.content-body p {
    margin-bottom: 1.5rem;
    text-align: justify;
    text-indent: 2em;
}

.content-body a {
    color: #00ff41;
    text-decoration: none;
    border-bottom: 1px dotted #00ff41;
    transition: all 0.3s ease;
    padding: 0.1rem 0.2rem;
    border-radius: 2px;
}

.content-body a:hover {
    background: rgba(0, 255, 65, 0.1);
    text-shadow: 0 0 10px #00ff41;
    border-bottom-style: solid;
}

.content-body img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    border: 1px solid #333333;
    margin: 1rem 0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.content-body img:hover {
    border-color: #00ff41;
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.3);
}

/* 懒加载图片样式 */
.content-body img[data-src] {
    opacity: 0.3;
    filter: blur(2px);
    transition: opacity 0.3s ease, filter 0.3s ease;
}

.content-body img.loaded {
    opacity: 1;
    filter: blur(0);
}

.content-body img.error {
    opacity: 0.5;
    border: 2px dashed #ff4444;
}

/* 性能警告样式 */
.performance-warning {
    background: linear-gradient(135deg, #2a1a00 0%, #3d2600 100%);
    border: 1px solid #ff8800;
    border-radius: 6px;
    padding: 1rem;
    margin: 1rem 0;
    color: #ffaa44;
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    position: relative;
}

.performance-warning::before {
    content: '⚠️';
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    font-size: 1.2rem;
}

.performance-warning-content {
    margin-left: 2rem;
}

.performance-warning-title {
    color: #ff8800;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.performance-warning-message {
    line-height: 1.5;
}

.content-body pre {
    background: linear-gradient(135deg, #000000 0%, #0a0a0a 100%);
    border: 1px solid #00ff41;
    border-radius: 8px;
    padding: 1.5rem;
    overflow-x: auto;
    margin: 1.5rem 0;
    position: relative;
    font-family: 'Fira Code', monospace;
    box-shadow: 0 4px 15px rgba(0, 255, 65, 0.1);
    line-height: 1.6;
}

.content-body pre::before {
    content: '< CODE />';
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    font-size: 0.7rem;
    color: #00ff41;
    background: rgba(0, 255, 65, 0.1);
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    border: 1px solid rgba(0, 255, 65, 0.3);
    font-family: 'Fira Code', monospace;
}

.content-body code {
    background: linear-gradient(135deg, #222222 0%, #2a2a2a 100%);
    color: #00ff41;
    padding: 0.3rem 0.5rem;
    border-radius: 4px;
    font-family: 'Fira Code', monospace;
    font-size: 0.9em;
    border: 1px solid rgba(0, 255, 65, 0.2);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.content-body pre code {
    background: none;
    padding: 0;
    border-radius: 0;
}

.content-body blockquote {
    border-left: 3px solid #00ff41;
    background: #1a1a1a;
    padding: 1rem;
    margin: 1rem 0;
    font-style: italic;
    color: #aaaaaa;
    position: relative;
}

.content-body blockquote::before {
    content: '"';
    font-size: 3rem;
    color: #00ff41;
    position: absolute;
    top: -0.5rem;
    left: 0.5rem;
    opacity: 0.3;
}

.content-body ul,
.content-body ol {
    margin: 1rem 0;
    padding-left: 2rem;
}

.content-body li {
    margin-bottom: 0.8rem;
    line-height: 1.8;
}

.content-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    background: linear-gradient(135deg, #1a1a1a 0%, #222222 100%);
    border: 2px solid #333333;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.content-body th,
.content-body td {
    padding: 1rem 1.25rem;
    text-align: left;
    border-bottom: 1px solid #333333;
    transition: all 0.3s ease;
}

.content-body th {
    background: linear-gradient(135deg, #2a2a2a 0%, #333333 100%);
    color: #00ff41;
    font-weight: bold;
    font-family: 'Fira Code', monospace;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid #00ff41;
}

.content-body tr:nth-child(even) td {
    background: rgba(42, 42, 42, 0.5);
}

.content-body tr:hover td {
    background: rgba(0, 255, 65, 0.05);
    border-color: rgba(0, 255, 65, 0.3);
}

/* 语法高亮样式 */
.content-body pre .keyword {
    color: #ff6b6b;
    font-weight: bold;
}

.content-body pre .string {
    color: #4ecdc4;
}

.content-body pre .comment {
    color: #666666;
    font-style: italic;
}

.content-body pre .number {
    color: #ffa726;
}

.content-body pre .function {
    color: #ab47bc;
}

.content-body pre .variable {
    color: #42a5f5;
}

/* 代码块语言标识 */
.content-body pre[data-lang]::after {
    content: attr(data-lang);
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    font-size: 0.7rem;
    color: #888888;
    background: rgba(0, 0, 0, 0.7);
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    text-transform: uppercase;
    font-family: 'Fira Code', monospace;
}

/* 文章附件 */
.article-attachments {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #333333;
}

.attachments-header {
    margin-bottom: 1rem;
}

.attachments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

.attachment-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #222222;
    border: 1px solid #333333;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.attachment-card:hover {
    border-color: #00ff41;
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.2);
    transform: translateY(-2px);
}

.attachment-icon {
    font-size: 1.5rem;
    color: #00ff41;
    min-width: 30px;
}

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

.attachment-name {
    color: #ffffff;
    font-weight: bold;
    margin-bottom: 0.25rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.attachment-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: #888888;
    font-family: 'Fira Code', monospace;
}

.attachment-download {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #00ff41;
    color: #000000;
    text-decoration: none;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.attachment-download:hover {
    background: #00cc33;
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.5);
    transform: scale(1.1);
}

/* 文章底部 */
.article-footer {
    padding: 2rem;
    border-top: 1px solid #333333;
    background: #1a1a1a;
}

.article-actions {
    margin-bottom: 2rem;
}

.action-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: transparent;
    border: 1px solid #333333;
    color: #cccccc;
    border-radius: 25px;
    cursor: pointer;
    font-family: 'Fira Code', monospace;
    font-size: 0.8rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.action-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 65, 0.2), transparent);
    transition: left 0.5s ease;
}

.action-btn:hover::before {
    left: 100%;
}

.action-btn:hover {
    border-color: #00ff41;
    color: #00ff41;
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.3);
    transform: translateY(-2px);
}

.like-count {
    background: #00ff41;
    color: #000000;
    padding: 0.2rem 0.4rem;
    border-radius: 10px;
    font-size: 0.7rem;
    margin-left: 0.25rem;
}

.article-stats {
    background: #222222;
    border: 1px solid #333333;
    border-radius: 6px;
    padding: 1.5rem;
}

.stats-header {
    margin-bottom: 1rem;
}

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

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: #2a2a2a;
    border: 1px solid #333333;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.stat-item:hover {
    border-color: #00ff41;
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.2);
}

.stat-label {
    color: #888888;
    font-size: 0.8rem;
    font-family: 'Fira Code', monospace;
}

.stat-value {
    color: #00ff41;
    font-family: 'Fira Code', monospace;
    font-size: 0.8rem;
    font-weight: bold;
}

/* 文章导航 */
.article-navigation {
    background: #1a1a1a;
    border: 1px solid #333333;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.nav-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.nav-item {
    background: #222222;
    border: 1px solid #333333;
    border-radius: 6px;
    padding: 1rem;
    transition: all 0.3s ease;
}

.nav-item:hover {
    border-color: #00ff41;
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.2);
    transform: translateY(-2px);
}

.nav-item.prev {
    text-align: left;
}

.nav-item.next {
    text-align: right;
}

.nav-label {
    color: #888888;
    font-size: 0.8rem;
    font-family: 'Fira Code', monospace;
    margin-bottom: 0.5rem;
}

.nav-link {
    text-decoration: none;
    color: inherit;
}

.nav-title {
    color: #ffffff;
    font-size: 1rem;
    margin-bottom: 0.25rem;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.nav-item:hover .nav-title {
    color: #00ff41;
}

.nav-meta {
    color: #666666;
    font-size: 0.8rem;
    font-family: 'Fira Code', monospace;
}

/* 相关文章 */
.related-articles {
    background: #1a1a1a;
    border: 1px solid #333333;
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.related-card {
    background: #222222;
    border: 1px solid #333333;
    border-radius: 6px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.related-card:hover {
    border-color: #00ff41;
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.2);
    transform: translateY(-5px);
}

.related-cover {
    height: 120px;
    overflow: hidden;
}

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

.related-card:hover .related-cover img {
    transform: scale(1.1);
}

.related-content {
    padding: 1rem;
}

.related-title {
    margin-bottom: 0.5rem;
}

.related-title a {
    color: #ffffff;
    text-decoration: none;
    font-size: 1rem;
    line-height: 1.4;
    transition: color 0.3s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-title a:hover {
    color: #00ff41;
}

.related-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.75rem;
    font-size: 0.8rem;
    color: #888888;
    font-family: 'Fira Code', monospace;
}

.related-excerpt {
    color: #cccccc;
    line-height: 1.5;
    font-size: 0.9rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 评论区域 */
.comments-section {
    background: #1a1a1a;
    border: 1px solid #333333;
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.comments-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #333333;
}

/* 评论表单 */
.comment-form-wrapper {
    background: #222222;
    border: 1px solid #333333;
    border-radius: 6px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.form-header {
    margin-bottom: 1rem;
}

.form-header h4 {
    margin: 0;
    color: #00ff41;
    font-size: 1.1rem;
}

.comment-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

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

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    color: #888888;
    font-size: 0.8rem;
    font-family: 'Fira Code', monospace;
}

.form-input,
.form-textarea {
    padding: 0.75rem;
    background: #2a2a2a;
    border: 1px solid #333333;
    color: #ffffff;
    border-radius: 4px;
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: #00ff41;
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.3);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
    font-family: inherit;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.submit-btn,
.reset-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-btn {
    background: #00ff41;
    color: #000000;
}

.submit-btn:hover {
    background: #00cc33;
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.5);
    transform: translateY(-2px);
}

.reset-btn {
    background: transparent;
    color: #cccccc;
    border: 1px solid #333333;
}

.reset-btn:hover {
    border-color: #666666;
    color: #ffffff;
}

/* 评论列表 */
.comments-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.comment-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: #222222;
    border: 1px solid #333333;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.comment-item:hover {
    border-color: #00ff41;
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.1);
}

.comment-avatar {
    flex-shrink: 0;
}

.comment-avatar img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid #333333;
    transition: border-color 0.3s ease;
}

.comment-item:hover .comment-avatar img {
    border-color: #00ff41;
}

.comment-content {
    flex: 1;
    min-width: 0;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.comment-author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.author-link,
.author-name {
    color: #00ff41;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.9rem;
}

.author-link:hover {
    text-shadow: 0 0 10px #00ff41;
}

.author-badge {
    background: #00ff41;
    color: #000000;
    padding: 0.1rem 0.4rem;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: bold;
}

.comment-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: #888888;
    font-family: 'Fira Code', monospace;
}

.comment-body {
    color: #cccccc;
    line-height: 1.6;
    margin-bottom: 0.75rem;
    word-wrap: break-word;
}

.comment-actions {
    display: flex;
    gap: 1rem;
}

.comment-reply,
.comment-like {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    background: none;
    border: none;
    color: #888888;
    cursor: pointer;
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.comment-reply:hover,
.comment-like:hover {
    color: #00ff41;
    background: rgba(0, 255, 65, 0.1);
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .content-wrapper {
        display: block;
        width: 100%;
    }
    
    .article-toc {
        position: static;
        max-height: none;
        order: -1;
    }
}

@media (max-width: 768px) {
    .article-container {
        padding: 1rem 0;
    }
    
    .article-header {
        padding: 1rem;
    }
    
    .article-title {
        font-size: 1.8rem;
    }
    
    .article-content {
        padding: 1rem;
    }
    
    .article-footer {
        padding: 1rem;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .nav-grid {
        grid-template-columns: 1fr;
    }
    
    .related-grid {
        grid-template-columns: 1fr;
    }
    
    .action-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .action-btn {
        justify-content: center;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .breadcrumb {
        font-size: 0.7rem;
    }
    
    .breadcrumb-item.current {
        max-width: 150px;
    }
    
    .comment-item {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .comment-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .article-title {
        font-size: 1.5rem;
    }
    
    .attachments-grid {
        grid-template-columns: 1fr;
    }
    
    .attachment-card {
        flex-direction: column;
        text-align: center;
    }
    
    .tags-list {
        justify-content: center;
    }
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: #222222;
    border: 2px solid #00ff41;
    border-radius: 50%;
    color: #00ff41;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.back-to-top:hover {
    background: #00ff41;
    color: #000000;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 255, 65, 0.4);
}

/* 代码复制按钮 */
.code-copy-btn {
    position: absolute;
    top: 0.5rem;
    right: 3rem;
    background: #333333;
    border: 1px solid #555555;
    border-radius: 4px;
    color: #cccccc;
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.7;
    white-space: nowrap;
}

.code-copy-btn:hover {
    background: #00ff41;
    color: #000000;
    border-color: #00ff41;
    opacity: 1;
}

/* 图片模态框 */
.image-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    background: #222222;
    border: 2px solid #00ff41;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 255, 65, 0.3);
}

.modal-content img {
    width: 100%;
    height: auto;
    display: block;
    border: none;
    margin: 0;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid #00ff41;
    border-radius: 50%;
    color: #00ff41;
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: #00ff41;
    color: #000000;
    transform: rotate(90deg);
}

/* 提示消息 */
.toast {
    position: fixed;
    top: 2rem;
    right: 2rem;
    background: #222222;
    border: 1px solid #00ff41;
    border-radius: 6px;
    color: #cccccc;
    padding: 1rem 1.5rem;
    font-size: 0.9rem;
    z-index: 3000;
    transform: translateX(100%);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.toast.show {
    transform: translateX(0);
}

.toast.toast-success {
    border-color: #00ff41;
    box-shadow: 0 4px 15px rgba(0, 255, 65, 0.2);
}

.toast.toast-error {
    border-color: #ff4444;
    box-shadow: 0 4px 15px rgba(255, 68, 68, 0.2);
}

/* 打印样式 */
@media print {
    .article-toc,
    .article-actions,
    .article-navigation,
    .related-articles,
    .comments-section {
        display: none;
    }
    
    .article-detail {
        border: none;
        box-shadow: none;
    }
    
    .content-wrapper {
        display: block;
        width: 100%;
    }
    
    .article-title {
        color: #000000;
        text-shadow: none;
    }
    
    .content-body {
        color: #000000;
    }
    
    .content-body h1,
    .content-body h2,
    .content-body h3,
    .content-body h4,
    .content-body h5,
    .content-body h6 {
        color: #000000;
    }
}