/* 车牌号归属地查询工具专用样式 */

/* 查询区域 */
.plate-search-section,
.province-section,
.history-section {
    margin-bottom: 30px;
}

.section-title {
    color: var(--text-primary);
    font-size: 1.3em;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title i {
    color: var(--primary-color);
}

/* 示例按钮 */
.example-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.example-buttons .btn {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    letter-spacing: 1px;
}

/* 车牌显示 */
.plate-display {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: white;
    padding: 20px;
    border-radius: var(--border-radius);
    text-align: center;
    margin-bottom: 20px;
    font-size: 2em;
    font-weight: bold;
    letter-spacing: 3px;
    font-family: 'Courier New', monospace;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.plate-display:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* 结果网格 */
.result-section {
    margin-bottom: 30px;
}

.result-title {
    color: var(--text-primary);
    font-size: 1.3em;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.result-title i {
    color: var(--success-color);
}

.result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.result-item {
    background: var(--surface-color);
    padding: 20px;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.result-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.result-label {
    font-weight: bold;
    color: var(--text-primary);
    margin-bottom: 12px;
    font-size: 1.1em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.result-value {
    color: var(--text-secondary);
}

.result-value p {
    margin: 8px 0;
    line-height: 1.6;
}

.result-value .highlight {
    color: var(--primary-color);
    font-weight: 600;
}

/* 可点击车牌样式 */
.clickable-plate {
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    border-radius: 4px;
    padding: 2px 6px;
    margin: -2px -6px;
    display: inline-block;
}

.clickable-plate:hover {
    background-color: rgba(66, 133, 244, 0.1);
    transform: scale(1.05);
}

.clickable-plate::after {
    content: '点击复制';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    margin-bottom: 5px;
    z-index: 1000;
}

.clickable-plate:hover::after {
    opacity: 1;
}

/* 省份网格 */
.province-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.province-item {
    background: var(--surface-color);
    padding: 16px;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.3s ease;
}

.province-item:hover {
    background: var(--background-color);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
    border-color: var(--primary-color);
}

/* 省份卡片头部 */
.province-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.province-item h4 {
    color: var(--text-primary);
    margin: 0;
    font-size: 1.1em;
}

.code-count {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.75em;
    font-weight: 600;
    white-space: nowrap;
}

/* 省份统计信息 */
.province-stats {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.stat-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #e3f2fd;
    color: #1976d2;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: 600;
}

.stat-item i {
    font-size: 0.9em;
}

.stat-item.stat-special {
    background: #fff3e0;
    color: #f57c00;
}

.stat-item.stat-additional {
    background: #f3e5f5;
    color: #7b1fa2;
}

.province-item p {
    color: var(--text-secondary);
    font-size: 0.9em;
    margin: 8px 0;
}

.province-codes {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.province-code {
    background: var(--primary-color);
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.85em;
    font-weight: bold;
    font-family: 'Courier New', monospace;
    transition: all 0.2s ease;
    cursor: help;
}

.province-code:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* 不同类型的代码标识 */
.province-code.code-ev {
    background: linear-gradient(135deg, #43a047 0%, #66bb6a 100%);
}

.province-code.code-special {
    background: linear-gradient(135deg, #fb8c00 0%, #ffa726 100%);
}

.province-code.code-additional {
    background: linear-gradient(135deg, #8e24aa 0%, #ab47bc 100%);
}

.province-code.code-more {
    background: linear-gradient(135deg, #5c6bc0 0%, #7986cb 100%);
}

/* 查询历史 */
.history-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.history-item {
    background: var(--surface-color);
    padding: 15px;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.history-item:hover {
    background: var(--background-color);
    transform: translateX(3px);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.history-item-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.history-item-plate {
    font-weight: bold;
    color: var(--text-primary);
    font-size: 1.1em;
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
}

.history-item-location {
    color: var(--text-secondary);
    font-size: 0.9em;
}

.history-item-time {
    color: var(--text-secondary);
    font-size: 0.85em;
}

.empty-state {
    text-align: center;
    color: var(--text-secondary);
    padding: 40px;
    font-style: italic;
}

/* 按钮增强效果 */
.btn-primary {
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease;
}

.btn-primary:active::after {
    width: 200px;
    height: 200px;
}

/* 输入框增强 */
#plateInput {
    transition: all 0.2s ease;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    letter-spacing: 1px;
    font-size: 1.1em;
}

#plateInput:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.1);
    transform: translateY(-1px);
}

/* 查询结果中的类型标签 */
.type-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75em;
    font-weight: 600;
    margin-left: 6px;
    white-space: nowrap;
}

.type-badge.type-city {
    background: #e3f2fd;
    color: #1976d2;
}

.type-badge.type-county {
    background: #f3e5f5;
    color: #7b1fa2;
}

.type-badge.type-prefecture {
    background: #fff3e0;
    color: #f57c00;
}

.type-badge.type-special {
    background: #ffebee;
    color: #c62828;
}

.type-badge.type-additional {
    background: #e8f5e9;
    color: #2e7d32;
}

/* 新能源车牌支持标识 */
.ev-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.9em;
    font-weight: 600;
    margin-top: 8px;
}

.ev-badge i {
    font-size: 1.1em;
}

.ev-badge.ev-support {
    background: linear-gradient(135deg, #43a047 0%, #66bb6a 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(67, 160, 71, 0.3);
}

.ev-badge.ev-not-support {
    background: #f5f5f5;
    color: #757575;
    border: 1px solid #e0e0e0;
}

/* 特殊说明高亮 */
.highlight-special {
    color: #f57c00;
    font-weight: 600;
    background: #fff3e0;
    padding: 2px 6px;
    border-radius: 4px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .province-grid {
        grid-template-columns: 1fr;
    }

    .result-grid {
        grid-template-columns: 1fr;
    }

    .plate-display {
        font-size: 1.5em;
        letter-spacing: 2px;
        padding: 15px;
    }

    .example-buttons {
        flex-direction: column;
    }

    .example-buttons .btn {
        width: 100%;
    }

    .history-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .history-item-time {
        align-self: flex-end;
    }
}

@media (max-width: 480px) {
    .section-title {
        font-size: 1.1em;
    }

    .result-title {
        font-size: 1.1em;
    }

    .plate-display {
        font-size: 1.3em;
        letter-spacing: 1px;
    }

    #plateInput {
        font-size: 1em;
    }
}
