@font-face {
  font-family: 'LXGW WenKai TC';
  src: url('../assets/fonts/LXGWWenKai.ttf') format('truetype');
  font-display: block;
}
@font-face {
  font-family: 'ZCOOL KuaiLe';
  src: url('../assets/fonts/ZCOOLKuaiLe-Regular.ttf') format('truetype');
  font-display: block;
}

:root {
  --color-primary: #8B5CF6;
  --color-accent: #C084FC;
  --color-bg: #1A0B2E;
  --color-surface: rgba(139, 92, 246, 0.1);
  --color-text: #E2D9F3;
  --color-text-secondary: rgba(226, 217, 243, 0.6);
  
  /* Status Bar */
  --status-bar-height: max(44px, env(safe-area-inset-top, 44px));
  --home-indicator-height: max(34px, env(safe-area-inset-bottom, 34px));

  /* Bubbles */
  --bubble-ai-bg: rgba(45, 27, 78, 0.5);
  --bubble-user-bg: rgba(109, 40, 217, 0.9);
  --bubble-radius: 18px;
  --bubble-blur: 20px;
  
  /* Utilities */
  --font-family-base: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-family-base);
  background-color: #000;
  color: var(--color-text);
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
}

/* Device Simulator Wrapper */
.device-simulator {
  width: 100vw;
  height: 100vh;
  position: relative;
  overflow: hidden;
  background-color: var(--color-bg);
}

@media (min-width: 600px) {
  .device-simulator {
    width: 393px;
    height: 852px;
    border-radius: 40px;
    box-shadow: 0 0 0 10px #222, 0 0 50px rgba(0, 0, 0, 0.5);
  }
}

/* Reusable UI Components */

/* 1. Status Bar */
.status-bar {
  height: var(--status-bar-height);
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 24px;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1000;
  pointer-events: none;
}

.status-bar .time {
  width: 60px;
}

.status-bar .island {
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 12px;
  display: none; /* Only show in apps */
}

.status-bar .icons {
  display: flex;
  gap: 6px;
  align-items: center;
  font-size: 12px;
}

/* On real mobile devices (especially PWA standalone), hide the mock status bar content 
   because the real OS status bar (time, battery) overlays this area. */
@media (max-width: 600px), (display-mode: standalone) {
  .status-bar > * {
    display: none !important;
  }
}

/* 2. App Headers & Containers */
.app-container {
  position: absolute; top: var(--status-bar-height); left: 0; width: 100%; 
  height: calc(100% - var(--status-bar-height)); overflow-y: auto; scrollbar-width: none; z-index: 5;
}
.app-container::-webkit-scrollbar { display: none; }

.header {
  height: 50px; display: flex; justify-content: space-between; align-items: center; 
  padding: 0 16px; font-weight: 500; position: sticky; top: 0; z-index: 20; color: white;
}
.back { font-size: 16px; cursor: pointer; display: flex; align-items: center; color: white;}
.back svg { margin-right: 4px; }
.title { font-size: 17px; font-weight: 600; text-align: center; }

/* 3. Home Indicator */
.home-indicator {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: var(--home-indicator-height);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  cursor: pointer;
}

.home-indicator .bar {
  width: 130px;
  height: 5px;
  background-color: var(--color-text);
  border-radius: 10px;
  opacity: 0.8;
}

/* Animations */
.fade-enter-active, .fade-leave-active {
  transition: opacity 0.5s ease;
}
.fade-enter-from, .fade-leave-to {
  opacity: 0;
}
