body {
    font-family: Arial, sans-serif;
    background-color: #f5f5f5;
    margin: 0;
    padding: 0;
    /* 防止移动设备按住并拖动文本 */
    -webkit-touch-callout: none;
    /* 防止选中文本 */
    -webkit-user-select: none;
    user-select: none;

    -webkit-tap-highlight-color: transparent;
}

.container {
    max-width: 800px;
    margin: 20px auto;
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

h1 {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
}

h2 {
    color: #555;
    border-bottom: 2px solid #007bff;
    padding-bottom: 10px;
    margin-top: 0;
}

h3 {
    color: #666;
    margin-top: 20px;
}

.form-section {
    margin-bottom: 30px;
}



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

label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #555;
}

input[type="text"],
input[type="number"] {
    width: 100%;
    padding: 3px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 24px;
    box-sizing: border-box;
    transition: border-color 0.3s;
    /* 防止移动设备自动缩放 */
    -webkit-user-scalable: no;
    user-scalable: no;
}

input[type="text"]:focus{
    padding: 3px;
}
input[type="number"]:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.3);
}

/* 车牌号输入框样式 */
.plate-input-container {
    display: flex;
    gap: 2px;
    margin: 10px 0;
    flex-wrap: nowrap;
    align-items: flex-start;
    justify-content: center;
}

.plate-char-input {
    flex: 0 0 auto;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 38px;
    min-width: 38px;
}



.plate-char-input.new-energy {
    opacity: 1;
}

.plate-char-input.new-energy .plate-char {
    background-color: #e8f5e9;
    border-color: #4caf50;
    color: #2e7d32;
    font-weight: bold;
}

.plate-char-input.new-energy .plate-char[readonly] {
    cursor: pointer;
    opacity: 0.9;
}

.plate-char-input.new-energy .plate-char:not([readonly]):focus {
    background-color: #c8e6c9;
    border-color: #388e3c;
}

.plate-char-input.new-energy .input-label {
    color: #4caf50;
    font-weight: bold;
}

.input-label {
    font-size: 10px;
    color: #999;
    margin-top: 2px;
    text-align: center;
    min-height: 12px;
}

.plate-char {
    width: 30px;
    height: 40px;
    padding: 0;
    font-size: 24px;
    font-weight: bold;
    text-align: center;
    text-transform: uppercase;
    border: 2px solid #ddd;
    border-radius: 3px;
    box-sizing: border-box;
    transition: all 0.3s ease;
    line-height: 40px;
    /* 防止系统键盘弹出 */
    -webkit-appearance: none;
    appearance: none;
    /* iOS Safari 固定缩放 */
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

.plate-char:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 8px rgba(0, 123, 255, 0.4);
    background-color: #f0f8ff;
    font-size: 24px;
    /* 防止移动设备上体缩放 */
    -webkit-text-size-adjust: 100%;
}

.plate-char.filled {
    border-color: #28a745;
    background-color: #f0fff4;
    font-size: 24px;
}

.plate-char.error {
    border-color: #dc3545;
    background-color: #fff5f5;
}

small {
    display: block;
    color: #999;
    font-size: 12px;
    margin-top: 5px;
}

.btn {
    padding: 10px 20px;
    background-color: #6c757d;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-right: 10px;
}

.btn:hover {
    background-color: #5a6268;
}

.btn-primary {
    background-color: #007bff;
    flex: 1;
}

.btn-primary:hover {
    background-color: #0056b3;
}

.btn-secondary {
    background-color: #6c757d;
    flex: 1;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

.button-group {
    display: flex;
    gap: 10px;
    margin: 20px 0;
}

.button-group .btn {
    flex: 1;
    margin: 0;
}



/* Toast 模态框 */
.toast-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.toast-modal.show {
    opacity: 1;
    pointer-events: auto;
}

.toast-content {
    background-color: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    max-width: 90%;
    text-align: center;
    position: relative;
    animation: slideUp 0.3s ease;
}

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

.toast-message {
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    word-break: break-word;
}

.toast-close {
    position: absolute;
    top: 10px;
    right: 15px;
    width: 30px;
    height: 30px;
    border: none;
    background-color: transparent;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.2s ease;
}

.toast-close:hover {
    color: #333;
}

/* success 类型 Toast */
.toast-modal.success .toast-content {
    border-left: 4px solid #28a745;
}

.toast-modal.success .toast-message {
    color: #155724;
}

/* error 类型 Toast */
.toast-modal.error .toast-content {
    border-left: 4px solid #dc3545;
}

.toast-modal.error .toast-message {
    color: #721c24;
}

/* info 类型 Toast */
.toast-modal.info .toast-content {
    border-left: 4px solid #17a2b8;
}

.toast-modal.info .toast-message {
    color: #0c5460;
}



.required {
    color: #dc3545;
}



/* 车牌展示 */


/* 软键盘容器 */
.softkeyboard-container {
    margin-top: 20px;
    padding: 15px;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 6px;
    min-height: 50px;
}

.frequent-plates-container:not(:empty) ~ .softkeyboard-container {
    margin-top: 20px;
}

.frequent-plates-container:empty ~ .softkeyboard-container {
    margin-top: 20px;
}

/* 常用车牌容器 */
.frequent-plates-container {
    margin-top: 15px;
    padding: 12px;
    background-color: #f0f8ff;
    border: 1px solid #b3d9ff;
    border-radius: 6px;
    min-height: 0;
}

.frequent-plates-container:empty {
    margin-top: 0;
    padding: 0;
    background-color: transparent;
    border: none;
}

.frequent-plates-title {
    font-size: 13px;
    font-weight: bold;
    color: #0066cc;
    margin-bottom: 8px;
}

.frequent-plates-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.frequent-plate-btn {
    padding: 0;
    min-width: 90px;
    height: 38px;
    text-align: center;
    line-height: 38px;
    background-color: white;
    border: 2px solid #0066cc;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    color: #0066cc;
    transition: all 0.2s ease;
    user-select: none;
    flex-shrink: 0;
    -webkit-appearance: none;
    appearance: none;
    -webkit-tap-highlight-color: transparent;
    -webkit-user-select: none;
}

/* 7位车牌 - 蓝色底色 */
.frequent-plate-btn.plate-7 {
    background-color: #0066cc;
    color: white;
    border-color: #0052a3;
}

.frequent-plate-btn.plate-7:hover {
    background-color: #0052a3;
    border-color: #003d7a;
    box-shadow: 0 2px 6px rgba(0, 102, 204, 0.4);
}

.frequent-plate-btn.plate-7:active {
    background-color: #003d7a;
    color: white;
    border-color: #002a52;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* 8位车牌 - 绿色底色 */
.frequent-plate-btn.plate-8 {
    background-color: #4caf50;
    color: white;
    border-color: #388e3c;
}

.frequent-plate-btn.plate-8:hover {
    background-color: #388e3c;
    border-color: #2e7d32;
    box-shadow: 0 2px 6px rgba(76, 175, 80, 0.4);
}

.frequent-plate-btn.plate-8:active {
    background-color: #2e7d32;
    color: white;
    border-color: #1b5e20;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
}

.frequent-plate-btn:hover {
    background-color: #e6f2ff;
    border-color: #0052a3;
    box-shadow: 0 2px 6px rgba(0, 102, 204, 0.2);
}

.frequent-plate-btn:active {
    background-color: #0066cc;
    color: white;
    border-color: #0052a3;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2);
}

.softkeyboard-title {
    font-size: 14px;
    font-weight: bold;
    color: #555;
    margin-bottom: 10px;
}

.softkeyboard-keys {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 6px;
}

.softkeyboard-keys:last-of-type {
    margin-bottom: 0;
}

.softkeyboard-key {
    padding: 0;
    width: 37px;
    height: 40px;
    text-align: center;
    line-height: 40px;
    background-color: white;
    border: 1px solid #bbb;
    border-radius: 4px;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    color: #333;
    transition: all 0.2s ease;
    user-select: none;
    flex-shrink: 0;
    /* 防止移动设备获得焦点 */
    -webkit-appearance: none;
    appearance: none;
    /* 禁止默认的点击范围效应 */
    -webkit-tap-highlight-color: transparent;
    /* 保证文本不被选中 */
    -webkit-user-select: none;
}

.softkeyboard-key:hover {
    background-color: #e8f4f8;
    border-color: #007bff;
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.2);
}

.softkeyboard-key:active {
    background-color: #007bff;
    color: white;
    border-color: #0056b3;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2);
}

.softkeyboard-key:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #f5f5f5;
}

/* 成功页面样式 */
.success-page {
    text-align: center;
    animation: fadeIn 0.5s ease;
}

.success-page.show-animation {
    animation: slideInAndGrow 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideInAndGrow {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.success-icon {
    margin: 20px 0;
    color: #28a745;
    display: flex;
    justify-content: center;
    animation: bounceIn 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.success-icon svg {
    stroke: #28a745;
    filter: drop-shadow(0 2px 4px rgba(40, 167, 69, 0.2));
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.success-page h1 {
    color: #28a745;
    font-size: 32px;
    margin-bottom: 10px;
    margin-top: 0;
}

.success-page h2 {
    color: #333;
    border-bottom: none;
    margin-top: 0;
    margin-bottom: 5px;
}

.success-plate-display {
    margin: 25px 0;
    display: none;
}

.plate-display-content {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.plate-number {
    display: inline-block;
    padding: 12px 20px;
    border: 3px solid #333;
    border-radius: 4px;
    font-size: 28px;
    font-weight: bold;
    letter-spacing: 2px;
    color: #fff;
    font-family: 'Arial Black', sans-serif;
    min-width: 280px;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* 传统车牌 */
.plate-number.traditional {
    background-color: #0066cc;
    color: #fff;
}

/* 新能源车牌 */
.plate-number.new-energy {
    background: linear-gradient(to right, #66bb6a 0%, #4caf50 50%, #2e7d32 100%);
    color: #fff;
}

.plate-label {
    display: inline-block;
    background-color: #4caf50;
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}

.success-content {
    margin: 30px 0;
}

.success-message {
    margin-bottom: 25px;
    padding: 15px;
    background-color: #f0fff4;
    border-radius: 8px;
    border-left: 4px solid #28a745;
}

.success-message p {
    margin: 5px 0 0 0;
    color: #666;
    font-size: 14px;
    line-height: 1.6;
}

.success-info-box {
    margin: 25px 0;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #e8e8e8;
    text-align: left;
    transition: all 0.3s ease;
}

.info-item:hover {
    background-color: #f0f8ff;
    border-color: #007bff;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.1);
}

.info-item:last-child {
    margin-bottom: 0;
}

.info-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 24px;
    font-weight: bold;
}

.info-item:nth-child(1) .info-icon {
    background-color: #d4edda;
    color: #155724;
}

.info-item:nth-child(2) .info-icon {
    background-color: #fff3cd;
    color: #856404;
}

.info-item:nth-child(3) .info-icon {
    background-color: #d1ecf1;
    color: #0c5460;
}

.info-text {
    flex: 1;
}

.info-text strong {
    display: block;
    margin-bottom: 5px;
    color: #333;
    font-size: 16px;
}

.info-text p {
    margin: 0;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

.success-button-group {
    display: flex;
    gap: 10px;
    margin-top: 30px;
    justify-content: center;
}

.success-button-group .btn {
    min-width: 150px;
}

.success-button-group .btn-primary {
    background-color: #28a745;
    font-size: 16px;
    padding: 12px 30px;
    flex: none;
}

.success-button-group .btn-primary:hover {
    background-color: #218838;
}