/* 身份证号码生成器专用样式 */

/* Tab 切换按钮 */
.tab-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    border-bottom: 2px solid #e9ecef;
}

.tab-btn {
    padding: 12px 30px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    color: #6c757d;
    transition: all 0.3s;
}

.tab-btn:hover {
    color: #007bff;
}

.tab-btn.active {
    color: #007bff;
    border-bottom-color: #007bff;
}

/* Tab 内容 */
.tab-content {
    animation: fadeIn 0.3s;
}

.tab-content.hidden {
    display: none;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 生成表单 */
.generate-form {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 25px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-row:last-child {
    margin-bottom: 0;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

.form-group select,
.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="date"] {
    padding: 10px 12px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group select:focus,
.form-group input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

/* 单选框组 */
.radio-group {
    display: flex;
    gap: 15px;
    align-items: center;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    font-weight: normal;
}

.radio-label input[type="radio"] {
    cursor: pointer;
}

/* 日期范围 */
.date-range {
    display: flex;
    align-items: center;
    gap: 10px;
}

.date-range input {
    flex: 1;
}

.date-range span {
    color: #6c757d;
}

/* 数量输入框 */
.count-input {
    width: 150px;
}

/* 按钮 */
.btn-generate,
.btn-validate {
    padding: 12px 40px;
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.btn-generate:hover,
.btn-validate:hover {
    background: linear-gradient(135deg, #0056b3, #004085);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 123, 255, 0.4);
}

.btn-generate:active,
.btn-validate:active {
    transform: translateY(0);
}

/* 生成结果 */
.results {
    margin-top: 25px;
}

.results h3 {
    font-size: 18px;
    color: #333;
    margin-bottom: 15px;
}

.result-list {
    display: grid;
    gap: 10px;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    transition: all 0.3s;
}

.result-item:hover {
    border-color: #007bff;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.1);
    transform: translateX(5px);
}

.id-number {
    font-size: 16px;
    font-weight: 500;
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
    color: #333;
}

.btn-copy,
.btn-copy-small {
    padding: 8px 16px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.btn-copy:hover,
.btn-copy-small:hover {
    background: #218838;
    transform: scale(1.05);
}

.btn-copy-small {
    padding: 6px 12px;
    font-size: 12px;
}

/* 历史记录 */
.history-section {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.history-header h3 {
    font-size: 16px;
    color: #333;
    margin: 0;
}

.btn-clear {
    padding: 6px 16px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s;
}

.btn-clear:hover {
    background: #c82333;
}

.history-list {
    display: grid;
    gap: 8px;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    transition: all 0.3s;
}

.history-item:hover {
    border-color: #007bff;
    box-shadow: 0 2px 6px rgba(0, 123, 255, 0.1);
}

.history-id {
    font-size: 14px;
    font-family: 'Courier New', monospace;
    letter-spacing: 0.5px;
    color: #555;
}

.history-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.history-time {
    font-size: 12px;
    color: #999;
}

/* 验证表单 */
.validate-form {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 25px;
}

.validate-form .form-group {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 15px;
}

.validate-form label {
    font-weight: 500;
    color: #333;
    white-space: nowrap;
}

.id-input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 16px;
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
}

.id-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

/* 验证结果 */
.validate-result {
    margin-top: 25px;
}

.validate-success,
.validate-error {
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    animation: slideIn 0.4s;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.validate-success {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    border: 1px solid #28a745;
}

.validate-error {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    border: 1px solid #dc3545;
}

.validate-success i {
    font-size: 48px;
    color: #28a745;
    margin-bottom: 15px;
}

.validate-error i {
    font-size: 48px;
    color: #dc3545;
    margin-bottom: 15px;
}

.validate-success h3,
.validate-error h3 {
    font-size: 24px;
    margin: 15px 0;
}

.validate-success h3 {
    color: #155724;
}

.validate-error h3 {
    color: #721c24;
}

.validate-error p {
    font-size: 16px;
    color: #721c24;
}

/* 信息网格 */
.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 25px;
    text-align: left;
}

.info-item {
    padding: 15px;
    background: white;
    border-radius: 8px;
    border: 1px solid rgba(40, 167, 69, 0.2);
}

.info-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    color: #155724;
    font-size: 14px;
    margin-bottom: 5px;
}

.info-value {
    font-size: 16px;
    color: #333;
    font-weight: 600;
}

/* 提示消息 Toast */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    background: #333;
    color: white;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 10000;
    max-width: 300px;
    word-wrap: break-word;
}

.toast.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.toast-success {
    background: #28a745;
}

.toast-error {
    background: #dc3545;
}

.toast-info {
    background: #17a2b8;
}

/* 空数据提示 */
.no-data {
    text-align: center;
    color: #999;
    font-size: 14px;
    padding: 20px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .tab-buttons {
        gap: 5px;
    }

    .tab-btn {
        padding: 10px 20px;
        font-size: 14px;
    }

    .generate-form,
    .validate-form {
        padding: 20px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .form-row:last-child {
        flex-direction: column;
        align-items: stretch;
    }

    .btn-generate,
    .btn-validate {
        width: 100%;
        padding: 12px;
    }

    .result-item {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }

    .btn-copy {
        width: 100%;
        justify-content: center;
    }

    .validate-form .form-group {
        flex-direction: column;
        align-items: stretch;
    }

    .validate-form label {
        text-align: left;
    }

    .info-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .history-item {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }

    .history-info {
        width: 100%;
        justify-content: space-between;
    }

    .toast {
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

@media (max-width: 480px) {
    .tab-btn {
        padding: 8px 15px;
        font-size: 13px;
    }

    .generate-form,
    .validate-form {
        padding: 15px;
    }

    .id-number {
        font-size: 14px;
        word-break: break-all;
    }

    .validate-success i,
    .validate-error i {
        font-size: 36px;
    }

    .validate-success h3,
    .validate-error h3 {
        font-size: 20px;
    }
}
