/* ============================================================
   弱电技术社区 - 深绿色科技风首页样式
   ============================================================ */

/* ---- 主题色变量 ---- */
:root {
    --tech-bg: #0a1f1a;
    --tech-bg-light: #0f2e25;
    --tech-bg-card: rgba(15, 46, 37, 0.6);
    --tech-primary: #00d4aa;
    --tech-primary-dim: #00a884;
    --tech-primary-glow: rgba(0, 212, 170, 0.3);
    --tech-text: #e0f2ec;
    --tech-text-dim: #8fb5a8;
    --tech-border: rgba(0, 212, 170, 0.15);
    --tech-border-hover: rgba(0, 212, 170, 0.4);
}

/* ---- 全局覆盖 ---- */
body {
    background: var(--tech-bg) !important;
    color: var(--tech-text) !important;
}

main {
    background: var(--tech-bg) !important;
}

/* ---- HERO 区域 ---- */
.hero-section {
    position: relative;
    min-height: 520px;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: linear-gradient(135deg, #0a1f1a 0%, #0d2820 50%, #0a1f1a 100%);
    padding: 80px 0 60px;
    margin-top: -1rem;
}

.hero-bg-pattern {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 20% 50%, rgba(0, 212, 170, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(0, 212, 170, 0.05) 0%, transparent 40%);
    pointer-events: none;
}

.hero-grid-lines {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(0, 212, 170, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 212, 170, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
}

.hero-container {
    position: relative;
    z-index: 2;
}

.hero-text {
    padding-right: 2rem;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--tech-text-dim);
    font-size: 13px;
    margin-bottom: 1.5rem;
    letter-spacing: 1px;
}

.badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--tech-primary);
    box-shadow: 0 0 10px var(--tech-primary);
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
    margin-bottom: 1rem;
    letter-spacing: -1px;
}

.text-gradient {
    background: linear-gradient(135deg, #00d4aa, #00ffcc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-desc {
    font-size: 1.1rem;
    color: var(--tech-text-dim);
    margin-bottom: 2rem;
    max-width: 500px;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-primary-glow {
    background: linear-gradient(135deg, var(--tech-primary), var(--tech-primary-dim));
    color: #0a1f1a;
    border: none;
    padding: 12px 28px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(0, 212, 170, 0.3);
}

.btn-primary-glow:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(0, 212, 170, 0.5);
    color: #0a1f1a;
}

.btn-outline-glow {
    background: transparent;
    color: var(--tech-primary);
    border: 1px solid var(--tech-border-hover);
    padding: 12px 28px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-outline-glow:hover {
    background: rgba(0, 212, 170, 0.1);
    border-color: var(--tech-primary);
    color: var(--tech-primary);
}

.hero-deco-line {
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--tech-primary), transparent);
    margin-top: 2rem;
    border-radius: 2px;
}

/* ---- 3D 盾牌场景 ---- */
.shield-scene {
    position: relative;
    width: 400px;
    height: 400px;
    margin: 0 auto;
}

.shield-core {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 120px;
}

.shield-icon {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 212, 170, 0.2), rgba(0, 212, 170, 0.05));
    border: 2px solid rgba(0, 212, 170, 0.5);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: var(--tech-primary);
    box-shadow: 0 0 40px rgba(0, 212, 170, 0.3), inset 0 0 20px rgba(0, 212, 170, 0.1);
    position: relative;
    z-index: 3;
}

.shield-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 1px solid rgba(0, 212, 170, 0.2);
    border-radius: 50%;
    pointer-events: none;
}

.ring-1 { width: 180px; height: 180px; animation: rotate-ring 20s linear infinite; }
.ring-2 { width: 260px; height: 260px; animation: rotate-ring 30s linear infinite reverse; }
.ring-3 { width: 340px; height: 340px; animation: rotate-ring 40s linear infinite; }

@keyframes rotate-ring {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

.orbit-node {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 8px;
}

.node-icon {
    width: 48px;
    height: 48px;
    background: rgba(0, 212, 170, 0.1);
    border: 1px solid rgba(0, 212, 170, 0.3);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--tech-primary);
    box-shadow: 0 0 15px rgba(0, 212, 170, 0.15);
}

.node-line {
    width: 40px;
    height: 1px;
    background: linear-gradient(90deg, rgba(0, 212, 170, 0.4), transparent);
}

.node-1 { top: 10%; left: 50%; transform: translateX(-50%); }
.node-2 { top: 30%; right: 5%; }
.node-3 { bottom: 30%; right: 5%; }
.node-4 { bottom: 10%; left: 50%; transform: translateX(-50%); }
.node-5 { top: 30%; left: 5%; flex-direction: row-reverse; }
.node-5 .node-line { background: linear-gradient(270deg, rgba(0, 212, 170, 0.4), transparent); }

/* ---- 右侧悬浮导航 ---- */
.side-nav {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
    background: rgba(15, 46, 37, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid var(--tech-border);
    border-radius: 12px;
    padding: 12px;
    width: 120px;
}

.side-nav-header {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--tech-text-dim);
    font-size: 12px;
    padding-bottom: 8px;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--tech-border);
}

.side-nav-items {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.side-nav-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 8px;
    color: var(--tech-text-dim);
    font-size: 13px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.side-nav-item:hover {
    background: rgba(0, 212, 170, 0.1);
    color: var(--tech-primary);
}

.side-nav-item.active {
    background: rgba(0, 212, 170, 0.15);
    color: var(--tech-primary);
}

.side-nav-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--tech-text-dim);
    transition: all 0.2s ease;
}

.side-nav-item.active .side-nav-dot,
.side-nav-item:hover .side-nav-dot {
    background: var(--tech-primary);
    box-shadow: 0 0 6px var(--tech-primary);
}

/* ---- 数据统计卡片 ---- */
.stats-section {
    padding: 40px 0;
    background: linear-gradient(180deg, var(--tech-bg) 0%, var(--tech-bg-light) 100%);
}

.stat-card {
    background: var(--tech-bg-card);
    border: 1px solid var(--tech-border);
    border-radius: 16px;
    padding: 28px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.stat-card:hover {
    border-color: var(--tech-border-hover);
    transform: translateY(-4px);
    box-shadow: 0 10px 40px rgba(0, 212, 170, 0.1);
}

.stat-card-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 212, 170, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.stat-card-num {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--tech-primary);
    line-height: 1;
    margin-bottom: 8px;
    text-shadow: 0 0 20px rgba(0, 212, 170, 0.3);
}

.stat-card-label {
    font-size: 14px;
    color: var(--tech-text-dim);
    letter-spacing: 1px;
}

/* ---- 核心功能 ---- */
.features-section {
    padding: 60px 0;
    background: var(--tech-bg-light);
}

.section-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    position: relative;
    padding-left: 16px;
}

.section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 24px;
    background: linear-gradient(180deg, var(--tech-primary), transparent);
    border-radius: 2px;
}

.feature-card {
    background: var(--tech-bg-card);
    border: 1px solid var(--tech-border);
    border-radius: 16px;
    padding: 32px 24px;
    height: 100%;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.feature-card:hover {
    border-color: var(--tech-border-hover);
    transform: translateY(-6px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3), 0 0 30px rgba(0, 212, 170, 0.1);
}

.feature-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, rgba(0, 212, 170, 0.2), rgba(0, 212, 170, 0.05));
    border: 1px solid rgba(0, 212, 170, 0.3);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--tech-primary);
    margin-bottom: 20px;
}

.feature-card h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 12px;
}

.feature-card p {
    font-size: 14px;
    color: var(--tech-text-dim);
    line-height: 1.7;
    margin-bottom: 20px;
}

.feature-link {
    color: var(--tech-primary);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.feature-link:hover {
    gap: 10px;
    color: #00ffcc;
}

/* ---- 文章卡片 ---- */
.articles-section,
.products-section,
.discussions-section {
    padding: 50px 0;
    background: var(--tech-bg);
}

.products-section {
    background: var(--tech-bg-light);
}

.article-card-new {
    background: var(--tech-bg-card);
    border: 1px solid var(--tech-border);
    border-radius: 16px;
    padding: 24px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    height: 100%;
}

.article-card-new:hover {
    border-color: var(--tech-border-hover);
    transform: translateY(-4px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.article-card-header {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.article-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.article-badge-top {
    background: rgba(239, 68, 68, 0.2) !important;
    color: #ef4444 !important;
}

.article-card-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 12px;
    line-height: 1.5;
}

.article-card-title a {
    color: #fff;
    text-decoration: none;
    transition: color 0.2s ease;
}

.article-card-title a:hover {
    color: var(--tech-primary);
}

.article-card-summary {
    font-size: 14px;
    color: var(--tech-text-dim);
    line-height: 1.7;
    margin-bottom: 16px;
}

.article-card-footer {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: var(--tech-text-dim);
}

.article-card-footer i {
    color: var(--tech-primary-dim);
}

/* ---- 讨论列表 ---- */
.discussion-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.discussion-item-new {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--tech-bg-card);
    border: 1px solid var(--tech-border);
    border-radius: 12px;
    padding: 20px 24px;
    text-decoration: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.discussion-item-new:hover {
    border-color: var(--tech-border-hover);
    transform: translateX(4px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.discussion-main {
    flex: 1;
    min-width: 0;
}

.discussion-badges {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.badge-pinned {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 11px;
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.badge-closed {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 11px;
    background: rgba(107, 114, 128, 0.2);
    color: #9ca3af;
}

.badge-cat {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 11px;
}

.discussion-title {
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.discussion-meta {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: var(--tech-text-dim);
}

.discussion-replies {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: rgba(0, 212, 170, 0.1);
    border-radius: 20px;
    color: var(--tech-primary);
    font-size: 14px;
    font-weight: 600;
    flex-shrink: 0;
    margin-left: 16px;
}

/* ---- 响应式 ---- */
@media (max-width: 991px) {
    .hero-title { font-size: 2.2rem; }
    .shield-scene { width: 300px; height: 300px; }
    .side-nav { display: none !important; }
}

@media (max-width: 767px) {
    .hero-section { padding: 60px 0 40px; }
    .hero-title { font-size: 1.8rem; }
    .stat-card-num { font-size: 1.8rem; }
    .discussion-item-new { flex-direction: column; align-items: flex-start; gap: 12px; }
    .discussion-replies { margin-left: 0; }
}
