/**
 * KeepABC 跨系统切换器样式
 * App Switcher Styles
 */

.app-switcher {
  position: relative;
  display: inline-block;
}

/* 九宫格图标按钮 */
.app-switcher-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: #666;
  cursor: pointer;
  transition: all 0.2s ease;
}

.app-switcher-btn:hover {
  background: rgba(0, 0, 0, 0.05);
  color: #28a7e1;
}

.app-switcher-btn:active {
  transform: scale(0.95);
}

.app-switcher-btn svg {
  width: 22px;
  height: 22px;
}

/* 下拉面板 */
.app-switcher-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 280px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.06);
  padding: 12px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(0.96);
  transform-origin: top right;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 99999;
}

.app-switcher-dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

/* 网格布局 */
.app-switcher-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

/* 单个平台项 */
.app-switcher-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 14px 8px;
  border-radius: 12px;
  text-decoration: none;
  color: #333;
  transition: all 0.2s ease;
  position: relative;
}

.app-switcher-item:hover {
  background: rgba(40, 167, 225, 0.08);
  transform: translateY(-2px);
}

.app-switcher-item:active {
  transform: translateY(0);
}

/* 图标容器 */
.app-switcher-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  transition: transform 0.2s ease;
}

.app-switcher-item:hover .app-switcher-icon {
  transform: scale(1.05);
}

/* 平台名称 */
.app-switcher-name {
  font-size: 12px;
  font-weight: 500;
  text-align: center;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* 当前平台标记 */
.app-switcher-item.active {
  background: rgba(40, 167, 225, 0.1);
}

.app-switcher-item.active .app-switcher-name {
  color: #28a7e1;
  font-weight: 600;
}

.app-switcher-check {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 16px;
  height: 16px;
  background: #28a7e1;
  color: #fff;
  border-radius: 50%;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 响应式调整 */
@media (max-width: 480px) {
  .app-switcher-dropdown {
    min-width: 240px;
    right: -10px;
  }
  
  .app-switcher-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* 暗色模式支持 */
@media (prefers-color-scheme: dark) {
  .app-switcher-dropdown {
    background: #1c1c1e;
    border-color: rgba(255, 255, 255, 0.1);
  }
  
  .app-switcher-item {
    color: #fff;
  }
  
  .app-switcher-item:hover {
    background: rgba(40, 167, 225, 0.2);
  }
  
  .app-switcher-btn {
    color: #999;
  }
  
  .app-switcher-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #28a7e1;
  }
}
