
/* ==================== 豪华3D表单样式 ==================== */
/* rem适配 - 基准设计稿430px, 1rem = 43px */

/* 豪华表单容器 */
.luxury-form {
  max-width: 18.605rem;
  margin: 0 auto;
  perspective: 23.256rem;
}

.luxury-section {
  background: linear-gradient(145deg, #ffffff 0%, #fff8f0 100%);
  border-radius: 0.558rem;
  padding: 0.744rem;
  margin-bottom: 0.558rem;
  box-shadow: 
    0 0.233rem 0.930rem rgba(255, 107, 53, 0.1),
    0 0.047rem 0.186rem rgba(0, 0, 0, 0.05);
  border: 0.023rem solid rgba(255, 107, 53, 0.1);
  position: relative;
  overflow: hidden;
}

.luxury-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 0.093rem;
  background: linear-gradient(90deg, #ff6b35, #f7931e, #ffb347, #ff6b35);
  background-size: 300% 100%;
  animation: gradientShift 4s ease infinite;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* 章节标题 */
.section-title {
  font-size: 0.465rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 0.558rem;
  display: flex;
  align-items: center;
  gap: 0.279rem;
}

.title-icon {
  font-size: 0.651rem;
  animation: iconFloat 3s ease-in-out infinite;
}

@keyframes iconFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-0.116rem); }
}

/* 浮动标签输入框 */
.floating-input-group {
  position: relative;
  width: 100%;
}

.luxury-input {
  width: 100%;
  padding: 0.651rem 0.465rem 0.279rem 1.209rem;
  font-size: var(--font-size-xs, 0.279rem);
  border: 0.116rem solid #fed7c2;
  border-radius: 0.372rem;
  background: linear-gradient(145deg, #ffffff 0%, #fff8f0 100%);
  color: #1f2937;
  transition: all 0.3s ease;
  outline: none;
}

.luxury-input:focus {
  border-color: #ff6b35;
  box-shadow: 0 0 0.698rem rgba(255, 107, 53, 0.3);
  transform: translateY(-0.047rem);
}

.floating-label {
  position: absolute;
  left: 1.209rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.372rem;
  color: #9ca3af;
  pointer-events: none;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.186rem;
  transform-origin: left center;
}

.label-icon {
  font-size: 0.465rem;
  opacity: 0.7;
  transition: all 0.3s ease;
}

/* 输入框聚焦或有内容时 - 标签上浮 */
.luxury-input:focus ~ .floating-label,
.luxury-input:not(:placeholder-shown) ~ .floating-label,
.floating-input-group.has-content .floating-label {
  top: 0.326rem;
  transform: translateY(0) scale(0.85);
  font-size: 0.279rem;
  color: #ff6b35;
  font-weight: 600;
}

.luxury-input:focus ~ .floating-label .label-icon,
.luxury-input:not(:placeholder-shown) ~ .floating-label .label-icon,
.floating-input-group.has-content .floating-label .label-icon {
  font-size: 0.326rem;
}

.input-glow {
  position: absolute;
  inset: -0.047rem;
  border-radius: 0.419rem;
  background: linear-gradient(135deg, #ff6b35, #f7931e, #ffb347);
  opacity: 0;
  z-index: -1;
  transition: opacity 0.3s ease;
  filter: blur(0.186rem);
}

.luxury-input:focus ~ .input-glow {
  opacity: 0.5;
}

/* 3D宠物类型卡片选择器 */
.card-selector-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.465rem;
}

.type-card-3d {
  position: relative;
  cursor: pointer;
  perspective: 11.628rem;
  height: 3.256rem;
  z-index: 1;
}

.card-3d-inner {
  position: relative;
  width: 100%;
  height: 100%;
  background: linear-gradient(145deg, #ffffff 0%, #fff8f0 100%);
  border-radius: 0.465rem;
  border: 0.070rem solid #fed7c2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.279rem;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  transform-style: preserve-3d;
  box-shadow: 
    0 0.233rem 0.698rem rgba(0, 0, 0, 0.1),
    inset 0 0.023rem 0 rgba(255, 255, 255, 0.8);
  pointer-events: auto;
}

.type-card-3d:hover .card-3d-inner {
  transform: rotateY(10deg) rotateX(-5deg) translateZ(0.465rem);
  border-color: #ff6b35;
  box-shadow: 
    0 0.465rem 0.930rem rgba(255, 107, 53, 0.3),
    inset 0 0.023rem 0 rgba(255, 255, 255, 0.8);
}

.type-card-3d.selected .card-3d-inner {
  background: linear-gradient(145deg, #fff0e6 0%, #ffe4d6 100%);
  border-color: #ff6b35;
  border-width: 0.093rem;
  transform: scale(1.05) translateZ(0.698rem);
  box-shadow: 
    0 0.581rem 1.163rem rgba(255, 107, 53, 0.4),
    inset 0 0.047rem 0 rgba(255, 255, 255, 0.8);
}

.card-icon {
  font-size: 1.116rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-name {
  font-size: 0.372rem;
  font-weight: 700;
  color: #374151;
  text-align: center;
}

.type-card-3d.selected .card-name {
  color: #ff6b35;
}

.card-glow {
  position: absolute;
  inset: -0.093rem;
  border-radius: 0.558rem;
  background: linear-gradient(135deg, #ff6b35, #f7931e);
  opacity: 0;
  z-index: -2;
  filter: blur(0.349rem);
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.type-card-3d.selected .card-glow {
  opacity: 0.6;
}

/* 3D性别选择器 */
.gender-3d-selector {
  display: flex;
  gap: 0.698rem;
  justify-content: center;
}

.gender-3d-btn {
  position: relative;
  width: 2.326rem;
  height: 2.326rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.gender-icon {
  font-size: 0.837rem;
  line-height: 1;
  margin-bottom: 0.093rem;
  position: relative;
  z-index: 2;
  transition: transform 0.3s ease;
}

.gender-label {
  font-size: 0.326rem;
  font-weight: 600;
  color: #374151;
  position: relative;
  z-index: 2;
}

.gender-3d-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(145deg, #ffffff 0%, #fff8f0 100%);
  border-radius: 50%;
  border: 0.093rem solid #fed7c2;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 
    0 0.233rem 0.698rem rgba(0, 0, 0, 0.1),
    inset 0 0.047rem 0.093rem rgba(255, 255, 255, 0.8);
  z-index: 0;
}

.gender-3d-btn:hover::before {
  transform: scale(1.1);
  border-color: #ff6b35;
  box-shadow: 
    0 0.349rem 0.814rem rgba(255, 107, 53, 0.3),
    inset 0 0.047rem 0.093rem rgba(255, 255, 255, 0.8);
}

.gender-3d-btn.selected::before {
  background: linear-gradient(145deg, #fff0e6 0%, #ffe4d6 100%);
  border-color: #ff6b35;
  transform: scale(1.1);
  box-shadow: 
    0 0.465rem 0.930rem rgba(255, 107, 53, 0.4),
    inset 0 0.047rem 0.093rem rgba(255, 255, 255, 0.8);
}

.gender-ring {
  position: absolute;
  inset: -0.186rem;
  border: 0.070rem dashed #ff6b35;
  border-radius: 50%;
  opacity: 0;
  animation: ringRotate 10s linear infinite;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.gender-3d-btn.selected .gender-ring {
  opacity: 1;
}

@keyframes ringRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.gender-3d-btn:hover .gender-icon {
  transform: scale(1.2);
}

/* 3D尾巴状态选择器 */
.tail-3d-options {
  display: flex;
  gap: 0.558rem;
  justify-content: center;
}

.tail-3d-card {
  position: relative;
  width: 3.256rem;
  height: 3.256rem;
  cursor: pointer;
  z-index: 1;
}

.tail-visual {
  position: relative;
  width: 100%;
  height: 1.86rem;
  background: linear-gradient(145deg, #ffffff 0%, #fff8f0 100%);
  border-radius: 0.372rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0.070rem solid #fed7c2;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 0.186rem 0.581rem rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.tail-svg {
  width: 1.86rem;
  height: 1.116rem;
}

.tail-curve {
  stroke-dasharray: 100;
  stroke-dashoffset: 0;
}

.tail-curve.broken {
  animation: none;
}

.tail-none {
  font-size: 0.744rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.no-tail-icon {
  opacity: 0.5;
}

.tail-label {
  text-align: center;
  margin-top: 0.279rem;
  font-size: 0.326rem;
  font-weight: 600;
  color: #374151;
  transition: color 0.3s ease;
}

.tail-shadow {
  position: absolute;
  bottom: -0.233rem;
  left: 10%;
  right: 10%;
  height: 0.465rem;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  filter: blur(0.186rem);
  transition: all 0.3s ease;
  z-index: -1;
  pointer-events: none;
}

.tail-3d-card:hover .tail-visual {
  transform: translateY(-0.116rem);
  border-color: #ff6b35;
  box-shadow: 0 0.465rem 0.930rem rgba(255, 107, 53, 0.25);
}

.tail-3d-card:hover .tail-shadow {
  transform: scale(0.9);
  opacity: 0.6;
}

.tail-3d-card.selected .tail-visual {
  background: linear-gradient(145deg, #fff0e6 0%, #ffe4d6 100%);
  border-color: #ff6b35;
  border-width: 0.093rem;
  transform: scale(1.05);
  box-shadow: 0 0.465rem 0.930rem rgba(255, 107, 53, 0.35);
}

.tail-3d-card.selected .tail-label {
  color: #ff6b35;
  font-weight: 700;
}

/* 豪华上传区域 */
.upload-luxury {
  position: relative;
}

.upload-3d-zone {
  position: relative;
  height: 4.651rem;
  background: linear-gradient(145deg, #ffffff 0%, #fff8f0 100%);
  border: 0.070rem dashed #fed7c2;
  border-radius: 0.558rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.4s ease;
}

.upload-halo {
  position: absolute;
  inset: -50%;
  background: radial-gradient(circle, rgba(255, 107, 53, 0.1) 0%, transparent 70%);
  animation: haloPulse 3s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

@keyframes haloPulse {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.1); opacity: 1; }
}

.upload-3d-zone:hover {
  border-color: #ff6b35;
  border-style: solid;
  box-shadow: 0 0.465rem 1.163rem rgba(255, 107, 53, 0.2);
  transform: translateY(-0.116rem);
}

.upload-content-3d {
  position: relative;
  z-index: 2;
  text-align: center;
}

/* 3D旋转立方体图标 */
.upload-icon-3d {
  width: 1.395rem;
  height: 1.395rem;
  margin: 0 auto 0.372rem;
  perspective: 4.651rem;
}

.icon-cube {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  animation: cubeRotate 8s linear infinite;
}

@keyframes cubeRotate {
  from { transform: rotateX(0deg) rotateY(0deg); }
  to { transform: rotateX(360deg) rotateY(360deg); }
}

.cube-face {
  position: absolute;
  width: 1.395rem;
  height: 1.395rem;
  background: linear-gradient(145deg, #fff8f0 0%, #ffe4d6 100%);
  border: 0.047rem solid #fed7c2;
  border-radius: 0.279rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.651rem;
  backface-visibility: hidden;
}

.cube-face.front  { transform: translateZ(0.698rem); }
.cube-face.back   { transform: rotateY(180deg) translateZ(0.698rem); }
.cube-face.right  { transform: rotateY(90deg) translateZ(0.698rem); }
.cube-face.left   { transform: rotateY(-90deg) translateZ(0.698rem); }
.cube-face.top    { transform: rotateX(90deg) translateZ(0.698rem); }
.cube-face.bottom { transform: rotateX(-90deg) translateZ(0.698rem); }

.upload-text {
  font-size: 0.419rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.186rem;
}

.upload-hint-3d {
  font-size: 0.302rem;
  color: #9ca3af;
  padding: 0.093rem 0.279rem;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 0.465rem;
}

.preview-image-3d {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0.558rem;
}

.preview-container {
  position: absolute;
  inset: 0;
  border-radius: 0.558rem;
  overflow: hidden;
}

.preview-container .preview-image-3d {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preview-close-btn {
  position: absolute;
  top: 0.233rem;
  right: 0.233rem;
  width: 0.744rem;
  height: 0.744rem;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 0.419rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 10;
}

.preview-close-btn:hover {
  background: rgba(239, 68, 68, 0.9);
  transform: scale(1.1);
}

.upload-tip {
  display: block;
  margin-top: 0.186rem;
  font-size: 0.279rem;
  color: #ff6b35;
  font-weight: 500;
}

/* 性格特点 - 星系风格 */
.personality-galaxy {
  display: flex;
  flex-wrap: wrap;
  gap: 0.465rem;
  justify-content: center;
}

.personality-star {
  position: relative;
  width: 2.093rem;
  height: 2.093rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  z-index: 1;
}

.star-core {
  width: 1.395rem;
  height: 1.395rem;
  background: linear-gradient(145deg, #ffffff 0%, #fff8f0 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.651rem;
  border: 0.070rem solid #fed7c2;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  z-index: 2;
  box-shadow: 0 0.116rem 0.465rem rgba(0, 0, 0, 0.1);
  line-height: 1;
}

.star-glow {
  position: absolute;
  width: 1.395rem;
  height: 1.395rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 107, 53, 0.6) 0%, transparent 70%);
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 1;
  pointer-events: none;
  top: 0;
}

.star-label {
  margin-top: 0.186rem;
  font-size: 0.302rem;
  font-weight: 600;
  color: #374151;
  transition: all 0.3s ease;
  text-align: center;
}

.personality-star:hover .star-core {
  transform: scale(1.1);
  border-color: #ff6b35;
}

.personality-star:hover .star-glow {
  opacity: 0.6;
  transform: scale(1.5);
}

.personality-star.selected .star-core {
  background: linear-gradient(145deg, #ff6b35 0%, #f7931e 100%);
  border-color: #ff6b35;
  transform: scale(1.05);
  box-shadow: 0 0.233rem 0.698rem rgba(255, 107, 53, 0.4);
}

.personality-star.selected .star-glow {
  opacity: 1;
  transform: scale(1.8);
}

.personality-star.selected .star-label {
  color: #ff6b35;
  font-weight: 700;
}

/* 3D保存按钮 */
.luxury-actions {
  display: flex;
  justify-content: center;
  margin-top: 0.930rem;
}

.btn-3d-save {
  position: relative;
  padding: 0.465rem 1.395rem;
  font-size: 0.419rem;
  font-weight: 700;
  color: white;
  background: linear-gradient(145deg, #ff6b35 0%, #f7931e 100%);
  border: none;
  border-radius: 1.163rem;
  cursor: pointer;
  overflow: hidden;
  box-shadow: 
    0 0.349rem 0.814rem rgba(255, 107, 53, 0.4),
    0 0.116rem 0.349rem rgba(0, 0, 0, 0.2),
    inset 0 0.023rem 0 rgba(255, 255, 255, 0.3);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  transform-style: preserve-3d;
}

.btn-3d-save::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(145deg, rgba(255,255,255,0.2) 0%, transparent 100%);
  border-radius: 1.163rem;
}

.btn-3d-save:hover {
  transform: translateY(-0.116rem) scale(1.05);
  box-shadow: 
    0 0.581rem 1.163rem rgba(255, 107, 53, 0.5),
    0 0.233rem 0.465rem rgba(0, 0, 0, 0.2),
    inset 0 0.023rem 0 rgba(255, 255, 255, 0.3);
}

.btn-3d-save:active {
  transform: translateY(-0.047rem) scale(1.02);
}

.btn-3d-text {
  position: relative;
  z-index: 2;
}

.btn-3d-shine {
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
  animation: shine 3s infinite;
}

@keyframes shine {
  0% { left: -100%; }
  50%, 100% { left: 100%; }
}

.btn-particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 1.163rem;
}

.btn-particles span {
  position: absolute;
  width: 0.140rem;
  height: 0.140rem;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  animation: particleFloat 3s ease-in-out infinite;
}

.btn-particles span:nth-child(1) { left: 20%; top: 50%; animation-delay: 0s; }
.btn-particles span:nth-child(2) { left: 40%; top: 30%; animation-delay: 0.5s; }
.btn-particles span:nth-child(3) { left: 60%; top: 60%; animation-delay: 1s; }
.btn-particles span:nth-child(4) { left: 80%; top: 40%; animation-delay: 1.5s; }

@keyframes particleFloat {
  0%, 100% { 
    transform: translateY(0) scale(1); 
    opacity: 0;
  }
  50% { 
    transform: translateY(-0.698rem) scale(1.5); 
    opacity: 1;
  }
}

/* 响应式调整 */
@media (max-width: 768px) {
  .card-selector-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .gender-3d-selector {
    gap: 0.465rem;
  }
  
  .gender-3d-btn {
    width: 1.86rem;
    height: 1.86rem;
  }
  
  .tail-3d-options {
    flex-wrap: wrap;
    gap: 0.372rem;
  }
  
  .tail-3d-card {
    width: 2.326rem;
    height: 2.791rem;
  }
  
  .luxury-section {
    padding: 0.465rem;
  }
  
  .personality-galaxy {
    gap: 0.279rem;
  }
  
  .personality-star {
    width: 1.628rem;
    height: 1.628rem;
  }
  
  .star-core {
    width: 1.163rem;
    height: 1.163rem;
    font-size: 0.512rem;
  }
  
  .btn-3d-save {
    padding: 0.372rem 0.930rem;
    font-size: 0.372rem;
  }
}

@media (max-width: 480px) {
  .card-selector-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.279rem;
  }
  
  .type-card-3d {
    height: 2.791rem;
  }
  
  .card-icon {
    font-size: 0.837rem;
  }
}
