@import 'common-page.css';

:root {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  font-weight: 400;
  
  color-scheme: light dark;
  
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;

  --bg-primary: #ffffff;
  --bg-secondary: #f5f7fa;
  --bg-tertiary: #ebeef5;
  --bg-sidebar: rgba(255, 255, 255, 0.8);
  
  --text-primary: #303133;
  --text-secondary: #606266;
  --text-tertiary: #909399;
  
  --border-color: #dcdfe6;
  --border-color-light: #e4e7ed;
  
  --color-primary: #18a058; /* Naive UI Green */
  --color-primary-light: #36ad6a;
  --color-success: #18a058;
  --color-warning: #f0a020;
  --color-danger: #d03050;
  --color-info: #2080f0;
  
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 12px 24px rgba(0, 0, 0, 0.15);
  
  --border-radius-sm: 4px;
  --border-radius-md: 6px;
  --border-radius-lg: 8px;
  
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.4s ease;
  
  --glass-border: rgba(255, 255, 255, 0.2);
}

.dark {
  --bg-primary: #101014;
  --bg-secondary: #18181c;
  --bg-tertiary: #28282c;
  --bg-sidebar: rgba(24, 24, 28, 0.8);
  
  --text-primary: #ffffff;
  --text-secondary: #dcdcdc;
  --text-tertiary: #a6a6a6;
  
  --border-color: #333333;
  --border-color-light: #3e3e3e;
  
  --color-primary: #63e2b7; /* Naive UI Green Dark */
  --color-primary-light: #7fe7c4;
  
  --glass-border: rgba(255, 255, 255, 0.08);
}

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

html, body {
  height: 100%;
  width: 100%;
  overflow: hidden; 
}

body {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

#app {
  height: 100%;
  width: 100%;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-primary-light);
}

button {
  font-family: inherit;
  border: none;
  outline: none;
  background: none;
  cursor: pointer;
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--text-tertiary);
  border-radius: 3px;
  opacity: 0.5;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-secondary);
}

[data-platform="ios"] ::-webkit-scrollbar,
[data-platform="android"] ::-webkit-scrollbar {
  display: none;
}

:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.fade-enter-active,
.fade-leave-active {
  transition: opacity var(--transition-normal);
}

.fade-enter-from,
.fade-leave-to {
  opacity: 0;
}

.slide-fade-enter-active {
  transition: all var(--transition-normal) ease-out;
}

.slide-fade-leave-active {
  transition: all var(--transition-fast) cubic-bezier(1, 0.5, 0.8, 1);
}

.slide-fade-enter-from,
.slide-fade-leave-to {
  transform: translateX(20px);
  opacity: 0;
}

.glass-panel {
  background: var(--bg-sidebar);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
}

.no-select {
  user-select: none;
  -webkit-user-select: none;
}

.clickable {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* Naive UI message components - ensure proper display below title bar */
.n-message-container {
  top: 40px !important; /* titlebar 32px + 8px spacing */
}

.n-notification-container {
  top: 40px !important;
}
