/**
 * FastValue - 高性能数据更新库
 * 默认样式表
 * @version 1.0.0
 */

/* ============================================
   基础输入框样式
   ============================================ */

.fv-input {
  /* 移除所有边框和轮廓 */
  border: none;
  outline: none;
  background: transparent;
  
  /* 继承字体 */
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
  
  /* 移除默认样式 */
  padding: 0;
  margin: 0;
  width: 100%;
  
  /* 禁止用户交互 */
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  
  /* 隐藏光标 */
  caret-color: transparent;
  
  /* 确保不可调整大小 */
  resize: none;
  
  /* 移除IE的清除按钮 */
  &::-ms-clear,
  &::-ms-reveal {
    display: none;
  }
  
  /* 移除Webkit的自动填充样式 */
  &:-webkit-autofill,
  &:-webkit-autofill:hover,
  &:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0px 1000px transparent inset;
    transition: background-color 5000s ease-in-out 0s;
  }
}

/* 聚焦状态 - 确保无样式 */
.fv-input:focus {
  border: none;
  outline: none;
  box-shadow: none;
}

/* ============================================
   更新动画效果
   ============================================ */

/* 更新中状态 */
.fv-updating {
  animation: fv-pulse 0.3s ease-in-out;
}

/* 更新完成状态 */
.fv-updated {
  animation: fv-flash 0.3s ease-out;
}

/* 脉冲动画 */
@keyframes fv-pulse {
  0% { opacity: 1; }
  50% { opacity: 0.6; }
  100% { opacity: 1; }
}

/* 闪烁动画 */
@keyframes fv-flash {
  0% { 
    background-color: rgba(0, 212, 255, 0.3);
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.8);
  }
  100% { 
    background-color: transparent;
    text-shadow: none;
  }
}

/* ============================================
   预设样式主题
   ============================================ */

/* 数字显示样式 */
.fv-number {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
  letter-spacing: -0.02em;
}

/* 大数字样式 */
.fv-large {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.2;
}

/* 中等数字样式 */
.fv-medium {
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.3;
}

/* 小数字样式 */
.fv-small {
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.4;
}

/* 货币样式 */
.fv-currency {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

/* 百分比样式 */
.fv-percent {
  font-variant-numeric: tabular-nums;
}

/* ============================================
   颜色主题
   ============================================ */

/* 主色调 */
.fv-primary {
  color: #00d4ff;
}

/* 成功色 */
.fv-success {
  color: #10ac84;
}

/* 警告色 */
.fv-warning {
  color: #f39c12;
}

/* 危险色 */
.fv-danger {
  color: #ff6b6b;
}

/* 中性色 */
.fv-neutral {
  color: #888;
}

/* 亮色（用于暗色背景） */
.fv-light {
  color: #fff;
}

/* 暗色（用于亮色背景） */
.fv-dark {
  color: #333;
}

/* ============================================
   数据卡片样式
   ============================================ */

.fv-card {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.fv-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.fv-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.fv-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.fv-card-title {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.7;
}

.fv-card-value {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.fv-card-unit {
  font-size: 0.9rem;
  opacity: 0.6;
}

.fv-card-change {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
  margin-top: 8px;
  padding: 4px 8px;
  border-radius: 12px;
  font-weight: 500;
}

.fv-card-change.positive {
  background: rgba(16, 172, 132, 0.2);
  color: #1dd1a1;
}

.fv-card-change.negative {
  background: rgba(255, 107, 107, 0.2);
  color: #ff6b6b;
}

/* ============================================
   网格布局
   ============================================ */

.fv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}

.fv-grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.fv-grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.fv-grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 768px) {
  .fv-grid-2,
  .fv-grid-3,
  .fv-grid-4 {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   统计面板样式
   ============================================ */

.fv-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
}

.fv-stat-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.fv-stat-label {
  font-size: 0.75rem;
  opacity: 0.6;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.fv-stat-value {
  font-size: 1.1rem;
  font-weight: 600;
  color: #00d4ff;
}

/* ============================================
   仪表盘样式
   ============================================ */

.fv-dashboard {
  padding: 24px;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  min-height: 100vh;
  color: #fff;
}

.fv-dashboard-header {
  margin-bottom: 32px;
}

.fv-dashboard-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 8px;
  background: linear-gradient(90deg, #00d4ff, #7b2cbf);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.fv-dashboard-subtitle {
  font-size: 0.9rem;
  opacity: 0.6;
}

/* ============================================
   实时指示器
   ============================================ */

.fv-indicator {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 12px 20px;
  background: rgba(0, 212, 255, 0.9);
  color: #000;
  border-radius: 8px;
  font-weight: 600;
  opacity: 0;
  transform: translateY(-20px);
  transition: all 0.3s ease;
  z-index: 1000;
  pointer-events: none;
}

.fv-indicator.show {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   控制面板
   ============================================ */

.fv-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 20px 0;
}

.fv-btn {
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.fv-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.fv-btn-primary {
  background: linear-gradient(135deg, #00d4ff, #0099cc);
}

.fv-btn-primary:hover {
  box-shadow: 0 8px 20px rgba(0, 212, 255, 0.3);
}

.fv-btn-danger {
  background: rgba(255, 107, 107, 0.2);
  color: #ff6b6b;
}

.fv-btn-danger:hover {
  background: rgba(255, 107, 107, 0.3);
}

/* ============================================
   加载状态
   ============================================ */

.fv-loading {
  position: relative;
  overflow: hidden;
}

.fv-loading::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.1),
    transparent
  );
  animation: fv-shimmer 1.5s infinite;
}

@keyframes fv-shimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* ============================================
   工具类
   ============================================ */

.fv-text-center { text-align: center; }
.fv-text-left { text-align: left; }
.fv-text-right { text-align: right; }

.fv-m-0 { margin: 0; }
.fv-m-1 { margin: 0.25rem; }
.fv-m-2 { margin: 0.5rem; }
.fv-m-3 { margin: 1rem; }
.fv-m-4 { margin: 1.5rem; }
.fv-m-5 { margin: 3rem; }

.fv-p-0 { padding: 0; }
.fv-p-1 { padding: 0.25rem; }
.fv-p-2 { padding: 0.5rem; }
.fv-p-3 { padding: 1rem; }
.fv-p-4 { padding: 1.5rem; }
.fv-p-5 { padding: 3rem; }

.fv-d-inline { display: inline; }
.fv-d-block { display: block; }
.fv-d-inline-block { display: inline-block; }
.fv-d-flex { display: flex; }
.fv-d-grid { display: grid; }
.fv-d-none { display: none; }
