/* IDE 主题 - 默认伪装主题 */
/* 用于假装在看代码编辑器 */
:root {
  --bg: #1e1e1e;
  --bg-2: #252526;
  --bg-3: #2d2d30;
  --ink: #d4d4d4;
  --ink-2: #cccccc;
  --ink-3: #858585;
  --accent: #007acc;
  --accent-2: #4ec9b0;
  --rule: #3e3e42;
  --danger: #f48771;
  --success: #4ec9b0;
  --warning: #dcdcaa;
  --font-mono: 'Cascadia Code', 'Fira Code', Consolas, Monaco, monospace;
  --font-sans: 'Segoe UI', Tahoma, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.6;
  overflow: hidden;
}

body {
  display: grid;
  grid-template-rows: 40px 1fr 24px;
  grid-template-areas: 'header' 'main' 'footer';
}

/* 顶部状态栏 */
.app-header {
  grid-area: header;
  background: var(--bg-2);
  border-bottom: 1px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  font-size: 13px;
}

.header-left, .header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo {
  color: var(--accent);
  font-weight: bold;
}

.file-name {
  color: var(--ink-3);
}

.notification {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.notification::before {
  content: '🔔';
}

.offline-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(78, 201, 176, 0.2);
  color: var(--success);
  font-size: 12px;
}

.offline-badge:empty {
  display: none;
}

.user-info {
  color: var(--ink-3);
  cursor: pointer;
}

/* 主内容区 */
.app-main {
  grid-area: main;
  overflow: auto;
  background: var(--bg);
}

.editor-view {
  padding: 24px;
  max-width: 960px;
  margin: 0 auto;
}

.code-block {
  background: var(--bg-2);
  padding: 16px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink-2);
  overflow-x: auto;
}

/* 底部状态栏 */
.app-footer {
  grid-area: footer;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  font-size: 12px;
}

.status-mode {
  font-weight: bold;
}

/* 紧急遮罩（伪装层） */
.stealth-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
}

.stealth-overlay.active {
  display: flex;
}

.stealth-overlay pre {
  font-family: var(--font-mono);
  color: var(--ink-2);
  font-size: 14px;
}

/* 工具提示 */
[data-route] {
  color: var(--accent-2);
  text-decoration: none;
}

[data-route]:hover {
  text-decoration: underline;
}

/* 滚动条美化 */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-2);
}

::-webkit-scrollbar-thumb {
  background: var(--rule);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

/* 响应式 */
@media (max-width: 768px) {
  .editor-view {
    padding: 12px;
  }

  .header-left, .header-right {
    gap: 8px;
  }
}
