/* 全局样式重置和基础设置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 微信浏览器兼容性修复 */
/* 强制使用webkit内核渲染 */
body, html {
    -webkit-text-size-adjust: 100%;
    -webkit-overflow-scrolling: touch;
    overflow-x: hidden;
}

/* 为.process-steps添加基础样式，确保默认横向 */
.process-steps {
    display: -webkit-flex;
    display: flex;
    -webkit-flex-direction: row;
    flex-direction: row;
    width: 100%;
}

/* 为radio-group添加基础样式，确保默认横向 */
.radio-group {
    display: -webkit-flex;
    display: flex;
    -webkit-flex-direction: row;
    flex-direction: row;
    width: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    padding: 0;
}

.container {
    max-width: 100%;
    background-color: #fff;
}

/* 头部样式 */
.header {
    text-align: center;
    padding: 30px 20px;
    background: linear-gradient(135deg, #ff6b6b, #ff8e53);
    color: white;
}

.header h1 {
    font-size: 28px;
    margin-bottom: 10px;
    font-weight: bold;
}

.header p {
    font-size: 16px;
    opacity: 0.9;
}

/* 申请表单样式 */
.application-form {
    padding: 20px;
}

.form-group {
    margin-bottom: 20px;
}

/* 城市显示区域样式 */
.city-display-wrapper {
    position: relative;
}

.city-display-wrapper input[type="text"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    background-color: #fff;
    cursor: pointer;
}

.city-display-wrapper input[type="text"]:focus {
    border-color: #e83e8c;
    outline: none;
}

/* 城市选择模态框样式 */
.city-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.city-modal.active {
    display: block;
}

.city-modal-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 80%;
    background-color: #fff;
    border-radius: 10px 10px 0 0;
    display: flex;
    flex-direction: column;
}

.city-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.city-modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
}

.city-modal-close,
.city-modal-confirm {
    font-size: 16px;
    color: #666;
    cursor: pointer;
}

.city-modal-confirm {
    color: #007aff;
}

.city-location {
    padding: 10px 15px;
    background-color: #f8f8f8;
    display: flex;
    align-items: center;
    gap: 5px;
}

.location-text {
    color: #007aff;
}

.refresh-icon {
    color: #666;
    cursor: pointer;
}

.city-modal-info {
    padding: 10px 15px;
    background-color: #e8f4fd;
}

.city-modal-info p {
    margin: 0;
    font-size: 14px;
    color: #007aff;
}

.city-select-content {
    flex: 1;
    display: flex;
    overflow: hidden;
}

.province-list {
    width: 30%;
    height: 100%;
    background-color: #f8f8f8;
    overflow-y: auto;
}

.city-list {
    width: 70%;
    height: 100%;
    overflow-y: auto;
}

.province-item {
    padding: 15px;
    font-size: 16px;
    color: #333;
    cursor: pointer;
    border-bottom: 1px solid #eee;
}

.province-item.active {
    background-color: #fff;
    color: #e83e8c;
    font-weight: bold;
}

.city-item {
    padding: 15px;
    font-size: 16px;
    color: #333;
    cursor: pointer;
    border-bottom: 1px solid #eee;
}

.city-item.active {
    color: #e83e8c;
    font-weight: bold;
}

/* 滚动条样式 */
.province-list::-webkit-scrollbar, .city-list::-webkit-scrollbar {
    width: 6px;
}

/* 协议链接样式 */
.agreement-link {
    color: #e83e8c;
    cursor: pointer;
    text-decoration: underline;
    transition: color 0.3s;
}

.agreement-link:hover {
    color: #c2185b;
}

/* 协议模态框样式 */
.agreement-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.agreement-modal-content {
    background-color: white;
    margin: 5% auto;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

.agreement-modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.agreement-modal-header h3 {
    margin: 0;
    font-size: 20px;
    color: #333;
}

.agreement-modal-close {
    font-size: 24px;
    color: #999;
    cursor: pointer;
    transition: color 0.3s;
}

.agreement-modal-close:hover {
    color: #333;
}

.agreement-modal-body {
    padding: 24px;
    overflow-y: auto;
    max-height: calc(80vh - 80px);
}

.agreement-content h4 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 18px;
    color: #333;
}

.agreement-content h5 {
    margin-top: 20px;
    margin-bottom: 10px;
    font-size: 16px;
    color: #555;
}

.agreement-content p {
    margin-bottom: 12px;
    line-height: 1.6;
    color: #666;
}

.agreement-content ol {
    margin-bottom: 15px;
    padding-left: 25px;
}

.agreement-content li {
    margin-bottom: 8px;
    line-height: 1.5;
    color: #666;
}

.province-list::-webkit-scrollbar-track,
.city-list::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.province-list::-webkit-scrollbar-thumb,
.city-list::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.province-list::-webkit-scrollbar-thumb:hover,
.city-list::-webkit-scrollbar-thumb:hover {
    background: #999;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.form-group input[type="text"],
.form-group input[type="tel"],
.form-group select {
    width: 100%;
    padding: 12px 15px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background-color: #fff;
}

.form-group input[type="text"]:focus,
.form-group input[type="tel"]:focus,
.form-group select:focus {
    outline: none;
    border-color: #ff6b6b;
}

/* 车牌输入框样式 */
.license-plate-container {
    position: relative;
    margin-bottom: 15px;
}

.license-plate-inputs {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

/* 第二个和第三个输入框之间的分隔符 */
.license-plate-inputs .plate-space:nth-child(4) {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.license-plate-inputs .plate-space:nth-child(4)::before {
  content: '・';
  font-size: 20px;
  color: #333;
}

/* 单选框组样式 - 胶囊式 */
.radio-group {
  display: flex;
  flex-wrap: nowrap;
  border: 1px solid #d9d9d9;
  border-radius: 20px;
  padding: 2px;
  margin-top: 8px;
  overflow: hidden;
  width: 100%;
  justify-content: center;
}

.radio-group label {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: 18px;
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  margin: 0;
  flex: 1;
  max-width: 300px;
  text-align: center;
}

.radio-group input[type="radio"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
}

.radio-group input[type="radio"]:checked + span {
  color: #1890ff;
  font-weight: 500;
}

/* 确保没有任何伪元素添加√标记 */
.radio-group input[type="radio"]:checked + span::before,
.radio-group input[type="radio"]:checked + span::after {
  content: none !important;
}

.radio-group label:has(input:checked) {
  background-color: #e6f7ff;
  color: #1890ff;
}

.plate-input {
  width: 36px;
  height: 36px;
  text-align: center;
  padding: 0 !important;
  font-size: 18px;
  font-weight: normal;
  line-height: 36px;
  box-sizing: border-box;
  letter-spacing: 0;
  display: inline-block;
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 0;
  transition: all 0.3s;
  cursor: pointer;
  margin: 0;
  overflow: hidden;
}

.new-energy-input {
    color: #2e8b57;
    border-bottom-color: #2e8b57;
}

.plate-input:focus, .plate-input.active {
    border-color: #e83e8c;
    background-color: transparent;
    outline: none;
}

.plate-input:focus, .plate-input.active {
    border-color: #e83e8c;
    background-color: #fff;
    outline: none;
}

.plate-dot {
    width: 12px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #ff6b6b;
    font-weight: bold;
}

.plate-space {
    width: 8px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.plate-input-special {
    background-color: #e8f5e8 !important;
    border-color: #2e8b57;
    color: #2e8b57;
}

/* 自定义placeholder样式，使其看起来像背景字 */
.plate-input-special::placeholder {
    color: #90caf9;
    font-size: 12px;
    opacity: 1; /* 确保placeholder完全不透明 */
}

/* 针对不同浏览器的兼容性 */
.plate-input-special::-webkit-input-placeholder {
    color: #90caf9;
    font-size: 12px;
    opacity: 1;
}

.plate-input-special:-moz-placeholder {
    color: #90caf9;
    font-size: 12px;
    opacity: 1;
}

.plate-input-special::-moz-placeholder {
    color: #90caf9;
    font-size: 12px;
    opacity: 1;
}

.plate-input-special:-ms-input-placeholder {
    color: #90caf9;
    font-size: 12px;
    opacity: 1;
}

#plate-char-7 {
    background-color: #e8f5e8 !important;
    border-color: #2e8b57 !important;
    color: #2e8b57 !important;
}

.new-energy-tag {
    width: 50px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #e8f4fd;
    color: #007aff;
    font-size: 12px;
    font-weight: bold;
    border-radius: 0 4px 4px 0;
    border: 1px solid #ddd;
    border-left: none;
}

.new-energy-checkbox {
    position: absolute;
    right: 16px;
    top: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    color: #666;
}

/* 键盘样式 */
.keyboard {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
    display: none;
}

.keyboard.active {
    display: block;
}

.keyboard-row {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.keyboard-btn {
    flex: 1;
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 45px;
}

/* 禁用的按键样式 */
.keyboard-btn.disabled {
    background-color: #e0e0e0;
    color: #a0a0a0;
    cursor: not-allowed;
    opacity: 0.6;
}

.keyboard-btn:hover {
    background-color: #ffecec;
    border-color: #ff6b6b;
}

.keyboard-btn:active {
    transform: scale(0.95);
}

.keyboard-btn.province {
    background-color: #fff3e0;
}

.keyboard-btn.function {
    background-color: #f0f0f0;
    color: #666;
    min-width: 70px;
}

.keyboard-btn.confirm-btn {
    background-color: #ff6b6b;
    color: white;
    min-width: 100px;
}

.keyboard-btn.confirm-btn:hover {
    background-color: #ff5252;
}

/* 单选按钮组样式 */
.radio-group {
  display: flex;
  flex-wrap: nowrap;
  border: 1px solid #ddd;
  border-radius: 20px;
  padding: 2px;
  margin-top: 8px;
  overflow: hidden;
  width: fit-content;
}

.radio-group label {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  padding: 8px 16px;
  border-radius: 18px;
  transition: all 0.3s ease;
  position: relative;
  overflow: visible;
  white-space: nowrap;
}

.radio-group input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.radio-group input[type="radio"]:checked + span {
  color: #1890ff;
}

.radio-group input[type="radio"]:checked + span::before {
  content: '✓';
  position: absolute;
  left: 12px;
  font-size: 12px;
  font-weight: bold;
}

.radio-group input[type="radio"]:checked + span::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  right: 2px;
  bottom: 2px;
  background-color: #e6f7ff;
  border-radius: 16px;
  z-index: -1;
}

/* 协议勾选样式 */
.agreement {
    margin-top: 25px;
}

.agreement label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-weight: normal;
    font-size: 14px;
    color: #666;
}

.agreement input[type="checkbox"] {
    margin-top: 2px;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* 提交按钮样式 */
.submit-button {
    width: 100%;
    padding: 15px;
    font-size: 18px;
    font-weight: bold;
    color: white;
    background-color: #ff6b6b;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 30px;
}

.submit-button:hover {
    background-color: #ff5252;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 107, 107, 0.3);
}

.submit-button:active {
    transform: translateY(0);
}

/* 产品信息样式 */
.product-info {
    padding: 20px;
    background-color: #fafafa;
    border-top: 1px solid #eee;
}

.product-info h3 {
    font-size: 18px;
    color: #ff6b6b;
    margin-bottom: 10px;
    margin-top: 20px;
}

.product-info h3:first-child {
    margin-top: 0;
}

.product-info p {
    color: #666;
    margin-bottom: 15px;
    line-height: 1.8;
}

.product-info ul {
    list-style: none;
    margin-bottom: 15px;
}

.product-info li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 8px;
    color: #666;
}

.product-info li:before {
    content: "•";
    color: #ff6b6b;
    position: absolute;
    left: 5px;
}

/* 流程步骤样式 */
.process-steps {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 20px 0;
    flex-wrap: nowrap; /* 确保不换行 */
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 5px 0;
}

/* 隐藏滚动条但保持滚动功能 */
.process-steps::-webkit-scrollbar {
    display: none;
}

.step {
    background-color: #ffecec;
    color: #ff6b6b;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    flex: 1;
    min-width: 70px;
    white-space: nowrap;
    flex-shrink: 0;
}

.arrow {
    color: #ccc;
    font-size: 14px;
    margin: 0 2px;
    flex-shrink: 0;
    min-width: 15px;
}

/* 手机端响应式调整 */
@media (max-width: 768px) {
    .process-steps {
        margin: 15px 0;
    }
    
    .step {
        padding: 5px 8px;
        font-size: 12px;
        min-width: 60px;
    }
    
    .arrow {
        font-size: 12px;
        margin: 0 1px;
        min-width: 10px;
    }
}

/* 小屏幕手机额外调整 */
@media (max-width: 480px) {
    .step {
        padding: 4px 6px;
        min-width: 55px;
        font-size: 11px;
    }
    
    .arrow {
        font-size: 10px;
    }
}

/* 手机端响应式样式，确保在小屏幕上也是横向显示 */
@media (max-width: 768px) {
    .process-steps {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 10px;
    }
    
    .step {
        font-size: 12px;
        padding: 6px 10px;
        min-width: 70px;
    }
    
    .arrow {
        font-size: 16px;
        margin: 0 3px;
    }
}

/* 合作机构样式 */
.partner-logos {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 10px;
}

.partner-logos span {
    padding: 8px 16px;
    background-color: #fff;
    border: 1px solid #eee;
    border-radius: 20px;
    font-size: 14px;
    color: #666;
}

/* 声明样式 */
.disclaimer {
    padding: 20px;
    background-color: #fff;
    border-top: 1px solid #eee;
}

.disclaimer h4 {
    color: #ff6b6b;
    margin-bottom: 15px;
    font-size: 16px;
}

.disclaimer ul {
    list-style: none;
}

.disclaimer li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 10px;
    font-size: 14px;
    color: #666;
    line-height: 1.7;
}

.disclaimer li:before {
    content: "•";
    color: #ff6b6b;
    position: absolute;
    left: 5px;
}

/* 页脚样式 */
.footer {
    background-color: #333;
    color: #fff;
    padding: 20px;
    text-align: center;
}

.footer p {
    margin-bottom: 8px;
    font-size: 14px;
    opacity: 0.8;
}

.footer p:last-child {
    margin-bottom: 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header h1 {
        font-size: 24px;
    }
    
    .license-plate-container {
        flex-direction: column;
        align-items: stretch;
        overflow-x: auto;
    }
    
    .license-plate-inputs {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        flex-wrap: nowrap;
        min-width: fit-content;
        padding-bottom: 5px;
      }
      
      /* 第二个和第三个输入框之间的分隔符 */
      .license-plate-inputs .plate-space:nth-child(4) {
        width: 18px;
        height: 18px;
        display: flex;
        align-items: center;
        justify-content: center;
      }
      
      .license-plate-inputs .plate-space:nth-child(4)::before {
        content: '・';
        font-size: 18px;
        color: #333;
      }
    
    .plate-input {
      width: 34px;
      height: 34px;
      font-size: 17px;
      text-align: center;
      padding: 0 !important;
      line-height: 34px;
      letter-spacing: 0;
      display: inline-block;
      background-color: #fff;
      border: 1px solid #ddd;
      border-radius: 0;
      margin: 0;
      overflow: hidden;
    }
    
    .plate-space {
        width: 4px;
        height: 30px;
    }
    
    .new-energy-checkbox {
        justify-content: center;
    }
    
    .radio-group {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        border: 1px solid #d9d9d9;
        border-radius: 20px;
        padding: 2px;
        overflow: hidden;
        width: 100%;
        justify-content: space-between;
        gap: 0;
        box-sizing: border-box;
    }
    
    .radio-group label {
        flex: 1;
        min-width: 0;
        text-align: center;
        padding: 8px 4px;
        font-size: 14px;
        box-sizing: border-box;
    }
    
    /* 确保响应式断点中也没有√标记 */
    .radio-group input[type="radio"]:checked + span::before,
    .radio-group input[type="radio"]:checked + span::after {
        content: none !important;
    }
    
    .process-steps {
        display: flex; /* 明确设置display:flex */
        flex-direction: row; /* 强制横向布局 */
        justify-content: space-between;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        width: 100%;
    }
    
    .arrow {
        transform: none; /* 保持横向箭头 */
        margin: 0 2px;
    }
    
    .step {
        width: auto;
        min-width: 60px;
        padding: 5px 8px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 20px 15px;
    }
    
    .header h1 {
        font-size: 20px;
    }
    
    .application-form,
    .product-info,
    .disclaimer {
        padding: 15px;
    }
    
    /* 微信浏览器专用样式 - 申请流程 */
    .process-steps {
        display: -webkit-flex !important;
        display: flex !important;
        -webkit-flex-direction: row !important;
        flex-direction: row !important;
        -webkit-justify-content: space-between;
        justify-content: space-between;
        width: 100% !important;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
    }
    
    .arrow {
        display: inline-block;
        -webkit-transform: none !important;
        transform: none !important;
        margin: 0 4px;
    }
    
    .step {
        display: inline-block;
        width: auto;
        min-width: 60px;
        padding: 5px 8px;
        font-size: 12px;
        white-space: nowrap;
    }
    
    /* 微信浏览器专用样式 - 车辆状态选择器 */
    .radio-group {
        display: -webkit-flex !important;
        display: flex !important;
        -webkit-flex-direction: row !important;
        flex-direction: row !important;
        -webkit-flex-wrap: nowrap !important;
        flex-wrap: nowrap !important;
        -webkit-justify-content: space-between !important;
        justify-content: space-between !important;
        width: 100% !important;
        border-radius: 16px;
        padding: 1px;
    }
    
    .radio-group label {
        -webkit-flex: 1;
        flex: 1;
        min-width: 0;
        text-align: center;
        padding: 6px 2px;
        font-size: 12px;
        -webkit-box-sizing: border-box;
        box-sizing: border-box;
    }
    
    .keyboard-btn {
        padding: 8px;
        font-size: 14px;
        min-width: 35px;
    }
    
    /* 小屏幕手机上的车辆状态选择器优化 */
    .radio-group {
        border-radius: 16px;
        padding: 1px;
    }
    
    .radio-group label {
        padding: 6px 2px;
        font-size: 12px;
    }
    
    .license-plate-inputs {
        display: flex;
        align-items: center;
      }
      
      /* 第二个和第三个输入框之间的分隔符 */
      .license-plate-inputs .plate-space:nth-child(4) {
        width: 16px;
        height: 16px;
        display: flex;
        align-items: center;
        justify-content: center;
      }
      
      .license-plate-inputs .plate-space:nth-child(4)::before {
        content: '・';
        font-size: 16px;
        color: #333;
      }
    
    .plate-input {
      width: 30px;
      height: 30px;
      font-size: 16px;
      text-align: center;
      padding: 0 !important;
      line-height: 30px;
      letter-spacing: 0;
      display: inline-block;
      background-color: #fff;
      border: 1px solid #ddd;
      border-radius: 0;
      margin: 0;
      overflow: hidden;
    }
    
    .submit-button {
        padding: 12px;
        font-size: 16px;
    }
}