:root {
    --bg-dark: #090e17; /* 深渊蓝背景 */
    --panel-bg: #111723; /* 卡片背景 */
    --panel-hover: #192233;
    --border-color: rgba(255, 255, 255, 0.08);
    --text-main: #f0f6fc;
    --text-muted: #8b949e;
    --accent: #48e4d3; /* 核心青色亮光 */
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-dark);
    /* 核心！科技感网格背景图 */
    background-image: 
        linear-gradient(var(--border-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--border-color) 1px, transparent 1px);
    background-size: 60px 60px; /* 网格大小 */
    background-position: center top;
    color: var(--text-main);
    min-height: 100vh;
}

.container { max-width: 1300px; margin: 0 auto; padding: 0 40px 60px 40px; }

/* --- 顶部导航栏 --- */
.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    background: rgba(9, 14, 23, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    position: sticky; top: 0; z-index: 100;
}
.nav-brand { font-size: 1.2rem; font-weight: bold; letter-spacing: 1px; }
.nav-brand span { color: var(--accent); margin-right: 5px; }
.nav-links { display: flex; gap: 30px; }
.nav-links a { color: var(--text-muted); text-decoration: none; font-size: 0.95rem; transition: 0.2s; }
.nav-links a:hover, .nav-links a.active { color: var(--text-main); }
.nav-search input {
    background: var(--panel-bg); border: 1px solid var(--border-color);
    padding: 8px 16px; border-radius: 20px; color: #fff; outline: none; transition: 0.3s;
}
.nav-search input:focus { border-color: var(--accent); box-shadow: 0 0 10px rgba(72, 228, 211, 0.2); }

/* --- 巨幕欢迎区 Hero --- */
.hero-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding: 80px 0;
}
.hero-title { font-size: 4.5rem; line-height: 1.1; margin-bottom: 20px; font-weight: 800; }
.hero-title .highlight { color: var(--accent); }
.hero-desc { color: var(--text-muted); font-size: 1.1rem; line-height: 1.6; margin-bottom: 30px; max-width: 80%; }
.hero-actions { display: flex; gap: 15px; }
.btn-primary {
    background: var(--accent); color: #000; padding: 12px 28px;
    border-radius: 30px; font-weight: bold; text-decoration: none;
    border: none; cursor: pointer; transition: 0.2s;
}
.btn-primary:hover { background: #3cc9b9; box-shadow: 0 0 15px rgba(72,228,211,0.4); }
.btn-outline {
    background: transparent; color: var(--text-main); padding: 10px 28px;
    border-radius: 30px; font-weight: bold; text-decoration: none;
    border: 1px solid var(--border-color); display: flex; align-items: center; gap: 8px; transition: 0.2s;
}
.btn-outline:hover { background: rgba(255,255,255,0.05); }

/* 右侧特写卡片 */
.hero-featured { display: flex; flex-direction: column; gap: 20px; justify-content: center; }
.featured-card {
    background: var(--panel-bg); border: 1px solid var(--border-color);
    padding: 25px; border-radius: 16px; display: flex; justify-content: space-between; align-items: center;
}
.feat-info h3 { font-size: 1.2rem; margin-bottom: 8px; }
.feat-info p { color: var(--text-muted); font-size: 0.95rem; }

/* --- 分类与导航卡片区 --- */
.category-section { margin-bottom: 50px; }
.category-title {
    font-size: 1.5rem; margin-bottom: 25px; display: flex; align-items: center; font-weight: bold;
}
/* 标题旁边的青色发光小点 */
.category-title::after {
    content: ''; display: inline-block; width: 6px; height: 6px;
    background: var(--accent); border-radius: 50%; margin-left: 10px;
    box-shadow: 0 0 8px var(--accent);
}

.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

/* 核心：暗黑风独立卡片 */
.link-card {
    background: var(--panel-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    text-decoration: none;
    color: var(--text-main);
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}
.link-card:hover {
    background: var(--panel-hover);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-3px);
}

/* 卡片内的小块图标 */
.site-icon {
    width: 38px; height: 38px;
    border-radius: 8px; /* 微圆角矩形 */
    background: rgba(255,255,255,0.9);
    padding: 4px;
    object-fit: contain;
    flex-shrink: 0;
}

.card-content { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 0; }
.site-name { font-weight: 600; font-size: 1.1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.site-desc { color: var(--text-muted); font-size: 0.85rem; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* 站长动作按钮 (放置在卡片右上角) */
.card-admin-actions { position: absolute; top: 15px; right: 15px; display: flex; gap: 8px; opacity: 0; transition: 0.2s; }
.link-card:hover .card-admin-actions { opacity: 1; }
.card-action-btn {
    background: rgba(255,255,255,0.1); border: none; color: #fff;
    width: 26px; height: 26px; border-radius: 6px; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.card-action-btn:hover { background: rgba(255,255,255,0.2); }

/* --- 弹窗样式调整 --- */
.modal-overlay { background: rgba(0, 0, 0, 0.8); position: fixed; top: 0; left: 0; width: 100%; height: 100%; display: flex; justify-content: center; align-items: center; z-index: 1000; }
.dark-panel { background: var(--bg-dark); border: 1px solid var(--border-color); padding: 30px; border-radius: 16px; width: 90%; max-width: 500px; box-shadow: 0 20px 50px rgba(0,0,0,0.5); }
.admin-form input {
    width: 100%; padding: 12px; background: var(--panel-bg); border: 1px solid var(--border-color);
    color: white; border-radius: 8px; margin-bottom: 15px; outline: none;
}
.admin-form input:focus { border-color: var(--accent); }
.admin-msg { text-align: center; color: #ff6b6b; font-size: 0.9rem; margin-top: 10px; }

/* 响应式调整 */
@media (max-width: 900px) {
    .hero-section { grid-template-columns: 1fr; padding: 40px 0; text-align: center; }
    .hero-actions { justify-content: center; }
    .hero-desc { margin: 0 auto 30px auto; }
}
