/* ==========================================================
   Edition III 首页独有模块 - 终端极客风格
   赛博朋克粉主题 - 代码化交互
   ========================================================== */

/* ========== 代码块特性 ========== */
.code-section {
    padding: 80px 20px;
    background:
        repeating-linear-gradient(0deg, transparent 0, transparent 2px, rgba(255, 0, 110, 0.03) 2px, rgba(255, 0, 110, 0.03) 4px);
}

.code-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    max-width: 1100px;
    margin: 40px auto 0;
}

.code-block {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 0, 110, 0.3);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s;
}

.code-block:hover {
    border-color: var(--primary);
    box-shadow: 0 0 30px rgba(255, 0, 110, 0.3);
    transform: translateY(-4px);
}

.code-header {
    background: rgba(255, 0, 110, 0.15);
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid rgba(255, 0, 110, 0.2);
}

.code-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary);
}

.code-dot.red { background: #ff5f56; }
.code-dot.yellow { background: #ffbd2e; }
.code-dot.green { background: #27c93f; }

.code-title {
    color: var(--secondary);
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    font-weight: 600;
}

.code-body {
    padding: 20px;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    line-height: 1.7;
    color: #c9d1d9;
    overflow-x: auto;
}

.code-body .key { color: #79c0ff; }
.code-body .val { color: #a5d6ff; }
.code-body .str { color: #ffa657; }
.code-body .cmt { color: #8b949e; }
.code-body .kw { color: #ff7b72; }
.code-body .fn { color: #d2a8ff; }

/* ========== 终端日志 ========== */
.terminal-section {
    padding: 80px 20px;
}

.terminal {
    max-width: 1100px;
    margin: 40px auto 0;
    background: #0d1117;
    border: 1px solid var(--primary);
    border-radius: 12px;
    box-shadow: 0 0 50px rgba(255, 0, 110, 0.2);
    overflow: hidden;
}

.terminal-header {
    background: #161b22;
    padding: 12px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 0, 110, 0.3);
}

.terminal-dots {
    display: flex;
    gap: 6px;
}

.terminal-dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.terminal-title {
    color: var(--secondary);
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
}

.terminal-body {
    padding: 20px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.8;
    min-height: 360px;
}

.log-line {
    margin-bottom: 4px;
    opacity: 0;
    animation: typeIn 0.5s ease forwards;
}

.log-line:nth-child(1) { animation-delay: 0.2s; }
.log-line:nth-child(2) { animation-delay: 0.5s; }
.log-line:nth-child(3) { animation-delay: 0.8s; }
.log-line:nth-child(4) { animation-delay: 1.1s; }
.log-line:nth-child(5) { animation-delay: 1.4s; }
.log-line:nth-child(6) { animation-delay: 1.7s; }
.log-line:nth-child(7) { animation-delay: 2.0s; }
.log-line:nth-child(8) { animation-delay: 2.3s; }
.log-line:nth-child(9) { animation-delay: 2.6s; }
.log-line:nth-child(10) { animation-delay: 2.9s; }
.log-line:nth-child(11) { animation-delay: 3.2s; }
.log-line:nth-child(12) { animation-delay: 3.5s; }
.log-line:nth-child(13) { animation-delay: 3.8s; }
.log-line:nth-child(14) { animation-delay: 4.1s; }

@keyframes typeIn {
    from { opacity: 0; transform: translateX(-10px); }
    to { opacity: 1; transform: translateX(0); }
}

.prompt { color: var(--primary); }
.cmd { color: #79c0ff; }
.success { color: #4ade80; }
.warning { color: #fbbf24; }
.info { color: var(--secondary); }
.path { color: #d2a8ff; }

/* ========== 架构图 ========== */
.arch-section {
    padding: 80px 20px;
    background: rgba(255, 255, 255, 0.02);
}

.arch-flow {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1100px;
    margin: 40px auto 0;
    gap: 12px;
    flex-wrap: wrap;
}

.arch-node {
    flex: 1;
    min-width: 130px;
    padding: 25px 18px;
    background: linear-gradient(135deg, rgba(255, 0, 110, 0.15), rgba(0, 245, 255, 0.08));
    border: 1px solid rgba(255, 0, 110, 0.4);
    border-radius: 12px;
    text-align: center;
    position: relative;
    transition: all 0.3s;
}

.arch-node:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 10px 30px rgba(255, 0, 110, 0.4);
}

.arch-node-icon {
    font-size: 2.5rem;
    margin-bottom: 8px;
}

.arch-node-name {
    color: var(--light);
    font-weight: 700;
    font-size: 0.95rem;
}

.arch-node-desc {
    color: var(--gray);
    font-size: 0.75rem;
    margin-top: 4px;
}

.arch-arrow {
    color: var(--primary);
    font-size: 1.5rem;
    font-weight: bold;
}

/* ========== API 性能图 ========== */
.api-perf-section {
    padding: 80px 20px;
}

.perf-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 1100px;
    margin: 40px auto 0;
}

.perf-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 0, 110, 0.2);
    border-radius: 12px;
    padding: 25px;
    font-family: 'Courier New', monospace;
}

.perf-title {
    color: var(--secondary);
    font-size: 0.9rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.perf-stats {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 0.85rem;
}

.perf-label { color: var(--gray); }
.perf-value { color: var(--primary); font-weight: 700; }

.perf-bar {
    height: 6px;
    background: rgba(255, 0, 110, 0.1);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 15px;
}

.perf-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 3px;
}

/* ========== 安全等级仪表 ========== */
.security-gauge-section {
    padding: 80px 20px;
    background: radial-gradient(ellipse at center, rgba(255, 0, 110, 0.05), transparent 70%);
}

.gauges-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    max-width: 1100px;
    margin: 40px auto 0;
}

.gauge-card {
    text-align: center;
    padding: 30px 20px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 0, 110, 0.2);
    border-radius: 16px;
}

.gauge-svg {
    width: 120px;
    height: 120px;
    margin: 0 auto 15px;
}

.gauge-bg {
    fill: none;
    stroke: rgba(255, 0, 110, 0.1);
    stroke-width: 10;
}

.gauge-progress {
    fill: none;
    stroke: url(#gauge-gradient);
    stroke-width: 10;
    stroke-linecap: round;
    transform: rotate(-90deg);
    transform-origin: center;
    transition: stroke-dasharray 1s ease;
}

.gauge-num {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--primary);
}

.gauge-label {
    color: var(--light);
    font-size: 0.9rem;
    margin-top: 5px;
}

/* ========== 集成生态 ========== */
.integrations-section {
    padding: 80px 20px;
}

.integ-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
    max-width: 1100px;
    margin: 40px auto 0;
}

.integ-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 0, 110, 0.2);
    border-radius: 10px;
    padding: 22px 15px;
    text-align: center;
    transition: all 0.3s;
    cursor: pointer;
}

.integ-card:hover {
    border-color: var(--primary);
    transform: translateY(-5px) rotate(-1deg);
    box-shadow: 0 10px 25px rgba(255, 0, 110, 0.3);
}

.integ-icon {
    font-size: 2rem;
    margin-bottom: 8px;
}

.integ-name {
    color: var(--light);
    font-size: 0.85rem;
    font-weight: 600;
}

/* ========== 响应式 ========== */
@media (max-width: 768px) {
    .code-grid { grid-template-columns: 1fr; }
    .perf-grid, .gauges-grid { grid-template-columns: repeat(2, 1fr); }
    .arch-flow { flex-direction: column; }
    .arch-arrow { transform: rotate(90deg); }
    .terminal-body { font-size: 0.8rem; }
}
