/* --- 基础设置 --- */
body {
    background-color: #080808;
    color: #f0f0f0;
    cursor: none;
}

/* 噪点背景层 */
.bg-texture {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('data:image/svg+xml,%3Csvg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"%3E%3Cfilter id="noiseFilter"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.8" numOctaves="3" stitchTiles="stitch"/%3E%3C/filter%3E%3Crect width="100%25" height="100%25" filter="url(%23noiseFilter)" opacity="0.07"/%3E%3C/svg%3E');
    pointer-events: none;
    z-index: 0;
}

/* 自定义鼠标 */
#cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 20px;
    height: 20px;
    border: 2px solid #E7FF00;
    background: rgba(231, 255, 0, 0.2);
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 9999;
    mix-blend-mode: difference;
    transition: width 0.2s, height 0.2s, background 0.2s, border-radius 0.2s;
    border-radius: 50%;
}
#cursor.hovered {
    width: 80px;
    height: 80px;
    background: #E7FF00;
    border-radius: 0;
}

/* 纹理模式 */
.pattern-dots {
    background-image: radial-gradient(#000 1px, transparent 1px);
    background-size: 8px 8px;
}
.pattern-lines {
    background: repeating-linear-gradient(45deg, #000, #000 2px, transparent 2px, transparent 8px);
}
.pattern-cross {
    background-image: linear-gradient(#000 1px, transparent 1px), linear-gradient(90deg, #000 1px, transparent 1px);
    background-size: 20px 20px;
}

/* 卡片交互 */
.brutal-card {
    position: relative;
    background: #1a1a1a;
    border: 1px solid #333;
    transition: transform 0.12s ease-out, border-color 0.12s ease-out;
    overflow: hidden;
}
.brutal-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--hover-color, #E7FF00);
    z-index: 10;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.77, 0, 0.175, 1);
    mix-blend-mode: difference;
    pointer-events: none;
}
.texture-reveal {
    position: absolute;
    inset: 0;
    opacity: 0;
    z-index: 11;
    transition: opacity 0.2s ease-out;
    pointer-events: none;
    mix-blend-mode: overlay;
}
.brutal-card:hover {
    border-color: #fff;
    transform: scale(1.02);
}
.brutal-card:hover::before {
    transform: translateY(0);
}
.brutal-card:hover .texture-reveal {
    opacity: 0.4;
}

/* Marquee */
.marquee-container {
    overflow: hidden;
    white-space: nowrap;
    background: #E7FF00;
    color: #000;
    font-family: 'Syncopate', sans-serif;
    font-weight: 700;
    padding: 4px 0;
    transform: rotate(-2deg) scale(1.05);
    border-top: 2px solid #000;
    border-bottom: 2px solid #000;
}
.marquee-content {
    display: inline-block;
    animation: marquee 20s linear infinite;
}
@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* 页面切换 */
.page-enter {
    animation: slideUp 0.6s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}
@keyframes slideUp {
    from { transform: translateY(50px); opacity: 0; clip-path: inset(100% 0 0 0); }
    to { transform: translateY(0); opacity: 1; clip-path: inset(0 0 0 0); }
}

/* Glitch 文字 */
.glitch-hover:hover {
    animation: shake 0.3s cubic-bezier(.36,.07,.19,.97) both;
    color: var(--hover-color, #fff);
}
@keyframes shake {
    10%, 90% { transform: translate3d(-1px, 0, 0); }
    20%, 80% { transform: translate3d(2px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
    40%, 60% { transform: translate3d(4px, 0, 0); }
}

/* Modal */
#modal.hidden { display: none; }
#modal.flex { display: flex; }
#modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 60;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}
#modal-content {
    background: #0b0b0b;
    border: 1px solid #222;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow: auto;
    border-radius: 6px;
    position: relative;
}
#modal-close {
    position: absolute;
    top: 8px;
    right: 12px;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.25rem;
    cursor: pointer;
}
#modal-body {
    padding: 2rem;
    color: #f7f7f7;
}

.partial-error {
    font-family: 'Space Mono', monospace;
    background: #330000;
    border: 1px solid #FF2A00;
    padding: 1rem;
    margin: 1rem;
    border-radius: 0.5rem;
}

/* Live Feed --- 新增酷元素 */
.live-feed {
    margin-top: 3rem;
    border: 1px solid #1f1f1f;
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.08), rgba(188, 19, 254, 0.05));
    box-shadow: 0 0 25px rgba(0, 240, 255, 0.12);
}
.live-feed__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    font-family: 'Syncopate', sans-serif;
    font-size: 0.9rem;
    letter-spacing: 0.2em;
    background: #0d0d0d;
    border-bottom: 1px solid #1f1f1f;
}
.live-feed__status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
}
.live-feed__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #E7FF00;
    animation: pulse 1s infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}
.live-feed__stream {
    max-height: 220px;
    overflow: hidden;
    font-size: 0.85rem;
    font-family: 'Space Mono', monospace;
}
.live-feed__line {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 1rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.9);
    opacity: 0;
    transform: translateY(20px);
    animation: feed-slide 0.45s forwards ease-out;
}
.live-feed__line span {
    color: #6cf3ff;
}
@keyframes feed-slide {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stroke-text {
    -webkit-text-stroke: 2px #fff;
}
