<template>
  <div class="app-container">
    <main class="main-content">
      <router-view></router-view>
    </main>

    <footer class="version-footer">
      2.2版本(权限管理版) © 2026 Device Monitor
    </footer>
  </div>
</template>

<script setup>
// App.vue 保持简洁
</script>

<style>
/* --- 全局样式 --- */
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  background-color: #f5f7fa;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  overflow-x: hidden; /* 防止 iOS 橡皮筋效果 */
}

#app {
  width: 100%;
  min-height: 100vh;
}

.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: 100%;
  max-width: 100vw; /* 强制不超过屏幕宽 */
}

/* ✅ 关键：内容区滚动控制 */
.main-content {
  flex: 1;
  width: 100%;
  box-sizing: border-box;
  overflow-x: auto; /* 允许横向滚动 */
  -webkit-overflow-scrolling: touch; /* 移动端顺滑滚动 */
}

.version-footer {
  text-align: center;
  padding: 15px 0;
  color: #c0c4cc;
  font-size: 12px;
  background-color: #f5f7fa;
  flex-shrink: 0; /* 防止被压缩 */
}
</style>
