/* 徽章墙样式 */
.badge-wall-section {
  background: white;
  border-radius: 16px;
  padding: 24px;
  margin-top: 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.badge-wall-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid #f0f0f0;
}

.badge-wall-title {
  font-size: 24px;
  font-weight: bold;
  background: linear-gradient(135deg, #1E3A8A, #3B82F6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.badge-share-btn {
  padding: 8px 16px;
  background: linear-gradient(135deg, #06B6D4, #3B82F6);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  transition: transform 0.3s;
}

.badge-share-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.badge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 24px;
}

.badge-item {
  text-align: center;
  cursor: pointer;
  transition: transform 0.3s;
  padding: 16px;
  border-radius: 12px;
  background: #f8f9fa;
}

.badge-item:hover {
  transform: translateY(-4px);
  background: linear-gradient(135deg, rgba(30,58,138,0.05), rgba(59,130,246,0.05));
}

.badge-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.badge-icon img {
  width: 60px;
  height: 60px;
  object-fit: contain;
}

.badge-emoji {
  font-size: 40px;
}

.badge-name {
  font-weight: 600;
  color: #333;
  margin-bottom: 4px;
  font-size: 14px;
}

.badge-date {
  font-size: 12px;
  color: #999;
}

.badge-empty {
  text-align: center;
  padding: 60px 20px;
}

.empty-icon {
  font-size: 64px;
  margin-bottom: 16px;
  opacity: 0.3;
}

.empty-text {
  font-size: 18px;
  color: #666;
  margin-bottom: 8px;
}

.empty-hint {
  font-size: 14px;
  color: #999;
}

/* 徽章详情弹窗 */
.badge-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: fadeIn 0.3s;
}

.badge-modal-content {
  background: white;
  border-radius: 20px;
  padding: 32px;
  max-width: 400px;
  width: 90%;
  position: relative;
  animation: slideUp 0.3s;
}

.badge-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f0f0f0;
  border-radius: 50%;
  cursor: pointer;
  font-size: 20px;
  transition: background 0.3s;
}

.badge-modal-close:hover {
  background: #e0e0e0;
}

.badge-modal-icon {
  width: 120px;
  height: 120px;
  margin: 0 auto 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(30,58,138,0.1), rgba(59,130,246,0.1));
  border-radius: 50%;
}

.badge-modal-icon img {
  width: 80px;
  height: 80px;
}

.badge-modal-content h2 {
  text-align: center;
  margin-bottom: 16px;
  color: #1E3A8A;
}

.badge-description {
  text-align: center;
  color: #666;
  margin-bottom: 24px;
  line-height: 1.6;
}

.badge-meta {
  padding-top: 16px;
  border-top: 1px solid #f0f0f0;
  font-size: 14px;
  color: #999;
}

.badge-meta div {
  margin-top: 8px;
}

/* 完成动画 */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@keyframes celebration {
  0% { transform: scale(0) rotate(0deg); opacity: 0; }
  50% { transform: scale(1.2) rotate(180deg); opacity: 1; }
  100% { transform: scale(1) rotate(360deg); opacity: 1; }
}

.badge-celebration {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10001;
  animation: celebration 0.6s ease-out;
}

.badge-celebration-icon {
  width: 200px;
  height: 200px;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.badge-celebration-icon img {
  width: 120px;
  height: 120px;
}

.badge-celebration-text {
  position: absolute;
  bottom: -60px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #1E3A8A, #3B82F6);
  color: white;
  padding: 12px 24px;
  border-radius: 24px;
  font-weight: bold;
  white-space: nowrap;
  animation: slideUp 0.5s ease-out 0.3s both;
}

/* 确保徽章图片正确显示 */
.badge-icon img {
  width: 60px;
  height: 60px;
  object-fit: contain;
}

.badge-emoji {
  font-size: 40px;
}

/* 强制网格布局 */
.badge-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)) !important;
  gap: 24px !important;
}
