/* ----------------------------------------------------
   NEXUS STREAM - 极客并发预缓存播放器 - 全局主题设计
   ---------------------------------------------------- */

:root {
    /* 核心色彩系统 (HSL 定制) */
    --bg-dark: #070913;
    --panel-bg: rgba(13, 17, 30, 0.65);
    --panel-border: rgba(255, 255, 255, 0.07);
    --panel-border-hover: rgba(255, 255, 255, 0.15);

    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    /* 状态霓虹色 */
    --accent-cyan: #00f0ff;
    --accent-indigo: #6366f1;
    --accent-emerald: #10b981;
    --accent-violet: #8b5cf6;
    --accent-amber: #f59e0b;
    --accent-error: #d90429;
    --accent-pink: #ff66cc;

    /* 状态阴影 */
    --glow-cyan: 0 0 15px rgba(0, 240, 255, 0.45);
    --glow-indigo: 0 0 15px rgba(99, 102, 241, 0.4);
    --glow-emerald: 0 0 15px rgba(16, 185, 129, 0.4);
    --glow-violet: 0 0 15px rgba(139, 92, 246, 0.4);
    --glow-pink: 0 0 15px rgba(255, 102, 204, 0.45);

    /* 字体体系 (原生系统级，100%离线闭环) */
    --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono: Consolas, Monaco, "Andale Mono", "Ubuntu Mono", monospace;
}

/* 基础重置 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-sans);
    overflow-x: hidden;
    min-height: 100vh;
    line-height: 1.5;
}

/* 霓虹发光底盘 */
.glow-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.glow-bg::before,
.glow-bg::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.15;
}

.glow-bg::before {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent-indigo) 0%, transparent 70%);
    top: -10%;
    left: -10%;
    animation: pulse-glow 15s infinite alternate;
}

.glow-bg::after {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--accent-cyan) 0%, transparent 70%);
    bottom: -10%;
    right: -10%;
    animation: pulse-glow 12s infinite alternate-reverse;
}

@keyframes pulse-glow {
    0% {
        transform: scale(1) translate(0, 0);
    }

    100% {
        transform: scale(1.2) translate(50px, 50px);
    }
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-cyan);
}

/* 核心布局容器 */
.app-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-height: 100vh;
}

/* 毛玻璃面板规范 */
.glass-panel {
    background: var(--panel-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--panel-border);
    border-radius: 16px;
    padding: 20px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.glass-panel:hover {
    border-color: var(--panel-border-hover);
}

/* Header 区域 */
.main-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
    padding: 16px 24px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    font-size: 24px;
    color: var(--accent-cyan);
    filter: drop-shadow(0 0 8px rgba(0, 240, 255, 0.6));
    animation: logo-heartbeat 1.6s infinite ease-in-out;
    display: inline-block;
}

@keyframes logo-heartbeat {
    0% {
        transform: scale(1);
        filter: drop-shadow(0 0 6px rgba(0, 240, 255, 0.5)) brightness(1);
    }

    14% {
        transform: scale(1.25);
        filter: drop-shadow(0 0 15px rgba(0, 240, 255, 0.9)) brightness(1.3);
    }

    28% {
        transform: scale(1.05);
        filter: drop-shadow(0 0 8px rgba(0, 240, 255, 0.6)) brightness(1.1);
    }

    42% {
        transform: scale(1.35);
        filter: drop-shadow(0 0 20px rgba(0, 240, 255, 1)) brightness(1.4);
    }

    70%,
    100% {
        transform: scale(1);
        filter: drop-shadow(0 0 6px rgba(0, 240, 255, 0.5)) brightness(1);
    }
}

.logo-text h1 {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 2px;
    line-height: 1;
}

.accent-text {
    background: linear-gradient(135deg, var(--accent-cyan) 0%, var(--accent-indigo) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sub-logo {
    font-size: 11px;
    color: var(--text-secondary);
    letter-spacing: 1px;
    font-weight: 300;
}

/* M3U8 输入栏 */
.stream-input-bar {
    display: flex;
    flex: 1;
    max-width: 900px;
    gap: 12px;
    width: 100%;
}

.input-wrapper {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--panel-border);
    border-radius: 12px;
    padding: 0 16px;
    flex: 1;
    transition: all 0.3s ease;
}

.input-wrapper:focus-within {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.2);
}

.input-icon {
    color: var(--text-muted);
    margin-right: 12px;
    font-size: 14px;
}

.input-wrapper input {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    width: 100%;
    font-family: var(--font-sans);
    font-size: 14px;
    height: 46px;
}

.input-wrapper input::placeholder {
    color: var(--text-muted);
}

/* 霓虹发光按钮 */
.glow-button {
    background: linear-gradient(135deg, var(--accent-indigo) 0%, var(--accent-cyan) 100%);
    border: none;
    border-radius: 12px;
    color: #fff;
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 14px;
    padding: 0 24px;
    cursor: pointer;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
    height: 48px;
}

.glow-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 240, 255, 0.4);
    filter: brightness(1.1);
}

.glow-button:active {
    transform: translateY(0);
}

/* 核心双栏架构 */
.main-content {
    display: grid;
    grid-template-columns: 57fr 43fr;
    gap: 20px;
    align-items: start;
}

@media (max-width: 1100px) {
    .main-content {
        grid-template-columns: 1fr;
    }
}

/* ==================== 左侧播放器栏 ==================== */
.player-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.player-container {
    padding: 0;
    overflow: hidden;
    border-radius: 16px;
    background: #000;
}

.video-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background-color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

#video-player {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* 自定义悬浮控制面板 */
.custom-controls-overlay {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(7, 9, 19, 0.9) 0%, rgba(7, 9, 19, 0.3) 30%, transparent 60%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 10;
}

.video-wrapper:hover .custom-controls-overlay {
    opacity: 1;
}

/* 确保控制栏上的交互元素能点中 */
.custom-controls-overlay * {
    pointer-events: auto;
}

/* 中间缓冲旋转 */
.center-loading-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    display: none;
    z-index: 11;
}

.spinner-ring {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(0, 240, 255, 0.1);
    border-radius: 50%;
    border-top-color: var(--accent-cyan);
    animation: spin 1s linear infinite;
    filter: drop-shadow(0 0 8px var(--accent-cyan));
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.controls-bottom {
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* 播放进度条设计 */
.progress-container {
    width: 100%;
    height: 16px;
    display: flex;
    align-items: center;
    cursor: pointer;
    position: relative;
    /* 确保 tooltip 能够精准绝对定位 */
}

/* 进度条时间悬浮框 */
.progress-tooltip {
    position: absolute;
    bottom: 22px;
    left: 0;
    /* 绝对定位坐标起点锚定，确保能够基于左边界计算 offset */
    background: rgba(7, 9, 19, 0.95);
    border: 1px solid rgba(0, 240, 255, 0.35);
    color: var(--accent-cyan);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-family: var(--font-mono);
    pointer-events: none;
    opacity: 0;
    transform: translateX(-50%) translateY(4px);
    transition: opacity 0.15s ease, transform 0.15s ease;
    box-shadow: 0 4px 10px rgba(0, 240, 255, 0.2);
    white-space: nowrap;
    z-index: 12;
}

.progress-container:hover .progress-tooltip,
.progress-container.dragging .progress-tooltip {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* 视频中心大悬浮提示框 (Play/Pause/+5s/-5s) */
.player-status-tip {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.6);
    background: rgba(7, 9, 19, 0.85);
    border: 1px solid rgba(0, 240, 255, 0.4);
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.35);
    border-radius: 50%;
    width: 90px;
    height: 90px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--accent-cyan);
    pointer-events: none;
    opacity: 0;
    z-index: 15;
    transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.player-status-tip.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.player-status-tip .status-icon {
    font-size: 26px;
    margin-bottom: 4px;
}

.player-status-tip .status-text {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.5px;
    font-family: var(--font-mono);
}

.progress-bar-bg {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
    position: relative;
    transition: height 0.2s ease;
}

.progress-container:hover .progress-bar-bg {
    height: 6px;
}

.buffered-bar {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: rgba(255, 255, 255, 0.35);
    border-radius: 2px;
    width: 0%;
    transition: width 0.1s linear;
}

.playback-bar {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: linear-gradient(to right, var(--accent-indigo), var(--accent-cyan));
    border-radius: 2px;
    width: 0%;
    position: relative;
}

.play-head {
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%) scale(0);
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 10px var(--accent-cyan);
    transition: transform 0.2s ease;
}

.progress-container:hover .play-head {
    transform: translateY(-50%) scale(1);
}

/* 按钮操作栏 */
.controls-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.control-group-left,
.control-group-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.ctrl-btn {
    background: transparent;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 15px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s, color 0.2s;
}

.ctrl-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--accent-cyan);
}

/* 音量滑动栏 */
.volume-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.volume-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 70px;
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.2);
    outline: none;
    transition: width 0.2s ease;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    transition: background-color 0.2s;
}

.volume-slider::-webkit-slider-thumb:hover {
    background: var(--accent-cyan);
    box-shadow: 0 0 8px var(--accent-cyan);
}

.time-display {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 300;
}

/* 下拉菜单（倍速、画质） */
.speed-menu-wrapper,
.quality-menu-wrapper {
    position: relative;
}

#speed-btn,
#quality-btn {
    font-size: 13px;
    font-weight: 600;
    padding: 0 10px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    height: 28px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    gap: 4px;
}

.dropdown-menu {
    position: absolute;
    bottom: calc(100% + 8px);
    right: 0;
    background: rgba(13, 17, 30, 0.95);
    border: 1px solid var(--panel-border-hover);
    border-radius: 10px;
    padding: 6px;
    min-width: 100px;
    display: none;
    flex-direction: column;
    gap: 4px;
    z-index: 12;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
}

.dropdown-menu.show {
    display: flex;
}

.dropdown-item {
    font-size: 12px;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-secondary);
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--accent-cyan);
}

.dropdown-item.active {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2) 0%, rgba(0, 240, 255, 0.2) 100%);
    color: var(--accent-cyan);
    border-left: 2px solid var(--accent-cyan);
}

/* 参数策略面板 */
.settings-panel {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.panel-header {
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 12px;
}

.panel-icon {
    font-size: 18px;
    color: var(--accent-cyan);
}

.panel-header h2 {
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

@media (max-width: 600px) {
    .settings-grid {
        grid-template-columns: 1fr;
    }
}

.setting-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.setting-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.setting-info label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}

.badge {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 20px;
    background: rgba(0, 240, 255, 0.12);
    color: var(--accent-cyan);
    font-weight: 600;
}

.badge-outline {
    background: transparent;
    border: 1px solid var(--accent-cyan);
}

/* 霓虹滑轨定制 */
.range-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.range-wrapper input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    outline: none;
}

.range-wrapper input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent-cyan);
    cursor: pointer;
    box-shadow: var(--glow-cyan);
    transition: transform 0.1s ease;
}

.range-wrapper input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.range-max {
    font-size: 11px;
    color: var(--text-muted);
    min-width: 20px;
}

.help-text {
    font-size: 11px;
    color: var(--text-muted);
}

/* 下拉菜单定制 */
.select-wrapper {
    position: relative;
    width: 100%;
}

.select-wrapper select {
    width: 100%;
    height: 38px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--panel-border);
    border-radius: 10px;
    padding: 0 14px;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 13px;
    appearance: none;
    outline: none;
    cursor: pointer;
    transition: all 0.3s;
}

.select-wrapper select:focus {
    border-color: var(--accent-indigo);
}

.select-arrow {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--text-muted);
    font-size: 12px;
}

/* 代理配置及开关 */
.toggle-switch {
    position: relative;
    width: 42px;
    height: 22px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch-label {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.1);
    transition: .4s;
    border-radius: 34px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.switch-label:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: var(--text-secondary);
    transition: .4s;
    border-radius: 50%;
}

.toggle-switch input:checked+.switch-label {
    background-color: rgba(99, 102, 241, 0.3);
    border-color: var(--accent-indigo);
}

.toggle-switch input:checked+.switch-label:before {
    transform: translateX(20px);
    background-color: var(--accent-cyan);
    box-shadow: var(--glow-cyan);
}

.proxy-item .input-wrapper {
    height: 38px;
    border-radius: 10px;
}

.proxy-item .input-wrapper.disabled {
    opacity: 0.4;
    background: rgba(255, 255, 255, 0.02);
    pointer-events: none;
}

.proxy-item .input-wrapper input {
    height: 100%;
    font-size: 12px;
}

.text-muted {
    color: var(--text-muted);
}


/* ==================== 右侧指标监控大屏 ==================== */
.dashboard-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 四连核心指标面板 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

@media (max-width: 600px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
}

.stat-icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.cyan-glow {
    color: var(--accent-cyan);
    border-color: rgba(0, 240, 255, 0.2);
    background: rgba(0, 240, 255, 0.05);
}

.emerald-glow {
    color: var(--accent-emerald);
    border-color: rgba(16, 185, 129, 0.2);
    background: rgba(16, 185, 129, 0.05);
}

.violet-glow {
    color: var(--accent-violet);
    border-color: rgba(139, 92, 246, 0.2);
    background: rgba(139, 92, 246, 0.05);
}

.amber-glow {
    color: var(--accent-amber);
    border-color: rgba(245, 158, 11, 0.2);
    background: rgba(245, 158, 11, 0.05);
}

.stat-content {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 300;
}

.stat-value {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.1;
    font-family: var(--font-mono);
}

.stat-unit {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 400;
}

/* 分片网格监视面板 */
.monitor-panel {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.panel-header-spaced {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 12px;
}

.panel-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.panel-header-left h2 {
    font-size: 16px;
    font-weight: 600;
}

/* 图例说明区 */
.grid-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 18px;
    font-size: 11px;
    color: var(--text-secondary);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.legend-color {
    width: 10px;
    height: 10px;
    border-radius: 2px;
    display: inline-block;
}

/* 不同状态背景色设计 */
.legend-color.idle,
.seg-block.idle {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.legend-color.downloading,
.seg-block.downloading {
    background: var(--accent-amber);
    box-shadow: 0 0 10px var(--accent-amber);
}

.pulsing {
    animation: segment-pulse 1s infinite alternate;
}

@keyframes segment-pulse {
    0% {
        opacity: 0.4;
    }

    100% {
        opacity: 1;
        transform: scale(1.1);
    }
}

.legend-color.cached,
.seg-block.cached {
    background: var(--accent-emerald);
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.3);
}

.legend-color.buffered,
.seg-block.buffered {
    background: var(--accent-violet);
    box-shadow: 0 0 8px rgba(139, 92, 246, 0.3);
}

.legend-color.playing,
.seg-block.playing {
    background: var(--accent-cyan);
    box-shadow: 0 0 12px var(--accent-cyan);
    border: 1px solid rgba(0, 240, 255, 0.6);
    animation: segment-pulse 0.8s infinite alternate;
    /* 正在播放切片闪烁青色高能霓虹呼吸灯 */
}

.legend-color.played,
.seg-block.played {
    background: var(--accent-pink);
    box-shadow: var(--glow-pink);
    opacity: 0.8;
}

.legend-color.error,
.seg-block.error {
    background: var(--accent-error);
    box-shadow: 0 0 10px rgba(217, 4, 41, 0.55);
}

/* 分片网格容器 */
.segment-grid-container {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 14px;
    height: 180px;
    /* 固定高度，完全防抖 */
    overflow-y: auto;
}

.segment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(13px, 1fr));
    gap: 5px;
    width: 100%;
}

.empty-state {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 30px 0;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 28px;
}

.empty-state p {
    font-size: 13px;
}

/* 单元分片块 */
.seg-block {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 2px;
    cursor: pointer;
    transition: transform 0.15s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.15s;
    position: relative;
}

.seg-block:hover {
    transform: scale(1.3);
    z-index: 5;
    outline: 1px solid #fff;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

/* 极客日志台 */
.logs-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px 20px;
}

.btn-text {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-family: var(--font-sans);
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-text:hover {
    color: var(--accent-error);
}

.logs-console-wrapper {
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    padding: 12px;
}

.logs-console {
    height: 140px;
    overflow-y: auto;
    font-family: var(--font-mono);
    font-size: 11px;
    color: #a7f3d0;
    /* 极客绿 */
    display: flex;
    flex-direction: column;
    gap: 6px;
    scroll-behavior: smooth;
}

.log-line {
    word-break: break-all;
    line-height: 1.4;
}

.log-line.system {
    color: var(--text-muted);
}

.log-line.error {
    color: var(--accent-error);
}

.log-line.download {
    color: var(--accent-cyan);
}

.log-line.hit {
    color: var(--accent-violet);
}

.log-line.cache {
    color: var(--accent-emerald);
}

/* 慢速旋转 */
.fa-spin-slow {
    animation: fa-spin 4s linear infinite;
}