/* 组件样式 */

/* Toast 提示 */
.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
  max-width: 80%;
  text-align: center;
}

.toast.show {
  opacity: 1;
}

.toast-success {
  background: rgba(76, 175, 80, 0.9);
}

.toast-error {
  background: rgba(244, 67, 54, 0.9);
}

.toast-warning {
  background: rgba(255, 152, 0, 0.9);
}

.toast-loading {
  background: rgba(0, 0, 0, 0.8);
}

/* Modal 弹窗 */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9998;
  opacity: 0;
  transition: opacity 0.3s;
  padding: 20px;
}

.modal.show {
  opacity: 1;
}

.modal-content {
  background: #fff;
  border-radius: 12px;
  width: 100%;
  max-width: 320px;
  overflow: hidden;
  transform: scale(0.9);
  transition: transform 0.3s;
}

.modal.show .modal-content {
  transform: scale(1);
}

.modal-title {
  padding: 20px 20px 10px;
  font-size: 18px;
  font-weight: bold;
  text-align: center;
}

.modal-body {
  padding: 10px 20px 20px;
  font-size: 14px;
  color: var(--text-secondary);
  text-align: center;
}

.modal-footer {
  display: flex;
  border-top: 1px solid var(--border-color);
}

.modal-footer .btn {
  flex: 1;
  border-radius: 0;
  padding: 14px;
  font-size: 16px;
  background: #fff;
  color: var(--text-color);
}

.modal-footer .btn-confirm {
  color: var(--primary-color);
  font-weight: bold;
  border-left: 1px solid var(--border-color);
}

.modal-footer .btn-cancel {
  color: var(--text-secondary);
}

/* Loading 遮罩 */
.loading-mask {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s;
}

.loading-mask.show {
  opacity: 1;
}

.loading-content {
  background: rgba(0, 0, 0, 0.8);
  border-radius: 12px;
  padding: 20px 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.loading-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

.loading-text {
  color: #fff;
  font-size: 14px;
  margin-top: 12px;
}

/* 作品卡片 */
.work-card {
  display: block;
  background: #fff;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-bottom: 12px;
}

.work-cover {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: #f0f0f0;
}

.work-info {
  padding: 12px;
}

.work-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-color);
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.work-time {
  font-size: 12px;
  color: var(--text-light);
}

/* 功能卡片 */
.feature-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: #fff;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  text-align: center;
  transition: transform 0.2s;
}

.feature-card:active {
  transform: scale(0.95);
}

.feature-icon {
  font-size: 36px;
  margin-bottom: 8px;
}

.feature-name {
  font-size: 14px;
  color: var(--text-color);
}

/* 用户信息卡片 */
.user-card {
  display: flex;
  align-items: center;
  padding: 20px;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: #fff;
}

.user-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  margin-right: 16px;
  overflow: hidden;
}

.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-info {
  flex: 1;
}

.user-name {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 4px;
}

.user-id {
  font-size: 12px;
  opacity: 0.8;
}

/* 菜单列表 */
.menu-list {
  background: #fff;
  border-radius: var(--border-radius);
  overflow: hidden;
}

.menu-item {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
}

.menu-item:last-child {
  border-bottom: none;
}

.menu-icon {
  font-size: 24px;
  margin-right: 16px;
}

.menu-content {
  flex: 1;
}

.menu-title {
  font-size: 16px;
  color: var(--text-color);
}

.menu-desc {
  font-size: 12px;
  color: var(--text-light);
  margin-top: 2px;
}

.menu-arrow {
  color: var(--text-light);
  font-size: 18px;
}
