/* ======== LCBK Architect Theme Styles ======== */

/* -------- 切换主题 ------ */
#theme-toggle {
    cursor: pointer;
}

/* -------- 公安备案号 ------ */
.icp-gov {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    vertical-align: middle;
}
.icp-gov img {
    width: 10px;
    height: 10px;
    flex-shrink: 0;
}

/* ======== 404 页面特效 ======== */

@keyframes glitch {
    0% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(-2px, -2px); }
    60% { transform: translate(2px, 2px); }
    80% { transform: translate(2px, -2px); }
    100% { transform: translate(0); }
}

@keyframes scanline-404 {
    0% { top: -10%; }
    100% { top: 110%; }
}

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

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 15px rgba(25, 120, 229, 0.1); }
    50% { box-shadow: 0 0 30px rgba(25, 120, 229, 0.25); }
}

.glitch-text {
    position: relative;
    animation: glitch 0.3s ease-in-out infinite;
}

.glitch-text::before,
.glitch-text::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch-text::before {
    color: #ff0040;
    z-index: -1;
    clip-path: polygon(0 0, 100% 0, 100% 35%, 0 35%);
    transform: translate(-3px, 0);
    opacity: 0.7;
}

.glitch-text::after {
    color: #00ffff;
    z-index: -2;
    clip-path: polygon(0 65%, 100% 65%, 100% 100%, 0 100%);
    transform: translate(3px, 0);
    opacity: 0.7;
}

.dark .glitch-text::before { color: #ff3366; }
.dark .glitch-text::after { color: #00e5ff; }

.scanline-404 {
    position: fixed;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(25, 120, 229, 0.3);
    z-index: 50;
    pointer-events: none;
    animation: scanline-404 4s linear infinite;
}

.cursor-blink::after {
    content: '_';
    animation: blink-cursor 1s step-end infinite;
    color: var(--brand);
}

.terminal-line {
    position: relative;
    padding-left: 1.25rem;
}

.terminal-line::before {
    content: '>';
    position: absolute;
    left: 0;
    color: var(--brand);
}

/* ======== echo_log.php 文章详情页样式 ======== */

/* 文章内容排版 */
.log-content {
    line-height: 1.8;
    color: var(--text-main);
}

.log-content h1,
.log-content h2,
.log-content h3,
.log-content h4,
.log-content h5,
.log-content h6 {
    margin-top: 1.5em;
    margin-bottom: 0.75em;
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-main);
    position: relative;
}

.log-content h1 { font-size: 1.5rem; }
.log-content h2 { font-size: 1.25rem; }
.log-content h3 { font-size: 1.125rem; }
.log-content h4 { font-size: 1rem; }

/* h2 左侧装饰线 */
.log-content h2::before {
    content: '';
    position: absolute;
    left: -1rem;
    top: 0.25em;
    bottom: 0.25em;
    width: 3px;
    background: var(--brand);
    border-radius: 2px;
    opacity: 0.6;
}

.log-content p {
    margin-bottom: 1em;
}

.log-content a {
    color: var(--brand);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s;
}

.log-content a:hover {
    border-bottom-color: var(--brand);
}

/* 代码块 */
.log-content pre {
    background: var(--darkest);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 1rem;
    margin: 1em 0;
    overflow-x: auto;
    font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
    font-size: 0.8125rem;
    line-height: 1.6;
}

.log-content code {
    background: var(--darkest);
    border: 1px solid var(--border);
    border-radius: 3px;
    padding: 0.15em 0.4em;
    font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
    font-size: 0.85em;
    color: var(--brand);
}

.log-content pre code {
    background: none;
    border: none;
    padding: 0;
    color: inherit;
}

/* 引用块 */
.log-content blockquote {
    margin: 1em 0;
    padding: 0.75em 1em;
    border-left: 3px solid var(--brand);
    background: var(--darkest);
    border-radius: 0 4px 4px 0;
    font-style: italic;
    color: var(--text-muted);
}

/* 列表 */
.log-content ul,
.log-content ol {
    margin: 0.75em 0;
    padding-left: 1.5em;
}

.log-content ul li {
    list-style-type: disc;
    margin-bottom: 0.25em;
}

.log-content ol li {
    list-style-type: decimal;
    margin-bottom: 0.25em;
}

/* 表格 */
.log-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1em 0;
    font-size: 0.875rem;
}

.log-content th,
.log-content td {
    padding: 0.5em 0.75em;
    border: 1px solid var(--border);
    text-align: left;
}

.log-content th {
    background: var(--darkest);
    font-weight: 600;
    color: var(--text-main);
}

.log-content tr:nth-child(even) {
    background: var(--darkest);
}

/* 图片 */
.log-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 1em 0;
    border: 1px solid var(--border);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: zoom-in;
}

.log-content img:hover {
    transform: scale(1.005);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

/* 分割线 */
.log-content hr {
    border: none;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--border), transparent);
    margin: 2em 0;
}

/* 相邻文章样式优化 */
.prev-log,
.next-log {
    display: block;
}

.neighbor-link {
    display: flex;
    flex-direction: column;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--darkest);
    transition: all 0.3s;
    text-decoration: none;
}

.neighbor-link:hover {
    border-color: var(--brand);
    background: var(--surface);
}

.neighbor-dir {
    font-size: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-info);
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.neighbor-title {
    font-size: 0.8125rem;
    color: var(--text-main);
    line-height: 1.4;
}

/* 评论区域样式 */
.comment {
    display: flex;
    gap: 0.75rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
}

.comment:last-child {
    border-bottom: none;
}

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

.comment .avatar img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--border);
}

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

.comment-infos b {
    font-size: 0.75rem;
    color: var(--text-main);
}

.comment-time {
    font-size: 0.625rem;
    color: var(--text-info);
    margin-left: 0.5rem;
}

.comment-content {
    margin-top: 0.375rem;
    font-size: 0.8125rem;
    line-height: 1.6;
    color: var(--text-muted);
    word-break: break-word;
}

.comment-reply {
    margin-top: 0.5rem;
}

.com-reply {
    font-size: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--brand);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: opacity 0.3s;
}

.com-reply:hover {
    opacity: 0.7;
}

.comment-children {
    margin-left: 2.5rem;
    padding-top: 0.75rem;
}

.comment-children .avatar img {
    width: 28px;
    height: 28px;
}

/* 评论表单 */
.commentform {
    margin-top: 1rem;
}

.commentform .log_comment {
    width: 100%;
    background: var(--darkest);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 0.75rem;
    color: var(--text-main);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8125rem;
    resize: vertical;
    min-height: 100px;
    transition: border-color 0.3s;
}

.commentform .log_comment:focus {
    outline: none;
    border-color: var(--brand);
}

.commentform .log_comment::placeholder {
    color: var(--text-info);
}

.comment-info {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.comment-info input {
    flex: 1;
    min-width: 140px;
    background: var(--darkest);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 0.5rem 0.75rem;
    color: var(--text-main);
    font-size: 0.75rem;
    font-family: 'JetBrains Mono', monospace;
    transition: border-color 0.3s;
}

.comment-info input:focus {
    outline: none;
    border-color: var(--brand);
}

.com_submit_p {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    align-items: center;
}

.com_submit_p .btn {
    padding: 0.5rem 1.25rem;
    background: var(--brand);
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 0.75rem;
    font-family: 'JetBrains Mono', monospace;
    cursor: pointer;
    transition: opacity 0.3s, transform 0.2s;
}

.com_submit_p .btn:hover {
    opacity: 0.85;
    transform: translateY(-1px);
}

.com_submit_p .cancel-reply {
    background: var(--darkest);
    color: var(--text-muted);
    border: 1px solid var(--border);
}

.com_submit_p .cancel-reply:hover {
    border-color: var(--brand);
    color: var(--brand);
}

.captcha-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* 评论分页 */
#pagenavi {
    margin-top: 1rem;
    font-size: 0.75rem;
}

#pagenavi a,
#pagenavi span {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    margin: 0 0.125rem;
    border-radius: 3px;
    transition: all 0.3s;
}

#pagenavi a {
    color: var(--text-muted);
    border: 1px solid var(--border);
    text-decoration: none;
}

#pagenavi a:hover {
    border-color: var(--brand);
    color: var(--brand);
}

#pagenavi span {
    background: var(--brand);
    color: #fff;
}

/* 评论头部 */
.comment-header {
    font-size: 0.75rem;
    color: var(--text-info);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

/* ======== 动画工具类 ======== */
@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fade-in-up 0.5s ease-out forwards;
}

/* 图片灯箱 */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.lightbox-overlay.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-overlay img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 4px;
    transform: scale(0.9);
    transition: transform 0.3s;
}

.lightbox-overlay.active img {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.lightbox-close:hover {
    opacity: 1;
}
