* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
    sans-serif;
}

body {
  background-color: #b71c1c;
}

.page {
  position: relative;
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  height: 100vh;
  overflow: hidden;
}

.bg {
  position: absolute;
  inset: 0;
  background: #b71c1c url("./img/bg.png") no-repeat center top / cover;
  z-index: 0;
}

.sunlight {
  position: absolute;
  top: -150px;
  right: -150px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.6) 0%, rgba(255, 230, 181, 0.3) 50%, transparent 80%);
  z-index: 1;
  pointer-events: none;
  filter: blur(30px);
  animation: sunlightShine 6s ease-in-out infinite;
  transform-origin: top right;
}

@keyframes sunlightShine {
  0%, 100% {
    opacity: 0.5;
    transform: scale(1) rotate(0deg);
  }
  50% {
    opacity: 0.9;
    transform: scale(1.3) rotate(8deg);
  }
}

.content {
  position: relative;
  z-index: 1;
  padding: 25px 20px 25px;
  display: flex;
  flex-direction: column;
}

.header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 40px;
}

.header .logo {
  height: 60px;
}

.header .title {
  height: 28px;
}

.main-card {
  margin-top: 20px;
  padding: 12px 0px 24px;
  
}

.activity-title {
  margin: 0 0 16px;
  font-size: 20px;
  color: #ffe6b5;
  font-weight: 600;
}

.form-group {
  margin-bottom: 14px;
}

.form-label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  color: #444;
}

.input-wrapper {
  position: relative;
  width: 100%;
  height: 48px;
  border-radius: 24px;
  background-color: rgba(255, 247, 240, 0.98);
  display: flex;
  align-items: center;
  padding: 0 16px 0 80px;
}

.input-wrapper::before {
  content: attr(data-label);
  position: absolute;
  left: 24px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 15px;
  color: #4b4b4b;
}

.input-wrapper::after {
  content: "";
  position: absolute;
  left: 64px;
  top: 50%;
  width: 1px;
  height: 22px;
  background: rgba(255, 191, 134, 0.8);
  transform: translateY(-50%);
}

.select-input,
.text-input {
  flex: 1;
  height: 100%;
  border: none;
  background: transparent;
  font-size: 15px;
  outline: none;
  color: #333;
  padding: 0;
  -webkit-appearance: none;
  appearance: none;
  padding: 10px;
}

.icon-arrow {
  width: 20px;
  height: 20px;
  margin-left: 8px;
  pointer-events: none;
}

.btn-primary,
.btn-secondary {
  width: 100%;
  height: 46px;
  margin-top: 10px;
  border-radius: 23px;
  border: none;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 2px;
}

.btn-primary {
  background: linear-gradient(90deg, #ffcf7f, #ffe6b5);
  color: #b0301b;
}

.btn-primary:disabled {
  opacity: 0.6;
}

.btn-secondary {
  background: transparent;
  border: 1px solid #ffe6b5;
  color: #ffe6b5;
}

.tip {
  margin-top: 8px;
  font-size: 12px;
  color: #fff3cd;
}

.popup {
  position: fixed;
  inset: 0;
  display: none;
}

/* 部门选择弹窗 */
.dept-popup {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 9999;
}

.dept-popup.show {
  display: block;
}

.dept-popup .popup-mask {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(2px);
}

.dept-popup .popup-panel {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 80%;
  max-width: 350px;
  max-height: 70vh;
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.dept-popup .popup-header {
  padding: 20px;
  background: linear-gradient(135deg, #b71c1c, #d32f2f);
  text-align: center;
}

.dept-popup .popup-header h3 {
  margin: 0;
  color: #fff;
  font-size: 18px;
  font-weight: 600;
}

.dept-popup .popup-list {
  max-height: calc(70vh - 80px);
  overflow-y: auto;
}

.dept-popup .popup-item {
  padding: 16px 20px;
  border-bottom: 1px solid #f0f0f0;
  font-size: 16px;
  color: #333;
  cursor: pointer;
  transition: background-color 0.2s;
}

.dept-popup .popup-item:last-child {
  border-bottom: none;
}

.dept-popup .popup-item:active {
  background-color: #f5f5f5;
}

.popup.show {
  display: block;
}

.popup-mask {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
}

.popup-panel {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  max-height: 60vh;
  background: #ffffff;
  border-radius: 18px 18px 0 0;
  display: flex;
  flex-direction: column;
}

.popup-header {
  padding: 12px 16px;
  font-size: 15px;
  font-weight: 600;
  border-bottom: 1px solid #f0f0f0;
}

.popup-list {
  flex: 1;
  overflow-y: auto;
}

.popup-item {
  padding: 10px 16px;
  font-size: 15px;
  border-bottom: 1px solid #f7f7f7;
}

.popup-item:active {
  background: #f2f2f2;
}

.name-panel .popup-header {
  border-bottom: none;
}

.name-search-input {
  width: 100%;
  height: 36px;
  padding: 0 12px;
  border-radius: 18px;
  border: 1px solid #ddd;
  outline: none;
  font-size: 14px;
}

.welcome-content {
  height: 100%;
  text-align: center;
}

.welcome-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: -80px;
}

.meeting-title {
  font-size: 24px;
  line-height: 1.6;
  color: #ffe6b5;
  margin-bottom: 60px;
  font-weight: 600;
  padding: 0 10px;
  white-space: pre-wrap;
}

.welcome-big-title {
  font-size: 44px;
  color: #ffe6b5;
  font-weight: 400;
  letter-spacing: 4px;
  margin: 0;
  animation: titlePulse 2s ease-in-out infinite;
}

.action-btn-wrap {
  cursor: pointer;
}

@keyframes titlePulse {
  0%, 100% { transform: scale(1); opacity: 0.9; }
  50% { transform: scale(1.05); opacity: 1; }
}

.success-content {
  height: 100%;
}

.success-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: -60px;
}

.success-status {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  animation: successScale 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}

.success-status .success-icon {
  height: 40px;
  animation: iconRotate 0.8s ease-out 0.2s both;
}

.success-status .success-text {
  font-size: 38px;
  font-weight: 600;
  color: #ffe6b5;
  letter-spacing: 2px;
}

.success-line {
  width: 100%;
  border: none;
  border-top: 1px solid rgba(255, 230, 181, 0.3);
  margin-bottom: 20px;
  animation: lineExpand 0.8s ease-out 0.4s both;
}

.success-slogan {
  width: 90%;
  animation: sloganSlideUp 1s ease-out 0.6s both;
}

.slogan-img {
  width: 100%;
  height: auto;
}

.back-overlay {
  position: absolute;
  inset: 0;
  background: transparent;
  border: none;
  z-index: 10;
}

/* 动画定义 */
@keyframes successScale {
  0% { opacity: 0; transform: scale(0.5); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes iconRotate {
  0% { opacity: 0; transform: rotate(-45deg); }
  100% { opacity: 1; transform: rotate(0); }
}

@keyframes lineExpand {
  0% { opacity: 0; transform: scaleX(0); }
  100% { opacity: 1; transform: scaleX(1); }
}

@keyframes sloganSlideUp {
  0% { opacity: 0; transform: translateY(40px); }
  100% { opacity: 1; transform: translateY(0); }
}

@media (min-width: 430px) {
  .page {
    border-radius: 16px;
  }
}
