/* Element Plus Variables */
:root {
  --el-color-primary: #667eea;
  --el-color-primary-light-3: #8aa0f0;
  --el-color-primary-light-5: #a8bbf3;
  --el-color-primary-light-7: #c6d5f6;
  --el-color-primary-light-9: #e4f0f9;
  --el-color-primary-dark-2: #5267d8;
}

/* Dark Theme Variables */
html.dark {
  --el-bg-color: #141414;
  --el-bg-color-page: #0a0a0a;
  --el-text-color-primary: #e5eaf3;
  --el-text-color-regular: #cfd3dc;
  --el-text-color-secondary: #a3a6ad;
  --el-text-color-placeholder: #8d9095;
  --el-text-color-disabled: #6c6e72;
  --el-border-color: #4c4d4f;
  --el-border-color-light: #414243;
  --el-border-color-lighter: #363637;
  --el-border-color-extra-light: #2b2b2c;
  --el-fill-color: #303133;
  --el-fill-color-light: #262727;
  --el-fill-color-lighter: #1d1e1f;
  --el-fill-color-extra-light: #191a1b;
  --el-fill-color-blank: #141414;
  --el-color-info: #909399;
  --el-color-info-light-9: #1e1f21;
  --el-color-info-light-8: #25262a;
  --el-color-info-light-7: #2c2d32;
  --el-color-warning: #e6a23c;
}

/* Light Theme Variables (Default) */
html:not(.dark) {
  --el-bg-color: #ffffff;
  --el-bg-color-page: #f5f7fa;
  --el-text-color-primary: #303133;
  --el-text-color-regular: #606266;
  --el-text-color-secondary: #909399;
  --el-text-color-placeholder: #a8abb2;
  --el-text-color-disabled: #c0c4cc;
  --el-border-color: #dcdfe6;
  --el-border-color-light: #e4e7ed;
  --el-border-color-lighter: #ebeef5;
  --el-border-color-extra-light: #f2f6fc;
  --el-fill-color: #f0f2f5;
  --el-fill-color-light: #f5f7fa;
  --el-fill-color-lighter: #fafafa;
  --el-fill-color-extra-light: #fafcff;
  --el-fill-color-blank: #ffffff;
  --el-color-info: #909399;
  --el-color-info-light-9: #f4f4f5;
  --el-color-info-light-8: #e9e9eb;
  --el-color-info-light-7: #dedfe0;
  --el-color-warning: #e6a23c;
}

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

html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

#app {
  height: 100%;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--el-fill-color-lighter);
}

::-webkit-scrollbar-thumb {
  background: var(--el-border-color);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--el-border-color-light);
}

/* Transitions */
* {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Focus Outline */
*:focus {
  outline: 2px solid var(--el-color-primary);
  outline-offset: 2px;
}

.el-button:focus,
.el-input__inner:focus,
.el-tag:focus {
  outline: none;
}

/* Element Plus Dark Mode Fixes */
html.dark .el-card {
  --el-card-bg-color: var(--el-bg-color);
  --el-card-border-color: var(--el-border-color-lighter);
}

html.dark .el-input {
  --el-input-bg-color: var(--el-fill-color-light);
  --el-input-border-color: var(--el-border-color);
}

html.dark .el-button--primary {
  --el-button-bg-color: var(--el-color-primary);
  --el-button-border-color: var(--el-color-primary);
}

html.dark .el-tag {
  --el-tag-bg-color: var(--el-fill-color);
  --el-tag-border-color: var(--el-border-color);
  --el-tag-text-color: var(--el-text-color-regular);
}

/* Responsive Font Sizes */
@media (max-width: 768px) {
  html {
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  html {
    font-size: 13px;
  }
}
