:root {
    --bg-color: #050505;
    --primary: #00f3ff; /* 赛博蓝 */
    --secondary: #bc13fe; /* 霓虹紫 */
    --alert: #ff2a2a;
    --success: #00ff41;
    --text-main: #ffffff;
    --glass: rgba(255, 255, 255, 0.03);
    --border: rgba(0, 243, 255, 0.3);
}

* { box-sizing: border-box; margin: 0; padding: 0; cursor: none; }

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: 'Roboto', sans-serif;
    overflow-x: hidden;
    min-height: 100vh;
}

/* 1. 动态背景 & 扫描线 */
#bgCanvas { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -2; }
.scanlines {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -1;
    background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,0) 50%, rgba(0,0,0,0.2) 50%, rgba(0,0,0,0.2));
    background-size: 100% 4px; pointer-events: none; opacity: 0.3;
}

/* 2. 鼠标特效 */
#cursor { position: fixed; width: 20px; height: 20px; border: 2px solid var(--primary); border-radius: 50%; pointer-events: none; transform: translate(-50%, -50%); z-index: 9999; transition: width 0.2s, height 0.2s; }
#cursor-blur { position: fixed; width: 60px; height: 60px; background: var(--primary); filter: blur(40px); opacity: 0.4; pointer-events: none; transform: translate(-50%, -50%); z-index: 9998; transition: 0.1s; }
body.hovered #cursor { width: 50px; height: 50px; background: rgba(0,243,255,0.1); border-color: var(--secondary); }

/* 3. 导航栏 */
.navbar {
    display: flex; justify-content: space-between; align-items: center; padding: 15px 30px;
    backdrop-filter: blur(10px); border-bottom: 1px solid var(--glass);
    position: sticky; top: 0; z-index: 100; background: rgba(5,5,5,0.7);
}
.logo { font-family: 'Orbitron'; font-size: 24px; color: var(--primary); text-shadow: 0 0 10px var(--primary); }
.blink { animation: blink 1s infinite; } @keyframes blink { 50% { opacity: 0; } }

.search-bar { flex: 1; max-width: 400px; margin: 0 30px; position: relative; }
#searchInput { width: 100%; background: rgba(0,0,0,0.5); border: 1px solid var(--border); border-radius: 20px; padding: 8px 20px; color: var(--primary); font-family: 'Orbitron'; letter-spacing: 1px; }
.search-icon { position: absolute; right: 15px; top: 50%; transform: translateY(-50%); opacity: 0.7; }
.nav-menu { display: flex; gap: 10px; align-items: center; }
.nav-select { background: #000; color: var(--primary); border: 1px solid var(--border); padding: 5px; font-family: 'Orbitron'; }

/* 按钮 */
.cyber-btn {
    background: transparent; border: 1px solid var(--primary); color: var(--primary);
    padding: 8px 15px; font-family: 'Orbitron'; text-transform: uppercase;
    transition: 0.3s; font-size: 0.8rem; position: relative; overflow: hidden;
}
.cyber-btn:hover { background: var(--primary); color: #000; box-shadow: 0 0 15px var(--primary); }
.danger-btn { border-color: var(--alert); color: var(--alert); }
.danger-btn:hover { background: var(--alert); color: #000; box-shadow: 0 0 15px var(--alert); }
.upload-btn { border-color: var(--success); color: var(--success); }
.upload-btn:hover { background: var(--success); color: #000; box-shadow: 0 0 15px var(--success); }

/* 4. 公告与面包屑 */
#marqueeContainer {
    background: rgba(0, 0, 0, 0.8); border-bottom: 1px solid var(--secondary); height: 30px;
    display: flex; align-items: center; overflow: hidden; font-family: 'VT323'; color: var(--secondary); font-size: 1.2rem;
}
.marquee-label { padding: 0 20px; background: var(--secondary); color: #000; height: 100%; display: flex; align-items: center; font-weight: bold; }
.marquee-content { white-space: nowrap; animation: marquee 20s linear infinite; padding-left: 100%; }
@keyframes marquee { 0% { transform: translateX(0); } 100% { transform: translateX(-100%); } }

.breadcrumb { margin: 20px 0; font-family: 'Orbitron'; color: #666; }
.crumb-item.active { color: var(--primary); cursor: pointer; text-decoration: underline; text-shadow: 0 0 5px var(--primary); }

/* 5. 视图容器与动画 */
.container { max-width: 1400px; margin: 20px auto; padding: 0 20px; perspective: 1000px; padding-bottom: 50px; }

/* 网格视图 */
.view-normal .grid-system { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 30px; }
/* 列表视图 */
.view-list .grid-system { display: flex; flex-direction: column; gap: 10px; }
/* 3D 视图 */
.view-3d .grid-system { display: flex; flex-wrap: wrap; justify-content: center; gap: 50px; transform-style: preserve-3d; transform: rotateX(25deg) scale(0.9); margin-top: 50px; }

/* 6. 卡片设计 */
@keyframes cardEntry { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

.card {
    background: var(--glass); border: 1px solid var(--border); padding: 15px; border-radius: 8px;
    position: relative; backdrop-filter: blur(8px); display: flex; flex-direction: column;
    transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    animation: cardEntry 0.5s ease-out forwards;
}
/* 置顶光效 */
.card.pinned { border-color: #ff9800; box-shadow: 0 0 10px rgba(255, 152, 0, 0.2); }
.card.pinned:hover { box-shadow: 0 0 20px rgba(255, 152, 0, 0.5); }
.pin-icon { color: #ff9800; font-size: 0.8rem; margin-right: 5px; }

.card:hover { transform: translateY(-10px) scale(1.02); border-color: var(--primary); box-shadow: 0 0 25px rgba(0, 243, 255, 0.3); z-index: 10; }

/* 列表模式下的卡片修正 */
.view-list .card { flex-direction: row; align-items: center; height: 70px; animation: none; transform: none !important; }
.view-list .card:hover { background: rgba(0, 243, 255, 0.1); border-left: 5px solid var(--primary); }
.view-list .card-img { width: 50px; height: 50px; margin-bottom: 0; margin-right: 20px; }
.view-list .card-desc { display: none; }
.view-list .card-link { margin-top: 0; margin-left: auto; width: auto; padding: 5px 20px; }

/* 3D 模式下的卡片修正 */
.view-3d .card { transform: translateZ(0); box-shadow: 0 15px 30px rgba(0,0,0,0.5); }
.view-3d .card:hover { transform: translateZ(50px) rotateX(-5deg); box-shadow: 0 0 50px var(--primary); }

.card-img { width: 100%; height: 130px; object-fit: cover; border-radius: 4px; margin-bottom: 10px; background: #000; border-bottom: 1px solid #333; }
.no-img { display: flex; align-items: center; justify-content: center; font-size: 2rem; color: #555; }
.card-title { font-weight: bold; color: var(--primary); margin-bottom: 5px; font-family: 'Orbitron'; }
.card-desc { font-size: 0.85rem; color: #aaa; margin-bottom: 15px; flex-grow: 1; height: 40px; overflow: hidden; }

/* 链接按钮 */
.card-link { text-decoration: none; background: rgba(0,243,255,0.1); color: #fff; padding: 10px; text-align: center; border: 1px solid var(--border); transition: 0.3s; font-family: 'Orbitron'; margin-top: auto; }
.card-link:hover { background: var(--primary); color: #000; box-shadow: 0 0 10px var(--primary); }

/* 状态灯 & 操作按钮 */
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #333; position: absolute; top: 10px; right: 10px; transition: 0.3s; }
.status-alive { background: var(--success); box-shadow: 0 0 8px var(--success); }
.status-dead { background: var(--alert); box-shadow: 0 0 8px var(--alert); animation: blink 0.5s infinite; }

.card-actions { position: absolute; top: 5px; right: 5px; display: none; gap: 5px; z-index: 20; }
.card:hover .card-actions { display: flex; }
.action-btn { width: 25px; height: 25px; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 12px; opacity: 0.8; transition: 0.2s; }
.action-btn:hover { opacity: 1; transform: scale(1.1); }
.btn-edit { background: var(--primary); color: #000; }
.btn-del { background: var(--alert); }
.btn-copy { background: #fff; color: #000; }

/* 模态框 & 底部 */
.modal { display: none; position: fixed; z-index: 2000; left: 0; top: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.9); backdrop-filter: blur(15px); align-items: center; justify-content: center; }
.modal-content { background: #0a0a0a; border: 1px solid var(--primary); padding: 30px; width: 450px; position: relative; box-shadow: 0 0 50px rgba(0,243,255,0.2); }
.wide-modal { width: 800px; }
.close-modal { position: absolute; right: 20px; top: 15px; color: #fff; font-size: 24px; cursor: pointer; }
.close-modal:hover { color: var(--primary); }
input, select, textarea { width: 100%; background: rgba(255,255,255,0.05); border: 1px solid #333; color: #fff; padding: 12px; margin-bottom: 15px; font-family: 'Roboto'; }
input:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 10px rgba(0,243,255,0.2); }
.checkbox-label { color: #aaa; cursor: pointer; display: flex; align-items: center; }
.checkbox-label input { width: auto; margin: 0 8px 0 0; }
.full-width { width: 100%; margin-top: 10px; }

.system-footer { position: fixed; bottom: 0; width: 100%; background: rgba(0,0,0,0.8); border-top: 1px solid #333; padding: 5px 20px; font-family: 'VT323'; color: #666; display: flex; justify-content: space-between; font-size: 1.1rem; }
#maintenanceMask { display: none; position: fixed; top:0; left:0; width:100%; height:100%; background: #000; z-index: 5000; flex-direction: column; align-items: center; justify-content: center; color: var(--alert); font-family: 'Orbitron'; text-align: center; }
.log-list { max-height: 300px; overflow-y: auto; font-family: 'VT323'; color: #aaa; border: 1px solid #333; padding: 10px; }
.log-item { display: flex; justify-content: space-between; border-bottom: 1px solid #222; padding: 5px 0; }