/**
 * 角色详情面板样式
 */

.character-detail-panel {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  overflow: hidden;
}

.character-detail-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('/images/xdda.png');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  z-index: 0;
  opacity: 0;
}

.character-detail-panel.open {
  opacity: 1;
  pointer-events: auto;
}

.detail-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: transparent;
  cursor: url('/images/shubiao.png') 0 0, pointer !important;
  z-index: 2;
}

.detail-content {
  position: relative;
  z-index: 3;
  background: linear-gradient(135deg, rgba(26, 26, 46, 0.5) 0%, rgba(22, 33, 62, 0.5) 100%);
  border: 2px solid #444;
  border-radius: 20px;
  max-width: 900px;
  width: 95%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
  animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 40px;
  backdrop-filter: blur(10px);
}

@keyframes slideUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.detail-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 50%;
  color: #fff;
  font-size: 24px;
  cursor: url('/images/shubiao.png') 0 0, pointer !important;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  z-index: 4;
}

.detail-close-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

.detail-body {
  display: flex;
  gap: 40px;
  padding: 0;
}

.detail-image {
  flex: 0 0 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border-radius: 15px;
  overflow: hidden;
  height: 600px;
}

.detail-character-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 15px;
}

.detail-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.detail-name {
  margin: 0;
  font-size: 36px;
  font-weight: bold;
  color: #fff;
}

.detail-rarity {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: bold;
  text-transform: uppercase;
  width: fit-content;
}

.detail-rarity.rarity-common {
  background: rgba(136, 136, 136, 0.2);
  color: #888;
  border: 1px solid #888;
}

.detail-rarity.rarity-rare {
  background: rgba(74, 144, 226, 0.2);
  color: #4a90e2;
  border: 1px solid #4a90e2;
}

.detail-rarity.rarity-epic {
  background: rgba(155, 89, 182, 0.2);
  color: #9b59b6;
  border: 1px solid #9b59b6;
}

.detail-rarity.rarity-legendary {
  background: rgba(243, 156, 18, 0.2);
  color: #f39c12;
  border: 1px solid #f39c12;
}

.detail-description {
  margin: 0;
  font-size: 16px;
  color: #ccc;
  line-height: 1.6;
}

.detail-attributes {
  margin-top: 8px;
}

.attribute-group h3 {
  margin: 0 0 12px 0;
  font-size: 14px;
  color: #aaa;
  text-transform: uppercase;
}

.attributes-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.attribute-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.attribute-label {
  font-size: 12px;
  color: #999;
  text-transform: uppercase;
}

.attribute-bar {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
}

.attribute-fill {
  height: 100%;
  background: linear-gradient(90deg, #4a90e2, #357abd);
  border-radius: 3px;
  transition: width 0.3s;
}

.attribute-value {
  font-size: 12px;
  color: #4a90e2;
  font-weight: bold;
}

.detail-select-btn {
  padding: 15px 30px;
  background: #4a90e2;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: bold;
  cursor: url('/images/shubiao.png') 0 0, pointer !important;
  transition: all 0.2s;
  margin-top: 12px;
}

.detail-select-btn:hover:not(:disabled) {
  background: #357abd;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
}

.detail-select-btn:disabled {
  background: #666;
  cursor: not-allowed;
  opacity: 0.6;
}

/* 已选择状态 */
.detail-select-btn.selected {
  background: linear-gradient(135deg, #FF9800 0%, #F57C00 100%);
  color: white;
}

.detail-select-btn.selected:hover {
  background: linear-gradient(135deg, #F57C00 0%, #FF9800 100%);
}

/* 响应式设计 */
@media (max-width: 768px) {
  .detail-content {
    max-width: 95%;
    max-height: 90vh;
  }

  .detail-body {
    flex-direction: column;
    padding: 24px;
    gap: 16px;
  }

  .detail-image {
    flex: 0 0 auto;
    width: 100%;
    height: auto;
    max-height: 300px;
  }

  .detail-name {
    font-size: 24px;
  }

  .attributes-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .detail-content {
    max-width: 100%;
    border-radius: 8px 8px 0 0;
    max-height: 85vh;
  }

  .detail-body {
    padding: 16px;
  }

  .detail-name {
    font-size: 20px;
  }

  .detail-description {
    font-size: 13px;
  }

  .detail-close-btn {
    width: 36px;
    height: 36px;
    font-size: 20px;
  }
}
