/* 基础样式 */
html {
  position: relative;
  overflow-x: hidden !important;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  touch-action: manipulation;
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  color: #324e63;
  background: #f5f7fa;
  line-height: 1.5;
  -webkit-tap-highlight-color: transparent;
}

a, a:hover {
  text-decoration: none;
}

/* 车牌验证层 */
.plate-verify-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(-20deg, #ff2846 0%, #6944ff 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.plate-verify-modal {
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.2);
  width: 100%;
  max-width: 400px;
  overflow: hidden;
}

.plate-verify-header {
  background: #6944ff;
  color: white;
  padding: 20px;
  text-align: center;
}

.plate-verify-header h2 {
  font-size: 24px;
  margin: 0;
}

.plate-verify-body {
  padding: 30px;
  text-align: center;
}

.plate-verify-body p {
  font-size: 18px;
  margin-bottom: 20px;
  color: #555;
}

.plate-input-group {
  margin-bottom: 20px;
}

.plate-input-group input {
  width: 100%;
  padding: 15px;
  border: 2px solid #ddd;
  border-radius: 8px;
  font-size: 18px;
  text-align: center;
  letter-spacing: 2px;
  transition: border-color 0.3s;
}

.plate-input-group input:focus {
  outline: none;
  border-color: #6944ff;
}

.verify-result {
  min-height: 24px;
  margin-top: 15px;
  font-size: 14px;
  color: #e74c3c;
  font-weight: 500;
}

.plate-verify-footer {
  padding: 0 30px 30px;
}

.plate-verify-footer button {
  width: 100%;
  padding: 15px;
  background: linear-gradient(45deg, #1da1f2, #0e71c8);
  color: white;
  border: none;
  border-radius: 50px;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(19, 127, 212, 0.4);
  transition: transform 0.2s, box-shadow 0.2s;
}

.plate-verify-footer button:active {
  transform: translateY(2px);
  box-shadow: 0 2px 8px rgba(19, 127, 212, 0.4);
}

/* 加载动画 */
@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-spinner {
  display: none;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s ease-in-out infinite;
  margin-right: 10px;
  vertical-align: middle;
}

.profile-card__button.loading .loading-spinner {
  display: inline-block;
}

/* 通知结果 */
.notification-result {
  margin-top: 20px;
  padding: 12px 20px;
  border-radius: 8px;
  text-align: center;
  display: none;
  font-size: 16px;
  font-weight: 500;
}

.notification-result.success {
  background-color: #d4edda;
  color: #155724;
  display: block;
}

.notification-result.error {
  background-color: #f8d7da;
  color: #721c24;
  display: block;
}

/* 卡片布局 */
.wrapper {
  width: 100%;
  height: auto;
  min-height: 100vh;
  padding: 50px 20px;
  padding-top: 100px;
  display: flex;
  background-image: linear-gradient(-20deg, #ff2846 0%, #6944ff 100%);
}

@media screen and (max-width: 768px) {
  .wrapper {
    height: auto;
    min-height: 100vh;
    padding-top: 60px;
    padding-bottom: 20px;
  }
}

.profile-card {
  width: 100%;
  min-height: 460px;
  margin: auto;
  box-shadow: 0px 8px 60px -10px rgba(13, 28, 39, 0.6);
  background: #fff;
  border-radius: 12px;
  max-width: 700px;
  position: relative;
}

.profile-card__img {
  width: 150px;
  height: 150px;
  margin-left: auto;
  margin-right: auto;
  transform: translateY(-50%);
  border-radius: 50%;
  overflow: hidden;
  position: relative;
  z-index: 4;
  box-shadow: 0px 5px 50px 0px #6c44fc, 0px 0px 0px 7px rgba(107, 74, 255, 0.5);
  background: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media screen and (max-width: 576px) {
  .profile-card__img {
    width: 120px;
    height: 120px;
  }
}

.profile-card__img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.profile-card__cnt {
  margin-top: -35px;
  text-align: center;
  padding: 0 20px;
  padding-bottom: 40px;
  transition: all 0.3s;
}

.profile-card__name {
  font-weight: 700;
  font-size: 24px;
  color: #6944ff;
  margin-bottom: 15px;
}

.profile-card__txt {
  font-size: 18px;
  font-weight: 500;
  color: #324e63;
  margin-bottom: 25px;
}

.profile-card__txt strong {
  font-weight: 700;
}

.profile-card-inf {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  align-items: flex-start;
  margin-top: 35px;
  margin-bottom: 20px;
}

.profile-card-inf__item {
  padding: 10px 25px;
  min-width: 130px;
}

@media screen and (max-width: 768px) {
  .profile-card-inf__item {
    padding: 10px 15px;
    min-width: 110px;
  }
}

@media screen and (max-width: 480px) {
  .profile-card-inf__item {
    padding: 8px 12px;
    min-width: 100px;
  }
}

.profile-card-inf__title {
  font-weight: 700;
  font-size: 27px;
  color: #324e63;
}

.profile-card-inf__txt {
  font-weight: 500;
  margin-top: 7px;
  font-size: 16px;
}

.profile-card-ctr {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 20px;
}

@media screen and (max-width: 576px) {
  .profile-card-ctr {
    flex-wrap: wrap;
  }
}

.profile-card__button {
  background: none;
  border: none;
  font-family: inherit;
  font-weight: 700;
  font-size: 19px;
  margin: 15px 20px;
  padding: 15px 30px;
  min-width: 200px;
  border-radius: 50px;
  min-height: 55px;
  color: #fff;
  cursor: pointer;
  backface-visibility: hidden;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media screen and (max-width: 768px) {
  .profile-card__button {
    min-width: 170px;
    margin: 15px 15px;
    padding: 12px 25px;
    font-size: 17px;
  }
}

@media screen and (max-width: 576px) {
  .profile-card__button {
    min-width: inherit;
    margin: 10px 0;
    width: 100%;
    max-width: 300px;
  }
  .profile-card__button:last-child {
    margin-bottom: 0;
  }
}

.profile-card__button:focus {
  outline: none !important;
}

@media screen and (min-width: 768px) {
  .profile-card__button:hover {
    transform: translateY(-3px);
  }
}

.profile-card__button:first-child {
  margin-left: 0;
}

.profile-card__button:last-child {
  margin-right: 0;
}

.profile-card__button.button--blue {
  background: linear-gradient(45deg, #1da1f2, #0e71c8);
  box-shadow: 0px 4px 15px rgba(19, 127, 212, 0.4);
}

.profile-card__button.button--blue:hover {
  box-shadow: 0px 7px 20px rgba(19, 127, 212, 0.6);
}

.profile-card__button.button--orange {
  background: linear-gradient(45deg, #ff6b35, #ff9e00);
  box-shadow: 0px 4px 15px rgba(255, 107, 53, 0.35);
}

.profile-card__button.button--orange:hover {
  box-shadow: 0px 7px 20px rgba(255, 107, 53, 0.6);
}

/* 管理员面板 */
.admin-section {
  margin-bottom: 20px;
  padding: 15px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.admin-section h4 {
  margin-bottom: 15px;
  color: #6944ff;
  text-align: center;
}

.input-group {
  display: flex;
  margin-bottom: 15px;
  align-items: center;
}

.input-group label {
  width: 80px;
  font-weight: 500;
}

.input-group input, .template-textarea {
  flex: 1;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 16px;
}

.template-textarea {
  width: 100%;
  height: 120px;
  margin-bottom: 10px;
}

.template-vars {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 14px;
}

.template-example {
  background: #f0f8ff;
  padding: 10px;
  border-radius: 4px;
  font-size: 14px;
}

.phone-input-group {
  display: flex;
  margin-bottom: 15px;
}

.phone-input {
  flex: 1;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px 0 0 4px;
}

.add-phone-btn {
  padding: 10px 15px;
  background: #6944ff;
  color: white;
  border: none;
  border-radius: 0 4px 4px 0;
  cursor: pointer;
}

.phone-list {
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid #eee;
  border-radius: 4px;
}

.phone-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  border-bottom: 1px solid #eee;
}

.remove-phone-btn {
  background: #dc3545;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 4px 8px;
  cursor: pointer;
}

.save-settings-btn {
  padding: 12px 30px;
  background: #28a745;
  color: white;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
}

/* 响应式优化 */
@media (max-width: 480px) {
  .profile-card {
    min-height: 400px;
  }
  
  .profile-card__name {
    font-size: 22px;
  }
  
  .profile-card__txt {
    font-size: 16px;
  }
  
  .profile-card-inf__item {
    min-width: 90px;
    padding: 8px 10px;
  }
  
  .profile-card-inf__title {
    font-size: 24px;
  }
  
  .profile-card-inf__txt {
    font-size: 14px;
  }
  
  .profile-card__button {
    padding: 12px 20px;
    font-size: 16px;
    min-height: 50px;
  }
  
  .admin-section {
    padding: 10px;
  }
  
  .input-group {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .input-group label {
    margin-bottom: 5px;
  }
  
  .input-group input, .template-textarea {
    width: 100%;
  }
}