* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', sans-serif;
    letter-spacing: 0.5px;
}

body {
    background: #f1f5f9;
    padding: 20px;
    min-height: 100vh;
    line-height: 1.5;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
}

.header {
    text-align: center;
    margin-bottom: 30px;
    color: #0f172a;
}
.header h1 {
    font-size: 2rem;
    font-weight: 800;
    color: #1e3a8a;
    margin-bottom: 5px;
}
.en-title {
    font-size: 1.8rem;
    color: #475569;
    font-weight: 500;
    margin-left: 8px;
}
.header .subtitle {
    color: #64748b;
    font-size: 0.9rem;
}

.panel {
    background: white;
    border-radius: 20px;
    padding: 22px 26px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.04);
    margin-bottom: 24px;
}

.row {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: end;
    justify-content: flex-start;
    margin-bottom: 18px;
}
.row-second {
    align-items: center;
    margin-bottom: 0;
    margin-top: 10px;
}

.form-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 140px;
    flex: 1;
    /* [NEW] 下拉框区域更紧凑 */
    max-width: 180px;
}
.label-wrap {
    display: flex;
    justify-content: flex-start;
    align-items: baseline;
    gap: 6px;
    width: 100%;
}
.form-item .label-cn {
    font-weight: 600;
    font-size: 0.85rem;
    color: #1e293b;
}
.form-item .label-en {
    font-size: 0.78rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.id-input-wrapper {
    flex: 3;
    min-width: 320px;
    max-width: none;
}
.id-input-group {
    display: flex;
    gap: 8px;
    align-items: center;
    width: 100%;
    flex-wrap: wrap;
}
/* [NEW] 身份证输入框加宽 */
.id-input-group input {
    flex: 1;
    min-width: 180px;
    max-width: 360px;
    padding: 8px 12px;
    font-size: 0.95rem;
}
.id-input-group select {
    padding: 8px 10px;
    font-size: 0.9rem;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #f8fafc;
    outline: none;
    transition: 0.2s;
    width: auto;
    min-width: 70px;
}
.id-input-group select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.15);
}
.id-input-group button {
    padding: 8px 18px;
    font-size: 0.9rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-generate-wrapper {
    flex: none;
    min-width: auto;
    max-width: none;
    display: flex;
    gap: 10px;
}

select, input {
    padding: 8px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font-size: 0.95rem;
    background: #f8fafc;
    outline: none;
    transition: 0.2s;
    width: 100%;
}
select:focus, input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.15);
}

.btn {
    padding: 8px 22px;
    border: none;
    border-radius: 40px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    white-space: nowrap;
    color: #fff;
    background: #2c3e50;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}
.btn:hover {
    background: #1e2b38;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    transform: translateY(-1px);
}
.btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.card {
    background: white;
    border-radius: 20px;
    padding: 28px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.04);
    margin-bottom: 24px;
}
.card-title-cn {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 5px;
}
.card-title-en {
    font-size: 0.8rem;
    color: #64748b;
    margin-bottom: 15px;
    margin-left: 4px;
}

.name-block {
    text-align: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #f1f5f9;
}
.name-cn { 
    font-size: 2.2rem; 
    font-weight: 800; 
    color: #0f172a; 
    letter-spacing: 2px;
    margin-bottom: 8px;
}
.name-en { 
    font-size: 1rem; 
    color: #64748b; 
    font-weight: 500; 
    font-style: italic;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}
.info-item {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.95rem;
    padding: 10px 8px;
    border-bottom: 1px dashed #e2e8f0;
}
.info-label-group {
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    min-width: 85px;
}
.info-item .label-cn {
    font-weight: 600;
    font-size: 0.9rem;
    color: #1e293b;
    margin-bottom: 2px;
}
.info-item .label-en {
    font-size: 0.73rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.info-item .value {
    color: #334155; 
    word-break: break-word; 
    font-size: 1rem;
    padding-left: 4px;
    flex: 1;
}

.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #1e293b;
    color: white;
    padding: 12px 28px;
    border-radius: 40px;
    font-weight: 600;
    z-index: 1000;
    opacity: 0;
    transition: 0.3s ease;
    pointer-events: none;
    font-size: 0.95rem;
}
.toast.show { 
    transform: translateX(-50%) translateY(0); 
    opacity: 1; 
}

@media (max-width: 768px) {
    .info-grid { 
        grid-template-columns: 1fr; 
        gap: 15px;
    }
    .panel { 
        padding: 20px; 
    }
    .row, .row-second {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    .form-item {
        max-width: 100%;
    }
    .id-input-wrapper {
        min-width: 100%;
    }
    .id-input-group {
        flex-wrap: wrap;
    }
    .id-input-group input {
        max-width: 100%;
    }
    .id-input-group select {
        width: 100%;
    }
    .id-input-group button {
        width: 100%;
        margin-top: 8px;
    }
    .btn-generate-wrapper {
        width: 100%;
        justify-content: center;
    }
    .header h1 { 
        font-size: 1.8rem; 
    }
    .name-cn { 
        font-size: 1.8rem; 
    }
    .label-wrap {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }
    .info-item {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .card { 
        padding: 20px; 
    }
    .info-item { 
        padding: 8px 4px; 
    }
    .btn-generate-wrapper {
        flex-direction: column;
        gap: 8px;
    }
    .btn {
        width: 100%;
    }
}
