@charset "UTF-8";
/**
 * viskem.css - 域层（viskem 专属）
 * 覆盖 vis.css 框架层，定义 viskem 项目专属样式。
 * 层级：vis.css → vis-legacy.css → chroma-glitch.css → viskem.css
 * 治理协议详见 protocol/VISCSS_GOVERNANCE.md
 */

/* ========== 基础覆盖 ========== */
body {
    background: #0a0a0a;
    color: #e5e7eb;
}

/* ========== CRT 显像管效果（html.crt-on 时生效） ========== */
html.crt-on body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        transparent 0px,
        transparent 1px,
        rgba(0, 0, 0, 0.35) 1px,
        rgba(0, 0, 0, 0.35) 2px
    );
    pointer-events: none;
    z-index: 9999;
    -webkit-animation: scanline 8s linear infinite;
    animation: scanline 8s linear infinite;
}
@keyframes scanline {
    0% { -webkit-transform: translateY(0); transform: translateY(0); }
    100% { -webkit-transform: translateY(4px); transform: translateY(4px); }
}
html.crt-on {
    -webkit-filter: saturate(0.7) brightness(1.05);
    filter: saturate(0.7) brightness(1.05);
}
@keyframes crtFlicker {
    0%, 100% { opacity: 1; }
    98% { opacity: 1; }
    99% { opacity: 0.98; }
}
html.crt-on body {
    -webkit-animation: crtFlicker 0.15s infinite;
    animation: crtFlicker 0.15s infinite;
}

/* ========== 通用组件 ========== */
.glass {
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid #444;
    border-radius: 0;
}
.grid-pattern {
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 50px 50px;
}
.font-ascii {
    font-family: 'Courier New';
}
.font-mono-en {
    font-family: 'JetBrains Mono', Consolas, 'Courier New', monospace;
}
.ascii-art {
    font-family: 'Courier New';
    font-size: 10px;
    line-height: 1.2;
    color: rgba(255, 255, 255, 0.3);
    white-space: pre;
}


/* ========== VISCSS 组件：vis-ascii-logo ========== */
.vis-ascii-logo-pre {
    -webkit-filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.4));
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.4));
    -webkit-animation: vis-ascii-pulse 4s ease-in-out infinite;
    animation: vis-ascii-pulse 4s ease-in-out infinite;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
    white-space: pre;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    font-size: 18px;
    letter-spacing: 4px;
    line-height: 1.45;
    -webkit-user-select: none;
    user-select: none;
    color: var(--gray-light);
    margin: 0;
}
@keyframes vis-ascii-pulse {
    0%, 100% {
        opacity: 1;
        filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.4));
        text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
    }
    50% {
        opacity: 0.95;
        filter: drop-shadow(0 0 25px rgba(234, 179, 8, 0.6));
        text-shadow: 0 0 15px rgba(234, 179, 8, 0.5);
    }
}
.vis-ascii-logo-char {
    display: inline-block;
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
}
.vis-ascii-logo-char:hover {
    color: #eab308 !important;
    text-shadow: 0 0 12px #eab308, 0 0 20px #eab308;
    transform: scale(1.15);
    z-index: 10;
}
@keyframes vis-ascii-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); }
}
.vis-ascii-logo-glitch-active {
    animation: vis-ascii-glitch 0.3s infinite;
}
.vis-ascii-logo-tooltip {
    position: fixed;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid #444;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    pointer-events: none;
    z-index: 10000;
    transition: all 0.3s;
}
.vis-ascii-logo-tooltip-word {
    font-weight: 600;
    color: var(--accent-yellow);
}
.vis-ascii-logo-tooltip-desc {
    color: var(--gray-medium);
    font-size: 0.75rem;
    margin-top: 0.25rem;
}
.vis-ascii-logo-wrap {
    position: relative;
    width: 100%;
    overflow: hidden;
}
.vis-ascii-logo-scale {
    display: inline-block;
    transform-origin: 0 0;
    -webkit-transform-origin: 0 0;
}
.vis-ascii-logo-art {
    text-align: center;
    position: relative;
    display: inline-block;
}

/* ========== VISCSS 组件：vis-explore-btn ========== */
.vis-explore-btn {
    display: block;
    position: relative;
    overflow: hidden;
    border: 1px solid #444;
    background: rgba(0, 0, 0, 0.7);
    height: 6rem;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: vis-explore-fadeIn 0.5s ease 0.2s both;
}
.vis-explore-btn:hover {
    transform: scale(1.02);
    border-color: var(--accent-yellow);
    text-decoration: none;
}
.vis-explore-btn:hover .vis-explore-btn-title {
    color: var(--accent-yellow);
}
.vis-explore-btn:hover .vis-explore-btn-shimmer,
.vis-explore-btn:hover .vis-explore-btn-glow {
    opacity: 1;
}
@keyframes vis-explore-fadeIn {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}
.vis-explore-btn-canvas {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}
.vis-explore-btn-content {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
    pointer-events: none;
    text-align: center;
}
.vis-explore-btn-title {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--gray-light);
    margin-bottom: 0.75rem;
    transition: color 0.3s;
}
.vis-explore-btn-sub {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    color: var(--gray-medium);
    font-weight: 300;
    letter-spacing: 0.2em;
}
.vis-explore-btn-shimmer {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    background-size: 1000px 100%;
    animation: vis-shimmer 3s infinite;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
}
@keyframes vis-shimmer {
    0% { background-position: -1000px 0; }
    100% { background-position: 1000px 0; }
}
.vis-explore-btn-glow {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
    background: linear-gradient(to right, rgba(234, 179, 8, 0.1), transparent);
}
/* 角标 */
.vis-explore-btn-corner {
    position: absolute;
    pointer-events: none;
    z-index: 10;
    font-family: var(--font-mono);
    font-size: 14px;
    color: #555;
}
/* 中文排版微调 */
html[lang="zh-CN"] .vis-explore-btn-title,
html[lang="zh-TW"] .vis-explore-btn-title {
    letter-spacing: 0.2em;
}

/* ========== 回响对话轮次 ========== */
.echo-turns {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.echo-turn {
    border-left: 2px solid #374151;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.02);
}
.echo-turn-ai {
    border-left-color: #1e3a5f;
    background: rgba(59, 130, 246, 0.03);
}
.echo-turn-head {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}
.echo-turn-role {
    font-size: 0.8125rem;
    font-weight: 600;
}
.echo-turn-role-human {
    color: #d1d5db;
}
.echo-turn-role-ai {
    color: #93c5fd;
}
.echo-turn-role-tag {
    font-size: 0.5625rem;
    color: #555;
    vertical-align: super;
    font-family: var(--font-mono);
    letter-spacing: 0.05em;
}

/* ========== 协议页两列网格 ========== */
.protocol-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}
.protocol-grid .project-card {
    margin-bottom: 0;
}
@media (min-width: 640px) {
    .protocol-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ========== 响应式 ========== */
@media (min-width: 640px) {
    .vis-explore-btn { height: 8rem; }
}
@media (min-width: 768px) {
    .vis-explore-btn { height: 10rem; padding: 1.5rem; }
    .vis-explore-btn-title { font-size: 1.875rem; }
}
