<template>
  <div class="app-container">
    <Sidebar />
    <div class="main-content">
      <router-view v-slot="{ Component }">
        <transition name="fade" mode="out-in">
          <component :is="Component" />
        </transition>
      </router-view>
    </div>
  </div>
</template>

<script setup lang="ts">
import Sidebar from './components/Sidebar.vue'
</script>

<style>
:root {
  --primary-color: #007AFF;
  --primary-hover: #0063CC;
  --bg-light: #FBFBFD;
  --sidebar-bg: #F8FAFD;
  --text-main: #1D1D1F;
  --text-sec: #86868B;
  --border-color: #E5E5E7;
  --card-shadow: 0 12px 30px rgba(0, 0, 0, 0.04);
  --btn-shadow: 0 4px 12px rgba(0, 122, 255, 0.25);
  --radius-card: 24px;
  --radius-btn: 12px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-light);
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

.app-container {
  display: flex;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
}

.main-content {
  flex: 1;
  height: 100vh;
  overflow-y: auto;
  position: relative;
}

/* 页面切换动画 */
.fade-enter-active,
.fade-leave-active {
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.fade-enter-from {
  opacity: 0;
  transform: translateY(10px);
}

.fade-leave-to {
  opacity: 0;
  transform: translateY(-10px);
}
</style>
