/* 古希腊德尔斐神庙注册页面样式 */

/* ==================== 页面基础样式 ==================== */
.ancient-register-body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  font-family: var(--font-ancient-body);
  color: var(--ancient-blue);
  overflow-x: hidden;
  position: relative;
}

/* ==================== 德尔斐神庙背景 ==================== */
.delphi-temple-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, 
    var(--ancient-ivory) 0%, 
    var(--ancient-marble) 30%, 
    var(--ancient-pearl) 70%, 
    var(--ancient-ivory) 100%);
  z-index: -2;
}

.delphi-temple-bg::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(circle at 20% 30%, rgba(255, 215, 0, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(205, 133, 63, 0.06) 0%, transparent 40%),
    radial-gradient(circle at 50% 50%, rgba(27, 54, 93, 0.04) 0%, transparent 60%);
  z-index: -1;
}

/* 神庙立柱装饰 */
.temple-columns {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 60%;
  display: flex;
  justify-content: space-around;
  align-items: flex-end;
  opacity: 0.1;
  z-index: -1;
}

.column {
  width: 40px;
  background: linear-gradient(180deg, 
    transparent 0%, 
    rgba(205, 133, 63, 0.3) 20%, 
    rgba(205, 133, 63, 0.5) 100%);
  border-radius: 20px 20px 0 0;
  position: relative;
  animation: columnRise 2s ease-out;
}

.column-1 { height: 200px; animation-delay: 0.2s; }
.column-2 { height: 250px; animation-delay: 0.4s; }
.column-3 { height: 220px; animation-delay: 0.6s; }
.column-4 { height: 180px; animation-delay: 0.8s; }

.column::before {
  content: '';
  position: absolute;
  top: -10px;
  left: -5px;
  right: -5px;
  height: 20px;
  background: rgba(255, 215, 0, 0.3);
  border-radius: 50%;
}

/* 神庙光效 */
.temple-light {
  position: absolute;
  top: 20%;
  left: 50%;
  transform: translateX(-50%);
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, 
    rgba(255, 215, 0, 0.15) 0%, 
    rgba(255, 215, 0, 0.08) 30%, 
    transparent 70%);
  border-radius: 50%;
  animation: templeGlow 4s ease-in-out infinite;
}

/* ==================== 注册神殿容器 ==================== */
.register-sanctuary {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 40px 20px;
  z-index: 1;
  width: 100%;  /* 确保容器占满整个宽度 */
  box-sizing: border-box;  /* 包含padding在内的盒模型 */
}

/* ==================== 神殿标题 ==================== */
.sanctuary-header {
  text-align: center;
  margin-bottom: 40px;
  animation: headerSlideDown 1s ease-out;
}

.sanctuary-title {
  font-size: 2.2rem;
  font-weight: 700;
  margin: 0 0 20px 0;
  letter-spacing: 3px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.title-ornament {
  color: var(--ancient-gold);
  margin: 0 12px;
  font-size: 1.8rem;
  animation: ornamentGlow 3s ease-in-out infinite;
}

.title-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin-top: 15px;
}

.divider-line {
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, 
    transparent 0%, 
    var(--ancient-gold) 50%, 
    transparent 100%);
}

.divider-ornament {
  font-size: 1.2rem;
  color: var(--ancient-terracotta);
  animation: leafSway 2s ease-in-out infinite;
}

/* ==================== 古希腊卷轴表单 ==================== */
.scroll-form {
  width: 100%;
  max-width: 450px;
  padding: 40px;  /* 调整为均匀的内边距 */
  position: relative;
  animation: formSlideUp 1.2s ease-out;
  margin: 0 auto;  /* 确保表单容器在页面中居中 */
  box-sizing: border-box;  /* 确保padding计算在宽度内 */
}

.scroll-form::before {
  content: '';
  position: absolute;
  top: -10px;
  left: -10px;
  right: -10px;
  bottom: -10px;
  background: linear-gradient(135deg, 
    rgba(255, 215, 0, 0.1) 0%, 
    rgba(205, 133, 63, 0.05) 50%, 
    rgba(255, 215, 0, 0.1) 100%);
  border-radius: 0;
  z-index: -1;
}

/* ==================== 步骤指示器 ==================== */
.temple-steps {
  display: flex;
  justify-content: space-between;
  margin-bottom: 35px;
  position: relative;
}

.temple-steps::before {
  content: '';
  position: absolute;
  top: 20px;
  left: 15%;
  right: 15%;
  height: 2px;
  background: linear-gradient(90deg, 
    var(--ancient-terracotta) 0%, 
    var(--ancient-gold) 50%, 
    var(--ancient-terracotta) 100%);
  z-index: 0;
}

.step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  z-index: 1;
  cursor: pointer;
  transition: all 0.3s ease;
}

.step-icon {
  width: 40px;
  height: 40px;
  background: var(--ancient-marble);
  border: 2px solid var(--ancient-terracotta);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  margin-bottom: 8px;
  transition: all 0.3s ease;
}

.step-item.active .step-icon {
  background: var(--ancient-gold);
  border-color: var(--ancient-gold);
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.5);
  transform: scale(1.1);
}

.step-label {
  font-size: 0.85rem;
  color: var(--ancient-terracotta);
  font-weight: 500;
  transition: all 0.3s ease;
}

.step-item.active .step-label {
  color: var(--ancient-blue);
  font-weight: 600;
}

/* ==================== 表单内容 ==================== */
.form-content {
  position: relative;
}

.ancient-form-group {
  margin-bottom: 25px;
  position: relative;
  width: 100%;  /* 确保表单组占满容器宽度 */
}

/* 确保按钮容器居中 - 使用CSS Grid方法 */
.ancient-form-group.button-container {
  display: grid !important;
  place-items: center !important;  /* 水平和垂直居中 */
  width: 100% !important;
  margin: 0 !important;  /* 清除所有margin */
  padding: 0 !important;  /* 清除所有padding */
  position: relative !important;
  box-sizing: border-box !important;  /* 确保padding计算正确 */
  /* 临时调试样式 */
  background-color: rgba(0, 255, 0, 0.1) !important;
  border: 1px solid green !important;
}

/* 调试：检查整个表单容器 */
.scroll-form {
  /* 临时调试样式 */
  outline: 2px solid orange !important;
}

/* 调试：检查页面容器 */
.register-sanctuary {
  /* 临时调试样式 */
  outline: 3px solid purple !important;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* 手机号输入区域 */
.phone-input-area {
  display: flex;
  gap: 10px;
}

.area-code {
  flex-shrink: 0;
}

.ancient-select {
  width: 80px;
  height: 45px;
  background: var(--ancient-ivory);
  border: var(--border-marble);
  border-radius: 0;
  padding: 0 10px;
  font-family: var(--font-ancient-body);
  font-size: 0.9rem;
  color: var(--ancient-blue);
  transition: all 0.3s ease;
}

.ancient-select:focus {
  outline: none;
  border-color: var(--ancient-gold);
  box-shadow: 0 0 8px rgba(255, 215, 0, 0.3);
}

/* 输入框样式 */
.ancient-input {
  width: 100%;
  height: 45px;
  background: var(--ancient-ivory);
  border: var(--border-marble);
  border-radius: 0;
  padding: 0 15px;
  font-family: var(--font-ancient-body);
  font-size: 1rem;
  color: var(--ancient-blue);
  transition: all 0.3s ease;
  position: relative;
}

.ancient-input::placeholder {
  color: rgba(27, 54, 93, 0.5);
  font-style: italic;
}

.ancient-input:focus {
  outline: none;
  border-color: var(--ancient-gold);
  box-shadow: 0 0 8px rgba(255, 215, 0, 0.3);
  background: rgba(255, 255, 240, 0.8);
}

.ancient-input:focus::placeholder {
  opacity: 0.7;
}

/* 错误提示样式 */
.ancient-error {
  display: block;
  margin-top: 6px;
  font-size: 0.85rem;
  color: var(--ancient-red);
  font-style: italic;
  min-height: 20px;
  transition: all 0.3s ease;
}

.ancient-error:not(:empty) {
  animation: errorShake 0.5s ease-in-out;
}

/* 注册按钮样式 - 使用更高的优先级 */
.ancient-register-btn.btn-ancient {
  width: 300px !important;  /* 固定宽度，移除 width: 100% */
  max-width: calc(100vw - 60px) !important;  /* 确保不超出屏幕边界 */
  height: 50px !important;
  /* 临时调试样式 */
  outline: 2px solid red !important;
  background: linear-gradient(135deg, 
    var(--ancient-terracotta) 0%, 
    var(--ancient-copper) 50%, 
    var(--ancient-terracotta) 100%) !important;
  border: 2px solid var(--ancient-gold) !important;
  border-radius: 0 !important;
  color: var(--ancient-ivory) !important;
  font-size: 1.1rem !important;
  font-weight: 600 !important;
  letter-spacing: 2px !important;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  display: flex !important;  /* flex布局 */
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  margin: 30px 0 20px 0 !important;  /* 清除margin auto，让Grid控制居中 */
  padding: 0 !important;  /* 覆盖 btn-ancient 的 padding */
  
  /* 清除定位，让CSS Grid控制居中 */
  position: static !important;
  left: auto !important;
  transform: none !important;
}

.ancient-register-btn.btn-ancient::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, 
    transparent 0%, 
    rgba(255, 215, 0, 0.3) 50%, 
    transparent 100%);
  transition: left 0.6s ease;
}

.ancient-register-btn.btn-ancient:hover::before {
  left: 100%;
}

.ancient-register-btn.btn-ancient:hover {
  background: linear-gradient(135deg, 
    var(--ancient-copper) 0%, 
    var(--ancient-gold) 50%, 
    var(--ancient-copper) 100%) !important;
  transform: translateY(-2px) !important;  /* 只需要Y轴移动 */
  box-shadow: 0 6px 20px rgba(205, 133, 63, 0.4) !important;
}

.ancient-register-btn.btn-ancient:active {
  transform: translateY(0) !important;  /* 只需要Y轴位置 */
  box-shadow: 0 3px 10px rgba(205, 133, 63, 0.3) !important;
}

.btn-icon {
  font-size: 1.2rem;
  animation: iconPulse 2s ease-in-out infinite;
}

/* 链接样式 */
.ancient-links {
  text-align: center;
  margin-top: 25px;
}

.link-text {
  font-size: 0.9rem;
  margin-right: 8px;
}

.link-item {
  font-size: 0.9rem;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  position: relative;
}

.link-item::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--ancient-gold);
  transition: width 0.3s ease;
}

.link-item:hover::after {
  width: 100%;
}

.link-item:hover {
  color: var(--ancient-copper);
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
}

/* ==================== 古希腊加载遮罩 ==================== */
.ancient-loading-mask {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(245, 245, 245, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  backdrop-filter: blur(8px);
}

.loading-temple {
  text-align: center;
  animation: templeFloat 2s ease-in-out infinite;
}

.loading-columns {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 8px;
  margin-bottom: 20px;
}

.loading-column {
  width: 8px;
  background: linear-gradient(180deg, 
    var(--ancient-gold) 0%, 
    var(--ancient-terracotta) 100%);
  border-radius: 4px 4px 0 0;
  animation: columnPulse 1.5s ease-in-out infinite;
}

.loading-column:nth-child(1) { 
  height: 30px; 
  animation-delay: 0s; 
}
.loading-column:nth-child(2) { 
  height: 40px; 
  animation-delay: 0.2s; 
}
.loading-column:nth-child(3) { 
  height: 35px; 
  animation-delay: 0.4s; 
}
.loading-column:nth-child(4) { 
  height: 25px; 
  animation-delay: 0.6s; 
}

.loading-text {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 1px;
  animation: textGlow 2s ease-in-out infinite;
}

/* ==================== 动画定义 ==================== */
@keyframes columnRise {
  from {
    height: 0;
    opacity: 0;
  }
  to {
    opacity: 0.1;
  }
}

@keyframes templeGlow {
  0%, 100% { 
    opacity: 0.6;
    transform: translateX(-50%) scale(1);
  }
  50% { 
    opacity: 0.9;
    transform: translateX(-50%) scale(1.1);
  }
}

@keyframes headerSlideDown {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

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

@keyframes ornamentGlow {
  0%, 100% { 
    color: var(--ancient-gold);
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
  }
  50% { 
    color: var(--ancient-copper);
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.8);
  }
}

@keyframes leafSway {
  0%, 100% { 
    transform: rotate(-3deg);
  }
  50% { 
    transform: rotate(3deg);
  }
}

@keyframes errorShake {
  0%, 100% { 
    transform: translateX(0);
  }
  25% { 
    transform: translateX(-5px);
  }
  75% { 
    transform: translateX(5px);
  }
}

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

@keyframes templeFloat {
  0%, 100% { 
    transform: translateY(0);
  }
  50% { 
    transform: translateY(-10px);
  }
}

@keyframes columnPulse {
  0%, 100% { 
    transform: scaleY(1);
    opacity: 0.7;
  }
  50% { 
    transform: scaleY(1.3);
    opacity: 1;
  }
}

@keyframes textGlow {
  0%, 100% { 
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
  }
  50% { 
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
  }
}

/* ==================== 响应式设计 ==================== */
@media (max-width: 768px) {
  .register-sanctuary {
    padding: 30px 15px;
  }
  
  .sanctuary-title {
    font-size: 1.8rem;
    letter-spacing: 2px;
  }
  
  .title-ornament {
    margin: 0 8px;
    font-size: 1.4rem;
  }
  
  .scroll-form {
    max-width: 100%;
    padding: 30px 25px;
    margin: 0 auto;  /* 确保响应式下也居中 */
  }
  
  .temple-steps {
    margin-bottom: 25px;
  }
  
  .step-icon {
    width: 35px;
    height: 35px;
    font-size: 1rem;
  }
  
  .step-label {
    font-size: 0.8rem;
  }
  
  .ancient-form-group {
    margin-bottom: 20px;
  }
  
  .ancient-input,
  .ancient-select {
    height: 42px;
  }
  
  .ancient-register-btn.btn-ancient {
    width: 280px !important;  /* 响应式调整宽度 */
    max-width: calc(100vw - 30px) !important;  /* 确保不超出屏幕边界 */
    height: 45px !important;
    font-size: 1rem !important;
    letter-spacing: 1px !important;
    margin: 30px 0 20px 0 !important;  /* 确保响应式下也是依靠Grid居中 */
  }
  
  .temple-columns {
    height: 40%;
  }
  
  .column {
    width: 30px;
  }
  
  .column-1 { height: 120px; }
  .column-2 { height: 150px; }
  .column-3 { height: 130px; }
  .column-4 { height: 110px; }
}

@media (max-width: 576px) {
  .register-sanctuary {
    padding: 20px 10px;
  }
  
  .sanctuary-title {
    font-size: 1.5rem;
    letter-spacing: 1px;
  }
  
  .title-ornament {
    margin: 0 6px;
    font-size: 1.2rem;
  }
  
  .scroll-form {
    padding: 25px 20px;
    margin: 0 auto;  /* 确保小屏幕下也居中 */
  }
  
  .temple-steps {
    margin-bottom: 20px;
  }
  
  .step-icon {
    width: 30px;
    height: 30px;
    font-size: 0.9rem;
  }
  
  .step-label {
    font-size: 0.75rem;
  }
  
  .phone-input-area {
    gap: 8px;
  }
  
  .ancient-select {
    width: 70px;
    font-size: 0.85rem;
  }
  
  .ancient-input {
    font-size: 0.9rem;
  }
  
  .ancient-register-btn.btn-ancient {
    width: 260px !important;  /* 小屏幕调整宽度 */
    max-width: calc(100vw - 40px) !important;  /* 确保不超出屏幕边界 */
    height: 42px !important;
    font-size: 0.95rem !important;
    gap: 8px !important;
    margin: 30px 0 20px 0 !important;  /* 确保小屏幕下也是依靠Grid居中 */
  }
  
  .temple-columns {
    display: none;
  }
  
  .temple-light {
    width: 200px;
    height: 200px;
  }
}

/* ==================== 兼容性和优化 ==================== */
.ancient-input,
.ancient-select,
.ancient-register-btn {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

.ancient-select {
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23CD853F' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px;
  padding-right: 35px;
}

/* 提升性能 */
.temple-light,
.column,
.title-ornament,
.divider-ornament,
.btn-icon {
  will-change: transform, opacity;
}

.ancient-input,
.ancient-register-btn,
.step-icon {
  will-change: transform, box-shadow, background;
} 