/**
 * 众水不灭 · 雅歌之印
 * 文件名: css/pet.css
 * 作用: 恩典灵宠悬浮挂件、神圣光环与喂养交互弹窗样式
 */

/* 悬浮灵宠微标 */
.grace-pet-widget {
  position: fixed;
  bottom: 100px;
  right: 24px;
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  user-select: none;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.grace-pet-widget:hover {
  transform: scale(1.1) translateY(-4px);
}

.grace-pet-avatar {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #fef08a, #f59e0b 60%, #b45309 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.6), inset 0 0 10px rgba(255, 255, 255, 0.8);
  position: relative;
  animation: petFloat 3s ease-in-out infinite alternate;
}

.grace-pet-halo {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1.5px dashed rgba(253, 230, 138, 0.7);
  animation: haloRotate 12s linear infinite;
  pointer-events: none;
}

.grace-pet-badge {
  margin-top: 4px;
  background: rgba(3, 7, 18, 0.85);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fde68a;
  font-size: 10.5px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.4);
  letter-spacing: 0.5px;
}

@keyframes petFloat {
  0% { transform: translateY(0px) rotate(-2deg); }
  100% { transform: translateY(-8px) rotate(3deg); }
}

@keyframes haloRotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* 灵宠互动弹窗 */
.grace-pet-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(3, 7, 18, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.grace-pet-dialog {
  width: 100%;
  max-width: 460px;
  background: linear-gradient(180deg, #131b2e 0%, #090d16 100%);
  border: 1.5px solid rgba(245, 158, 11, 0.35);
  border-radius: 24px;
  padding: 26px 22px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.7), 0 0 35px rgba(245, 158, 11, 0.25);
  position: relative;
  color: #f8fafc;
  max-height: 85vh;
  overflow-y: auto;
}

.grace-pet-dialog-close {
  position: absolute;
  top: 16px;
  right: 18px;
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 20px;
  cursor: pointer;
  padding: 4px 8px;
}

.grace-pet-dialog-close:hover { color: #fff; }

.grace-pet-card-header {
  text-align: center;
  margin-bottom: 20px;
}

.grace-pet-big-avatar {
  width: 76px;
  height: 76px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #fef08a, #f59e0b 60%, #b45309 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 38px;
  box-shadow: 0 0 28px rgba(245, 158, 11, 0.7);
}

.grace-pet-name {
  font-size: 18px;
  font-weight: 900;
  color: #fff;
  margin-bottom: 4px;
}

.grace-pet-sub {
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.4;
}

/* 能量光芒统计条 */
.grace-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

.grace-stat-box {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 10px;
  text-align: center;
}

.grace-stat-val {
  font-size: 16px;
  font-weight: 900;
  color: #fde68a;
  margin-bottom: 2px;
}

.grace-stat-lbl {
  font-size: 10.5px;
  color: #94a3b8;
}

/* 喂养操作舱 */
.grace-action-section {
  background: rgba(3, 7, 18, 0.6);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 18px;
}

.grace-action-title {
  font-size: 13px;
  font-weight: 800;
  color: #fde68a;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.grace-textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 10px;
  color: #fff;
  font-size: 13px;
  resize: none;
  box-sizing: border-box;
  margin-bottom: 10px;
}

.grace-textarea:focus {
  outline: none;
  border-color: #f59e0b;
}

.grace-feed-btn {
  width: 100%;
  padding: 10px;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  border: none;
  border-radius: 12px;
  color: #fff;
  font-size: 13.5px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
  transition: transform 0.2s;
}

.grace-feed-btn:active { transform: scale(0.98); }

.grace-sacrifice-btn {
  width: 100%;
  margin-top: 10px;
  padding: 10px;
  background: rgba(244, 63, 94, 0.15);
  border: 1px solid rgba(244, 63, 94, 0.4);
  border-radius: 12px;
  color: #fb7185;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s;
}

.grace-sacrifice-btn:hover {
  background: rgba(244, 63, 94, 0.25);
  color: #fff;
}

/* 感恩足迹日志列表 */
.grace-log-list {
  max-height: 160px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.grace-log-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 12px;
  color: #cbd5e1;
  line-height: 1.4;
}

.grace-log-item span {
  display: block;
  font-size: 10px;
  color: #64748b;
  margin-top: 2px;
}
