/* --- 控制台 2.0 样式 --- */

#console-screen {
    background-color: transparent; /* 透出底层背景 */
    position: relative;
}

/* 隐藏默认的 header，因为我们有自定义的窗口 header */
#console-screen > .app-header {
    display: none;
}

.console-content-wrapper {
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: rgba(0, 0, 0, 0.2); /* 整体稍微压暗背景 */
}

.console-window {
    width: 100%;
    max-width: 600px;
    height: 85%;
    background: rgba(30, 30, 30, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: consolePopIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes consolePopIn {
    0% { opacity: 0; transform: scale(0.95) translateY(10px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

/* 窗口顶部装饰栏 */
.console-window-header {
    height: 36px;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    flex-shrink: 0;
}

.console-window-dots {
    display: flex;
    gap: 6px;
    width: 60px; /* 占位平衡 */
    align-items: center;
}

.console-window-dots.back-btn {
    cursor: pointer;
}

.console-window-dots .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.console-window-dots .dot.red { 
    background-color: #ff5f56; 
}

.console-window-dots .dot.red svg {
    opacity: 0;
    transition: opacity 0.2s ease;
}

/* 整个圆点区域悬停时，红点显示返回图标 */
.console-window-dots:hover .dot.red svg {
    opacity: 1;
}

/* 悬停时圆点稍微变亮 */
.console-window-dots:hover .dot {
    filter: brightness(1.1);
}
.console-window-dots .dot.yellow { background-color: #ffbd2e; }
.console-window-dots .dot.green { background-color: #27c93f; }

.console-window-title {
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.console-window-placeholder {
    width: 60px; /* 占位平衡 */
}

/* 日志容器 */
#console-log-container {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
    font-size: 13px;
    line-height: 1.6;
    color: #d4d4d4;
    scroll-behavior: smooth;
}

/* 自定义滚动条 */
#console-log-container::-webkit-scrollbar {
    width: 8px;
}
#console-log-container::-webkit-scrollbar-track {
    background: transparent;
}
#console-log-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}
#console-log-container::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* 单条日志样式 */
.console-log-item {
    margin-bottom: 8px;
    padding: 8px 10px;
    border-radius: 6px;
    word-wrap: break-word;
    white-space: pre-wrap;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    transition: background-color 0.2s;
    position: relative;
}

.console-log-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.console-msg-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.console-msg {
    flex: 1;
}

.console-time {
    color: #666;
    font-size: 11px;
    align-self: flex-end;
    user-select: none;
}

.console-item-copy-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.2s;
    margin-left: 8px;
}

.console-log-item:hover .console-item-copy-btn {
    opacity: 1;
}

.console-item-copy-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* 日志级别颜色 */
.console-log-item.log .console-msg { color: #d4d4d4; }
.console-log-item.warn { background-color: rgba(206, 145, 120, 0.05); border-left: 3px solid #ce9178; }
.console-log-item.warn .console-msg { color: #ce9178; }
.console-log-item.error { background-color: rgba(244, 71, 71, 0.08); border-left: 3px solid #f44747; }
.console-log-item.error .console-msg { color: #f44747; }

/* 底部控制栏 */
.console-window-footer {
    height: 44px;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
    flex-shrink: 0;
}

.console-filters {
    display: flex;
    gap: 8px;
}

.console-filter-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.6);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.console-filter-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.console-filter-btn.active {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.4);
}

.console-action-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.console-action-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.console-action-btn:active {
    transform: scale(0.95);
}
