/* ============================================
   整体布局
   ============================================ */

/* 顶部栏 */
.app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: var(--bg-header);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: var(--z-header);
  box-shadow: var(--shadow-sm);
}

.header-left, .header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-center {
  flex: 1;
  display: flex;
  justify-content: center;
  padding: 0 20px;
}

.header-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--border-radius-sm);
  background: transparent;
  color: var(--text-secondary);
  font-size: 16px;
  transition: all var(--transition-fast);
}
.header-btn:hover {
  background: var(--bg-surface-hover);
  color: var(--primary);
}
.header-btn .icon {
  font-style: normal;
  font-weight: bold;
}

.app-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  user-select: none;
}
.logo-icon {
  font-size: 20px;
  color: var(--primary);
}
.logo-text {
  font-size: 15px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.novel-title-bar {
  display: flex;
  align-items: center;
  gap: 12px;
}

.novel-title-input {
  border: none;
  background: transparent;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  text-align: center;
  min-width: 200px;
  max-width: 400px;
  padding: 4px 8px;
  border-radius: var(--border-radius-sm);
  transition: background var(--transition-fast);
}
.novel-title-input:hover {
  background: var(--bg-surface-hover);
}
.novel-title-input:focus {
  background: var(--bg-surface-hover);
  box-shadow: 0 0 0 2px var(--primary-bg);
}

.word-count-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  background: var(--primary-bg);
  color: var(--primary);
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.token-display {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  background: linear-gradient(135deg, rgba(108,92,231,0.1), rgba(0,206,201,0.1));
  border-radius: 16px;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.token-display:hover {
  background: linear-gradient(135deg, rgba(108,92,231,0.2), rgba(0,206,201,0.2));
}
.token-icon {
  color: var(--primary);
  font-size: 14px;
}
.token-count {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
}

/* 主体区域 */
.app-main {
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  overflow: hidden;
}

/* 中间内容区 */
.content-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
  background: var(--bg-body);
}
