/**
 * 公共样式文件
 * 包含项目中通用的样式定义
 */

/* iOS 设备显示控制 */
.js-show-ios {
  display: none !important;
}

/* Android 设备显示控制 */
.js-show-android {
  display: none !important;
}

/* 通用工具类 */
.txt-hidden {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 通用动画 */
.fade-in {
  animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.slide-up {
  animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* 通用按钮样式 */
.btn-primary {
  background: #ff4366;
  color: #fff;
  border: none;
  border-radius: 0.12rem;
  padding: 0.24rem 0.48rem;
  font-size: 0.28rem;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-primary:hover {
  background: #e12859;
}

.btn-primary:active {
  background: #c01d4a;
}

/* 通用输入框样式 */
.input-field {
  width: 100%;
  height: 0.88rem;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 0.12rem;
  padding: 0 0.24rem;
  font-size: 0.28rem;
  color: #fff;
  outline: none;
}

.input-field::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

/* 移除所有 input 和 textarea 的选中样式 */
input:focus,
input:active,
textarea:focus,
textarea:active {
  outline: none !important;
  border: none !important;
  box-shadow: none !important;
}

/* 通用卡片样式 */
.card {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 0.12rem;
  padding: 0.24rem;
  margin-bottom: 0.24rem;
}

/* 通用加载动画 */
.loading {
  display: inline-block;
  width: 0.4rem;
  height: 0.4rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ff4366;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* 通用遮罩层 */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1000;
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.overlay.show {
  display: block;
  opacity: 1;
}

/* 响应式工具类 */
@media (max-width: 768px) {
  .hide-mobile {
    display: none !important;
  }
}

@media (min-width: 769px) {
  .hide-desktop {
    display: none !important;
  }
}
