* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html {
  width: 100%;
  height: 100%;
  overflow: hidden;
}
body {
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}
.main {
  width: 100%;
  height: 100%;
  position: relative;
  background-repeat: no-repeat;
  background-size: 100% 100%;
  background-color: #f5f0e8;
}
img {
  width: 100%;
  height: 100%;
}
.app-container {
  width: 40%;
  position: absolute;
  top: 30%;
  left: 30%;
}
.form-header {
  text-align: center;
  margin-bottom: 30px;
}
.form-header h1 {
  font-size: 28px;
  color: #2c3e50;
  font-weight: 600;
}
.form-header p {
  font-size: 14px;
  color: #7f8c8d;
  margin-top: 4px;
}
.sub-title {
  font-size: 13px;
  color: #95a5a6;
  margin-top: 2px;
}
.reservation-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.form-group {
  display: flex;
  align-items: center;
  margin-bottom: 10%;
  position: relative;
}
.form-group label {
  width: 10%;
  text-align: center;
}
.form-group input,
.form-group select {
  flex: 1;
  padding: 12px 40px 12px 15px;
  border: 1px solid #dfe6e9;
  border-radius: 8px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-color: #fff;
  cursor: pointer;
}
.form-group:has(select)::after {
  content: "▼";
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #7f8c8d;
  font-size: 12px;
  pointer-events: none;
  transition: all 0.3s ease;
}
.form-group:has(select:focus)::after {
  color: #27ae60;
}
.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: #27ae60;
  box-shadow: 0 0 6px rgba(39, 174, 96, 0.2);
}
.form-group input::placeholder,
.form-group select:hover {
  color: #b0b8b9;
}
.submit-wrapper {
  margin-top: 10px;
  text-align: center;
}
.submit-btn {
  width: 60%;
  padding: 12px;
  background: #27ae60;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 18px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}
.submit-btn:hover {
  background: #219653;
}
.submit-btn:active {
  transform: scale(0.98);
}
.reminder {
  width: 100%;
  height: 100%;
  position: relative;
  background-color: rgba(0, 0, 0, 0.5);
}
.box {
  width: 25%;
  height: 30%;
  position: absolute;
  top: 35%;
  left: 40%;
  background-color: #fff;
}
.part-nr {
  margin-top: 10%;
  text-align: center;
}
.sure-btn {
  width: 60%;
  position: absolute;
  bottom: 10%;
  left: 20%;
  padding: 12px;
  background: #27ae60;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 18px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}
.Mediator {
  width: 5%;
  height: 8%;
  position: absolute;
  right: 9%;
  bottom: 9%;
}

/* ===== 移动端适配 (max-width: 768px) ===== */
@media (max-width: 768px) {
  html {
    overflow-x: hidden;
  }
  body {
    position: relative;
    width: 100%;
    min-height: 100vh;
  }
  .main {
    width: 100%;
    min-height: 100vh;
    background-size: cover;
    background-position: center;
  }
  img {
    max-width: 100%;
    height: 100%;
  }
  .app-container {
    width: 90%;
    max-width: 500px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 0 15px;
  }
  .form-header {
    margin-bottom: 20px;
  }
  .form-header h1 {
    font-size: 22px;
  }
  .form-header p {
    font-size: 13px;
  }
  .sub-title {
    font-size: 12px;
  }
  .reservation-form {
    gap: 15px;
  }
  .form-group {
    flex-direction: column;
    gap: 8px;
    margin-bottom: 15px;
  }
  .form-group label {
    width: 100%;
    text-align: left;
    font-size: 14px;
    color: #2c3e50;
  }
  .form-group input,
  .form-group select {
    width: 100%;
    padding: 12px 15px;
    font-size: 15px;
  }
  .form-group:has(select)::after {
    top: 70%;
  }
  .form-group input::placeholder {
    color: #b0b8b9;
  }
  .submit-btn {
    width: 100%;
    max-width: 280px;
    padding: 14px;
    font-size: 16px;
  }
  .reminder {
    width: 100%;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 999;
  }
  .box {
    width: 85%;
    max-width: 300px;
    height: auto;
    min-height: 180px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }
  .part-nr {
    font-size: 16px;
    margin-bottom: 30px;
    margin-top: 0;
  }
  .sure-btn {
    width: 100%;
    position: static;
    font-size: 16px;
  }
  .Mediator {
    display: none;
  }

  /* ===== 证据上传区域（仅手机端显示） ===== */
  .evidence-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
  }
  .evidence-group label {
    width: 100%;
    text-align: left;
    font-size: 14px;
    color: #2c3e50;
  }
  .evidence-buttons {
    display: flex;
    gap: 12px;
    width: 100%;
  }
  .evidence-btn {
    flex: 1;
    padding: 12px 10px;
    border: 2px dashed #27ae60;
    background: #f0faf4;
    color: #27ae60;
    border-radius: 8px;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
  }
  .evidence-btn:active {
    background: #27ae60;
    color: #fff;
    transform: scale(0.97);
  }
  .preview-area {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
    margin-top: 4px;
  }
  .preview-item {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #dfe6e9;
  }
  .preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  .preview-remove {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 20px;
    height: 20px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
    line-height: 1;
  }
  .evidence-hint {
    width: 100%;
    font-size: 12px;
    color: #95a5a6;
    margin-top: 2px;
    text-align: center;
  }
  .red-text {
    color: #e74c3c;
    font-weight: 600;
  }

  .chat {
    width: 19%;
    height: 10.5%;
    position: absolute;
    right: 4%;
    top: 6%;
    border-radius: 50%;
  }

  .chat-tx {
    text-align: center;
  }
}

/* ===== PC端隐藏证据区域 ===== */
@media (min-width: 769px) {
  .evidence-group {
    display: none !important;
  }

  .chat {
    display: none !important;
  }

  .chat-tx {
    display: none !important;
  }
}

/* ===== 视频通话模态框（手机端） ===== */
.video-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000;
  z-index: 99999;
  justify-content: center;
  align-items: center;
}

.video-container {
  position: relative;
  width: 100%;
  height: 100%;
  background: #111;
  overflow: hidden;
}

.remote-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #222;
}

/* 接通前提示文字 */
.connecting-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: rgba(255, 255, 255, 0.8);
  font-size: 20px;
  font-weight: 400;
  letter-spacing: 2px;
  z-index: 5;
  pointer-events: none;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.local-video {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 30%;
  max-width: 160px;
  border-radius: 12px;
  border: 2px solid rgba(255, 255, 255, 0.5);
  object-fit: cover;
  background: #333;
  z-index: 10;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

.video-controls {
  position: absolute;
  bottom: 40px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 20px;
  padding: 0 20px;
  z-index: 20;
}

.vc-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  width: 64px;
  height: 64px;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  color: #fff;
}

.vc-btn:active {
  transform: scale(0.92);
  background: rgba(255, 255, 255, 0.25);
}

.vc-icon {
  font-size: 22px;
  line-height: 1;
}

.vc-label {
  font-size: 10px;
  white-space: nowrap;
  position: absolute;
  bottom: -18px;
  color: rgba(255, 255, 255, 0.8);
}

.vc-hangup {
  background: rgba(244, 67, 54, 0.8);
  border-color: #f44336;
}

.vc-hangup:active {
  background: #f44336;
}

/* ===== 提示弹窗 ===== */
.tip-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999999;
  justify-content: center;
  align-items: center;
}

.tip-box {
  background: #fff;
  border-radius: 16px;
  padding: 32px 24px 24px;
  max-width: 320px;
  width: 85%;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.tip-box p {
  font-size: 16px;
  color: #333;
  line-height: 1.6;
  margin-bottom: 24px;
}

.tip-btn {
  background: #27ae60;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 40px;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.tip-btn:active {
  transform: scale(0.96);
  background: #219653;
}

/* ===== 移动端视频控制适配 ===== */
@media (max-width: 768px) {
  .video-controls {
    bottom: 30px;
    gap: 16px;
  }

  .vc-btn {
    width: 56px;
    height: 56px;
  }

  .vc-icon {
    font-size: 20px;
  }

  .vc-label {
    font-size: 9px;
    bottom: -16px;
  }

  .local-video {
    width: 25%;
    max-width: 120px;
    top: 12px;
    right: 12px;
  }
}
