/**
 * 角色管理页面主样式
 */

@import url('character-card.css');
@import url('character-carousel.css');
@import url('character-detail.css');

* {
  box-sizing: border-box;
  cursor: url('/images/shubiao.png') 0 0, auto !important;
}

body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: #0f0f1e;
  color: #fff;
  cursor: url('/images/shubiao.png') 0 0, auto !important;
}

.character-management-app {
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(135deg, #0f0f1e 0%, #1a1a2e 100%);
  position: relative;
  overflow: hidden;
}

/* 背景壁纸 */
.character-management-app::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('/images/xdda.png');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  opacity: 0.6;
  z-index: 0;
  pointer-events: none;
}

/* 确保内容显示在背景之上 */
.character-management-app > * {
  position: relative;
  z-index: 2;
}

/* 头部 */
.character-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  gap: 16px;
}

.back-button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: #4a90e2;
  border: none;
  border-radius: 6px;
  color: white;
  cursor: url('/images/shubiao.png') 0 0, pointer !important;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
}

.back-button:hover {
  background: #357abd;
  transform: translateY(-2px);
}

.back-icon {
  font-size: 18px;
}

.back-text {
  display: none;
}

@media (min-width: 768px) {
  .back-text {
    display: inline;
  }
}

.page-title {
  margin: 0;
  font-size: 28px;
  font-weight: 900;
  flex: 1;
  text-align: center;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  background: linear-gradient(135deg, #ff6b9d 0%, #c44569 50%, #8b0000 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 30px rgba(139, 0, 0, 0.3);
  filter: drop-shadow(0 0 8px rgba(255, 107, 157, 0.4)) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
  font-family: 'Georgia', 'Garamond', serif;
  font-style: italic;
  transition: all 0.3s ease;
}

.header-spacer {
  width: 80px;
}

/* 主容器 */
.character-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow: visible;
}

/* 加载指示器 */
.loading-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: #ccc;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid rgba(255, 255, 255, 0.1);
  border-top-color: #4a90e2;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* 错误提示 */
.error-message {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 40px;
  background: rgba(220, 53, 69, 0.1);
  border: 1px solid rgba(220, 53, 69, 0.3);
  border-radius: 8px;
  color: #ff6b6b;
  max-width: 400px;
}

.error-message p {
  margin: 0;
  text-align: center;
}

.retry-button {
  padding: 10px 20px;
  background: #4a90e2;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: url('/images/shubiao.png') 0 0, pointer !important;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
}

.retry-button:hover {
  background: #357abd;
  transform: translateY(-2px);
}

/* 空状态 */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: #999;
}

.empty-icon {
  font-size: 64px;
  opacity: 0.5;
}

.empty-text {
  margin: 0;
  font-size: 18px;
}

/* 轮播容器 */
.carousel-container {
  width: 100%;
  max-width: 1400px;
}

/* 响应式设计 */
@media (max-width: 1024px) {
  .character-header {
    padding: 12px 16px;
  }

  .page-title {
    font-size: 20px;
  }

  .character-main {
    padding: 16px;
  }
}

@media (max-width: 768px) {
  .character-header {
    padding: 12px 16px;
  }

  .page-title {
    font-size: 18px;
  }

  .header-spacer {
    display: none;
  }

  .character-main {
    padding: 12px;
  }

  .carousel-container {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .character-header {
    padding: 8px 12px;
  }

  .page-title {
    font-size: 16px;
  }

  .character-main {
    padding: 8px;
  }

  .error-message {
    padding: 24px 16px;
    max-width: 100%;
  }

  .empty-icon {
    font-size: 48px;
  }

  .empty-text {
    font-size: 16px;
  }
}

/* 滚动条样式 */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}

::-webkit-scrollbar-thumb {
  background: rgba(74, 144, 226, 0.3);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(74, 144, 226, 0.5);
}

/* 焦点样式 */
:focus-visible {
  outline: 2px solid #4a90e2;
  outline-offset: 2px;
}

/* 可点击元素的自定义鼠标皮肤 */
a, button, input[type="button"], input[type="submit"], select, .clickable {
  cursor: url('/images/shubiao.png') 0 0, pointer !important;
}

/* 禁用文本选择 */
.character-card,
.detail-close-btn,
.back-button,
.retry-button {
  user-select: none;
  -webkit-user-select: none;
}

/* 烟雾容器 - 显示在背景之上但内容之下 */
.smoke-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}
